@inkeep/agents-ui-js 0.0.0-dev-20260528172136 → 0.0.0-dev-20260528193213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embed.js +1 -1
- package/package.json +2 -2
package/dist/embed.js
CHANGED
|
@@ -67,7 +67,7 @@ var NV={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 MG={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 FG({iconKey:e,...t}){var n;const r=MG[e],a=r?{builtIn:r}:{custom:""},{baseSettings:o}=rR(),i=(null==(n=o.customIcons)?void 0:n[e])||a;return rg.jsx(DG,{"data-icon":e,iconSettings:i,...t})}const jG=X.createContext(void 0),zG=({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 rg.jsx(jG.Provider,{value:o,children:e})},BG=()=>{const e=X.useContext(jG);if(!e)throw new Error("useImagePreview must be used within an ImagePreviewProvider");return e},HG=X.createContext(void 0),UG=({children:e,message:t})=>rg.jsx(HG.Provider,{value:{message:t},children:e}),$G=()=>{const e=X.useContext(HG);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e};var VG=(e,t=[])=>({parts:(...n)=>{if(qG(t))return VG(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>VG(e,[...t,...n]),omit:(...n)=>VG(e,t.filter((e=>!n.includes(e)))),rename:e=>VG(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${GG(e)}"][data-part="${GG(n)}"]`,`& [data-scope="${GG(e)}"][data-part="${GG(n)}"]`].join(", "),attrs:{"data-scope":GG(e),"data-part":GG(n)}}})),{})}),GG=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),qG=e=>0===e.length,WG=VG("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger").build(),YG=Object.defineProperty,ZG=(e,t,n)=>((e,t,n)=>t in e?YG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),KG=e=>"object"==typeof e&&null!==e,XG=e=>e?"":void 0,QG=e=>KG(e)&&1===e.nodeType&&"string"==typeof e.nodeName,JG=e=>KG(e)&&void 0!==e.nodeType,eq=e=>JG(e)&&11===e.nodeType&&"host"in e;function tq(e,t){var n;if(!e||!t)return!1;if(!QG(e)||!JG(t))return!1;if(QG(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&eq(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function nq(e){var t;return eq(e)?nq(e.host):(e=>KG(e)&&9===e.nodeType)(e)?e.defaultView??window:QG(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function rq(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 aq=(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)}},oq=class e{constructor(){ZG(this,"id",null),ZG(this,"fn_cleanup"),ZG(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 iq={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},sq=e=>e.isDirectory,lq=e=>e.isFile,cq=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),uq=(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?sq(e)?uq(e.createReader(),`${t}${e.name}`):lq(e)?new Promise((n=>{e.file((e=>{n(cq(e,t))}))})):void 0:null)).filter((e=>e));r.push(Promise.all(o)),a()}))};a()}));var dq=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 pq=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,fq=e=>null!=e;var hq=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 mq(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&&hq.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 gq=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 yq=["","kilo","mega","giga","tera"],bq=["","kilo","mega","giga","tera","peta"],vq=(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?yq:bq,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 gq(t,n).format(e)}(c?-p:p,t,{style:"unit",unit:l[d]+o,unitDisplay:i})};function kq(e){return e.reduce(((e,t)=>Array.isArray(t)?e.concat(kq(t)):e.concat(t)),[])}var xq=e=>String.fromCharCode(e+(e>25?39:97));var wq=e=>function(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=xq(t%52)+n;return xq(t%52)+n}(function(e,t){let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e}(5381,e)>>>0);function Eq(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}var _q=e=>{var t;return(null==(t=e.ids)?void 0:t.root)??`file:${e.id}`},Sq=e=>{var t;return(null==(t=e.ids)?void 0:t.dropzone)??`file:${e.id}:dropzone`},Tq=e=>{var t;return(null==(t=e.ids)?void 0:t.hiddenInput)??`file:${e.id}:input`},Cq=(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}`},Aq=e=>wq(`${e.name}-${e.size}`),Nq=e=>e.getById(Tq(e));function Iq(e){const t=rq(e);return e.dataTransfer?e.dataTransfer.types.some((e=>"Files"===e||"application/x-moz-file"===e)):!!t&&"files"in t}function Oq(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||mq(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}(e,o("acceptAttr")),[u,d]=function(e,t,n){if(fq(e.size))if(fq(t)&&fq(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(fq(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(fq(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}(e,a("minFileSize"),a("maxFileSize")),p=n.some((t=>pq(t,e)))||i.some((t=>pq(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 Rq="accepted";function Pq(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&&tq(t,n)}function Lq(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=Rq){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=>vq(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({...WG.root.attrs,dir:a("dir"),id:_q(i),"data-disabled":XG(l),"data-readonly":XG(c),"data-dragging":XG(f)}),getDropzoneProps:(e={})=>t.element({...WG.dropzone.attrs,dir:a("dir"),id:Sq(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":XG(a("invalid")),"data-disabled":XG(l),"data-readonly":XG(c),"data-dragging":XG(f),onKeyDown(t){if(l||c)return;if(t.defaultPrevented)return;const n=rq(t);tq(t.currentTarget,n)&&(Pq(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=rq(t);tq(t.currentTarget,n)&&(Pq(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(!Iq(e))return;const t=e.dataTransfer.items.length;r({type:"DROPZONE.DRAG_OVER",count:t})},onDragLeave(e){l||c||d&&(tq(e.currentTarget,e.relatedTarget)||r({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(e){if(l||c)return;d&&(e.preventDefault(),e.stopPropagation());var t,n;Iq(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(sq(t)&&n)return uq(t.createReader(),`${t.name}`);if(lq(t)&&"function"==typeof e.getAsFile){const t=e.getAsFile();return Promise.resolve(t?cq(t,""):null)}return lq(t)?new Promise((e=>{t.file((t=>{e(cq(t,""))}))})):void 0})).filter((e=>e)))).then((e=>{r({type:"DROPZONE.DROP",files:kq(e)})}))},onFocus(){l||c||r({type:"DROPZONE.FOCUS"})},onBlur(){l||c||r({type:"DROPZONE.BLUR"})}}),getTriggerProps(){return t.button({...WG.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":XG(l),"data-readonly":XG(c),"data-invalid":XG(a("invalid")),type:"button",onClick(e){l||c||(tq((e=>e.getById(Sq(e)))(i),e.currentTarget)&&e.stopPropagation(),r({type:"OPEN"}))}});var e,n},getHiddenInputProps:()=>t.input({id:Tq(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:iq}),getItemGroupProps(e={}){const{type:n=Rq}=e;return t.element({...WG.itemGroup.attrs,dir:a("dir"),"data-disabled":XG(l),"data-type":n})},getItemProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.item.attrs,dir:a("dir"),id:(o=i,s=Aq(n),(null==(u=null==(c=o.ids)?void 0:c.item)?void 0:u.call(c,s))??`file:${o.id}:item:${s}`),"data-disabled":XG(l),"data-type":r});var o,s,c,u},getItemNameProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.itemName.attrs,dir:a("dir"),id:(o=i,s=Aq(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":XG(l),"data-type":r});var o,s,c,u},getItemSizeTextProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.itemSizeText.attrs,dir:a("dir"),id:(o=i,s=Aq(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":XG(l),"data-type":r});var o,s,c,u},getItemPreviewProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.itemPreview.attrs,dir:a("dir"),id:(o=i,s=Aq(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":XG(l),"data-type":r});var o,s,c,u},getItemPreviewImageProps(e){var n;const{file:r,url:a,type:o=Rq}=e;if(!r.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...WG.itemPreviewImage.attrs,alt:null==(n=p.itemPreview)?void 0:n.call(p,r),src:a,"data-disabled":XG(l),"data-type":o})},getItemDeleteTriggerProps(e){var n;const{file:o,type:s=Rq}=e;return t.button({...WG.itemDeleteTrigger.attrs,dir:a("dir"),id:Cq(i,Aq(o)),type:"button",disabled:l||c,"data-disabled":XG(l),"data-readonly":XG(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({...WG.label.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.label)??`file:${e.id}:label`),htmlFor:Tq(i),"data-disabled":XG(l),"data-required":XG(u)});var e,n},getClearTriggerProps:()=>t.button({...WG.clearTrigger.attrs,dir:a("dir"),type:"button",disabled:l||c,hidden:0===m.length,"data-disabled":XG(l),"data-readonly":XG(c),onClick(e){e.defaultPrevented||l||c||r({type:"FILES.CLEAR"})}})}}var Dq=new WeakMap,Mq=new WeakMap;function Fq(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&Eq(`[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||Eq(`[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 jq,zq=(jq={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)=>pq(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)=>pq(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(dq).join(","):Object.entries(e).reduce(((e,[t,n])=>[...e,t,...n]),[]).filter(dq).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)}))})(aq(n,"dragover",(e=>{null==e||e.preventDefault()}),!1),aq(n,"drop",(e=>{var n;tq((n=t).getById(_q(n)),rq(e))||e.preventDefault()}),!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask((()=>{const n=Nq(e);if(!n)return;!function(e,t){const n=nq(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=oq.create();t.request(e),t.cleanup}((()=>{var t;null==(t=Nq(e))||t.click()}))},setFiles(e){const{computed:t,context:n,event:r}=e,{acceptedFiles:a,rejectedFiles:o}=Oq(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}=Oq(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=>!pq(e.file,t.file)));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter((e=>!pq(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=Dq.get(e);if(t)return t;const{index:n,idIndex:r}=Fq(e);Dq.set(e,n),Mq.set(e,r)}(jq),jq);var Bq=(e,...t)=>e.filter((e=>!t.includes(e))),Hq=(e,t)=>((e,t)=>-1!==e.indexOf(t))(e,t)?Bq(e,t):((e,...t)=>e.concat(t))(e,t),Uq=e=>"Array"===(null==e?void 0:e.constructor.name),$q=(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(Uq(e)&&Uq(t))return((e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!$q(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(!$q(e[r],t[r]))return!1}return!0},Vq=e=>null!=e&&"object"==typeof e,Gq=e=>Vq(e)&&!(e=>Array.isArray(e))(e),qq=e=>"function"==typeof e,Wq=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Yq=Function.prototype.toString,Zq=Yq.call(Object),Kq=e=>{if(!Vq(e)||"[object Object]"!=(e=>Object.prototype.toString.call(e))(e)||Xq(e))return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;const n=Wq(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Yq.call(n)==Zq},Xq=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),Qq=e=>e(),Jq=()=>{},eW=(...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))};function tW(e,t,...n){var r;if(e in t){const r=t[e];return qq(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,tW),a}function nW(e){if(!Kq(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]=nW(t))}return n}function rW(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function aW(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function oW(e,t){if(null==e)throw new Error(t())}var iW=".",sW=new WeakMap,lW=new WeakMap;function cW(e){return e.join(iW)}function uW(e){return e.startsWith("#")}function dW(e,t){return e?`${e}${iW}${t}`:t}function pW(e){const t=sW.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)&&aW(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){oW(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||aW(`[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=dW(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 sW.set(e,n),lW.set(e,r),n}function fW(e){return e?String(e).split(iW).filter(Boolean):[]}function hW(e,t){if(!t)return[];const n=pW(e),r=fW(t),a=[],o=[];for(const i of r){o.push(i);const e=cW(o),t=n.get(e);if(!t)break;a.push({path:e,state:t})}return a}function mW(e,t){const n=pW(e),r=fW(t);if(!r.length)return t;const a=[];for(const s of r){a.push(s);const e=cW(a);if(!n.has(e))return t}let o=cW(a),i=n.get(o);for(;null==i?void 0:i.initial;){const e=`${o}${iW}${i.initial}`,t=n.get(e);if(!t)break;o=e,i=t}return o}function gW(e,t){return pW(e).has(t)}function yW(e,t,n){const r=String(t);if(uW(r)){const t=function(e){return uW(e)?e.slice(1):e}(r),n=function(e,t){var n;return pW(e),null==(n=lW.get(e))?void 0:n.get(t)}(e,t);return oW(n,(()=>`[zag-js] Unknown state id: "${t}"`)),mW(e,n)}if(function(e){return e.startsWith(iW)}(r)&&n){return mW(e,dW(n,r.slice(1)))}if(!function(e){return e.includes(iW)}(r)&&n){const t=fW(n);for(let n=t.length-1;n>=1;n--){const a=dW(t.slice(0,n).join(iW),r);if(gW(e,a))return mW(e,a)}if(gW(e,r))return mW(e,r)}return mW(e,r)}function bW(e){return pW(e),e}var vW=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(vW||{}),kW="__init__",xW=Object.defineProperty,wW=(e,t,n)=>((e,t,n)=>t in e?xW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);function EW(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;const t=e.value.length;e.setSelectionRange(t,t)}catch{}}var _W=()=>{},SW=e=>"object"==typeof e&&null!==e,TW=e=>e?"":void 0,CW=e=>e?"true":void 0,AW=e=>SW(e)&&1===e.nodeType&&"string"==typeof e.nodeName,NW=e=>SW(e)&&9===e.nodeType,IW=e=>AW(e)?e.localName||"":"#document";var OW=e=>SW(e)&&void 0!==e.nodeType,RW=e=>OW(e)&&11===e.nodeType&&"host"in e,PW=e=>AW(e)&&"input"===e.localName;function LW(e){if(!e)return!1;return zW(e.getRootNode())===e}var DW=/(textarea|select)/;function MW(e,t){var n;if(!e||!t)return!1;if(!AW(e)||!OW(t))return!1;if(AW(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&RW(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function FW(e){return NW(e)?e:(e=>SW(e)&&e===e.window)(e)?e.document:(null==e?void 0:e.ownerDocument)??document}function jW(e){var t;return RW(e)?jW(e.host):NW(e)?e.defaultView??window:AW(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function zW(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 BW(e){if("html"===IW(e))return e;const t=e.assignedSlot||e.parentNode||RW(e)&&e.host||FW(e).documentElement;return RW(t)?t.host:t}function HW(e){let t;try{if(t=e.getRootNode({composed:!0}),NW(t)||RW(t))return t}catch{}return e.ownerDocument??document}var UW=new WeakMap;function $W(e){return UW.has(e)||UW.set(e,jW(e).getComputedStyle(e)),UW.get(e)}var VW=new Set(["menu","listbox","dialog","grid","tree","region"]),GW=e=>VW.has(e),qW=e=>{var t;return(null==(t=e.getAttribute("aria-controls"))?void 0:t.split(" "))||[]};function WW(e,t){const n=new Set,r=HW(e),a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=qW(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&&GW(n)&&!r){if(e===t||e.contains(t))return!0;if(a(e))return!0}}}}return!1};return a(e)}function YW(e){const t=new Set;return function(e,t){const n=HW(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=qW(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&&VW.has(n)&&!r&&(t(e),a(e))}}}};a(e)}(e,(n=>{e.contains(n)||t.add(n)})),Array.from(t)}function ZW(e){if(!e.id)return!1;const t=HW(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&&VW.has(t))}(e))}var KW=()=>"undefined"!=typeof document;var XW=e=>KW()&&e.test(function(){const e=navigator.userAgentData;return(null==e?void 0:e.platform)??navigator.platform}()),QW=e=>KW()&&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}()),JW=()=>KW()&&!!navigator.maxTouchPoints,eY=()=>XW(/^iPhone/i)||XW(/^iPad/i)||tY()&&navigator.maxTouchPoints>1,tY=()=>XW(/^Mac/i);function nY(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 rY(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,tY()?a.metaKey:a.ctrlKey);var a;return n||r}function aY(e){return!(""!==e.pointerType||!e.isTrusted)||(QW(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}var oY=e=>0===e.button,iY=e=>2===e.button||tY()&&e.ctrlKey&&0===e.button,sY={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},lY={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function cY(e,t={}){const{dir:n="ltr",orientation:r="horizontal"}=t;let a=e.key;a=sY[a]??a;return"rtl"===n&&"horizontal"===r&&a in lY&&(a=lY[a]),a}var uY=(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)}},dY=e=>AW(e)&&"IFRAME"===e.tagName,pY=/^(audio|video|details)$/;function fY(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function hY(e){if(!function(e){return PW(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&&vY(t))),a=r.find((e=>e.checked));return a?a===e:r[0]===e}function mY(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 gY(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=mY(e,t);if(l){const t=Array.from(l.querySelectorAll(yY)).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 yY="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",bY=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(yY));(1==n||"if-empty"==n&&0===a.length)&&AW(e)&&vY(e)&&a.unshift(e);const o=[];for(const i of a)if(vY(i))if(dY(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...bY(e,{getShadowRoot:r}))}else o.push(i);return r?gY(o,r,vY):o};function vY(e){return!(!AW(e)||e.closest("[inert]"))&&(e.matches(yY)&&(!!AW(t=e)&&(t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0)));var t}function kY(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(yY));n&&xY(e)&&a.unshift(e);const o=[];for(const i of a)if(xY(i))if(dY(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...kY(e,{getShadowRoot:r}))}else o.push(i);if(r){const e=gY(o,r,xY);return!e.length&&n?a:e}return!o.length&&n?a:o}function xY(e){return!!(AW(e)&&e.tabIndex>0)||!(!vY(e)||(e=>fY(e)<0)(e))&&hY(e)}function wY(e){return e.tabIndex<0&&(pY.test(e.localName)||function(e){if(null==e||!AW(e))return!1;try{return PW(e)&&null!=e.selectionStart||DW.test(e.localName)||e.isContentEditable||"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")}catch{return!1}}(e))&&(t=e,Number.isNaN(fY(t)))?0:e.tabIndex;var t}var EY=class e{constructor(){wW(this,"id",null),wW(this,"fn_cleanup"),wW(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 _Y(e){const t=EY.create();return t.request(e),t.cleanup}function SY(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 TY(e,t){const{defer:n}=t,r=n?_Y: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 CY(e){const t=()=>{const t=jW(e);e.dispatchEvent(new t.MouseEvent("click"))};QW(/Firefox/i)?function(e,t,n){const r=_Y((()=>{e.removeEventListener(t,a,!0),n()})),a=()=>{r(),n()};e.addEventListener(t,a,{once:!0,capture:!0})}(e,"keyup",t):queueMicrotask(t)}function AY(e){const t=BW(e);return["html","body","#document"].includes(IW(t))?FW(t).body:AW(t)&&OY(t)?t:AY(t)}var NY=/auto|scroll|overlay|hidden|clip/,IY=new Set(["inline","contents"]);function OY(e){const t=jW(e),{overflow:n,overflowX:r,overflowY:a,display:o}=t.getComputedStyle(e);return NY.test(n+a+r)&&!IY.has(o)}function RY(e,t){const{rootEl:n,...r}=t||{};e&&n&&OY(n)&&function(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}(n)&&e.scrollIntoView(r)}function PY(e,t){if(!e)return _W;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]))?_W:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),0===e.style.length&&e.removeAttribute("style")});var r,a}function LY(e,t){const{timeout:n,rootNode:r}=t,a=jW(r),o=FW(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 DY=void 0!==globalThis.document?X.useLayoutEffect:X.useEffect;function MY(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);DY((()=>{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:Qq)((()=>(t=>{var r,a;const s=l.current,c=qq(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)}}}MY.cleanup=e=>{X.useEffect((()=>e),[])},MY.ref=e=>{const t=X.useRef(e);return{get:()=>t.current,set:e=>{t.current=e}}};var FY=(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 jY(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=()=>FW(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>zW(t()),isActiveElement:LW,getById:e=>t().getElementById(e)}}({id:e,ids:n,getRootNode:r})}),[t]),s=(...t)=>{e.debug&&console.log(...t)},l=function(e){const t=zY(e);return function(e){return t.current[e]}}((null==(n=e.props)?void 0:n.call(e,{props:nW(t),scope:i}))??t),c=zY(null==(r=e.context)?void 0:r.call(e,{prop:l,bindable:MY,scope:i,flush:BY,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}${iW}`))}(_.ref.current,e))),hasTag:t=>function(e,t,n){return hW(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:FY,refs:y,computed:E,flush:BY,scope:i,choose:w}),v=t=>{const n=qq(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||rW(`[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 qq(t)?t(b()):null==(r=null==(n=e.implementations)?void 0:n.guards)?void 0:r[t](b())},x=t=>{const n=qq(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||rW(`[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):qq(e.guard)&&(t=e.guard(b())),t}));var t},E=t=>{oW(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})},_=MY((()=>({defaultValue:yW(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?hW(e,t):[],c=hW(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===kW){v(e.entry);const t=x(e.effects);t&&d.current.set(kW,t)}i.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.entry)}))}}))),S=X.useRef(void 0),T=X.useRef(vW.NotStarted);DY((()=>{queueMicrotask((()=>{const e=T.current===vW.Started;T.current=vW.Started,s(e?"rehydrating...":"initializing...");const t=S.current??_.initial;_.invoke(t,e?_.get():kW)}));const t=d.current;return()=>{const n=C();s("unmounting..."),S.current=n,T.current=vW.Stopped,t.forEach((e=>null==e?void 0:e())),d.current=new Map,p.current=null,queueMicrotask((()=>{v(e.exit),T.current=vW.Stopped}))}}),[]);const C=()=>"ref"in _?_.ref.current:_.get(),A=t=>{queueMicrotask((()=>{if(T.current!==vW.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=hW(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=yW(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 zY(e){const t=X.useRef(e);return t.current=e,t}function BY(e){queueMicrotask((()=>{ue.flushSync((()=>e()))}))}var HY,UY=(HY=e=>e,new Proxy({},{get:(e,t)=>"style"===t?e=>HY({style:e}).style:HY}));const $Y=X.createContext(null);function VY({children:e,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,onFileAccept:i,onFileChange:s,onFileReject:l}){const c=X.useId(),u=VO(),d=Lq(jY(zq,{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}),UY);return rg.jsx($Y.Provider,{value:d,children:e})}function GY(){const e=X.useContext($Y);if(!e)throw new Error("useFileUploadApi must be used within FileUploadRoot");return e}function qY(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 WY={"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 YY(e){return e.startsWith("image/")}const ZY={"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"]},KY=new Set(Object.keys(ZY)),XY=10485760,QY=Object.entries(ZY).reduce(((e,[t,n])=>{for(const r of n)e[r]=t;return e}),{});function JY(e){var t;if(e.type)return e;const n=`.${null==(t=e.name.split(".").pop())?void 0:t.toLowerCase()}`,r=QY[n];return r?new File([e],e.name,{type:r}):e}const eZ=vV("div",{_id:"aiChatMessage__Files"}),tZ=({children:e,...t})=>{const{message:n}=$G();if("user"!==n.role)return null;const r=(n.parts??[]).filter((e=>{if("file"!==e.type)return!1;const t=e.mediaType;return KY.has(t??"")}));return r.length?rg.jsx(eZ,{...t,children:e(r)}):null},nZ=vV("button",{_id:"aiChatMessage__File"}),rZ=({url:e,name:t,mediaType:n,onClick:r,...a})=>{const{openImagePreview:o}=BG(),[i,s]=X.useState(!0),l=X.useMemo((()=>new File([],t??"file",{type:n})),[t,n]);return rg.jsx(SZ.Provider,{value:{file:l,objectUrl:e,isLoading:i,setIsLoading:s,onRemove:()=>{}},children:rg.jsx(nZ,{type:"button","aria-label":YY(n??"")?`Preview ${t??"file"}`:`Open ${t??"file"} in new tab`,"data-loading":aV(i),onClick:qY(r,(()=>{if(YY(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})})},aZ=vV("div",{_id:"aiChatInput__Fieldset"}),oZ=e=>{const t=GY();return rg.jsx(aZ,{...t.getDropzoneProps({disableClick:!0}),"data-drag-over":aV(t.dragging),...e})},iZ=({...e})=>{const{files:t,setFiles:n,showInputNotification:r}=yJ();return rg.jsx(VY,{accept:ZY,maxFiles:10,maxFileSize:XY,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:rg.jsx(oZ,{...e})})},sZ=vV("div",{_id:"aiChatInput__DropZone"}),lZ=vV("div",{_id:"aiChatInput__Notification"}),cZ=e=>{const{inputNotification:t}=yJ();return t?rg.jsx(lZ,{role:"alert",...e}):null},uZ=vV("p",{_id:"aiChatInput__NotificationTitle"}),dZ=({children:e,...t})=>{const{inputNotification:n}=yJ();return(null==n?void 0:n.title)?rg.jsxs(uZ,{...t,children:[e,n.title]}):null},pZ=vV("p",{_id:"aiChatInput__NotificationMessage"}),fZ=e=>{const{inputNotification:t}=yJ();return rg.jsx(pZ,{...e,children:null==t?void 0:t.message})},hZ=vV("button",{_id:"aiChatInput__NotificationClose"}),mZ=({onClick:e,...t})=>{const{clearInputNotification:n}=yJ();return rg.jsx(hZ,{type:"button","aria-label":"Dismiss",onClick:qY(e,n),...t})},gZ=vV("div",{_id:"aiChatInput__NotificationContent"}),yZ=vV("div",{_id:"aiChatInput__NotificationHeader"}),bZ=vV(FG,{_id:"aiChatInput__FileUploadButtonIcon",iconKey:"fileUpload"}),vZ=vV("button",{_id:"aiChatInput__FileUploadButton"}),kZ=e=>{const{aiChatSettings:t}=rR(),n=GY(),{onClick:r,...a}=e;return rg.jsx(vZ,{type:"button","aria-label":"Upload file",disabled:t.isViewOnly,onClick:qY(r,(()=>n.openFilePicker())),...a})},xZ=vV("input",{_id:"aiChatInput__FileInput"}),wZ=e=>{const t=GY();return rg.jsx(xZ,{...e,...t.getHiddenInputProps()})},EZ=vV("div",{_id:"aiChatInput__FileList"}),_Z=({children:e,...t})=>{const n=GY().acceptedFiles;return n.length?rg.jsx(EZ,{...t,children:e(n)}):null},SZ=Q.createContext(null);function TZ(){const e=Q.useContext(SZ);if(!e)throw new Error("useFileContext must be used within EmbeddedChatPrimitiveFileItem");return e}const CZ=vV("div",{_id:"aiChatInput__FileItem"}),AZ=({file:e,...t})=>{const n=GY(),[r,a]=X.useState(void 0),[o,i]=X.useState(!0);X.useEffect((()=>n.createFileUrl(e,(e=>{a(e),i(!0)}))),[e]);return rg.jsx(SZ.Provider,{value:{file:e,objectUrl:r,isLoading:o,setIsLoading:i,onRemove:()=>n.deleteFile(e)},children:rg.jsx(CZ,{"data-loading":aV(o),...t})})},NZ=vV("button",{_id:"aiChatInput__FilePreviewTrigger"}),IZ=({onClick:e,...t})=>{const{objectUrl:n,file:r}=TZ(),{openImagePreview:a}=BG();return rg.jsx(NZ,{type:"button","aria-label":`Preview ${r.name}`,disabled:!n,onClick:qY(e,(()=>{n&&a({url:n,name:r.name})})),...t})},OZ=vV("span",{_id:"aiChatInput__FileContent"}),RZ=e=>rg.jsx(OZ,{...e}),PZ=vV("img",{_id:"aiChatInput__FileThumbnail"}),LZ=({onLoad:e,...t})=>{const{objectUrl:n,file:r,setIsLoading:a}=TZ();return rg.jsx(PZ,{src:n,alt:r.name,onLoad:qY(e,(()=>a(!1))),...t})},DZ=({className:e})=>{const{file:t}=TZ(),n=WY[JY(t).type]??"file";return rg.jsx(FG,{iconKey:n,className:e})},MZ=vV("span",{_id:"aiChatInput__FileName"}),FZ=e=>{const{file:t}=TZ();return rg.jsx(MZ,{...e,children:t.name})},jZ=vV("button",{_id:"aiChatInput__FileRemove"}),zZ=vV(FG,{_id:"aiChatInput__FileRemoveIcon",iconKey:"close"}),BZ=({onClick:e,...t})=>{const{onRemove:n}=TZ();return rg.jsx(jZ,{type:"button","aria-label":"Remove file",onClick:qY(e,n),...t})},HZ=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},UZ=()=>{};function $Z(e=21){const t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,(e=>e.toString(36))).join("").slice(0,e)}const VZ=new Map;function GZ(e="id"){const t=(VZ.get(e)||0)+1;return VZ.set(e,t),`${e}${t}`}var qZ=J[" useInsertionEffect ".trim().toString()]||zO;function WZ({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,i]=function({defaultProp:e,onChange:t}){const[n,r]=X.useState(e),a=X.useRef(n),o=X.useRef(t);return qZ((()=>{o.current=t}),[t]),X.useEffect((()=>{var e;a.current!==n&&(null==(e=o.current)||e.call(o,n),a.current=n)}),[n,a]),[n,r,o]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:a;{const t=X.useRef(void 0!==e);X.useEffect((()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s}),[s,r])}const c=X.useCallback((t=>{var n;if(s){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&(null==(n=i.current)||n.call(i,r))}else o(t)}),[s,e,o,i]);return[l,c]}function YZ(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 ZZ="Hmm.. \n\nIt seems I might be having some issues right now. Please clear the chat and try again.",KZ="Please try again.",XZ=()=>{const{baseSettings:e,aiChatSettings:t}=rR(),[n="",r]=WZ({prop:t.conversationIdOverride,defaultProp:t.conversationIdOverride??""}),{logEvent:a}=iR(),{setConversationId:o,emitToParent:i}=function(){const e=VO(),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}=ER(),{onInputMessageChange:_,filters:S,baseUrl:T,agentUrl:C,context:A,headers:N,appId:I,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}=gR({appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a??UZ,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(eNe){return eNe instanceof Error&&"AbortError"===eNe.name||console.error("[useConversationLoader]",eNe),null}}),[e,n,i])}})({baseUrl:T,appId:I,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(N);W.current=N;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 GU({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",...I?{"x-inkeep-app-id":I}:{},...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,I,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 k$(a));("chat"in n&&n.chat!==o.current||"id"in n&&o.current.id!==n.id)&&(o.current="chat"in n?n.chat:new k$(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=YZ(e),n=fR(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=ZZ;return"user"===n.role?t.push({id:$Z(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=YZ(e);return 400===t||429===t}(t),l=(t=>{var n,r;switch(YZ(t)){case 400:try{const e=JSON.parse(t.message??"");return e.detail??(null==(n=e.error)?void 0:n.message)??KZ}catch{return(null==(r=t.message)?void 0:r.trim())||KZ}case 401:return g?"Authentication failed. Please try again.":ZZ;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 ZZ}})(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:$Z(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=HZ("(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_${$Z(16)}`,r(s));const u=$Z(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=JY(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]),Ne=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:$Z(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(eNe){n.signal.aborted||r(eNe)}})(),()=>{a.current=null,n.abort()}}),[e,t])})({conversationId:t.conversationId,effectiveAuthToken:w,loadAndRestoreSession:Ne,onLoadFailed:()=>Ae("",[])});const{openForm:Ie}=tL(),Oe=KJ();return X.useImperativeHandle(t.chatFunctionsRef,(()=>({submitMessage:_e,updateInputMessage(e){c(e)},clearChat:Ce,openForm:e=>{null==Oe||Oe.setView("chat"),Ie(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:Ne,isSessionLoading:M,authToken:m?h:b,refreshSession:m?y:v,getCaptchaHeader:k,invalidateCaptcha:x,inputNotification:ke,showInputNotification:xe,clearInputNotification:we}},QZ=()=>{};const JZ=X.createContext(void 0);function eK(){const{baseSettings:e,aiChatSettings:t}=rR(),[n,r]=X.useState(null),[a,o]=X.useState({}),{conversationId:i,messages:s,authToken:l,getCaptchaHeader:c,invalidateCaptcha:u,refreshSession:d}=yJ(),{analyticsProperties:p}=e,{logEvent:f}=iR(),{submitFeedback:h}=function({baseUrl:e,appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a,refreshSession:o,headers:i}){const{fetchWithAuth:s}=gR({appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a??QZ,refreshSession:o}),l=X.useRef(i);return l.current=i,{submitFeedback:X.useCallback((async({conversationId:t,messageId:n,type:r,details:a})=>{if(!e)return;const o=`${e}/run/v1/feedback`,i=await s(o,{method:"POST",headers:{"Content-Type":"application/json",...l.current},body:JSON.stringify({conversationId:t,messageId:n,type:r,details:a})});if(!i.ok)throw new Error(`Feedback submission failed: ${i.status}`);return i.json()}),[e,s])}}({baseUrl:t.baseUrl,appId:t.appId,authToken:l,getCaptchaHeader:c,invalidateCaptcha:u,refreshSession:d,headers:t.headers}),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:lV(s[a-1]),answer:lV(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 tK=({children:e})=>{const t=eK();return rg.jsx(JZ.Provider,{value:t,children:e})},nK=()=>{const e=X.useContext(JZ);if(!e)throw new Error("useFeedback must be used within a FeedbackProvider");return e};function rK(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 aK(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function oK(...e){return t=>{let n=!1;const r=e.map((e=>{const r=aK(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():aK(e[t],null)}}}}function iK(...e){return X.useCallback(oK(...e),e)}function sK(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 rg.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}\``)}]},lK(r,...t)]}function lK(...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 cK=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.Children.toArray(n),o=a.find(pK);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 rg.jsx(uK,{...r,ref:t,children:X.isValidElement(e)?X.cloneElement(e,void 0,n):null})}return rg.jsx(uK,{...r,ref:t,children:n})}));cK.displayName="Slot";var uK=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,{...fK(r,n.props),ref:t?oK(t,e):e})}return X.Children.count(n)>1?X.Children.only(null):null}));uK.displayName="SlotClone";var dK=({children:e})=>rg.jsx(rg.Fragment,{children:e});function pK(e){return X.isValidElement(e)&&e.type===dK}function fK(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 hK=["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?cK:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),rg.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function mK(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 gK(e,t=(null==globalThis?void 0:globalThis.document)){const n=mK(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 yK,bK="dismissableLayer.update",vK="dismissableLayer.pointerDownOutside",kK="dismissableLayer.focusOutside",xK=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wK=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(xK),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=iK(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=mK(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){_K(vK,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=mK(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){_K(kK,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 gK((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&&(yK=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),EK(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=yK)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),EK())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(bK,e),()=>document.removeEventListener(bK,e)}),[]),rg.jsx(hK.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:rK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:rK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:rK(e.onPointerDownCapture,x.onPointerDownCapture)})}));wK.displayName="DismissableLayer";function EK(){const e=new CustomEvent(bK);document.dispatchEvent(e)}function _K(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(xK),r=X.useRef(null),a=iK(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),rg.jsx(hK.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var SK=Boolean(null==globalThis?void 0:globalThis.document)?X.useLayoutEffect:()=>{},TK=J["useId".toString()]||(()=>{}),CK=0;function AK(e){const[t,n]=X.useState(TK());return SK((()=>{n((e=>e??String(CK++)))}),[e]),e||(t?`radix-${t}`:"")}const NK=["top","right","bottom","left"],IK=Math.min,OK=Math.max,RK=Math.round,PK=Math.floor,LK=e=>({x:e,y:e}),DK={left:"right",right:"left",bottom:"top",top:"bottom"};function MK(e,t,n){return OK(e,IK(t,n))}function FK(e,t){return"function"==typeof e?e(t):e}function jK(e){return e.split("-")[0]}function zK(e){return e.split("-")[1]}function BK(e){return"x"===e?"y":"x"}function HK(e){return"y"===e?"height":"width"}function UK(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function $K(e){return BK(UK(e))}function VK(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const GK=["left","right"],qK=["right","left"],WK=["top","bottom"],YK=["bottom","top"];function ZK(e,t,n,r){const a=zK(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?qK:GK:t?GK:qK;case"left":case"right":return t?WK:YK;default:return[]}}(jK(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(VK)))),o}function KK(e){const t=jK(e);return DK[t]+e.slice(t.length)}function XK(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 QK(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 JK(e,t,n){let{reference:r,floating:a}=e;const o=UK(t),i=$K(t),s=HK(i),l=jK(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(zK(t)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1)}return f}async function eX(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}=FK(t,e),h=XK(f),m=s[p?"floating"===d?"reference":"floating":d],g=QK(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=QK(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 tX(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nX(e){return NK.some((t=>e[t]>=0))}const rX=new Set(["left","top"]);function aX(){return"undefined"!=typeof window}function oX(e){return lX(e)?(e.nodeName||"").toLowerCase():"#document"}function iX(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function sX(e){var t;return null==(t=(lX(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function lX(e){return!!aX()&&(e instanceof Node||e instanceof iX(e).Node)}function cX(e){return!!aX()&&(e instanceof Element||e instanceof iX(e).Element)}function uX(e){return!!aX()&&(e instanceof HTMLElement||e instanceof iX(e).HTMLElement)}function dX(e){return!(!aX()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof iX(e).ShadowRoot)}function pX(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=wX(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function fX(e){return/^(table|td|th)$/.test(oX(e))}function hX(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const mX=/transform|translate|scale|rotate|perspective|filter/,gX=/paint|layout|strict|content/,yX=e=>!!e&&"none"!==e;let bX;function vX(e){const t=cX(e)?wX(e):e;return yX(t.transform)||yX(t.translate)||yX(t.scale)||yX(t.rotate)||yX(t.perspective)||!kX()&&(yX(t.backdropFilter)||yX(t.filter))||mX.test(t.willChange||"")||gX.test(t.contain||"")}function kX(){return null==bX&&(bX="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),bX}function xX(e){return/^(html|body|#document)$/.test(oX(e))}function wX(e){return iX(e).getComputedStyle(e)}function EX(e){return cX(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _X(e){if("html"===oX(e))return e;const t=e.assignedSlot||e.parentNode||dX(e)&&e.host||sX(e);return dX(t)?t.host:t}function SX(e){const t=_X(e);return xX(t)?e.ownerDocument?e.ownerDocument.body:e.body:uX(t)&&pX(t)?t:SX(t)}function TX(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=SX(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=iX(a);if(o){const e=CX(i);return t.concat(i,i.visualViewport||[],pX(a)?a:[],e&&n?TX(e):[])}return t.concat(a,TX(a,[],n))}function CX(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function AX(e){const t=wX(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=uX(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=RK(n)!==o||RK(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function NX(e){return cX(e)?e:e.contextElement}function IX(e){const t=NX(e);if(!uX(t))return LK(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=AX(t);let i=(o?RK(n.width):n.width)/r,s=(o?RK(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const OX=LK(0);function RX(e){const t=iX(e);return kX()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:OX}function PX(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=NX(e);let i=LK(1);t&&(r?cX(r)&&(i=IX(r)):i=IX(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==iX(e))&&t}(o,n,r)?RX(o):LK(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=iX(o),t=r&&cX(r)?iX(r):r;let n=e,a=CX(n);for(;a&&r&&t!==n;){const e=IX(a),t=a.getBoundingClientRect(),r=wX(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=iX(a),a=CX(n)}}return QK({width:u,height:d,x:l,y:c})}function LX(e,t){const n=EX(e).scrollLeft;return t?t.left+n:PX(sX(e)).left+n}function DX(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-LX(e,n),y:n.top+t.scrollTop}}function MX(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=iX(e),r=sX(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=kX();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}const c=LX(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=sX(e),n=EX(e),r=e.ownerDocument.body,a=OK(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=OK(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+LX(e);const s=-n.scrollTop;return"rtl"===wX(r).direction&&(i+=OK(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(sX(e));else if(cX(t))r=function(e,t){const n=PX(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=uX(e)?IX(e):LK(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=RX(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return QK(r)}function FX(e,t){const n=_X(e);return!(n===t||!cX(n)||xX(n))&&("fixed"===wX(n).position||FX(n,t))}function jX(e,t,n){const r=uX(t),a=sX(t),o="fixed"===n,i=PX(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=LK(0);function c(){l.x=LX(a)}if(r||!r&&!o)if(("body"!==oX(t)||pX(a))&&(s=EX(t)),r){const e=PX(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?LK(0):DX(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 zX(e){return"static"===wX(e).position}function BX(e,t){if(!uX(e)||"fixed"===wX(e).position)return null;if(t)return t(e);let n=e.offsetParent;return sX(e)===n&&(n=n.ownerDocument.body),n}function HX(e,t){const n=iX(e);if(hX(e))return n;if(!uX(e)){let t=_X(e);for(;t&&!xX(t);){if(cX(t)&&!zX(t))return t;t=_X(t)}return n}let r=BX(e,t);for(;r&&fX(r)&&zX(r);)r=BX(r,t);return r&&xX(r)&&zX(r)&&!vX(r)?n:r||function(e){let t=_X(e);for(;uX(t)&&!xX(t);){if(vX(t))return t;if(hX(t))return null;t=_X(t)}return null}(e)||n}const UX={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=sX(r),s=!!t&&hX(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=LK(1);const u=LK(0),d=uX(r);if((d||!d&&!o)&&(("body"!==oX(r)||pX(i))&&(l=EX(r)),d)){const e=PX(r);c=IX(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!i||d||o?LK(0):DX(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:sX,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?hX(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=TX(e,[],!1).filter((e=>cX(e)&&"body"!==oX(e))),a=null;const o="fixed"===wX(e).position;let i=o?_X(e):e;for(;cX(i)&&!xX(i);){const t=wX(i),n=vX(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&("absolute"===a.position||"fixed"===a.position)||pX(i)&&!n&&FX(e,i))?r=r.filter((e=>e!==i)):a=t,i=_X(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=MX(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=MX(t,o[d],a);s=OK(e.top,s),l=IK(e.right,l),c=IK(e.bottom,c),u=OK(e.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:HX,getElementRects:async function(e){const t=this.getOffsetParent||HX,n=this.getDimensions,r=await n(e.floating);return{reference:jX(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}=AX(e);return{width:t,height:n}},getScale:IX,isElement:cX,isRTL:function(e){return"rtl"===wX(e).direction}};function $X(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function VX(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=NX(e),u=a||o?[...c?TX(c):[],...t?TX(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=sX(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:-PK(d)+"px "+-PK(a.clientWidth-(u+p))+"px "+-PK(a.clientHeight-(d+f))+"px "+-PK(u)+"px",threshold:OK(0,IK(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||$X(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?PX(e):null;return l&&function t(){const r=PX(e);m&&!$X(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 GX=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=jK(n),s=zK(n),l="y"===UK(n),c=rX.has(i)?-1:1,u=o&&l?-1:1,d=FK(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}}}}},qX=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}=FK(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),p=UK(jK(a)),f=BK(p);let h=u[f],m=u[p];if(i){const e="y"===f?"bottom":"right";h=MK(h+d["y"===f?"top":"left"],h,h-d[e])}if(s){const e="y"===p?"bottom":"right";m=MK(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}}}}}},WX=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}=FK(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=jK(a),b=UK(s),v=jK(s)===s,k=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[KK(s)]:function(e){const t=KK(e);return[VK(e),t,VK(t)]}(s)),w="none"!==h;!p&&w&&x.push(...ZK(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=zK(e),a=$K(e),o=HK(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=KK(i)),[i,KK(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!==UK(t))||T.every((e=>UK(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 N;const e=null==(N=T.filter((e=>{if(w){const t=UK(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:N[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}},YX=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}=FK(e,t),u=await i.detectOverflow(t,c),d=jK(a),p=zK(a),f="y"===UK(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=IK(m-u[g],b),x=IK(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=OK(u.left,0),t=OK(u.right,0),n=OK(u.top,0),r=OK(u.bottom,0);f?_=h-2*(0!==e||0!==t?e+t:OK(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:OK(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}}:{}}}},ZX=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=FK(e,t);switch(a){case"referenceHidden":{const e=tX(await r.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:nX(e)}}}case"escaped":{const e=tX(await r.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:nX(e)}}}default:return{}}}}},KX=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}=FK(e,t)||{};if(null==c)return{};const d=XK(u),p={x:n,y:r},f=$K(a),h=HK(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=IK(d[y],S),C=IK(d[b],S),A=T,N=E-m[h]-C,I=E/2-m[h]/2+_,O=MK(A,I,N),R=!l.arrow&&null!=zK(a)&&I!==O&&o.reference[h]/2-(I<A?T:C)-m[h]/2<0,P=R?I<A?I-A:I-N:0;return{[f]:p[f]+P,data:{[f]:O,centerOffset:I-O-P,...R&&{alignmentOffset:P}},reset:R}}}),XX=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}=FK(e,t),u={x:n,y:r},d=UK(a),p=BK(d);let f=u[p],h=u[d];const m=FK(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=rX.has(jK(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}}}},QX=(e,t,n)=>{const r=new Map,a={platform:UX,...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:eX},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}=JK(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}=JK(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var JX="undefined"!=typeof document?X.useLayoutEffect:function(){};function eQ(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(!eQ(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)&&!eQ(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function tQ(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nQ(e,t){const n=tQ(e);return Math.round(t*n)/n}function rQ(e){const t=X.useRef(e);return JX((()=>{t.current=e})),t}function aQ(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);eQ(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=rQ(l),C=rQ(a),A=rQ(c),N=X.useCallback((()=>{if(!w.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};C.current&&(e.platform=C.current),QX(w.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};I.current&&!eQ(_.current,t)&&(_.current=t,ue.flushSync((()=>{d(t)})))}))}),[p,t,n,C,A]);JX((()=>{!1===c&&_.current.isPositioned&&(_.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const I=X.useRef(!1);JX((()=>(I.current=!0,()=>{I.current=!1})),[]),JX((()=>{if(k&&(w.current=k),x&&(E.current=x),k&&x){if(T.current)return T.current(k,x,N);N()}}),[k,x,N,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=nQ(R.floating,u.x),r=nQ(R.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...tQ(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:N,refs:O,elements:R,floatingStyles:P})),[u,N,O,R,P])}const oQ=(e,t)=>{const n=GX(e);return{name:n.name,fn:n.fn,options:[e,t]}},iQ=(e,t)=>{const n=qX(e);return{name:n.name,fn:n.fn,options:[e,t]}},sQ=(e,t)=>({fn:XX(e).fn,options:[e,t]}),lQ=(e,t)=>{const n=WX(e);return{name:n.name,fn:n.fn,options:[e,t]}},cQ=(e,t)=>{const n=YX(e);return{name:n.name,fn:n.fn,options:[e,t]}},uQ=(e,t)=>{const n=ZX(e);return{name:n.name,fn:n.fn,options:[e,t]}},dQ=(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?KX({element:n.current,padding:r}).fn(t):{}:n?KX({element:n,padding:r}).fn(t):{};var a}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var pQ=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return rg.jsx(hK.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:rg.jsx("polygon",{points:"0,0 30,0 15,10"})})}));pQ.displayName="Arrow";var fQ=pQ;function hQ(e){const[t,n]=X.useState(void 0);return SK((()=>{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 mQ="Popper",[gQ,yQ]=sK(mQ),[bQ,vQ]=gQ(mQ),kQ=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return rg.jsx(bQ,{scope:t,anchor:r,onAnchorChange:a,children:n})};kQ.displayName=mQ;var xQ="PopperAnchor",wQ=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=vQ(xQ,n),i=X.useRef(null),s=iK(t,i);return X.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:rg.jsx(hK.div,{...a,ref:s})}));wQ.displayName=xQ;var EQ="PopperContent",[_Q,SQ]=gQ(EQ),TQ=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=vQ(EQ,l),[E,_]=X.useState(null),S=iK(t,(e=>_(e))),[T,C]=X.useState(null),A=hQ(T),N=(null==A?void 0:A.width)??0,I=(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(IQ),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=aQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>VX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[oQ({mainAxis:u+I,alignmentAxis:p}),h&&iQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?sQ():void 0,...D}),h&&lQ({...D}),cQ({...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&&dQ({element:T,padding:f}),OQ({arrowWidth:N,arrowHeight:I}),b&&uQ({strategy:"referenceHidden",...D})]}),[H,U]=RQ(j),$=mK(k);SK((()=>{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 SK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),rg.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:rg.jsx(_Q,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:rg.jsx(hK.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));TQ.displayName=EQ;var CQ="PopperArrow",AQ={top:"bottom",right:"left",bottom:"top",left:"right"},NQ=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=SQ(CQ,n),o=AQ[a.placedSide];return rg.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:rg.jsx(fQ,{...r,ref:t,style:{...r.style,display:"block"}})})}));function IQ(e){return null!==e}NQ.displayName=CQ;var OQ=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]=RQ(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 RQ(e){const[t,n="center"]=e.split("-");return[t,n]}var PQ=kQ,LQ=wQ,DQ=TQ,MQ=NQ;var FQ=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=jQ(r.current);o.current="mounted"===s?e:"none"}),[s]),SK((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=jQ(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]),SK((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=jQ(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=jQ(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=iK(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 jQ(e){return(null==e?void 0:e.animationName)||"none"}function zQ({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=mK(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=mK(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])]}FQ.displayName="Presence";var BQ=X.forwardRef(((e,t)=>rg.jsx(hK.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}})));BQ.displayName="VisuallyHidden";var HQ=BQ,[UQ]=sK("Tooltip",[yQ]),$Q=yQ(),VQ="TooltipProvider",GQ=700,qQ="tooltip.open",[WQ,YQ]=UQ(VQ),ZQ=e=>{const{__scopeTooltip:t,delayDuration:n=GQ,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)}),[]),rg.jsx(WQ,{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})};ZQ.displayName=VQ;var KQ="Tooltip",[XQ,QQ]=UQ(KQ),JQ=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,l=YQ(KQ,e.__scopeTooltip),c=$Q(t),[u,d]=X.useState(null),p=AK(),f=X.useRef(0),h=i??l.disableHoverableContent,m=s??l.delayDuration,g=X.useRef(!1),[y=!1,b]=zQ({prop:r,defaultProp:a,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(qQ))):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)}),[]),rg.jsx(PQ,{...c,children:rg.jsx(XQ,{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})})};JQ.displayName=KQ;var eJ="TooltipTrigger",tJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=QQ(eJ,n),o=YQ(eJ,n),i=$Q(n),s=iK(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]),rg.jsx(LQ,{asChild:!0,...i,children:rg.jsx(hK.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:s,onPointerMove:rK(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(c.current||o.isPointerInTransitRef.current||(a.onTriggerEnter(),c.current=!0))})),onPointerLeave:rK(e.onPointerLeave,(()=>{a.onTriggerLeave(),c.current=!1})),onPointerDown:rK(e.onPointerDown,(()=>{l.current=!0,document.addEventListener("pointerup",u,{once:!0})})),onFocus:rK(e.onFocus,(()=>{l.current||a.onOpen()})),onBlur:rK(e.onBlur,a.onClose),onClick:rK(e.onClick,a.onClose)})})}));tJ.displayName=eJ;var[nJ,rJ]=UQ("TooltipPortal",{forceMount:void 0}),aJ="TooltipContent",oJ=X.forwardRef(((e,t)=>{const n=rJ(aJ,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=QQ(aJ,e.__scopeTooltip);return rg.jsx(FQ,{present:r||i.open,children:i.disableHoverableContent?rg.jsx(cJ,{side:a,...o,ref:t}):rg.jsx(iJ,{side:a,...o,ref:t})})})),iJ=X.forwardRef(((e,t)=>{const n=QQ(aJ,e.__scopeTooltip),r=YQ(aJ,e.__scopeTooltip),a=X.useRef(null),o=iK(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]),rg.jsx(cJ,{...e,ref:o})})),[sJ,lJ]=UQ(KQ,{isInside:!1}),cJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,l=QQ(aJ,n),c=$Q(n),{onClose:u}=l;return X.useEffect((()=>(document.addEventListener(qQ,u),()=>document.removeEventListener(qQ,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]),rg.jsx(wK,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:rg.jsxs(DQ,{"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:[rg.jsx(dK,{children:r}),rg.jsx(sJ,{scope:n,isInside:!0,children:rg.jsx(HQ,{id:l.contentId,role:"tooltip",children:a||r})})]})})}));oJ.displayName=aJ;var uJ="TooltipArrow",dJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=$Q(n);return lJ(uJ,n).isInside?null:rg.jsx(MQ,{...a,...r,ref:t})}));dJ.displayName=uJ;var pJ=ZQ,fJ=tJ,hJ=dJ;const mJ=X.createContext(void 0),gJ=({children:e,...t})=>{const n=XZ();return rg.jsx(mJ.Provider,{value:{...n,...t},children:rg.jsx(tK,{children:rg.jsx(pJ,{children:e})})})},yJ=()=>{const e=X.useContext(mJ);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},bJ=X.createContext(void 0);const vJ=({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}=yJ(),{aiChatSettings:u,baseSettings:d}=rR(),{baseUrl:p,appId:f,apiKey:h}=u,m=!!d.getAuthToken,g=!h&&!!f&&(!!i||m),{fetchWithAuth:y}=gR({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),N=X.useRef(null),I=X.useRef(m),O=X.useRef(i);X.useEffect((()=>{const e=I.current,t=O.current;I.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(eNe){console.error("[useChatHistory] Failed to load conversations:",eNe)}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=N.current)||n.abort();const r=new AbortController;N.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 rg.jsx(bJ.Provider,{value:n,children:"function"==typeof t?t(n):t})},kJ=()=>{const e=X.useContext(bJ);if(!e)throw new Error("useChatHistory must be used within a ChatHistoryProvider");return e},xJ=X.createContext(void 0),wJ=({children:e,field:t,fieldProps:n,autoFocus:r})=>{const{errors:a}=tL(),o=a[t.name];return rg.jsx(xJ.Provider,{value:{field:t,fieldProps:n,error:o,autoFocus:r},children:e})},EJ=()=>{const e=X.useContext(xJ);if(!e)throw new Error("useFormField must be used within a FormFieldProvider");return e},_J=X.createContext(void 0);const SJ=({children:e,value:t})=>rg.jsx(_J.Provider,{value:t,children:e}),TJ=["light","dark"],CJ="(prefers-color-scheme: dark)",AJ="undefined"==typeof window,NJ=X.createContext(void 0),IJ={setColorMode:e=>{},colorModes:[]};function OJ(e,t){const n=X.useContext(NJ)??IJ;return"dark"===(n.forcedColorMode??n.resolvedColorMode)?t:e}const RJ=e=>(X.useContext(NJ),rg.jsx(LJ,{...e})),PJ=["light","dark"],LJ=({forcedColorMode:e,disableTransitionOnChange:t=!1,enableSystem:n=!1,enableColorScheme:r=!0,storageKey:a="inkeep-colorMode",colorModes:o=PJ,defaultColorMode:i=(n?"system":"light"),attribute:s="data-theme",value:l,children:c,nonce:u,shadowHostId:d,rootId:p})=>{const[f,h]=X.useState((()=>MJ(a,i))),[m,g]=X.useState((()=>MJ(a))),y=l?Object.values(l):o,b=X.useCallback((e=>{var a;let o=e;if(!o)return;"system"===e&&n&&(o=jJ());const c=l?l[o]:o,u=t?FJ():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=TJ.includes(i)?i:null,t=TJ.includes(o)?o:e;h.style.colorScheme=t}null==u||u()}),[]),v=X.useCallback((e=>{h(e);try{localStorage.setItem(a,e)}catch(Fce){}}),[e]),k=X.useCallback((t=>{const r=jJ(t);g(r),"system"===f&&n&&!e&&b("system")}),[f,e]);X.useEffect((()=>{const e=window.matchMedia(CJ);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 rg.jsxs(NJ.Provider,{value:x,children:[rg.jsx(DJ,{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]})},DJ=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(TJ.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&&TJ.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='${CJ}',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 rg.jsx("script",{nonce:l,dangerouslySetInnerHTML:{__html:m}})}),(()=>!0)),MJ=(e,t)=>{if(AJ)return;let n;try{n=localStorage.getItem(e)||void 0}catch(Fce){}return n||t},FJ=()=>{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)}},jJ=e=>{e||(e=window.matchMedia(CJ));return e.matches?"dark":"light"};var zJ=Object.prototype.hasOwnProperty;function BJ(e,t,n){for(n of e.keys())if(HJ(n,t))return n}function HJ(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--&&HJ(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=BJ(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=BJ(t,a)))return!1;if(!HJ(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(zJ.call(e,n)&&++r&&!zJ.call(t,n))return!1;if(!(n in t)||!HJ(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function UJ(){const{baseSettings:e}=rR(),[t,n]=X.useState([]),r=function(e){const t=X.useRef(void 0);HJ(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=>rg.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:e.value}},e.key??GZ("link_")))),o=e.map((e=>{const t=e.key??GZ("stylesheet_");return rg.jsx("link",{id:t,rel:"stylesheet",type:"text/css",href:e.value,onLoad:()=>{n((t=>[...new Set([...t,e.value])]))}},t)}));return{customStyles:rg.jsxs(rg.Fragment,{children:[o,a]}),linksCount:e.length}}),[r]);return{customStyles:a,loaded:t.length>=(o??0)}}const $J=({children:e})=>{const{baseSettings:t}=rR(),{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=gk(s,r),h=function(e){const t={};for(const[n,r]of Object.entries(e)){const e=bk[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}=UJ(),{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]),rg.jsxs(rg.Fragment,{children:[!c&&rg.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&&rg.jsx(RJ,{forcedColorMode:b??k,...v,shadowHostId:null==a?void 0:a.id,rootId:null==o?void 0:o.id,children:rg.jsx("div",{className:l,style:{display:"contents",...h},children:e})})]})};function VJ(e){const{children:t,config:n,componentType:r}=e;return rg.jsx(nR,{value:{...n,componentType:r},children:rg.jsx($J,{children:rg.jsx(oR,{children:t})})})}const GJ=X.createContext(void 0),qJ=({children:e,source:t})=>rg.jsx(GJ.Provider,{value:{source:t},children:e}),WJ=()=>{const e=X.useContext(GJ);if(!e)throw new Error("useSourceItem must be used within a SourceItemProvider");return e},YJ=X.createContext(void 0),ZJ=({children:e,widget:t})=>rg.jsx(YJ.Provider,{value:t,children:e}),KJ=()=>X.useContext(YJ),XJ=(e,t)=>{const{isOpen:n,onOpenChange:r,defaultOpen:a=!1,shortcutKey:o,triggerSelector:i=t.defaultTriggerSelector}=e??{},{logEvent:s}=iR(),[l=a,c]=WZ({prop:n,defaultProp:a??!1,onChange:r}),u=i||t.defaultTriggerSelector;(e=>{const{triggerSelector:t,onTriggerClick:n}=e;X.useEffect((()=>{const e=e=>{var r;const a=e.target;t&&(null==(r=null==a?void 0:a.matches)?void 0:r.call(a,t))&&(null==n||n())};return t&&document.addEventListener("click",e),()=>{t&&document.removeEventListener("click",e)}}),[t,n])})({triggerSelector:u,onTriggerClick:u?()=>c(!l):void 0});const d=X.useRef(!0);X.useEffect((()=>{d.current?d.current=!1:s({eventName:l?`${t.eventNamePrefix}_opened`:`${t.eventNamePrefix}_closed`,properties:{}})}),[l,t.eventNamePrefix]);const p=X.useRef(l);return p.current=l,X.useEffect((()=>{const e=e=>{o&&(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===o.toLowerCase()&&(e.preventDefault(),e.stopPropagation(),c(!0)),"Escape"===e.key&&p.current&&(e.preventDefault(),c(!1))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[o,c]),{isOpen:l,setOpen:c,shortcutKey:o}},QJ=X.createContext(void 0),JJ=({children:e,value:t})=>rg.jsx(QJ.Provider,{value:t,children:e}),e0=()=>{const e=X.useContext(QJ);if(!e)throw new Error("useSidebarChat must be used within a SidebarChatProvider");return e},t0=X.createContext(void 0),n0=({children:e,value:t})=>rg.jsx(t0.Provider,{value:t,children:e});var r0=X.useLayoutEffect,a0=function(e,t){"function"!=typeof e?e.current=t:e(t)},o0={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},i0=function(e){Object.keys(o0).forEach((function(t){e.style.setProperty(t,o0[t],"important")}))},s0=null,l0=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize};var c0=function(){},u0=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],d0=!!document.documentElement.currentStyle,p0=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,u0.reduce((function(e,t){return e[t]=n[t],e}),{})),a=r.boxSizing;return""===a?null:(d0&&"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 f0(e,t,n){var r,a,o=(r=n,a=Q.useRef(r),r0((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 h0=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],m0=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,a=e.minRows,o=e.onChange,i=void 0===o?c0:o,s=e.onHeightChange,l=void 0===s?c0:s,c=x$(e,h0),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&&a0(n.current,null),n.current=t,t&&a0(t,r)}),[t])}(d,t),f=X.useRef(0),h=X.useRef(),m=function(){var e=d.current,t=n&&h.current?h.current:p0(e);if(t){h.current=t;var o=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),s0||((s0=document.createElement("textarea")).setAttribute("tabindex","-1"),s0.setAttribute("aria-hidden","true"),i0(s0)),null===s0.parentNode&&document.body.appendChild(s0);var a=e.paddingSize,o=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach((function(e){var t=e;s0.style[t]=i[t]})),i0(s0),s0.value=t;var l=l0(s0,e);s0.value=t,l=l0(s0,e),s0.value="x";var c=s0.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){f0(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()}))}})),f0(window,"resize",m),function(e){f0(document.fonts,"loadingdone",e)}(m),X.createElement("textarea",w$({},c,{onChange:function(e){u||m(),i(e)},ref:p}))},g0=X.forwardRef(m0),y0="Avatar",[b0]=sK(y0),[v0,k0]=b0(y0),x0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,o]=X.useState("idle");return rg.jsx(v0,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:o,children:rg.jsx(hK.span,{...r,ref:t})})}));x0.displayName=y0;var w0="AvatarImage",E0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...o}=e,i=k0(w0,n),s=function(e,t){const[n,r]=X.useState("idle");return SK((()=>{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=mK((e=>{a(e),i.onImageLoadingStatusChange(e)}));return SK((()=>{"idle"!==s&&l(s)}),[s,l]),"loaded"===s?rg.jsx(hK.img,{...o,ref:t,src:r}):null}));E0.displayName=w0;var _0="AvatarFallback",S0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,o=k0(_0,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?rg.jsx(hK.span,{...a,ref:t}):null}));S0.displayName=_0;var T0=x0,C0=E0,A0=S0;var N0="Checkbox",[I0]=sK(N0),[O0,R0]=I0(N0),P0=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=iK(t,(e=>f(e))),m=X.useRef(!1),g=!p||(u||!!p.closest("form")),[y=!1,b]=zQ({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]),rg.jsxs(O0,{scope:n,state:y,disabled:s,children:[rg.jsx(hK.button,{type:"button",role:"checkbox","aria-checked":F0(y)?"mixed":y,"aria-required":i,"data-state":j0(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onKeyDown:rK(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:rK(e.onClick,(e=>{b((e=>!!F0(e)||!e)),g&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))}),g&&rg.jsx(M0,{control:p,bubbles:!m.current,name:r,value:l,checked:y,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"},defaultChecked:!F0(o)&&o})]})}));P0.displayName=N0;var L0="CheckboxIndicator",D0=X.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=R0(L0,n);return rg.jsx(FQ,{present:r||F0(o.state)||!0===o.state,children:rg.jsx(hK.span,{"data-state":j0(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})}));D0.displayName=L0;var M0=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=hQ(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=F0(n),a.call(e,!F0(n)&&n),e.dispatchEvent(t)}}),[s,n,r]);const c=X.useRef(!F0(n)&&n);return rg.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 F0(e){return"indeterminate"===e}function j0(e){return F0(e)?"indeterminate":e?"checked":"unchecked"}var z0=P0,B0=D0,H0=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.Children.toArray(n),o=a.find(V0);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 rg.jsx(U0,{...r,ref:t,children:X.isValidElement(e)?X.cloneElement(e,void 0,n):null})}return rg.jsx(U0,{...r,ref:t,children:n})}));H0.displayName="Slot";var U0=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?oK(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));U0.displayName="SlotClone";var $0=({children:e})=>rg.jsx(rg.Fragment,{children:e});function V0(e){return X.isValidElement(e)&&e.type===$0}var G0=["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?H0:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),rg.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});var q0,W0="dismissableLayer.update",Y0="dismissableLayer.pointerDownOutside",Z0="dismissableLayer.focusOutside",K0=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),X0=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(K0),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=iK(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=mK(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){J0(Y0,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=mK(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){J0(Z0,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 gK((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&&(q0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Q0(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=q0)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Q0())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(W0,e),()=>document.removeEventListener(W0,e)}),[]),rg.jsx(G0.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:rK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:rK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:rK(e.onPointerDownCapture,x.onPointerDownCapture)})}));X0.displayName="DismissableLayer";function Q0(){const e=new CustomEvent(W0);document.dispatchEvent(e)}function J0(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(K0),r=X.useRef(null),a=iK(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),rg.jsx(G0.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var e1=0;function t1(){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 n1="focusScope.autoFocusOnMount",r1="focusScope.autoFocusOnUnmount",a1={bubbles:!1,cancelable:!0},o1=X.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=X.useState(null),c=mK(a),u=mK(o),d=X.useRef(null),p=iK(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:c1(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||c1(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&c1(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){u1.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(n1,a1);s.addEventListener(n1,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(c1(r,{select:t}),document.activeElement!==n)return}((e=i1(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&c1(s))}return()=>{s.removeEventListener(n1,c),setTimeout((()=>{const e=new CustomEvent(r1,a1);s.addEventListener(r1,u),s.dispatchEvent(e),e.defaultPrevented||c1(t??document.body,{select:!0}),s.removeEventListener(r1,u),u1.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=i1(e),n=s1(t,e),r=s1(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&c1(o,{select:!0})):(e.preventDefault(),n&&c1(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return rg.jsx(G0.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function i1(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 s1(e,t){for(const n of e)if(!l1(n,{upTo:t}))return n}function l1(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 c1(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()}}o1.displayName="FocusScope";var u1=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=d1(e,t),e.unshift(t)},remove(t){var n;e=d1(e,t),null==(n=e[0])||n.resume()}}}();function d1(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var p1=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return rg.jsx(G0.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:rg.jsx("polygon",{points:"0,0 30,0 15,10"})})}));p1.displayName="Arrow";var f1=p1,h1="Popper",[m1,g1]=sK(h1),[y1,b1]=m1(h1),v1=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return rg.jsx(y1,{scope:t,anchor:r,onAnchorChange:a,children:n})};v1.displayName=h1;var k1="PopperAnchor",x1=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=b1(k1,n),i=X.useRef(null),s=iK(t,i);return X.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:rg.jsx(G0.div,{...a,ref:s})}));x1.displayName=k1;var w1="PopperContent",[E1,_1]=m1(w1),S1=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=b1(w1,l),[E,_]=X.useState(null),S=iK(t,(e=>_(e))),[T,C]=X.useState(null),A=hQ(T),N=(null==A?void 0:A.width)??0,I=(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(N1),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=aQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>VX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[oQ({mainAxis:u+I,alignmentAxis:p}),h&&iQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?sQ():void 0,...D}),h&&lQ({...D}),cQ({...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&&dQ({element:T,padding:f}),I1({arrowWidth:N,arrowHeight:I}),b&&uQ({strategy:"referenceHidden",...D})]}),[H,U]=O1(j),$=mK(k);SK((()=>{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 SK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),rg.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:rg.jsx(E1,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:rg.jsx(G0.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));S1.displayName=w1;var T1="PopperArrow",C1={top:"bottom",right:"left",bottom:"top",left:"right"},A1=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=_1(T1,n),o=C1[a.placedSide];return rg.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:rg.jsx(f1,{...r,ref:t,style:{...r.style,display:"block"}})})}));function N1(e){return null!==e}A1.displayName=T1;var I1=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]=O1(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 O1(e){const[t,n="center"]=e.split("-");return[t,n]}var R1=v1,P1=x1,L1=S1,D1=A1,M1=new WeakMap,F1=new WeakMap,j1={},z1=0,B1=function(e){return e&&(e.host||B1(e.parentNode))},H1=function(e,t,n,r){var a=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=B1(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]);j1[n]||(j1[n]=new WeakMap);var o=j1[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=(M1.get(e)||0)+1,c=(o.get(e)||0)+1;M1.set(e,l),o.set(e,c),i.push(e),1===l&&a&&F1.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(Fce){console.error("aria-hidden: cannot operate on ",e,Fce)}}))};return u(t),s.clear(),z1++,function(){i.forEach((function(e){var t=M1.get(e)-1,a=o.get(e)-1;M1.set(e,t),o.set(e,a),t||(F1.has(e)||e.removeAttribute(r),F1.delete(e)),a||e.removeAttribute(n)})),--z1||(M1=new WeakMap,M1=new WeakMap,F1=new WeakMap,j1={})}},U1=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"))),H1(r,a,n,"aria-hidden")):function(){return null}},$1="right-scroll-bar-position",V1="width-before-scroll-bar";function G1(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var q1="undefined"!=typeof window?X.useLayoutEffect:X.useEffect,W1=new WeakMap;function Y1(e,t){var n,r,a,o=(n=null,r=function(t){return e.forEach((function(e){return G1(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 q1((function(){var t=W1.get(o);if(t){var n=new Set(t),r=new Set(e),a=o.current;n.forEach((function(e){r.has(e)||G1(e,null)})),r.forEach((function(e){n.has(e)||G1(e,a)}))}W1.set(o,e)}),[e]),o}function Z1(e){return e}var K1=function(e){var t=e.sideCar,n=S$(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,_$({},n))};K1.isSideCarExport=!0;var X1=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Z1);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=_$({async:!0,ssr:!1},e),t}(),Q1=function(){},J1=X.forwardRef((function(e,t){var n=X.useRef(null),r=X.useState({onScrollCapture:Q1,onWheelCapture:Q1,onTouchMoveCapture:Q1}),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=S$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,w=Y1([n,t]),E=_$(_$({},k),a);return X.createElement(X.Fragment,null,u&&X.createElement(x,{sideCar:X1,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),_$(_$({},E),{ref:w})):X.createElement(b,_$({},E,{className:l,ref:w}),s))}));J1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},J1.classNames={fullWidth:V1,zeroRight:$1};function e2(){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 t2=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=e2())&&(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)}}},n2=function(){var e,t=(e=t2(),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}},r2={left:0,top:0,right:0,gap:0},a2=function(e){return parseInt(e||"",10)||0},o2=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return r2;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[a2(n),a2(r),a2(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])}},i2=n2(),s2="data-scroll-locked",l2=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(s2,"] {\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($1," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(V1," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat($1," .").concat($1," {\n right: 0 ").concat(r,";\n }\n \n .").concat(V1," .").concat(V1," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(s2,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},c2=function(){var e=parseInt(document.body.getAttribute(s2)||"0",10);return isFinite(e)?e:0},u2=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(s2,(c2()+1).toString()),function(){var e=c2()-1;e<=0?document.body.removeAttribute(s2):document.body.setAttribute(s2,e.toString())}}),[]);var o=X.useMemo((function(){return o2(a)}),[a]);return X.createElement(i2,{styles:l2(o,!t,a,n?"":"!important")})},d2=!1;if("undefined"!=typeof window)try{var p2=Object.defineProperty({},"passive",{get:function(){return d2=!0,!0}});window.addEventListener("test",p2,p2),window.removeEventListener("test",p2,p2)}catch(eNe){d2=!1}var f2=!!d2&&{passive:!1},h2=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])},m2=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),g2(e,r)){var a=y2(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},g2=function(e,t){return"v"===e?function(e){return h2(e,"overflowY")}(t):function(e){return h2(e,"overflowX")}(t)},y2=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},b2=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},v2=function(e){return[e.deltaX,e.deltaY]},k2=function(e){return e&&"current"in e?e.current:e},x2=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},w2=0,E2=[];function _2(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const S2=(T2=function(e){var t=X.useRef([]),n=X.useRef([0,0]),r=X.useRef(),a=X.useState(w2++)[0],o=X.useState(n2)[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=T$([e.lockRef.current],(e.shards||[]).map(k2),!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=b2(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=m2(d,u);if(!h)return!0;if(h?a=d:(a="v"===d?"h":"v",h=m2(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=y2(e,i),f=p[0],h=p[1]-p[2]-a*f;(f||h)&&g2(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(E2.length&&E2[E2.length-1]===o){var r="deltaY"in n?v2(n):b2(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(k2).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:_2(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=b2(e),r.current=void 0}),[]),d=X.useCallback((function(t){c(t.type,v2(t),t.target,s(t,e.lockRef.current))}),[]),p=X.useCallback((function(t){c(t.type,b2(t),t.target,s(t,e.lockRef.current))}),[]);X.useEffect((function(){return E2.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,f2),document.addEventListener("touchmove",l,f2),document.addEventListener("touchstart",u,f2),function(){E2=E2.filter((function(e){return e!==o})),document.removeEventListener("wheel",l,f2),document.removeEventListener("touchmove",l,f2),document.removeEventListener("touchstart",u,f2)}}),[]);var f=e.removeScrollBar,h=e.inert;return X.createElement(X.Fragment,null,h?X.createElement(o,{styles:x2(a)}):null,f?X.createElement(u2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},X1.useMedium(T2),K1);var T2,C2=X.forwardRef((function(e,t){return X.createElement(J1,_$({},e,{ref:t,sideCar:S2}))}));C2.classNames=J1.classNames;var A2="Popover",[N2]=sK(A2,[g1]),I2=g1(),[O2,R2]=N2(A2),P2=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!1}=e,s=I2(t),l=X.useRef(null),[c,u]=X.useState(!1),[d=!1,p]=zQ({prop:r,defaultProp:a,onChange:o});return rg.jsx(R1,{...s,children:rg.jsx(O2,{scope:t,contentId:AK(),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})})};P2.displayName=A2;var L2="PopoverAnchor";X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=R2(L2,n),o=I2(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=a;return X.useEffect((()=>(i(),()=>s())),[i,s]),rg.jsx(P1,{...o,...r,ref:t})})).displayName=L2;var D2="PopoverTrigger",M2=X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=R2(D2,n),o=I2(n),i=iK(t,a.triggerRef),s=rg.jsx(G0.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":q2(a.open),...r,ref:i,onClick:rK(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:rg.jsx(P1,{asChild:!0,...o,children:s})}));M2.displayName=D2;var[F2,j2]=N2("PopoverPortal",{forceMount:void 0}),z2="PopoverContent",B2=X.forwardRef(((e,t)=>{const n=j2(z2,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,o=R2(z2,e.__scopePopover);return rg.jsx(FQ,{present:r||o.open,children:o.modal?rg.jsx(H2,{...a,ref:t}):rg.jsx(U2,{...a,ref:t})})}));B2.displayName=z2;var H2=X.forwardRef(((e,t)=>{const n=R2(z2,e.__scopePopover),r=X.useRef(null),a=iK(t,r),o=X.useRef(!1);return X.useEffect((()=>{const e=r.current;if(e)return U1(e)}),[]),rg.jsx(C2,{as:H0,allowPinchZoom:!0,children:rg.jsx($2,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:rK(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),o.current||null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:rK(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:rK(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),U2=X.forwardRef(((e,t)=>{const n=R2(z2,e.__scopePopover),r=X.useRef(!1),a=X.useRef(!1);return rg.jsx($2,{...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()}})})),$2=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=R2(z2,n),f=I2(n);return X.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??t1()),document.body.insertAdjacentElement("beforeend",e[1]??t1()),e1++,()=>{1===e1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),e1--}}),[]),rg.jsx(o1,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:rg.jsx(X0,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:rg.jsx(L1,{"data-state":q2(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)"}})})})})),V2="PopoverClose";X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=R2(V2,n);return rg.jsx(G0.button,{type:"button",...r,ref:t,onClick:rK(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=V2;var G2=X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=I2(n);return rg.jsx(D1,{...a,...r,ref:t})}));function q2(e){return e?"open":"closed"}G2.displayName="PopoverArrow";var W2=P2,Y2=M2,Z2=B2,K2=G2,X2=X.createContext(void 0);var Q2="ScrollArea",[J2]=sK(Q2),[e5,t5]=J2(Q2),n5=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=iK(t,(e=>l(e))),T=function(e){const t=X.useContext(X2);return e||t||"ltr"}(a);return rg.jsx(e5,{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:rg.jsx(hK.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}})})}));n5.displayName=Q2;var r5="ScrollAreaViewport",a5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,i=t5(r5,n),s=iK(t,X.useRef(null),i.onViewportChange);return rg.jsxs(rg.Fragment,{children:[rg.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}),rg.jsx(hK.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:rg.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})}));a5.displayName=r5;var o5="ScrollAreaScrollbar",i5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=t5(o5,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?rg.jsx(s5,{...r,ref:t,forceMount:n}):"scroll"===a.type?rg.jsx(l5,{...r,ref:t,forceMount:n}):"auto"===a.type?rg.jsx(c5,{...r,ref:t,forceMount:n}):"always"===a.type?rg.jsx(u5,{...r,ref:t}):null}));i5.displayName=o5;var s5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=t5(o5,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]),rg.jsx(FQ,{present:n||o,children:rg.jsx(c5,{"data-state":o?"visible":"hidden",...r,ref:t})})})),l5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=t5(o5,e.__scopeScrollArea),o="horizontal"===e.orientation,i=N5((()=>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]),rg.jsx(FQ,{present:n||"hidden"!==s,children:rg.jsx(u5,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:rK(e.onPointerEnter,(()=>l("POINTER_ENTER"))),onPointerLeave:rK(e.onPointerLeave,(()=>l("POINTER_LEAVE")))})})})),c5=X.forwardRef(((e,t)=>{const n=t5(o5,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,i]=X.useState(!1),s="horizontal"===e.orientation,l=N5((()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}}),10);return I5(n.viewport,l),I5(n.content,l),rg.jsx(FQ,{present:r||o,children:rg.jsx(u5,{"data-state":o?"visible":"hidden",...a,ref:t})})})),u5=X.forwardRef(((e,t)=>{const{orientation:n="vertical",...r}=e,a=t5(o5,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=E5(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=_5(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 T5([l,c],d)(e)}(e,i.current,s,t)}return"horizontal"===n?rg.jsx(d5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=S5(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?rg.jsx(p5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=S5(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})),d5=X.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=t5(o5,e.__scopeScrollArea),[i,s]=X.useState(),l=X.useRef(null),c=iK(t,l,o.onScrollbarXChange);return X.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),rg.jsx(m5,{"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":_5(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),C5(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:w5(i.paddingLeft),paddingEnd:w5(i.paddingRight)}})}})})),p5=X.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=t5(o5,e.__scopeScrollArea),[i,s]=X.useState(),l=X.useRef(null),c=iK(t,l,o.onScrollbarYChange);return X.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),rg.jsx(m5,{"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":_5(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),C5(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:w5(i.paddingTop),paddingEnd:w5(i.paddingBottom)}})}})})),[f5,h5]=J2(o5),m5=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=t5(o5,n),[h,m]=X.useState(null),g=iK(t,(e=>m(e))),y=X.useRef(null),b=X.useRef(""),v=f.viewport,k=r.content-r.viewport,x=mK(u),w=mK(l),E=N5(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]),I5(h,E),I5(f.content,E),rg.jsx(f5,{scope:n,scrollbar:h,hasThumb:a,onThumbChange:mK(o),onThumbPointerUp:mK(i),onThumbPositionChange:w,onThumbPointerDown:mK(s),children:rg.jsx(hK.div,{...p,ref:g,style:{position:"absolute",...p.style},onPointerDown:rK(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:rK(e.onPointerMove,_),onPointerUp:rK(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}))})})})),g5="ScrollAreaThumb",y5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=h5(g5,e.__scopeScrollArea);return rg.jsx(FQ,{present:n||a.hasThumb,children:rg.jsx(b5,{ref:t,...r})})})),b5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=t5(g5,n),i=h5(g5,n),{onThumbPositionChange:s}=i,l=iK(t,(e=>i.onThumbChange(e))),c=X.useRef(void 0),u=N5((()=>{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=A5(e,s);c.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[o.viewport,u,s]),rg.jsx(hK.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:rK(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:rK(e.onPointerUp,i.onThumbPointerUp)})}));y5.displayName=g5;var v5="ScrollAreaCorner",k5=X.forwardRef(((e,t)=>{const n=t5(v5,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?rg.jsx(x5,{...e,ref:t}):null}));k5.displayName=v5;var x5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=t5(v5,n),[o,i]=X.useState(0),[s,l]=X.useState(0),c=Boolean(o&&s);return I5(a.scrollbarX,(()=>{var e;const t=(null==(e=a.scrollbarX)?void 0:e.offsetHeight)||0;a.onCornerHeightChange(t),l(t)})),I5(a.scrollbarY,(()=>{var e;const t=(null==(e=a.scrollbarY)?void 0:e.offsetWidth)||0;a.onCornerWidthChange(t),i(t)})),c?rg.jsx(hK.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 w5(e){return e?parseInt(e,10):0}function E5(e,t){const n=e/t;return isNaN(n)?0:n}function _5(e){const t=E5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function S5(e,t,n="ltr"){const r=_5(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 T5([0,i],[0,s])(l)}function T5(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 C5(e,t){return e>0&&e<t}var A5=(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 N5(e,t){const n=mK(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 I5(e,t){const n=mK(t);SK((()=>{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 O5=n5,R5=a5,P5=k5;function L5(e,[t,n]){return Math.min(n,Math.max(t,e))}function D5(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 M5(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 rg.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}\``)}]},F5(r,...t)]}function F5(...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 j5(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function z5(...e){return t=>{let n=!1;const r=e.map((e=>{const r=j5(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():j5(e[t],null)}}}}function B5(...e){return X.useCallback(z5(...e),e)}var H5=Symbol.for("react.lazy"),U5=J[" use ".trim().toString()];function $5(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===H5&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function V5(e){const t=G5(e),n=X.forwardRef(((e,n)=>{let{children:r,...a}=e;$5(r)&&"function"==typeof U5&&(r=U5(r._payload));const o=X.Children.toArray(r),i=o.find(W5);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 rg.jsx(t,{...a,ref:n,children:X.isValidElement(e)?X.cloneElement(e,void 0,r):null})}return rg.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function G5(e){const t=X.forwardRef(((e,t)=>{let{children:n,...r}=e;if($5(n)&&"function"==typeof U5&&(n=U5(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?z5(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 q5=Symbol("radix.slottable");function W5(e){return X.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===q5}var Y5=X.createContext(void 0);function Z5(e){const t=X.useContext(Y5);return e||t||"ltr"}function K5(e){const t=X5(e),n=X.forwardRef(((e,n)=>{const{children:r,...a}=e,o=X.Children.toArray(r),i=o.find(J5);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 rg.jsx(t,{...a,ref:n,children:X.isValidElement(e)?X.cloneElement(e,void 0,r):null})}return rg.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function X5(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?z5(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 Q5=Symbol("radix.slottable");function J5(e){return X.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Q5}var e3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=K5(`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),rg.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function t3(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 n3,r3="dismissableLayer.update",a3="dismissableLayer.pointerDownOutside",o3="dismissableLayer.focusOutside",i3=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),s3=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(i3),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=B5(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=t3(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){c3(a3,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=t3(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){c3(o3,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=t3(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&&(n3=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),l3(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=n3)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),l3())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(r3,e),()=>document.removeEventListener(r3,e)}),[]),rg.jsx(e3.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:D5(e.onFocusCapture,w.onFocusCapture),onBlurCapture:D5(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:D5(e.onPointerDownCapture,x.onPointerDownCapture)})}));s3.displayName="DismissableLayer";function l3(){const e=new CustomEvent(r3);document.dispatchEvent(e)}function c3(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(i3),r=X.useRef(null),a=B5(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),rg.jsx(e3.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var u3=0;function d3(){X.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??p3()),document.body.insertAdjacentElement("beforeend",e[1]??p3()),u3++,()=>{1===u3&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),u3--}}),[])}function p3(){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 f3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=V5(`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),rg.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),h3="focusScope.autoFocusOnMount",m3="focusScope.autoFocusOnUnmount",g3={bubbles:!1,cancelable:!0},y3=X.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=X.useState(null),c=t3(a),u=t3(o),d=X.useRef(null),p=B5(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:x3(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||x3(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&x3(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){w3.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(h3,g3);s.addEventListener(h3,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(x3(r,{select:t}),document.activeElement!==n)return}((e=b3(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&x3(s))}return()=>{s.removeEventListener(h3,c),setTimeout((()=>{const e=new CustomEvent(m3,g3);s.addEventListener(m3,u),s.dispatchEvent(e),e.defaultPrevented||x3(t??document.body,{select:!0}),s.removeEventListener(m3,u),w3.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=b3(e),n=v3(t,e),r=v3(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&x3(o,{select:!0})):(e.preventDefault(),n&&x3(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return rg.jsx(f3.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function b3(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 v3(e,t){for(const n of e)if(!k3(n,{upTo:t}))return n}function k3(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 x3(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()}}y3.displayName="FocusScope";var w3=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=E3(e,t),e.unshift(t)},remove(t){var n;e=E3(e,t),null==(n=e[0])||n.resume()}}}();function E3(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var _3=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return rg.jsx(e3.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:rg.jsx("polygon",{points:"0,0 30,0 15,10"})})}));_3.displayName="Arrow";var S3=_3;function T3(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 rg.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}\``)}]},C3(r,...t)]}function C3(...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 A3="Popper",[N3,I3]=T3(A3),[O3,R3]=N3(A3),P3=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return rg.jsx(O3,{scope:t,anchor:r,onAnchorChange:a,children:n})};P3.displayName=A3;var L3="PopperAnchor",D3=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=R3(L3,n),i=X.useRef(null),s=B5(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:rg.jsx(e3.div,{...a,ref:s})}));D3.displayName=L3;var M3="PopperContent",[F3,j3]=N3(M3),z3=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=R3(M3,l),[E,_]=X.useState(null),S=B5(t,(e=>_(e))),[T,C]=X.useState(null),A=function(e){const[t,n]=X.useState(void 0);return zO((()=>{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),N=(null==A?void 0:A.width)??0,I=(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($3),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=aQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>VX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[oQ({mainAxis:u+I,alignmentAxis:p}),h&&iQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?sQ():void 0,...D}),h&&lQ({...D}),cQ({...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&&dQ({element:T,padding:f}),V3({arrowWidth:N,arrowHeight:I}),b&&uQ({strategy:"referenceHidden",...D})]}),[H,U]=G3(j),$=t3(k);zO((()=>{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 zO((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),rg.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:rg.jsx(F3,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:rg.jsx(e3.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));z3.displayName=M3;var B3="PopperArrow",H3={top:"bottom",right:"left",bottom:"top",left:"right"},U3=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=j3(B3,n),o=H3[a.placedSide];return rg.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:rg.jsx(S3,{...r,ref:t,style:{...r.style,display:"block"}})})}));function $3(e){return null!==e}U3.displayName=B3;var V3=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]=G3(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 G3(e){const[t,n="center"]=e.split("-");return[t,n]}var q3=P3,W3=D3,Y3=z3,Z3=U3,K3=X.forwardRef(((e,t)=>{var n;const{container:r,...a}=e,[o,i]=X.useState(!1);zO((()=>i(!0)),[]);const s=r||o&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?de.createPortal(rg.jsx(f3.div,{...a,ref:t}),s):null}));K3.displayName="Portal";const X3=[" ","Enter","ArrowUp","ArrowDown"],Q3=[" ","Enter"],J3="Select",[e4,t4,n4]=function(e){const t=e+"CollectionProvider",[n,r]=M5(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 rg.jsx(a,{scope:t,itemMap:o,collectionRef:r,children:n})};i.displayName=t;const s=e+"CollectionSlot",l=V5(s),c=Q.forwardRef(((e,t)=>{const{scope:n,children:r}=e,a=B5(t,o(s,n).collectionRef);return rg.jsx(l,{ref:a,children:r})}));c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=V5(u),f=Q.forwardRef(((e,t)=>{const{scope:n,children:r,...a}=e,i=Q.useRef(null),s=B5(t,i),l=o(u,n);return Q.useEffect((()=>(l.itemMap.set(i,{ref:i,...a}),()=>{l.itemMap.delete(i)}))),rg.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]}(J3),[r4]=M5(J3,[n4,I3]),a4=I3(),[o4,i4]=r4(J3),[s4,l4]=r4(J3),c4=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=a4(t),[f,h]=X.useState(null),[m,g]=X.useState(null),[y,b]=X.useState(!1),v=Z5(c),[k,x]=WZ({prop:r,defaultProp:a??!1,onChange:o,caller:J3}),[w,E]=WZ({prop:i,defaultProp:s,onChange:l,caller:J3}),_=X.useRef(null),[S,T]=X.useState(new Set);return rg.jsx(q3,{...p,children:rg.jsx(o4,{required:d,scope:t,trigger:f,onTriggerChange:h,valueNode:m,onValueNodeChange:g,valueNodeHasChildren:y,onValueNodeHasChildrenChange:b,contentId:UO(),value:w,onValueChange:E,open:!!k,onOpenChange:x,dir:v,triggerPointerDownPosRef:_,disabled:u,children:rg.jsx(e4.Provider,{scope:t,children:rg.jsx(s4,{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})})})})};c4.displayName=J3;const u4="SelectTrigger",d4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=a4(n),i=i4(u4,n),s=i.disabled||r,l=B5(t,i.onTriggerChange),c=t4(n),u=X.useRef("touch"),[d,p,f]=G4((e=>{const t=c().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=q4(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 rg.jsx(W3,{asChild:!0,...o,children:rg.jsx(f3.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":V4(i.value)?"":void 0,...a,ref:l,onClick:D5(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==u.current&&h(e)})),onPointerDown:D5(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:D5(a.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||X3.includes(e.key)&&(h(),e.preventDefault())}))})})}));d4.displayName=u4;const p4="SelectValue",f4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...s}=e,l=i4(p4,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==o,d=B5(t,l.onValueNodeChange);return zO((()=>{c(u)}),[c,u]),rg.jsx(f3.span,{...s,ref:d,style:{pointerEvents:"none"},children:V4(l.value)?rg.jsx(rg.Fragment,{children:i}):o})}));f4.displayName=p4;const h4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return rg.jsx(f3.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})}));h4.displayName="SelectIcon";const m4="SelectContent",g4=X.forwardRef(((e,t)=>{const n=i4(m4,e.__scopeSelect),[r,a]=X.useState();if(zO((()=>{a(new DocumentFragment)}),[]),!n.open){const t=r;return t?ue.createPortal(rg.jsx(b4,{scope:e.__scopeSelect,children:rg.jsx(e4.Slot,{scope:e.__scopeSelect,children:rg.jsx("div",{children:e.children})})}),t):null}return rg.jsx(x4,{...e,ref:t})}));g4.displayName=m4;const y4=10,[b4,v4]=r4(m4),k4=V5("SelectContent.RemoveScroll"),x4=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=i4(m4,n),[v,k]=X.useState(null),[x,w]=X.useState(null),E=B5(t,(e=>k(e))),[_,S]=X.useState(null),[T,C]=X.useState(null),A=t4(n),[N,I]=X.useState(!1),O=X.useRef(!1);X.useEffect((()=>{if(v)return U1(v)}),[v]),d3();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((()=>{N&&P()}),[N,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]=G4((e=>{const t=A().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=q4(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?E4:w4,U=H===E4?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g}:{};return rg.jsx(b4,{scope:n,content:v,viewport:x,onViewportChange:w,itemRefCallback:j,selectedItem:_,onItemLeave:z,itemTextRefCallback:B,focusSelectedItem:P,selectedItemText:T,position:r,isPositioned:N,searchRef:M,children:rg.jsx(C2,{as:k4,allowPinchZoom:!0,removeScrollBar:!1,children:rg.jsx(y3,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:D5(a,(e=>{var t;null==(t=b.trigger)||t.focus({preventScroll:!0}),e.preventDefault()})),children:rg.jsx(s3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:rg.jsx(H,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...U,onPlaced:()=>I(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:D5(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()}}))})})})})})}));x4.displayName="SelectContentImpl";const w4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=i4(m4,n),i=v4(m4,n),[s,l]=X.useState(null),[c,u]=X.useState(null),d=B5(t,(e=>u(e))),p=t4(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-y4,d=L5(o,[y4,Math.max(y4,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-y4,d=L5(o,[y4,Math.max(y4,u-c)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=p(),l=window.innerHeight-2*y4,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-y4,T=l-S,C=g.offsetHeight/2,A=h+b+(g.offsetTop+C),N=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)+N;s.style.height=t+"px",m.scrollTop=A-S+m.offsetTop}s.style.margin=`${y4}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]);zO((()=>v()),[v]);const[k,x]=X.useState();zO((()=>{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 rg.jsx(_4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:f,onScrollButtonChange:w,children:rg.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:rg.jsx(f3.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));w4.displayName="SelectItemAlignedPosition";const E4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=y4,...o}=e,i=a4(n);return rg.jsx(Y3,{...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)"}})}));E4.displayName="SelectPopperPosition";const[_4,S4]=r4(m4,{}),T4="SelectViewport",C4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=v4(T4,n),i=S4(T4,n),s=B5(t,o.onViewportChange),l=X.useRef(0);return rg.jsxs(rg.Fragment,{children:[rg.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}),rg.jsx(e4.Slot,{scope:n,children:rg.jsx(f3.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:D5(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*y4,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}))})})]})}));C4.displayName=T4;const A4="SelectGroup",[N4,I4]=r4(A4);X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=UO();return rg.jsx(N4,{scope:n,id:a,children:rg.jsx(f3.div,{role:"group","aria-labelledby":a,...r,ref:t})})})).displayName=A4;const O4="SelectLabel";X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=I4(O4,n);return rg.jsx(f3.div,{id:a.id,...r,ref:t})})).displayName=O4;const R4="SelectItem",[P4,L4]=r4(R4),D4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,s=i4(R4,n),l=v4(R4,n),c=s.value===r,[u,d]=X.useState(o??""),[p,f]=X.useState(!1),h=B5(t,(e=>{var t;return null==(t=l.itemRefCallback)?void 0:t.call(l,e,r,a)})),m=UO(),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 rg.jsx(P4,{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:rg.jsx(e4.ItemSlot,{scope:n,value:r,disabled:a,textValue:u,children:rg.jsx(f3.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:D5(i.onFocus,(()=>f(!0))),onBlur:D5(i.onBlur,(()=>f(!1))),onClick:D5(i.onClick,(()=>{"mouse"!==g.current&&y()})),onPointerUp:D5(i.onPointerUp,(()=>{"mouse"===g.current&&y()})),onPointerDown:D5(i.onPointerDown,(e=>{g.current=e.pointerType})),onPointerMove:D5(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:D5(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null==(t=l.onItemLeave)||t.call(l))})),onKeyDown:D5(i.onKeyDown,(e=>{var t;""!==(null==(t=l.searchRef)?void 0:t.current)&&" "===e.key||(Q3.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));D4.displayName=R4;const M4="SelectItemText",F4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=i4(M4,n),s=v4(M4,n),l=L4(M4,n),c=l4(M4,n),[u,d]=X.useState(null),p=B5(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((()=>rg.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value)),[l.disabled,l.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return zO((()=>(m(h),()=>g(h))),[m,g,h]),rg.jsxs(rg.Fragment,{children:[rg.jsx(f3.span,{id:l.textId,...o,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ue.createPortal(o.children,i.valueNode):null]})}));F4.displayName=M4;const j4="SelectItemIndicator",z4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return L4(j4,n).isSelected?rg.jsx(f3.span,{"aria-hidden":!0,...r,ref:t}):null}));z4.displayName=j4;const B4="SelectScrollUpButton";X.forwardRef(((e,t)=>{const n=v4(B4,e.__scopeSelect),r=S4(B4,e.__scopeSelect),[a,o]=X.useState(!1),i=B5(t,r.onScrollButtonChange);return zO((()=>{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?rg.jsx(U4,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null})).displayName=B4;const H4="SelectScrollDownButton";X.forwardRef(((e,t)=>{const n=v4(H4,e.__scopeSelect),r=S4(H4,e.__scopeSelect),[a,o]=X.useState(!1),i=B5(t,r.onScrollButtonChange);return zO((()=>{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?rg.jsx(U4,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null})).displayName=H4;const U4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=v4("SelectScrollButton",n),i=X.useRef(null),s=t4(n),l=X.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return X.useEffect((()=>()=>l()),[l]),zO((()=>{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]),rg.jsx(f3.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:D5(a.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:D5(a.onPointerMove,(()=>{var e;null==(e=o.onItemLeave)||e.call(o),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:D5(a.onPointerLeave,(()=>{l()}))})}));X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return rg.jsx(f3.div,{"aria-hidden":!0,...r,ref:t})})).displayName="SelectSeparator";const $4="SelectArrow";function V4(e){return""===e||void 0===e}function G4(e){const t=t3(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 q4(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=a4(n),o=i4($4,n),i=v4($4,n);return o.open&&"popper"===i.position?rg.jsx(Z3,{...a,...r,ref:t}):null})).displayName=$4;const W4=c4,Y4=d4,Z4=f4,K4=h4,X4=g4,Q4=C4,J4=D4,e6=F4,t6=z4;var n6=(e,t=[])=>({parts:(...n)=>{if(a6(t))return n6(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>n6(e,[...t,...n]),omit:(...n)=>n6(e,t.filter((e=>!n.includes(e)))),rename:e=>n6(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${r6(e)}"][data-part="${r6(n)}"]`,`& [data-scope="${r6(e)}"][data-part="${r6(n)}"]`].join(", "),attrs:{"data-scope":r6(e),"data-part":r6(n)}}})),{})}),r6=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),a6=e=>0===e.length,o6=n6("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger").build(),i6=Object.defineProperty,s6=(e,t,n)=>((e,t,n)=>t in e?i6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),l6={itemToValue:e=>"string"==typeof e?e:Gq(e)&&Wq(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:Gq(e)&&Wq(e,"label")?e.label:l6.itemToValue(e),isItemDisabled:e=>!(!Gq(e)||!Wq(e,"disabled"))&&!!e.disabled},c6=class e{constructor(t){this.options=t,s6(this,"items"),s6(this,"indexMap",null),s6(this,"copy",(t=>new e({...this.options,items:t??[...this.items]}))),s6(this,"isEqual",(e=>$q(this.items,e.items))),s6(this,"setItems",(e=>this.copy(e))),s6(this,"getValues",((e=this.items)=>{const t=[];for(const n of e){const e=this.getItemValue(n);null!=e&&t.push(e)}return t})),s6(this,"find",(e=>{if(null==e)return null;const t=this.indexOf(e);return-1!==t?this.at(t):null})),s6(this,"findMany",(e=>{const t=[];for(const n of e){const e=this.find(n);null!=e&&t.push(e)}return t})),s6(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})),s6(this,"sortFn",((e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0))),s6(this,"sort",(e=>[...e].sort(this.sortFn.bind(this)))),s6(this,"getItemValue",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToValue)?void 0:n.call(t,e))??l6.itemToValue(e)})),s6(this,"getItemDisabled",(e=>{var t,n;return null!=e&&((null==(n=(t=this.options).isItemDisabled)?void 0:n.call(t,e))??l6.isItemDisabled(e))})),s6(this,"stringifyItem",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToString)?void 0:n.call(t,e))??l6.itemToString(e)})),s6(this,"stringify",(e=>null==e?null:this.stringifyItem(this.find(e)))),s6(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)})),s6(this,"stringifyMany",((e,t)=>this.stringifyItems(this.findMany(e),t))),s6(this,"has",(e=>-1!==this.indexOf(e))),s6(this,"hasItem",(e=>null!=e&&this.has(this.getItemValue(e)))),s6(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})),s6(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))})),s6(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))})),s6(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})),s6(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)&&u6(this.stringifyItem(o),e)))return o}})),s6(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})),s6(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)])})),s6(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)])})),s6(this,"insert",((e,...t)=>this.copy(d6(this.items,e,...t)))),s6(this,"insertBefore",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(d6(this.items,n,...t))})),s6(this,"insertAfter",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(d6(this.items,n+1,...t))})),s6(this,"prepend",((...e)=>this.copy(d6(this.items,0,...e)))),s6(this,"append",((...e)=>this.copy(d6(this.items,this.items.length,...e)))),s6(this,"filter",(e=>{const t=this.items.filter(((t,n)=>e(this.stringifyItem(t),n,t)));return this.copy(t)})),s6(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)})))})),s6(this,"move",((e,t)=>{const n=this.indexOf(e);return-1===n?this:this.copy(p6(this.items,[n],t))})),s6(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(p6(this.items,r,n))})),s6(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(p6(this.items,r,n+1))})),s6(this,"reorder",((e,t)=>this.copy(p6(this.items,[e],t)))),s6(this,"compareValue",((e,t)=>{const n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:n>r?1:0})),s6(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[]})),s6(this,"getValueRange",((e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[])),s6(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})),s6(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}},u6=(e,t)=>!!(null==e?void 0:e.toLowerCase().startsWith(t.toLowerCase()));function d6(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function p6(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 f6({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 h6({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 m6({values:e,collection:t,selectedItemMap:n}){const r=f6({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:h6({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function g6({selectedItems:e,collection:t}){return h6({selectedItemMap:new Map,values:e.map((e=>t.getItemValue(e))).filter(Boolean),selectedItems:e,collection:t})}var y6=e=>new c6(e);function b6(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 v6(e,t){return{contextElement:AW(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 b6();const{x:t,y:n,width:r,height:a}=e;return b6(t,n,r,a)}(r):n.getBoundingClientRect()}}}y6.empty=()=>new c6({items:[]});var k6=e=>({variable:e,reference:`var(${e})`}),x6={arrowSize:k6("--arrow-size"),arrowSizeHalf:k6("--arrow-size-half"),arrowBg:k6("--arrow-background"),transformOrigin:k6("--transform-origin"),arrowOffset:k6("--arrow-offset")};function w6(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(x6.transformOrigin.variable,A?C:T),{data:{transformOrigin:A?C:T}}}}}var E6={name:"rects",fn:({rects:e})=>({data:e})},_6=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% + ${x6.arrowOffset.reference})`}),{}}}};var S6={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 T6(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function C6(e,t){return null!=e&&Math.abs(e-t)<.5}function A6(e){return"function"==typeof e?e():"clipping-ancestors"===e?"clippingAncestors":e}function N6(e,t,n){const r=e||t.createElement("div");return KX({element:r,padding:n.arrowPadding})}function I6(e,t){if(null!=(t.offset??t.gutter))return GX((({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 nW({crossAxis:(null==(a=t.offset)?void 0:a.crossAxis)??c,mainAxis:s,alignmentAxis:t.shift})}))}function O6(e){if(!e.flip)return;const t=A6(e.boundary);return WX({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:!0===e.flip?void 0:e.flip})}function R6(e){if(!e.slide&&!e.overlap)return;const t=A6(e.boundary);return qX({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:XX()})}function P6(e){if(!1===e.sizeMiddleware&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,a;return YX({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),C6(t,c)||(l.style.setProperty("--reference-width",`${c}px`),t=c),C6(n,u)||(l.style.setProperty("--reference-height",`${u}px`),n=u),C6(r,s)||(l.style.setProperty("--available-width",`${s}px`),r=s),C6(a,i)||(l.style.setProperty("--available-height",`${i}px`),a=i)}})}function L6(e){if(e.hideWhenDetached)return ZX({strategy:"referenceHidden",boundary:A6(e.boundary)??"clippingAncestors"})}var D6=["transform","visibility","pointer-events","--x","--y","--z-index","--reference-width","--reference-height","--available-width","--available-height","--transform-origin"],M6=["top","right","bottom","left"];function F6(e,t){if(!e)return Jq;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 j6(e,t,n={}){const{defer:r,...a}=n,o=r?_Y: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=v6((null==(r=n.getAnchorElement)?void 0:r.call(n))??e,n.getAnchorRect);if(!t||!a)return;const o=Object.assign({},S6,n),i=t.querySelector("[data-part=arrow]"),s=o.restoreStyles?F6(t,D6):void 0,l=o.restoreStyles?F6(i,M6):void 0,c=[I6(i,o),O6(o),R6(o),N6(i,t.ownerDocument,o),_6(i),w6({gutter:o.gutter,offset:o.offset,overlap:o.overlap},i),P6(o),L6(o),E6],{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 QX(a,t,{placement:u,middleware:c,strategy:d});null==p||p(n);const r=jW(t),i=T6(r,n.x),s=T6(r,n.y);if(t.style.transform=`translate3d(${i}px, ${s}px, 0)`,C6(h,i)||(t.style.setProperty("--x",`${i}px`),h=i),C6(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",$W(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?VX(a,t,b,v):Jq;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 z6={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};var B6=e=>{var t;return(null==(t=e.ids)?void 0:t.label)??`combobox:${e.id}:label`},H6=e=>{var t;return(null==(t=e.ids)?void 0:t.control)??`combobox:${e.id}:control`},U6=e=>{var t;return(null==(t=e.ids)?void 0:t.input)??`combobox:${e.id}:input`},$6=e=>{var t;return(null==(t=e.ids)?void 0:t.content)??`combobox:${e.id}:content`},V6=e=>{var t;return(null==(t=e.ids)?void 0:t.positioner)??`combobox:${e.id}:popper`},G6=e=>{var t;return(null==(t=e.ids)?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},q6=e=>{var t;return(null==(t=e.ids)?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},W6=(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}`},Y6=(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}`},Z6=(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}`},K6=e=>e.getById($6(e)),X6=e=>e.getById(U6(e)),Q6=e=>e.getById(V6(e)),J6=e=>e.getById(H6(e)),e8=e=>e.getById(G6(e)),t8=(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}(K6(e),n)},n8=e=>{const t=X6(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0}),EW(t)};function r8(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:x6.arrowSize.reference,height:x6.arrowSize.reference,[x6.arrowSizeHalf.variable]:`calc(${x6.arrowSize.reference} / 2)`,[x6.arrowOffset.variable]:`calc(${x6.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?z6[t.split("-")[0]]:void 0,background:x6.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 oW(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=X6(i))||e.focus()},setOpen(e,t="script"){a.hasTag("open")!==e&&o({type:e?"OPEN":"CLOSE",src:t})},getRootProps(){return t.element({...o6.root.attrs,dir:r("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.root)??`combobox:${e.id}`),"data-invalid":TW(f),"data-readonly":TW(m)});var e,n},getLabelProps:()=>t.label({...o6.label.attrs,dir:r("dir"),htmlFor:U6(i),id:B6(i),"data-readonly":TW(m),"data-disabled":TW(d),"data-invalid":TW(f),"data-required":TW(h),"data-focus":TW(y),onClick(e){var t;b||(e.preventDefault(),null==(t=e8(i))||t.focus({preventScroll:!0}))}}),getControlProps:()=>t.element({...o6.control.attrs,dir:r("dir"),id:H6(i),"data-state":g?"open":"closed","data-focus":TW(y),"data-disabled":TW(d),"data-invalid":TW(f)}),getPositionerProps:()=>t.element({...o6.positioner.attrs,dir:r("dir"),id:V6(i),style:k.floating}),getInputProps:()=>t.input({...o6.input.attrs,dir:r("dir"),"aria-invalid":CW(f),"data-invalid":TW(f),"data-autofocus":TW(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:U6(i),type:"text",role:"combobox",defaultValue:n.get("inputValue"),"aria-autocomplete":s("autoComplete")?"both":"list","aria-controls":$6(i),"aria-expanded":g,"data-state":g?"open":"closed","aria-activedescendant":v?Z6(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=t8(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()}}[cY(e,{dir:r("dir")})];null==l||l(e)}}),getTriggerProps:(e={})=>t.button({...o6.trigger.attrs,dir:r("dir"),id:G6(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?$6(i):void 0,disabled:d,"data-invalid":TW(f),"data-focusable":TW(e.focusable),"data-readonly":TW(m),"data-disabled":TW(d),onFocus(){e.focusable&&o({type:"INPUT.FOCUS",src:"trigger"})},onClick(e){e.defaultPrevented||p&&oY(e)&&o({type:"TRIGGER.CLICK",src:"trigger-click"})},onPointerDown(e){p&&"touch"!==e.pointerType&&oY(e)&&(e.preventDefault(),queueMicrotask((()=>{n8(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"})}}[cY(e,{dir:r("dir")})];t&&(t(e),e.preventDefault())}}),getContentProps:()=>t.element({...o6.content.attrs,dir:r("dir"),id:$6(i),role:b?"listbox":"dialog",tabIndex:-1,hidden:!g,"data-state":g?"open":"closed","data-placement":n.get("currentPlacement"),"aria-labelledby":B6(i),"aria-multiselectable":!(!r("multiple")||!b)||void 0,"data-empty":TW(0===u.size),onPointerDown(e){oY(e)&&e.preventDefault()}}),getListProps:()=>t.element({...o6.list.attrs,role:b?void 0:"listbox","data-empty":TW(0===u.size),"aria-labelledby":B6(i),"aria-multiselectable":!(!r("multiple")||b)||void 0}),getClearTriggerProps:()=>t.button({...o6.clearTrigger.attrs,dir:r("dir"),id:q6(i),type:"button",tabIndex:-1,disabled:d,"data-invalid":TW(f),"aria-label":c.clearTriggerLabel,"aria-controls":U6(i),hidden:!n.get("value").length,onPointerDown(e){oY(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({...o6.item.attrs,dir:r("dir"),id:Z6(i,a),role:"option",tabIndex:-1,"data-highlighted":TW(n.highlighted),"data-state":n.selected?"checked":"unchecked","aria-selected":CW(n.selected),"aria-disabled":CW(n.disabled),"data-disabled":TW(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)||rY(e)||iY(e)||n.disabled||o({type:"ITEM.CLICK",src:"item-select",value:a})}})},getItemTextProps(e){const n=x(e);return t.element({...o6.itemText.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked","data-disabled":TW(n.disabled),"data-highlighted":TW(n.highlighted)})},getItemIndicatorProps(e){const n=x(e);return t.element({"aria-hidden":!0,...o6.itemIndicator.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked",hidden:!n.selected})},getItemGroupProps(e){const{id:n}=e;return t.element({...o6.itemGroup.attrs,dir:r("dir"),id:W6(i,n),"aria-labelledby":Y6(i,n),"data-empty":TW(0===u.size),role:"group"})},getItemGroupLabelProps(e){const{htmlFor:n}=e;return t.element({...o6.itemGroupLabel.attrs,dir:r("dir"),id:Y6(i,n),role:"presentation"})}}}var a8="pointerdown.outside",o8="focus.outside";function i8(e){for(const t of e)if(AW(t)&&vY(t))return!0;return!1}var s8=e=>"clientY"in e;function l8(e,t){if(!t||!s8(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 c8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:a,onInteractOutside:o,defer:i,followControlledElements:s=!0}=t;if(!e)return;const l=FW(e),c=jW(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(!AW(r))return!1;if(!r.isConnected)return!1;if(MW(e,r))return!1;if(function(e,t){if(!s8(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&&WW(e,r))return!1;const a=l.querySelector(`[aria-controls="${e.id}"]`);if(a){if(l8(t,AY(a)))return!1}return!l8(t,AY(e))&&!(null==n?void 0:n(r))}const f=new Set,h=RW(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&&!JW()?_Y: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]:nY(t);if(e&&p(t,n)){if(a||o){const t=eW(a,o);e.addEventListener(a8,t,{once:!0})}d8(e,a8,{bubbles:!1,cancelable:!0,detail:{originalEvent:l,contextmenu:iY(l),focusable:i8(c),target:n}})}}))}l.addEventListener("pointerup",n,{once:!0}),c.addEventListener("pointerup",n,{once:!0}),"touch"===t.pointerType?(f.forEach((e=>e())),f.add(uY(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(uY(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?_Y: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]:nY(t);if(e&&p(t,i)){if(r||o){const t=eW(r,o);e.addEventListener(o8,t,{once:!0})}d8(e,o8,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:vY(i),target:i}})}}))}return JW()||(y.add(uY(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 u8(e,t){const{defer:n}=t,r=n?_Y:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(c8(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function d8(e,t,n){const r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function p8(e,t){return uY(FW(e),"keydown",(e=>{"Escape"===e.key&&(e.isComposing||null==t||t(e))}),{capture:!0})}var f8,h8="layer:request-dismiss",m8={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=>MW(e.node,t)))||this.recentlyRemoved.size>0},isInBranch(e){return Array.from(this.branches).some((t=>MW(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),SY((()=>this.recentlyRemoved.delete(e))),t<this.count()-1){this.getNestedLayers(e).forEach((t=>m8.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=h8,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,h8,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function g8(){m8.layers.forEach((({node:e})=>{e.style.pointerEvents=m8.isBelowPointerBlockingLayer(e)?"none":"auto"}))}function y8(e,t){const n=FW(e),r=[];return m8.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(f8=document.body.style.pointerEvents,queueMicrotask((()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")}))),null==t||t.forEach((e=>{const[t,n]=LY((()=>{const t=e();return AW(t)?t:null}),{timeout:1e3});t.then((e=>r.push(PY(e,{pointerEvents:"auto"})))),r.push(n)})),()=>{m8.hasPointerBlockingLayer()||(queueMicrotask((()=>{n.body.style.pointerEvents=f8,n.body.removeAttribute("data-inert"),0===n.body.style.length&&n.body.removeAttribute("style")})),r.forEach((e=>e())))}}function b8(e,t){const{defer:n}=t,r=n?_Y:e=>e(),a=[];return a.push(r((()=>{const n=qq(e)?e():e;a.push(function(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e)return void rW("[@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};m8.add(c),g8();const u=[o?y8(e,t.persistentElements):void 0,p8(e,(function(n){var a;m8.isTopMost(e)&&(null==(a=t.onEscapeKeyDown)||a.call(t,n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))})),u8(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(AW);return s&&o.push(...s),o.some((e=>MW(e,n)))||m8.isInNestedLayer(e,n)},onFocusOutside:function(e){var n,a;const o=nY(e.detail.originalEvent);m8.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=nY(n.detail.originalEvent);m8.isBelowPointerBlockingLayer(e)||m8.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()=>{m8.remove(e),g8(),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 v8=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);var k8=null,x8=new Set,w8=new Map,E8=!1,_8=!1,S8={Tab:!0,Escape:!0};function T8(e,t){for(let n of x8)n(e,t)}function C8(e){E8=!0,function(e){return!(e.metaKey||!tY()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(k8="keyboard",T8("keyboard",e))}function A8(e){k8="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(E8=!0,T8("pointer",e))}function N8(e){aY(e)&&(E8=!0,k8="virtual")}function I8(e){const t=nY(e);t!==jW(t)&&t!==FW(t)&&e.isTrusted&&(E8||_8||(k8="virtual",T8("virtual",e)),E8=!1,_8=!1)}function O8(){E8=!1,_8=!0}var R8=(e,t)=>{const n=jW(e),r=FW(e),a=w8.get(n);if(a){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:a.focus})}catch{}r.removeEventListener("keydown",C8,!0),r.removeEventListener("keyup",C8,!0),r.removeEventListener("click",N8,!0),n.removeEventListener("focus",I8,!0),n.removeEventListener("blur",O8,!1),void 0!==n.PointerEvent?(r.removeEventListener("pointerdown",A8,!0),r.removeEventListener("pointermove",A8,!0),r.removeEventListener("pointerup",A8,!0)):(r.removeEventListener("mousedown",A8,!0),r.removeEventListener("mousemove",A8,!0),r.removeEventListener("mouseup",A8,!0)),w8.delete(n)}};function P8(){return"keyboard"===k8||"virtual"===k8}function L8(e={}){const{isTextInput:t,autoFocus:n,onChange:r,root:a}=e;!function(e){if("undefined"==typeof window||w8.get(jW(e)))return;const t=jW(e),n=FW(e);let r=t.HTMLElement.prototype.focus;try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:function(){E8=!0,r.apply(this,arguments)}})}catch{}n.addEventListener("keydown",C8,!0),n.addEventListener("keyup",C8,!0),n.addEventListener("click",N8,!0),t.addEventListener("focus",I8,!0),t.addEventListener("blur",O8,!1),void 0!==t.PointerEvent?(n.addEventListener("pointerdown",A8,!0),n.addEventListener("pointermove",A8,!0),n.addEventListener("pointerup",A8,!0)):(n.addEventListener("mousedown",A8,!0),n.addEventListener("mousemove",A8,!0),n.addEventListener("mouseup",A8,!0)),t.addEventListener("beforeunload",(()=>{R8(e)}),{once:!0}),w8.set(t,{focus:r})}(a),null==r||r({isFocusVisible:n||P8(),modality:k8});const o=(e,n)=>{(function(e,t,n){const r=n?nY(n):null,a=FW(r),o=jW(r),i=zW(a);return!((e=e||i instanceof o.HTMLInputElement&&!v8.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(S8,n.key))})(!!t,e,n)&&(null==r||r({isFocusVisible:P8(),modality:e}))};return x8.add(o),()=>{x8.delete(o)}}var{guards:D8,createMachine:M8,choose:F8}={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=>bW(e),choose:e=>function({choose:t}){var n;return null==(n=t(e))?void 0:n.actions}},{and:j8,not:z8}=D8,B8=M8({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}){CY(e)},collection:y6.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:$q,hash:e=>e.join(","),onChange(t){var r;const a=n(),o=e("collection"),i=m6({values:t,collection:o,selectedItemMap:a.get("selectedItemMap")}),s=e("value")??t,l=s===t?i:m6({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=tW(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:g6({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})=>f6({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:F8([{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:j8("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:j8("isCustomValue",z8("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:j8("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:j8("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:j8("isOpenControlled","isCustomValue",z8("hasHighlightedItem"),z8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:j8("isCustomValue",z8("hasHighlightedItem"),z8("allowCustomValue")),target:"closed.focused",actions:["revertInputValue","invokeOnClose"]},{guard:j8("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"ITEM.CLICK":[{guard:j8("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:j8("isOpenControlled","isCustomValue",z8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:j8("isCustomValue",z8("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:j8("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:j8("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:j8("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:j8("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 L8({root:null==(t=e.getRootNode)?void 0:t.call(e)})},trackDismissableLayer({send:e,prop:t,scope:n}){if(t("disableLayer"))return;return b8((()=>K6(n)),{type:"listbox",defer:!0,exclude:()=>{return[X6(n),e8(n),(e=n,e.getById(q6(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),j6((()=>J6(n)||e8(n)),(()=>Q6(n)),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})),scrollToHighlightedItem({context:e,prop:t,scope:n}){const r=X6(n);let a=[];const o=r=>{if("pointer"===k8)return;const o=e.get("highlightedValue");if(!o)return;const i=K6(n),s=t("scrollToIndexFn");if(s){return void s({index:t("collection").indexOf(o),immediate:r,getElement:()=>t8(n,o)})}const l=t8(n,o),c=_Y((()=>{RY(l,{rootEl:i,block:"nearest"})}));a.push(c)},i=_Y((()=>{var e;k8=e="virtual",T8(e,null),o(!0)}));a.push(i);const s=TY(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}){j6((()=>J6(n)),(()=>Q6(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")?Hq(n.get("value"),o):[o];null==(t=r("onSelect"))||t({value:i,itemValue:o}),n.set("value",i);const s=tW(r("selectionBehavior"),{preserve:n.get("inputValue"),replace:a.stringifyMany(i),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){SY((()=>{const r=e.get("highlightedValue");if(null==r)return;const a=t8(n,r),o=K6(n),i=t("scrollToIndexFn");if(i){i({index:t("collection").indexOf(r),immediate:!0,getElement:()=>t8(n,r)})}else RY(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")?Hq(t.get("value"),n.value):[n.value];null==(e=a("onSelect"))||e({value:r,itemValue:n.value}),t.set("value",r);const o=tW(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=Bq(t.get("value"),n.value);t.set("value",e);const r=tW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(e),clear:""});t.set("inputValue",r)}))},setInitialFocus({scope:e}){_Y((()=>{n8(e)}))},setFinalFocus({scope:e}){_Y((()=>{const t=e8(e);null==(null==t?void 0:t.dataset.focusable)?n8(e):(e=>{const t=e8(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0})})(e)}))},syncInputValue({context:e,scope:t,event:n}){const r=X6(t);r&&(r.value=e.get("inputValue"),queueMicrotask((()=>{"INPUT.CHANGE"!==n.current().type&&EW(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=tW(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=tW(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=tW(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:()=>t8(t,r)})}else{const e=K6(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){var r;const a=H8(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=H8(t);null==(r=e("onOpenChange"))||r({open:!1,reason:a,value:n.get("value")})},highlightFirstItem({context:e,prop:t,scope:n}){(K6(n)?queueMicrotask:_Y)((()=>{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}){(K6(n)?queueMicrotask:_Y)((()=>{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}){_Y((()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)}))},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){_Y((()=>{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}){_Y((()=>{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=X6(a),i=n("collection");if(!t("autoComplete")||!o||!r.keypress)return;const s=i.stringify(e.get("highlightedValue"));_Y((()=>{o.value=s||e.get("inputValue")}))},syncSelectedItems(e){queueMicrotask((()=>{const{context:t,prop:n}=e,r=n("collection"),a=t.get("value"),o=m6({values:a,collection:r,selectedItemMap:t.get("selectedItemMap")});t.set("selectedItemMap",o.nextSelectedItemMap);const i=tW(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 H8(e){return(e.previousEvent||e).src}const U8=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=VO(),[m,g]=X.useState(a),y=X.useMemo((()=>y6({items:m,itemToValue:e=>e.value,itemToString:e=>e.label})),[m]),b=r8(jY(B8,{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)}}),UY),v=X.useMemo((()=>({api:b,options:m})),[b,m]),k=b.getRootProps();return rg.jsx("div",{"data-scope":"combobox","data-part":"root",...k,children:rg.jsx(n9.Provider,{value:v,children:n})})}));U8.displayName="ComboboxRoot";const $8=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=r9(),o=a.getControlProps();return rg.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:V8(t,o.ref),...r,children:n})}));function V8(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))}}$8.displayName="ComboboxControl";const G8=X.forwardRef(((e,t)=>{const n=r9(),r=n.getInputProps();return rg.jsx("input",{"data-scope":"combobox","data-part":"input","data-state":n.open?"open":"closed",...r,...e,ref:V8(t,r.ref)})}));G8.displayName="ComboboxInput";const q8=X.forwardRef(((e,t)=>{const n=r9(),r=n.getTriggerProps();return rg.jsx("button",{type:"button","data-scope":"combobox","data-part":"trigger","data-state":n.open?"open":"closed","data-disabled":n.disabled?"":void 0,...r,ref:V8(t,r.ref),...e,children:e.children??"▼"})}));q8.displayName="ComboboxTrigger";const W8=X.forwardRef((function(e,t){const n=r9();return rg.jsx("div",{ref:t,...n.getPositionerProps(),...e})})),Y8=X.forwardRef(((e,t)=>{const n=r9(),r=n.getContentProps();return rg.jsx("div",{"data-scope":"combobox","data-part":"content","data-state":n.open?"open":"closed",...r,ref:V8(t,r.ref),...e,children:e.children})}));Y8.displayName="ComboboxContent";const Z8=X.forwardRef(((e,t)=>{const n=r9().getListProps();return rg.jsx("div",{ref:V8(t,n.ref),"data-scope":"combobox","data-part":"list",...n,...e,children:e.children})}));Z8.displayName="ComboboxList";const K8=({children:e})=>{const t=function(){const e=X.useContext(n9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.options}();return rg.jsx(rg.Fragment,{children:e(t)})};K8.displayName="ComboboxListItems";const X8=X.forwardRef(((e,t)=>{const{children:n="No results found",...r}=e;return rg.jsx("div",{ref:t,"data-scope":"combobox","data-part":"list-empty",...r,children:n})}));X8.displayName="ComboboxListEmpty";const Q8=X.createContext(null),J8=X.forwardRef(((e,t)=>{const{item:n,...r}=e,a=r9(),o=a.getItemState({item:n}),i=a.getItemProps({item:n});return rg.jsx(Q8.Provider,{value:n,children:rg.jsx("div",{ref:V8(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})})}));J8.displayName="ComboboxItem";const e9=X.forwardRef(((e,t)=>{const n=X.useContext(Q8),r=r9(),a=n?r.getItemTextProps({item:n}):{};return rg.jsx("span",{ref:V8(t,a.ref),"data-scope":"combobox","data-part":"item-text",...a,...e})}));e9.displayName="ComboboxItemText";const t9=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.useContext(Q8),o=r9(),i=a?o.getItemState({item:a}):{selected:!1},s=a?o.getItemIndicatorProps({item:a}):{};return i.selected?rg.jsx("span",{ref:V8(t,s.ref),"data-scope":"combobox","data-part":"item-indicator","data-state":"checked","aria-hidden":!0,...s,...r,children:n??rg.jsx(DG,{iconSettings:{builtIn:"LuCheck"}})}):null}));t9.displayName="ComboboxItemIndicator";const n9=X.createContext(null);function r9(){const e=X.useContext(n9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.api}const a9=X.forwardRef(((e,t)=>{const n=r9(),r=n.selectedItems??[],a=n.clearValue;return 0===r.length?null:rg.jsx("div",{ref:t,"data-scope":"combobox","data-part":"selected-tags",className:e.className,style:e.style,children:r.map((t=>rg.jsxs("span",{"data-scope":"combobox","data-part":"tag",children:[e.renderTag?e.renderTag(t):t.label,rg.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:rg.jsx(DG,{iconSettings:{builtIn:"IoCloseOutline"}})})]},t.value)))})}));a9.displayName="ComboboxSelectedTags";var o9=Object.defineProperty,i9=(e,t,n)=>((e,t,n)=>t in e?o9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),s9={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()}},l9=[],c9=class{constructor(e,t){i9(this,"trapStack"),i9(this,"config"),i9(this,"doc"),i9(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),i9(this,"portalContainers",new Set),i9(this,"listenerCleanups",[]),i9(this,"handleFocus",(e=>{const t=nY(e),n=this.findContainerIndex(t,e)>=0;if(n||NW(t))n&&(this.state.mostRecentlyFocusedNode=t);else{let t;e.stopImmediatePropagation();let n=!0;if(this.state.mostRecentlyFocusedNode)if(wY(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=>wY(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})),i9(this,"handlePointerDown",(e=>{const t=nY(e);this.findContainerIndex(t,e)>=0||(h9(this.config.clickOutsideDeactivates,e)?this.deactivate({returnFocus:this.config.returnFocusOnDeactivate}):h9(this.config.allowOutsideClick,e)||e.preventDefault())})),i9(this,"handleClick",(e=>{const t=nY(e);this.findContainerIndex(t,e)>=0||h9(this.config.clickOutsideDeactivates,e)||h9(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())})),i9(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;d9(e)&&e.preventDefault(),this.tryFocus(n)}})),i9(this,"handleEscapeKey",(e=>{m9(e)&&!1!==h9(this.config.escapeDeactivates,e)&&(e.preventDefault(),this.deactivate())})),i9(this,"_mutationObserver"),i9(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))))&&ZW(t)}))))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())}))})),i9(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)})))})),i9(this,"getInitialFocusNode",(()=>{let e=this.getNodeForOption("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!vY(e)){const t=zW(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})),i9(this,"tryFocus",(e=>{!1!==e&&e!==zW(this.doc)&&(e&&e.focus?(e.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=e,y9(e)&&e.select()):this.tryFocus(this.getInitialFocusNode()))})),i9(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(),s9.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=()=>{g9((()=>{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})),i9(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})),i9(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})),i9(this,"updateContainerElements",(e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this))),i9(this,"getReturnFocusNode",(e=>{const t=this.getNodeForOption("setReturnFocus",{params:[e]});return t||!1!==t&&e})),i9(this,"getOption",((e,t,n)=>e&&void 0!==e[t]?e[t]:this.config[n||t])),i9(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(eNe){throw new Error(`\`${e}\` appears to be an invalid selector; error="${eNe.message}"`)}if(!a&&!t)throw new Error(`\`${e}\` as selector refers to no known node`)}return a})),i9(this,"findNextNavNode",(e=>{const{event:t,isBackward:n=!1}=e,r=e.target||nY(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||vY(r)&&!xY(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=wY(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else d9(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||vY(r)&&!xY(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=wY(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else d9(t)||(a=null==o?void 0:o.nextTabbableNode(r))}}else a=this.getNodeForOption("fallbackFocus");return a})),this.trapStack=t.trapStack||l9;const n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:p9,isKeyBackward:f9,...t};this.doc=n.document||FW(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=>{YW(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&&WW(e,t)}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map((e=>{const t=kY(e,{getShadowRoot:this.config.getShadowRoot}),n=bY(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(wY(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(xY(n[t]))return n[t]}else for(let t=o-1;t>=0;t--)if(xY(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 s9.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?g9((()=>{this.tryFocus(this.getInitialFocusNode())})):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(uY(this.doc,"focusin",this.handleFocus,!0),uY(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),uY(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),uY(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),uY(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),uY(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=zW(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)}},u9=e=>"keydown"===(null==e?void 0:e.type),d9=e=>u9(e)&&"Tab"===(null==e?void 0:e.key),p9=e=>u9(e)&&"Tab"===e.key&&!(null==e?void 0:e.shiftKey),f9=e=>u9(e)&&"Tab"===e.key&&(null==e?void 0:e.shiftKey),h9=(e,...t)=>"function"==typeof e?e(...t):e,m9=e=>!e.isComposing&&"Escape"===e.key,g9=e=>setTimeout(e,0),y9=e=>"input"===e.localName&&"select"in e&&"function"==typeof e.select;var b9=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=v9(r.current);o.current="mounted"===s?e:"none"}),[s]),zO((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=v9(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]),zO((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=v9(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=v9(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=B5(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 v9(e){return(null==e?void 0:e.animationName)||"none"}b9.displayName="Presence";var k9="data-scroll-lock";function x9(e){const t=$W(e),n=null==t?void 0:t.scrollbarGutter;return"stable"===n||!0===(null==n?void 0:n.startsWith("stable "))}function w9(e){const t=e??document,n=t.defaultView??window,{documentElement:r,body:a}=t;if(a.hasAttribute(k9))return;const o=x9(r)||x9(a),i=n.innerWidth-r.clientWidth;a.setAttribute(k9,"");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 _W;const r=e.style.getPropertyValue(t);return r===n?_W:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),0===e.style.length&&e.removeAttribute("style")})}(r,"--scrollbar-width",`${i}px`),eY()?(()=>{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=PY(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`),PY(a,e)})()];return()=>{l.forEach((e=>null==e?void 0:e())),a.removeAttribute(k9)}}const E9="Dialog",[_9]=M5(E9),[S9,T9]=_9(E9),C9=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]=WZ({prop:r,defaultProp:a??!1,onChange:o});return rg.jsx(S9,{scope:t,triggerRef:s,contentRef:l,contentId:UO(),titleId:UO(),descriptionId:UO(),open:c,onOpenChange:u,onOpenToggle:X.useCallback((()=>u((e=>!e))),[u]),modal:i,children:n})};C9.displayName=E9;const A9="DialogTrigger";X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=T9(A9,n),o=B5(t,a.triggerRef);return rg.jsx(f3.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":q9(a.open),...r,ref:o,onClick:D5(e.onClick,a.onOpenToggle)})})).displayName=A9;const N9="DialogPortal",[I9,O9]=_9(N9,{forceMount:void 0}),R9=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=T9(N9,t);return rg.jsx(I9,{scope:t,forceMount:n,children:X.Children.map(r,(e=>rg.jsx(b9,{present:n||o.open,children:rg.jsx(K3,{asChild:!0,container:a,children:e})})))})};R9.displayName=N9;const P9="DialogOverlay",L9=X.forwardRef(((e,t)=>{const n=O9(P9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=T9(P9,e.__scopeDialog);return o.modal?rg.jsx(b9,{present:r||o.open,children:rg.jsx(D9,{...a,ref:t})}):null}));L9.displayName=P9;const D9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=T9(P9,n),o=VO();return X.useEffect((()=>{var e;return w9((null==(e=null==o?void 0:o.rootElement)?void 0:e.ownerDocument)??document)}),[o]),rg.jsx(f3.div,{"data-dialog-overlay":"","data-state":q9(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})),M9="DialogContent",F9=X.forwardRef(((e,t)=>{const n=O9(M9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=T9(M9,e.__scopeDialog);return rg.jsx(b9,{present:r||o.open,children:o.modal?rg.jsx(j9,{...a,ref:t}):rg.jsx(z9,{...a,ref:t})})}));F9.displayName=M9;const j9=X.forwardRef(((e,t)=>{const n=T9(M9,e.__scopeDialog),r=X.useRef(null),a=B5(t,n.contentRef,r);return X.useEffect((()=>{const e=r.current;if(e){const t=document.querySelectorAll("[data-ikp-component]");return U1([e,...Array.from(t)])}}),[]),rg.jsx(B9,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onPointerDownOutside:D5(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:D5(e.onFocusOutside,(e=>e.preventDefault()))})})),z9=X.forwardRef(((e,t)=>{const n=T9(M9,e.__scopeDialog),r=X.useRef(!1),a=X.useRef(!1);return rg.jsx(B9,{...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()}})})),B9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=T9(M9,n),l=X.useRef(null),c=B5(t,l);return d3(),X.useEffect((()=>{if(r)return function(e,t={}){let n;const r=_Y((()=>{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 c9(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a,...t,document:FW(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]")}})}),[]),rg.jsx(s3,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":q9(s.open),...i,ref:c,onDismiss:()=>s.onOpenChange(!1)})})),H9="DialogTitle",U9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=T9(H9,n);return rg.jsx(f3.h2,{id:a.titleId,...r,ref:t})}));U9.displayName=H9;const $9="DialogDescription";X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=T9($9,n);return rg.jsx(f3.p,{id:a.descriptionId,...r,ref:t})})).displayName=$9;const V9="DialogClose",G9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=T9(V9,n);return rg.jsx(f3.button,{type:"button",...r,ref:t,onClick:D5(e.onClick,(()=>a.onOpenChange(!1)))})}));function q9(e){return e?"open":"closed"}G9.displayName=V9;const W9=C9,Y9=R9,Z9=L9,K9=F9,X9=U9,Q9=G9,J9=X.forwardRef(((e,t)=>{const n=X.useId();return rg.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:"100%",width:"100%",ref:t,...e,children:[rg.jsx("title",{children:"AI Avatar"}),rg.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"}),rg.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"}),rg.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"}),rg.jsxs("defs",{children:[rg.jsxs("linearGradient",{id:`${n}-stroke1`,x1:"0.149625",y1:"0.148102",x2:"23.8539",y2:"23.8524",gradientUnits:"userSpaceOnUse",children:[rg.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),rg.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),rg.jsxs("linearGradient",{id:`${n}-stroke2`,x1:"16.537",y1:"1.53728",x2:"22.463",y2:"7.46321",gradientUnits:"userSpaceOnUse",children:[rg.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),rg.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),rg.jsxs("linearGradient",{id:`${n}-stroke3`,x1:"1.53704",y1:"16.5373",x2:"7.46296",y2:"22.4632",gradientUnits:"userSpaceOnUse",children:[rg.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),rg.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]})]})]})})),e7=X.forwardRef(((e,t)=>rg.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"32px",viewBox:"0 96 960 960",width:"32px",ref:t,...e,children:[rg.jsx("title",{children:"User Avatar"}),rg.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"})]}))),t7=X.forwardRef((({isExternal:e,...t},n)=>rg.jsx("a",{target:e?"_blank":void 0,rel:e?"noopener":void 0,...t,ref:n})));t7.displayName="Link";const n7=X.forwardRef((({href:e,appendToUrl:t,...n},r)=>{const{baseSettings:a}=rR(),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 rg.jsx(t7,{ref:r,href:i,...n})}));function r7(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 a7(e,t){const n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}n7.displayName="LinkWithQueryParams";const o7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,i7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s7={};function l7(e,t){return(s7.jsx?i7:o7).test(e)}const c7=/[ \t\n\f\r]/g;function u7(e){return""===e.replace(c7,"")}class d7{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function p7(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new d7(n,r,t)}function f7(e){return e.toLowerCase()}d7.prototype.normal={},d7.prototype.property={},d7.prototype.space=void 0;class h7{constructor(e,t){this.attribute=t,this.property=e}}h7.prototype.attribute="",h7.prototype.booleanish=!1,h7.prototype.boolean=!1,h7.prototype.commaOrSpaceSeparated=!1,h7.prototype.commaSeparated=!1,h7.prototype.defined=!1,h7.prototype.mustUseProperty=!1,h7.prototype.number=!1,h7.prototype.overloadedBoolean=!1,h7.prototype.property="",h7.prototype.spaceSeparated=!1,h7.prototype.space=void 0;let m7=0;const g7=E7(),y7=E7(),b7=E7(),v7=E7(),k7=E7(),x7=E7(),w7=E7();function E7(){return 2**++m7}const _7=Object.freeze(Object.defineProperty({__proto__:null,boolean:g7,booleanish:y7,commaOrSpaceSeparated:w7,commaSeparated:x7,number:v7,overloadedBoolean:b7,spaceSeparated:k7},Symbol.toStringTag,{value:"Module"})),S7=Object.keys(_7);class T7 extends h7{constructor(e,t,n,r){let a=-1;if(super(e,t),C7(this,"space",r),"number"==typeof n)for(;++a<S7.length;){const e=S7[a];C7(this,S7[a],(n&_7[e])===_7[e])}}}function C7(e,t,n){n&&(e[t]=n)}function A7(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new T7(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[f7(r)]=r,n[f7(o.attribute)]=r}return new d7(t,n,e.space)}T7.prototype.defined=!0;const N7=A7({properties:{ariaActiveDescendant:null,ariaAtomic:y7,ariaAutoComplete:null,ariaBusy:y7,ariaChecked:y7,ariaColCount:v7,ariaColIndex:v7,ariaColSpan:v7,ariaControls:k7,ariaCurrent:null,ariaDescribedBy:k7,ariaDetails:null,ariaDisabled:y7,ariaDropEffect:k7,ariaErrorMessage:null,ariaExpanded:y7,ariaFlowTo:k7,ariaGrabbed:y7,ariaHasPopup:null,ariaHidden:y7,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:k7,ariaLevel:v7,ariaLive:null,ariaModal:y7,ariaMultiLine:y7,ariaMultiSelectable:y7,ariaOrientation:null,ariaOwns:k7,ariaPlaceholder:null,ariaPosInSet:v7,ariaPressed:y7,ariaReadOnly:y7,ariaRelevant:null,ariaRequired:y7,ariaRoleDescription:k7,ariaRowCount:v7,ariaRowIndex:v7,ariaRowSpan:v7,ariaSelected:y7,ariaSetSize:v7,ariaSort:null,ariaValueMax:v7,ariaValueMin:v7,ariaValueNow:v7,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function I7(e,t){return t in e?e[t]:t}function O7(e,t){return I7(e,t.toLowerCase())}const R7=A7({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:x7,acceptCharset:k7,accessKey:k7,action:null,allow:null,allowFullScreen:g7,allowPaymentRequest:g7,allowUserMedia:g7,alt:null,as:null,async:g7,autoCapitalize:null,autoComplete:k7,autoFocus:g7,autoPlay:g7,blocking:k7,capture:null,charSet:null,checked:g7,cite:null,className:k7,cols:v7,colSpan:null,content:null,contentEditable:y7,controls:g7,controlsList:k7,coords:v7|x7,crossOrigin:null,data:null,dateTime:null,decoding:null,default:g7,defer:g7,dir:null,dirName:null,disabled:g7,download:b7,draggable:y7,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:g7,formTarget:null,headers:k7,height:v7,hidden:b7,high:v7,href:null,hrefLang:null,htmlFor:k7,httpEquiv:k7,id:null,imageSizes:null,imageSrcSet:null,inert:g7,inputMode:null,integrity:null,is:null,isMap:g7,itemId:null,itemProp:k7,itemRef:k7,itemScope:g7,itemType:k7,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:g7,low:v7,manifest:null,max:null,maxLength:v7,media:null,method:null,min:null,minLength:v7,multiple:g7,muted:g7,name:null,nonce:null,noModule:g7,noValidate:g7,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:g7,optimum:v7,pattern:null,ping:k7,placeholder:null,playsInline:g7,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:g7,referrerPolicy:null,rel:k7,required:g7,reversed:g7,rows:v7,rowSpan:v7,sandbox:k7,scope:null,scoped:g7,seamless:g7,selected:g7,shadowRootClonable:g7,shadowRootDelegatesFocus:g7,shadowRootMode:null,shape:null,size:v7,sizes:null,slot:null,span:v7,spellCheck:y7,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v7,step:null,style:null,tabIndex:v7,target:null,title:null,translate:null,type:null,typeMustMatch:g7,useMap:null,value:y7,width:v7,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:k7,axis:null,background:null,bgColor:null,border:v7,borderColor:null,bottomMargin:v7,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:g7,declare:g7,event:null,face:null,frame:null,frameBorder:null,hSpace:v7,leftMargin:v7,link:null,longDesc:null,lowSrc:null,marginHeight:v7,marginWidth:v7,noResize:g7,noHref:g7,noShade:g7,noWrap:g7,object:null,profile:null,prompt:null,rev:null,rightMargin:v7,rules:null,scheme:null,scrolling:y7,standby:null,summary:null,text:null,topMargin:v7,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v7,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:g7,disableRemotePlayback:g7,prefix:null,property:null,results:v7,security:null,unselectable:null},space:"html",transform:O7}),P7=A7({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:w7,accentHeight:v7,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v7,amplitude:v7,arabicForm:null,ascent:v7,attributeName:null,attributeType:null,azimuth:v7,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v7,by:null,calcMode:null,capHeight:v7,className:k7,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:v7,diffuseConstant:v7,direction:null,display:null,dur:null,divisor:v7,dominantBaseline:null,download:g7,dx:null,dy:null,edgeMode:null,editable:null,elevation:v7,enableBackground:null,end:null,event:null,exponent:v7,externalResourcesRequired:null,fill:null,fillOpacity:v7,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:x7,g2:x7,glyphName:x7,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v7,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v7,horizOriginX:v7,horizOriginY:v7,id:null,ideographic:v7,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v7,k:v7,k1:v7,k2:v7,k3:v7,k4:v7,kernelMatrix:w7,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v7,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:v7,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:v7,overlineThickness:v7,paintOrder:null,panose1:null,path:null,pathLength:v7,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:k7,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v7,pointsAtY:v7,pointsAtZ:v7,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:w7,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:w7,rev:w7,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:w7,requiredFeatures:w7,requiredFonts:w7,requiredFormats:w7,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:v7,specularExponent:v7,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v7,strikethroughThickness:v7,string:null,stroke:null,strokeDashArray:w7,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v7,strokeOpacity:v7,strokeWidth:null,style:null,surfaceScale:v7,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:w7,tabIndex:v7,tableValues:null,target:null,targetX:v7,targetY:v7,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:w7,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:v7,underlineThickness:v7,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v7,values:null,vAlphabetic:v7,vMathematical:v7,vectorEffect:null,vHanging:v7,vIdeographic:v7,version:null,vertAdvY:v7,vertOriginX:v7,vertOriginY:v7,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v7,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:I7}),L7=A7({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()}),D7=A7({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:O7}),M7=A7({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),F7={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"},j7=/[A-Z]/g,z7=/-[a-z]/g,B7=/^data[-\w.:]+$/i;function H7(e,t){const n=f7(t);let r=t,a=h7;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&B7.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(z7,$7);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!z7.test(e)){let n=e.replace(j7,U7);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=T7}return new a(r,t)}function U7(e){return"-"+e.toLowerCase()}function $7(e){return e.charAt(1).toUpperCase()}const V7=p7([N7,R7,L7,D7,M7],"html"),G7=p7([N7,P7,L7,D7,M7],"svg");function q7(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function W7(e){return e.join(" ").trim()}var Y7={},Z7=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,K7=/\n/g,X7=/^\s*/,Q7=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,J7=/^:\s*/,eee=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,tee=/^[;\s]*/,nee=/^\s+|\s+$/g,ree="";function aee(e){return e?e.replace(nee,ree):ree}var oee=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(K7);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(X7)}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;ree!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,ree===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(Q7);if(t){if(d(),!l(J7))return s("property missing ':'");var n=l(eee),r=e({type:"declaration",property:aee(t[0].replace(Z7,ree)),value:n?aee(n[0].replace(Z7,ree)):ree});return l(tee),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}()},iee=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Y7,"__esModule",{value:!0}),Y7.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,see.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 see=iee(oee);var lee={};Object.defineProperty(lee,"__esModule",{value:!0}),lee.camelCase=void 0;var cee=/^--[a-zA-Z0-9_-]+$/,uee=/-([a-z])/g,dee=/^[^-]+$/,pee=/^-(webkit|moz|ms|o|khtml)-/,fee=/^-(ms)-/,hee=function(e,t){return t.toUpperCase()},mee=function(e,t){return"".concat(t,"-")};lee.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||dee.test(e)||cee.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(fee,mee):e.replace(pee,mee)).replace(uee,hee))};var gee=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},yee=gee(Y7),bee=lee;function vee(e,t){var n={};return e&&"string"==typeof e?((0,yee.default)(e,(function(e,r){e&&r&&(n[(0,bee.camelCase)(e,t)]=r)})),n):n}vee.default=vee;const kee=l(vee),xee=Eee("end"),wee=Eee("start");function Eee(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 _ee(e){return e&&"object"==typeof e?"position"in e||"type"in e?Tee(e.position):"start"in e||"end"in e?Tee(e):"line"in e||"column"in e?See(e):"":""}function See(e){return Cee(e&&e.line)+":"+Cee(e&&e.column)}function Tee(e){return See(e&&e.start)+"-"+See(e&&e.end)}function Cee(e){return e&&"number"==typeof e?e:1}class Aee 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=_ee(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}}Aee.prototype.file="",Aee.prototype.name="",Aee.prototype.reason="",Aee.prototype.message="",Aee.prototype.stack="",Aee.prototype.column=void 0,Aee.prototype.line=void 0,Aee.prototype.ancestors=void 0,Aee.prototype.cause=void 0,Aee.prototype.fatal=void 0,Aee.prototype.place=void 0,Aee.prototype.ruleId=void 0,Aee.prototype.source=void 0;const Nee={}.hasOwnProperty,Iee=new Map,Oee=/[A-Z]/g,Ree=new Set(["table","tbody","thead","tfoot","tr"]),Pee=new Set(["td","th"]),Lee="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Dee(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=wee(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?G7:V7,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=Mee(a,e,void 0);return o&&"string"!=typeof o?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Mee(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=G7,e.schema=a);e.ancestors.push(t);const o=Hee(e,t.tagName,!1),i=function(e,t){const n={};let r,a;for(a in t.properties)if("children"!==a&&Nee.call(t.properties,a)){const o=Bee(e,a,t.properties[a]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&"align"===a&&"string"==typeof i&&Pee.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=zee(e,t);Ree.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&u7(t.value):u7(t));var t})));return Fee(e,i,o,t),jee(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)}Uee(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=G7,e.schema=a);e.ancestors.push(t);const o=null===t.name?e.Fragment:Hee(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 Uee(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 Uee(e,t.position);else o=null===r.value||r.value;n[a]=o}return n}(e,t),s=zee(e,t);return Fee(e,i,o,t),jee(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);Uee(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return jee(r,zee(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 Fee(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function jee(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function zee(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Iee;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=Mee(e,o,i);void 0!==s&&n.push(s)}return n}function Bee(e,t,n){const r=H7(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?a7(n):W7(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return kee(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Aee("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=Lee+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Nee.call(e,n)&&(t[$ee(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?F7[r.property]||r.property:r.attribute,n]}}function Hee(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,a=-1;for(;++a<e.length;){const t=l7(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=l7(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 Nee.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Uee(e)}function Uee(e,t){const n=new Aee("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=Lee+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $ee(e){let t=e.replace(Oee,Vee);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Vee(e){return"-"+e.toLowerCase()}const Gee={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"]},qee={};function Wee(e,t){return Yee(e,"boolean"!=typeof qee.includeImageAlt||qee.includeImageAlt,"boolean"!=typeof qee.includeHtml||qee.includeHtml)}function Yee(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 Zee(e.children,t,n)}return Array.isArray(e)?Zee(e,t,n):""}function Zee(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=Yee(e[a],t,n);return r.join("")}const Kee=document.createElement("i");function Xee(e){const t="&"+e+";";Kee.innerHTML=t;const n=Kee.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Qee(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 Jee(e,t){return e.length>0?(Qee(e,e.length,0,t),e):t}const ete={}.hasOwnProperty;function tte(e){const t={};let n=-1;for(;++n<e.length;)nte(t,e[n]);return t}function nte(e,t){let n;for(n in t){const r=(ete.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){ete.call(r,o)||(r[o]=[]);const e=a[o];rte(r[o],Array.isArray(e)?e:e?[e]:[])}}}function rte(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Qee(e,0,0,r)}function ate(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 ote(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ite=bte(/[A-Za-z]/),ste=bte(/[\dA-Za-z]/),lte=bte(/[#-'*+\--9=?A-Z^-~]/);function cte(e){return null!==e&&(e<32||127===e)}const ute=bte(/\d/),dte=bte(/[\dA-Fa-f]/),pte=bte(/[!-/:-@[-`{-~]/);function fte(e){return null!==e&&e<-2}function hte(e){return null!==e&&(e<0||32===e)}function mte(e){return-2===e||-1===e||32===e}const gte=bte(new RegExp("\\p{P}|\\p{S}","u")),yte=bte(/\s/);function bte(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function vte(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(37===o&&ste(e.charCodeAt(n+1))&&ste(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 kte(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(mte(r))return e.enter(n),i(r);return t(r)};function i(r){return mte(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}const xte={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"),kte(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)):fte(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}};const wte={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 Qee(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(Ete,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(Ete,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)):fte(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++;Qee(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}}},Ete={tokenize:function(e,t,n){return kte(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function _te(e){return null===e||hte(e)||yte(e)?1:gte(e)?2:void 0}function Ste(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 Tte={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};Cte(d,-s),Cte(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=Jee(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Jee(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=Jee(l,Ste(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Jee(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=Jee(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Qee(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=_te(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=_te(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 Cte(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ate={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 ite(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||ste(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||ste(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||cte(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):lte(t)?(e.consume(t),l):n(t)}function c(e){return ste(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||ste(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Nte={partial:!0,tokenize:function(e,t,n){return function(t){return mte(t)?kte(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||fte(e)?t(e):n(e)}}};const Ite={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(mte(t))return kte(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(r){return e.attempt(Ite,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 mte(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Ote={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 pte(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Rte={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=ste,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=dte,c):(e.enter("characterReferenceValue"),a=7,o=ute,c(t))}function c(s){if(59===s&&i){const a=e.exit("characterReferenceValue");return o!==ste||Xee(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 Pte={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)}}},Lte={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"),mte(t)?kte(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"),mte(t)?kte(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||fte(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"),mte(t)?kte(e,c,"whitespace")(t):c(t))}function c(n){return null===n||fte(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Pte,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||fte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):mte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),kte(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||fte(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||fte(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&&mte(t)?kte(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||fte(t)?e.check(Pte,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||fte(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const Dte={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),kte(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):fte(t)?e.attempt(Mte,o,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||fte(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},Mte={partial:!0,tokenize:function(e,t,n){const r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):fte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):kte(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):fte(e)?a(e):n(e)}}};const Fte={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)):fte(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||fte(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 jte{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&&zte(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),zte(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),zte(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);zte(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);zte(this.left,t.reverse())}}}function zte(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 Bte(e){const t={};let n,r,a,o,i,s,l,c=-1;const u=new jte(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,Hte(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 Qee(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Hte(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 Ute={resolve:function(e){return Bte(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):fte(t)?e.check($te,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}}},$te={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"),kte(e,a,"linePrefix")};function a(a){if(null===a||fte(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 Vte(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||cte(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||fte(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&&!hte(a)?u<c&&40===a?(e.consume(a),u++,h):41===a?(e.consume(a),u--,h):null===a||32===a||40===a||cte(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 Gte(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):fte(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||fte(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!mte(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function qte(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):fte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),kte(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||fte(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 Wte(e,t){let n;return function r(a){if(fte(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r;if(mte(a))return kte(e,r,n?"linePrefix":"lineSuffix")(a);return t(a)}}const Yte={name:"definition",tokenize:function(e,t,n){const r=this;let a;return function(t){return e.enter("definition"),function(t){return Gte.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return a=ote(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 hte(t)?Wte(e,s)(t):s(t)}function s(t){return Vte(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Zte,c,c)(t)}function c(t){return mte(t)?kte(e,u,"whitespace")(t):u(t)}function u(o){return null===o||fte(o)?(e.exit("definition"),r.parser.defined.push(a),t(o)):n(o)}}},Zte={partial:!0,tokenize:function(e,t,n){return function(t){return hte(t)?Wte(e,r)(t):n(t)};function r(t){return qte(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return mte(t)?kte(e,o,"whitespace")(t):o(t)}function o(e){return null===e||fte(e)?t(e):n(e)}}};const Kte={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return fte(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Xte={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"},Qee(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||hte(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||fte(n)?(e.exit("atxHeading"),t(n)):mte(n)?kte(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||hte(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}};const Qte=["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"],Jte=["pre","script","style","textarea"],ene={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):ite(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):ite(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 ite(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||hte(s)){const l=47===s,c=i.toLowerCase();return l||o||!Jte.includes(c)?Qte.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||ste(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 mte(t)?(e.consume(t),g):_(t)}function y(t){return 47===t?(e.consume(t),_):58===t||95===t||ite(t)?(e.consume(t),b):mte(t)?(e.consume(t),y):_(t)}function b(t){return 45===t||46===t||58===t||95===t||ste(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),k):mte(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):mte(t)?(e.consume(t),k):w(t)}function x(t){return t===l?(e.consume(t),l=null,E):null===t||fte(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||hte(t)?v(t):(e.consume(t),w)}function E(e){return 47===e||62===e||mte(e)?y(e):n(e)}function _(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||fte(t)?T(t):mte(t)?(e.consume(t),S):n(t)}function T(t){return 45===t&&2===a?(e.consume(t),I):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):!fte(t)||6!==a&&7!==a?null===t||fte(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(tne,M,C)(t))}function C(t){return e.check(nne,A,M)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||fte(t)?C(t):(e.enter("htmlFlowData"),T(t))}function I(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 Jte.includes(n)?(e.consume(t),D):T(t)}return ite(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||fte(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},tne={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Nte,t,n)}}},nne={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(fte(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 rne={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):ite(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):ite(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):fte(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):fte(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):fte(t)?(i=y,R(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):fte(t)?(i=b,R(t)):(e.consume(t),b)}function v(e){return 62===e?O(e):b(e)}function k(t){return ite(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||ste(t)?(e.consume(t),x):w(t)}function w(t){return fte(t)?(i=w,R(t)):mte(t)?(e.consume(t),w):O(t)}function E(t){return 45===t||ste(t)?(e.consume(t),E):47===t||62===t||hte(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),O):58===t||95===t||ite(t)?(e.consume(t),S):fte(t)?(i=_,R(t)):mte(t)?(e.consume(t),_):O(t)}function S(t){return 45===t||46===t||58===t||95===t||ste(t)?(e.consume(t),S):T(t)}function T(t){return 61===t?(e.consume(t),C):fte(t)?(i=T,R(t)):mte(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):fte(t)?(i=C,R(t)):mte(t)?(e.consume(t),C):(e.consume(t),N)}function A(t){return t===a?(e.consume(t),a=void 0,I):null===t?n(t):fte(t)?(i=A,R(t)):(e.consume(t),A)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||hte(t)?_(t):(e.consume(t),N)}function I(e){return 47===e||62===e||hte(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 mte(t)?kte(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 ane={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&&Qee(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=Jee(o,e.slice(r+1,r+s+3)),o=Jee(o,[["enter",u,t]]),o=Jee(o,Ste(t.parser.constructs.insideSpan.null,e.slice(r+s+4,a-3),t)),o=Jee(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=Jee(o,e.slice(a+1)),o=Jee(o,[["exit",l,t]]),Qee(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(ote(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(one,c,o?c:u)(t):91===t?e.attempt(ine,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(sne,c,u)(t)}function c(e){return t(e)}function u(e){return a._balanced=!0,n(e)}}},one={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 hte(t)?Wte(e,a)(t):a(t)}function a(t){return 41===t?c(t):Vte(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return hte(t)?Wte(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?qte(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return hte(t)?Wte(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)}}},ine={tokenize:function(e,t,n){const r=this;return function(t){return Gte.call(r,e,a,o,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(ote(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},sne={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 lne={name:"labelStartImage",resolveAll:ane.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 cne={name:"labelStartLink",resolveAll:ane.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 une={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),kte(e,t,"linePrefix")}}};const dne={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||fte(o))?(e.exit("thematicBreak"),t(o)):n(o)}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),mte(t)?kte(e,o,"whitespace")(t):o(t))}}};const pne={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Nte,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,kte(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){if(r.containerState.furtherBlankLines||!mte(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(hne,t,a)(n)}));function a(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,kte(e,e.attempt(pne,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:ute(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(dne,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 ute(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(Nte,r.interrupt?n:c,e.attempt(fne,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return mte(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)}}},fne={partial:!0,tokenize:function(e,t,n){const r=this;return kte(e,(function(e){const a=r.events[r.events.length-1];return!mte(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},hne={partial:!0,tokenize:function(e,t,n){const r=this;return kte(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 mne={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"),mte(t)?kte(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||fte(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const gne={tokenize:function(e){const t=this,n=e.attempt(Nte,(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,kte(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Ute,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 yne={resolveAll:xne()},bne=kne("string"),vne=kne("text");function kne(e){return{resolveAll:xne("text"===e?wne: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 xne(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 wne(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 Ene={42:pne,43:pne,45:pne,48:pne,49:pne,50:pne,51:pne,52:pne,53:pne,54:pne,55:pne,56:pne,57:pne,62:Ite},_ne={91:Yte},Sne={[-2]:Dte,[-1]:Dte,32:Dte},Tne={35:Xte,42:dne,45:[mne,dne],60:ene,61:mne,95:dne,96:Lte,126:Lte},Cne={38:Rte,92:Ote},Ane={[-5]:une,[-4]:une,[-3]:une,33:lne,38:Rte,42:Tte,60:[Ate,rne],91:cne,92:[Kte,Ote],93:ane,95:Tte,96:Fte},Nne={null:[Tte,yne]},Ine=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:_ne,disable:{null:[]},document:Ene,flow:Tne,flowInitial:Sne,insideSpan:Nne,string:Cne,text:Ane},Symbol.toStringTag,{value:"Module"}));function One(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){fte(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=Jee(i,e),f(),null!==i[i.length-1])return[];return y(t,0),c.events=Ste(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&&Qee(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 Rne=/[\0\t\n\r]/g;const Pne=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Lne(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return ate(n.slice(t?2:1),t?16:10)}return Xee(n)||e}const Dne={}.hasOwnProperty;function Mne(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(N),htmlFlowData:T,htmlText:l(I),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()}};jne(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]];Dne.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]||Bne).call(o,void 0,e[0])}for(r.position={start:Fne(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Fne(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:Fne(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+"` ("+_ee({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]||Bne).call(this,e,r[0])}n.position.end=Fne(e.end)}function u(){return Wee(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=ote(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:Fne(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=Fne(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=Fne(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 N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function 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(Pne,Lne)}(t),n.identifier=ote(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=ote(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=ate(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Xee(t)}this.stack[this.stack.length-1].value+=r}function $(e){this.stack.pop().position.end=Fne(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(;!Bte(e););return e}(function(e){const t={constructs:tte([Ine,...(e||{}).extensions||[]]),content:n(xte),defined:[],document:n(wte),flow:n(gne),lazy:{},string:n(bne),text:n(vne)};return t;function n(e){return function(n){return One(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(Rne.lastIndex=u,l=Rne.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 Fne(e){return{line:e.line,column:e.column,offset:e.offset}}function jne(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jne(e,r):zne(e,r)}}function zne(e,t){let n;for(n in t)if(Dne.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 Bne(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+_ee({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_ee({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+_ee({start:t.start,end:t.end})+") is still open")}function Hne(e){const t=this;t.parser=function(n){return Mne(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Une(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 $ne(e){const t=e.spread;return null==t?e.children.length>1:t}function Vne(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(Gne(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(Gne(t.slice(a),a>0,!1)),o.join("")}function Gne(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 qne={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=vte(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 Une(e,t);const a={src:vte(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:vte(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 Une(e,t);const a={href:vte(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:vte(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=$ne(n[r])}return t}(n):$ne(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=wee(t.children[1]),i=xee(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:Vne(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:Wne,yaml:Wne,definition:Wne,footnoteDefinition:Wne};function Wne(){}const Yne="object"==typeof self?self:globalThis,Zne=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 Yne[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 Yne[o](i),a)};return r})(new Map,e)(0),Kne="",{toString:Xne}={},{keys:Qne}=Object,Jne=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Xne.call(e).slice(8,-1);switch(n){case"Array":return[1,Kne];case"Object":return[2,Kne];case"Date":return[3,Kne];case"RegExp":return[4,Kne];case"Map":return[5,Kne];case"Set":return[6,Kne];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},ere=([e,t])=>0===e&&("function"===t||"symbol"===t),tre=(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]=Jne(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 Qne(r))!e&&ere(Jne(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||!ere(Jne(a))&&!ere(Jne(i)))&&t.push([o(a),o(i)]);return n}case 6:{const t=[],n=a([i,t],r);for(const a of r)!e&&ere(Jne(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},nre="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Zne(tre(e,t)):structuredClone(e):(e,t)=>Zne(tre(e,t));function rre(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 are(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const ore=function(e){if(null==e)return sre;if("function"==typeof e)return ire(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ore(e[n]);return ire(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 ire(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 ire(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function ire(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 sre(){return!0}const lre=[],cre=!0,ure=!1;function dre(e,t,n,r){let a;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):a=t;const o=ore(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=lre;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[cre,e];return null==e?lre:[e]}(n(a,l)),p[0]===ure))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]===ure)return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function pre(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),dre(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 fre={}.hasOwnProperty,hre={};function mre(e,t){e.position&&(t.position=function(e){const t=wee(e),n=xee(e);if(t&&n)return{start:t,end:n}}(e))}function gre(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,nre(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function yre(e,t){const n=t.data||{},r=!("value"in t)||fre.call(n,"hProperties")||fre.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 bre(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 vre(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function kre(e,t){const n=function(e,t){const n=t||hre,r=new Map,a=new Map,o=new Map,i={...qne,...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=vre(a.value)),!Array.isArray(a)&&"element"===a.type)){const e=a.children[0];e&&"text"===e.type&&(e.value=vre(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:gre,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(fre.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=nre(n);return r.children=s.all(e),r}return nre(e)}return(s.options.unknownHandler||yre)(s,e,t)},options:n,patch:mre,wrap:bre};return pre(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||rre,r=e.options.footnoteBackLabel||are,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=vte(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:{...nre(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 xre(e,t){return e&&"run"in e?async function(n,r){const a=kre(n,{file:r,...t});await e.run(a,r)}:function(n,r){return kre(n,{file:r,...e||t})}}function wre(e){if(e)throw e}var Ere=Object.prototype.hasOwnProperty,_re=Object.prototype.toString,Sre=Object.defineProperty,Tre=Object.getOwnPropertyDescriptor,Cre=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===_re.call(e)},Are=function(e){if(!e||"[object Object]"!==_re.call(e))return!1;var t,n=Ere.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Ere.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Ere.call(e,t)},Nre=function(e,t){Sre&&"__proto__"===t.name?Sre(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ire=function(e,t){if("__proto__"===t){if(!Ere.call(e,t))return;if(Tre)return Tre(e,t).value}return e[t]},Ore=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=Ire(s,n),s!==(a=Ire(t,n))&&(u&&a&&(Are(a)||(o=Cre(a)))?(o?(o=!1,i=r&&Cre(r)?r:[]):i=r&&Are(r)?r:{},Nre(s,{name:n,newValue:e(u,i,a)})):void 0!==a&&Nre(s,{name:n,newValue:a}));return s};const Rre=l(Ore);function Pre(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 Lre(){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 Dre={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Mre(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(Mre(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){Mre(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;)Mre(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Mre(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 Mre(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Fre={cwd:function(){return"/"}};function jre(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function zre(e){if("string"==typeof e)e=new URL(e);else if(!jre(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 Bre=["history","path","basename","stem","extname","dirname"];class Hre{constructor(e){let t;t=e?jre(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?"":Fre.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Bre.length;){const e=Bre[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Bre.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Dre.basename(this.path):void 0}set basename(e){$re(e,"basename"),Ure(e,"basename"),this.path=Dre.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Dre.dirname(this.path):void 0}set dirname(e){Vre(this.basename,"dirname"),this.path=Dre.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Dre.extname(this.path):void 0}set extname(e){if(Ure(e,"extname"),Vre(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=Dre.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){jre(e)&&(e=zre(e)),$re(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Dre.basename(this.path,this.extname):void 0}set stem(e){$re(e,"stem"),Ure(e,"stem"),this.path=Dre.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 Aee(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 Ure(e,t){if(e&&e.includes(Dre.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Dre.sep+"`")}function $re(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Vre(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Gre=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},qre={}.hasOwnProperty;class Wre extends Gre{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=Lre()}copy(){const e=new Wre;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Rre(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Xre("data",this.frozen),this.namespace[e]=t,this):qre.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Xre("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=eae(e),n=this.parser||this.Parser;return Zre("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Zre("process",this.parser||this.Parser),Kre("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,a){const o=eae(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(),Zre("processSync",this.parser||this.Parser),Kre("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,wre(e),t=r})),Jre("processSync","process",n),t}run(e,t,n){Qre(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=eae(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){wre(e),n=t,r=!0})),Jre("runSync","run",r),n}stringify(e,t){this.freeze();const n=eae(t),r=this.compiler||this.Compiler;return Kre("stringify",r),Qre(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Xre("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=Rre(!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];Pre(i)&&Pre(r)&&(r=Rre(!0,i,r)),n[a]=[e,r,...o]}}}}const Yre=(new Wre).freeze();function Zre(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Kre(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xre(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 Qre(e){if(!Pre(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Jre(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function eae(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Hre(e)}const tae=[],nae={allowDangerousHtml:!0},rae=/^(https?|ircs?|mailto|xmpp)$/i,aae=[{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 oae(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",a=e.className,o=e.components,i=e.disallowedElements,s=e.rehypePlugins||tae,l=e.remarkPlugins||tae,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...nae}:nae,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||iae,f=Yre().use(Hne).use(l).use(xre,c).use(s),h=new Hre;"string"==typeof r&&(h.value=r);for(const y of aae)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]}),pre(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 Gee)if(Object.hasOwn(Gee,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Gee[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}})),Dee(g,{Fragment:rg.Fragment,components:o,ignoreInvalidStyle:!0,jsx:rg.jsx,jsxs:rg.jsxs,passKeys:!0,passNode:!0})}function iae(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||rae.test(e.slice(0,t))?e:""}const sae=/[#.]/g;function lae(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;){sae.lastIndex=i;const e=sae.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))cae(e,i.properties,t,n)}for(const e of o)uae(i.children,e);return"element"===i.type&&"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]),i}}function cae(e,t,n,r){const a=H7(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?q7(r):a.commaSeparated?r7(r):a.commaOrSpaceSeparated?q7(r7(r).join(" ")):dae(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(dae(a,a.property,t));o=e}"className"===a.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function uae(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)uae(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?uae(e,t.children):e.push(t)}}function dae(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||f7(n)===f7(t)))return!0}return n}const pae=lae(V7,"div"),fae=lae(G7,"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 hae(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 mae={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/"},gae={}.hasOwnProperty,yae=Object.prototype;function bae(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},kae(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:vae(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=hae(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=hae(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"},kae(e,t,n),n;case"#text":{const r=t;return n={type:"text",value:r.value},kae(e,r,n),n}default:return n=function(e,t){const n=e.schema;e.schema=t.namespaceURI===mae.svg?G7:V7;let r=-1;const a={};for(;++r<t.attrs.length;){const e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;gae.call(yae,n)||(a[n]=e.value)}const o="svg"===e.schema.space?fae:pae,i=o(t.tagName,a,vae(e,t.childNodes));if(kae(e,t,i),"template"===i.tagName){const n=t,r=n.sourceCodeLocation,a=r&&r.startTag&&xae(r.startTag),o=r&&r.endTag&&xae(r.endTag),s=bae(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 vae(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=bae(e,t[n]);r.push(a)}return r}function kae(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=function(e,t,n){const r=xae(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)gae.call(n.attrs,a)&&(r[H7(e.schema,a).property]=xae(n.attrs[a]));n.startTag;const o=xae(n.startTag),i=n.endTag?xae(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 xae(e){const t=wae({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=wae({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function wae(e){return e.line&&e.column?e:void 0}const Eae={}.hasOwnProperty;function _ae(e,t){const n=t||{};function r(t,...n){let a=r.invalid;const o=r.handlers;if(t&&Eae.call(t,e)){const n=String(t[e]);a=Eae.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 Sae={},Tae={}.hasOwnProperty,Cae=_ae("type",{handlers:{root:function(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Nae(e.children,n,t),Iae(e,n),n},element:function(e,t){const n=t;let r=n;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===n.space&&(r=G7);const a=[];let o;if(e.properties)for(o in e.properties)if("children"!==o&&Tae.call(e.properties,o)){const t=Aae(r,o,e.properties[o]);t&&a.push(t)}const i=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:mae[i],childNodes:[],parentNode:null};s.childNodes=Nae(e.children,s,r),Iae(e,s),"template"===e.tagName&&e.content&&(s.content=function(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Nae(e.children,n,t),Iae(e,n),n}(e.content,r));return s},text:function(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Iae(e,t),t},comment:function(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Iae(e,t),t},doctype:function(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Iae(e,t),t}}});function Aae(e,t,n){const r=H7(e,t);if(!1===n||null==n||"number"==typeof n&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?a7(n):W7(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=mae[r.space]}return a}function Nae(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const o=Cae(e[r],n);o.parentNode=t,a.push(o)}return a}function Iae(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 Oae=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Rae=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]),Pae="�";var Lae,Dae;(Dae=Lae||(Lae={}))[Dae.EOF=-1]="EOF",Dae[Dae.NULL=0]="NULL",Dae[Dae.TABULATION=9]="TABULATION",Dae[Dae.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",Dae[Dae.LINE_FEED=10]="LINE_FEED",Dae[Dae.FORM_FEED=12]="FORM_FEED",Dae[Dae.SPACE=32]="SPACE",Dae[Dae.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",Dae[Dae.QUOTATION_MARK=34]="QUOTATION_MARK",Dae[Dae.AMPERSAND=38]="AMPERSAND",Dae[Dae.APOSTROPHE=39]="APOSTROPHE",Dae[Dae.HYPHEN_MINUS=45]="HYPHEN_MINUS",Dae[Dae.SOLIDUS=47]="SOLIDUS",Dae[Dae.DIGIT_0=48]="DIGIT_0",Dae[Dae.DIGIT_9=57]="DIGIT_9",Dae[Dae.SEMICOLON=59]="SEMICOLON",Dae[Dae.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",Dae[Dae.EQUALS_SIGN=61]="EQUALS_SIGN",Dae[Dae.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",Dae[Dae.QUESTION_MARK=63]="QUESTION_MARK",Dae[Dae.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",Dae[Dae.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",Dae[Dae.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",Dae[Dae.GRAVE_ACCENT=96]="GRAVE_ACCENT",Dae[Dae.LATIN_SMALL_A=97]="LATIN_SMALL_A",Dae[Dae.LATIN_SMALL_Z=122]="LATIN_SMALL_Z";const Mae="--",Fae="[CDATA[",jae="doctype",zae="script",Bae="public",Hae="system";function Uae(e){return e>=55296&&e<=57343}function $ae(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function Vae(e){return e>=64976&&e<=65007||Rae.has(e)}var Gae,qae;(qae=Gae||(Gae={})).controlCharacterInInputStream="control-character-in-input-stream",qae.noncharacterInInputStream="noncharacter-in-input-stream",qae.surrogateInInputStream="surrogate-in-input-stream",qae.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",qae.endTagWithAttributes="end-tag-with-attributes",qae.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",qae.unexpectedSolidusInTag="unexpected-solidus-in-tag",qae.unexpectedNullCharacter="unexpected-null-character",qae.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",qae.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",qae.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",qae.missingEndTagName="missing-end-tag-name",qae.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",qae.unknownNamedCharacterReference="unknown-named-character-reference",qae.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",qae.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",qae.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",qae.eofBeforeTagName="eof-before-tag-name",qae.eofInTag="eof-in-tag",qae.missingAttributeValue="missing-attribute-value",qae.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",qae.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",qae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",qae.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",qae.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",qae.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",qae.missingDoctypePublicIdentifier="missing-doctype-public-identifier",qae.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",qae.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",qae.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",qae.cdataInHtmlContent="cdata-in-html-content",qae.incorrectlyOpenedComment="incorrectly-opened-comment",qae.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",qae.eofInDoctype="eof-in-doctype",qae.nestedComment="nested-comment",qae.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",qae.eofInComment="eof-in-comment",qae.incorrectlyClosedComment="incorrectly-closed-comment",qae.eofInCdata="eof-in-cdata",qae.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",qae.nullCharacterReference="null-character-reference",qae.surrogateCharacterReference="surrogate-character-reference",qae.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",qae.controlCharacterReference="control-character-reference",qae.noncharacterCharacterReference="noncharacter-character-reference",qae.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",qae.missingDoctypeName="missing-doctype-name",qae.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",qae.duplicateAttribute="duplicate-attribute",qae.nonConformingDoctype="non-conforming-doctype",qae.missingDoctype="missing-doctype",qae.misplacedDoctype="misplaced-doctype",qae.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",qae.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",qae.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",qae.openElementsLeftAfterEof="open-elements-left-after-eof",qae.abandonedHeadElementChild="abandoned-head-element-child",qae.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",qae.nestedNoscriptInHead="nested-noscript-in-head",qae.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text";class Wae{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,Lae.EOF;return this._err(Gae.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,Lae.EOF;const n=this.html.charCodeAt(t);return n===Lae.CARRIAGE_RETURN?Lae.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,Lae.EOF;let e=this.html.charCodeAt(this.pos);if(e===Lae.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,Lae.LINE_FEED;if(e===Lae.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,Uae(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===Lae.LINE_FEED||e===Lae.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){$ae(e)?this._err(Gae.controlCharacterInInputStream):Vae(e)&&this._err(Gae.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Yae,Zae;function Kae(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}(Zae=Yae||(Yae={}))[Zae.CHARACTER=0]="CHARACTER",Zae[Zae.NULL_CHARACTER=1]="NULL_CHARACTER",Zae[Zae.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",Zae[Zae.START_TAG=3]="START_TAG",Zae[Zae.END_TAG=4]="END_TAG",Zae[Zae.COMMENT=5]="COMMENT",Zae[Zae.DOCTYPE=6]="DOCTYPE",Zae[Zae.EOF=7]="EOF",Zae[Zae.HIBERNATION=8]="HIBERNATION";const Xae=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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)))),Qae=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 Jae,eoe;(eoe=Jae||(Jae={}))[eoe.NUM=35]="NUM",eoe[eoe.SEMI=59]="SEMI",eoe[eoe.EQUALS=61]="EQUALS",eoe[eoe.ZERO=48]="ZERO",eoe[eoe.NINE=57]="NINE",eoe[eoe.LOWER_A=97]="LOWER_A",eoe[eoe.LOWER_F=102]="LOWER_F",eoe[eoe.LOWER_X=120]="LOWER_X",eoe[eoe.LOWER_Z=122]="LOWER_Z",eoe[eoe.UPPER_A=65]="UPPER_A",eoe[eoe.UPPER_F=70]="UPPER_F",eoe[eoe.UPPER_Z=90]="UPPER_Z";var toe,noe,roe,aoe,ooe,ioe,soe,loe,coe,uoe,doe,poe,foe,hoe,moe,goe;function yoe(e){return e>=Jae.ZERO&&e<=Jae.NINE}function boe(e){return e===Jae.EQUALS||function(e){return e>=Jae.UPPER_A&&e<=Jae.UPPER_Z||e>=Jae.LOWER_A&&e<=Jae.LOWER_Z||yoe(e)}(e)}(noe=toe||(toe={}))[noe.VALUE_LENGTH=49152]="VALUE_LENGTH",noe[noe.BRANCH_LENGTH=16256]="BRANCH_LENGTH",noe[noe.JUMP_TABLE=127]="JUMP_TABLE",(aoe=roe||(roe={}))[aoe.EntityStart=0]="EntityStart",aoe[aoe.NumericStart=1]="NumericStart",aoe[aoe.NumericDecimal=2]="NumericDecimal",aoe[aoe.NumericHex=3]="NumericHex",aoe[aoe.NamedEntity=4]="NamedEntity",(ioe=ooe||(ooe={}))[ioe.Legacy=0]="Legacy",ioe[ioe.Strict=1]="Strict",ioe[ioe.Attribute=2]="Attribute";class voe{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=roe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ooe.Strict}startEntity(e){this.decodeMode=e,this.state=roe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case roe.EntityStart:return e.charCodeAt(t)===Jae.NUM?(this.state=roe.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=roe.NamedEntity,this.stateNamedEntity(e,t));case roe.NumericStart:return this.stateNumericStart(e,t);case roe.NumericDecimal:return this.stateNumericDecimal(e,t);case roe.NumericHex:return this.stateNumericHex(e,t);case roe.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===Jae.LOWER_X?(this.state=roe.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=roe.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(!(yoe(a)||(r=a,r>=Jae.UPPER_A&&r<=Jae.UPPER_F||r>=Jae.LOWER_A&&r<=Jae.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(!yoe(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===Jae.SEMI)this.consumed+=1;else if(this.decodeMode===ooe.Strict)return 0;return this.emitCodePoint(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=Qae.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==Jae.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&toe.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const o=e.charCodeAt(t);if(this.treeIndex=koe(n,r,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return 0===this.result||this.decodeMode===ooe.Attribute&&(0===a||boe(o))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],a=(r&toe.VALUE_LENGTH)>>14,0!==a){if(o===Jae.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ooe.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]&toe.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]&~toe.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case roe.NamedEntity:return 0===this.result||this.decodeMode===ooe.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case roe.NumericDecimal:return this.emitNumericEntity(0,2);case roe.NumericHex:return this.emitNumericEntity(0,3);case roe.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case roe.EntityStart:return 0}}}function koe(e,t,n,r){const a=(t&toe.BRANCH_LENGTH)>>7,o=t&toe.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}(loe=soe||(soe={})).HTML="http://www.w3.org/1999/xhtml",loe.MATHML="http://www.w3.org/1998/Math/MathML",loe.SVG="http://www.w3.org/2000/svg",loe.XLINK="http://www.w3.org/1999/xlink",loe.XML="http://www.w3.org/XML/1998/namespace",loe.XMLNS="http://www.w3.org/2000/xmlns/",(uoe=coe||(coe={})).TYPE="type",uoe.ACTION="action",uoe.ENCODING="encoding",uoe.PROMPT="prompt",uoe.NAME="name",uoe.COLOR="color",uoe.FACE="face",uoe.SIZE="size",(poe=doe||(doe={})).NO_QUIRKS="no-quirks",poe.QUIRKS="quirks",poe.LIMITED_QUIRKS="limited-quirks",(hoe=foe||(foe={})).A="a",hoe.ADDRESS="address",hoe.ANNOTATION_XML="annotation-xml",hoe.APPLET="applet",hoe.AREA="area",hoe.ARTICLE="article",hoe.ASIDE="aside",hoe.B="b",hoe.BASE="base",hoe.BASEFONT="basefont",hoe.BGSOUND="bgsound",hoe.BIG="big",hoe.BLOCKQUOTE="blockquote",hoe.BODY="body",hoe.BR="br",hoe.BUTTON="button",hoe.CAPTION="caption",hoe.CENTER="center",hoe.CODE="code",hoe.COL="col",hoe.COLGROUP="colgroup",hoe.DD="dd",hoe.DESC="desc",hoe.DETAILS="details",hoe.DIALOG="dialog",hoe.DIR="dir",hoe.DIV="div",hoe.DL="dl",hoe.DT="dt",hoe.EM="em",hoe.EMBED="embed",hoe.FIELDSET="fieldset",hoe.FIGCAPTION="figcaption",hoe.FIGURE="figure",hoe.FONT="font",hoe.FOOTER="footer",hoe.FOREIGN_OBJECT="foreignObject",hoe.FORM="form",hoe.FRAME="frame",hoe.FRAMESET="frameset",hoe.H1="h1",hoe.H2="h2",hoe.H3="h3",hoe.H4="h4",hoe.H5="h5",hoe.H6="h6",hoe.HEAD="head",hoe.HEADER="header",hoe.HGROUP="hgroup",hoe.HR="hr",hoe.HTML="html",hoe.I="i",hoe.IMG="img",hoe.IMAGE="image",hoe.INPUT="input",hoe.IFRAME="iframe",hoe.KEYGEN="keygen",hoe.LABEL="label",hoe.LI="li",hoe.LINK="link",hoe.LISTING="listing",hoe.MAIN="main",hoe.MALIGNMARK="malignmark",hoe.MARQUEE="marquee",hoe.MATH="math",hoe.MENU="menu",hoe.META="meta",hoe.MGLYPH="mglyph",hoe.MI="mi",hoe.MO="mo",hoe.MN="mn",hoe.MS="ms",hoe.MTEXT="mtext",hoe.NAV="nav",hoe.NOBR="nobr",hoe.NOFRAMES="noframes",hoe.NOEMBED="noembed",hoe.NOSCRIPT="noscript",hoe.OBJECT="object",hoe.OL="ol",hoe.OPTGROUP="optgroup",hoe.OPTION="option",hoe.P="p",hoe.PARAM="param",hoe.PLAINTEXT="plaintext",hoe.PRE="pre",hoe.RB="rb",hoe.RP="rp",hoe.RT="rt",hoe.RTC="rtc",hoe.RUBY="ruby",hoe.S="s",hoe.SCRIPT="script",hoe.SEARCH="search",hoe.SECTION="section",hoe.SELECT="select",hoe.SOURCE="source",hoe.SMALL="small",hoe.SPAN="span",hoe.STRIKE="strike",hoe.STRONG="strong",hoe.STYLE="style",hoe.SUB="sub",hoe.SUMMARY="summary",hoe.SUP="sup",hoe.TABLE="table",hoe.TBODY="tbody",hoe.TEMPLATE="template",hoe.TEXTAREA="textarea",hoe.TFOOT="tfoot",hoe.TD="td",hoe.TH="th",hoe.THEAD="thead",hoe.TITLE="title",hoe.TR="tr",hoe.TRACK="track",hoe.TT="tt",hoe.U="u",hoe.UL="ul",hoe.SVG="svg",hoe.VAR="var",hoe.WBR="wbr",hoe.XMP="xmp",(goe=moe||(moe={}))[goe.UNKNOWN=0]="UNKNOWN",goe[goe.A=1]="A",goe[goe.ADDRESS=2]="ADDRESS",goe[goe.ANNOTATION_XML=3]="ANNOTATION_XML",goe[goe.APPLET=4]="APPLET",goe[goe.AREA=5]="AREA",goe[goe.ARTICLE=6]="ARTICLE",goe[goe.ASIDE=7]="ASIDE",goe[goe.B=8]="B",goe[goe.BASE=9]="BASE",goe[goe.BASEFONT=10]="BASEFONT",goe[goe.BGSOUND=11]="BGSOUND",goe[goe.BIG=12]="BIG",goe[goe.BLOCKQUOTE=13]="BLOCKQUOTE",goe[goe.BODY=14]="BODY",goe[goe.BR=15]="BR",goe[goe.BUTTON=16]="BUTTON",goe[goe.CAPTION=17]="CAPTION",goe[goe.CENTER=18]="CENTER",goe[goe.CODE=19]="CODE",goe[goe.COL=20]="COL",goe[goe.COLGROUP=21]="COLGROUP",goe[goe.DD=22]="DD",goe[goe.DESC=23]="DESC",goe[goe.DETAILS=24]="DETAILS",goe[goe.DIALOG=25]="DIALOG",goe[goe.DIR=26]="DIR",goe[goe.DIV=27]="DIV",goe[goe.DL=28]="DL",goe[goe.DT=29]="DT",goe[goe.EM=30]="EM",goe[goe.EMBED=31]="EMBED",goe[goe.FIELDSET=32]="FIELDSET",goe[goe.FIGCAPTION=33]="FIGCAPTION",goe[goe.FIGURE=34]="FIGURE",goe[goe.FONT=35]="FONT",goe[goe.FOOTER=36]="FOOTER",goe[goe.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",goe[goe.FORM=38]="FORM",goe[goe.FRAME=39]="FRAME",goe[goe.FRAMESET=40]="FRAMESET",goe[goe.H1=41]="H1",goe[goe.H2=42]="H2",goe[goe.H3=43]="H3",goe[goe.H4=44]="H4",goe[goe.H5=45]="H5",goe[goe.H6=46]="H6",goe[goe.HEAD=47]="HEAD",goe[goe.HEADER=48]="HEADER",goe[goe.HGROUP=49]="HGROUP",goe[goe.HR=50]="HR",goe[goe.HTML=51]="HTML",goe[goe.I=52]="I",goe[goe.IMG=53]="IMG",goe[goe.IMAGE=54]="IMAGE",goe[goe.INPUT=55]="INPUT",goe[goe.IFRAME=56]="IFRAME",goe[goe.KEYGEN=57]="KEYGEN",goe[goe.LABEL=58]="LABEL",goe[goe.LI=59]="LI",goe[goe.LINK=60]="LINK",goe[goe.LISTING=61]="LISTING",goe[goe.MAIN=62]="MAIN",goe[goe.MALIGNMARK=63]="MALIGNMARK",goe[goe.MARQUEE=64]="MARQUEE",goe[goe.MATH=65]="MATH",goe[goe.MENU=66]="MENU",goe[goe.META=67]="META",goe[goe.MGLYPH=68]="MGLYPH",goe[goe.MI=69]="MI",goe[goe.MO=70]="MO",goe[goe.MN=71]="MN",goe[goe.MS=72]="MS",goe[goe.MTEXT=73]="MTEXT",goe[goe.NAV=74]="NAV",goe[goe.NOBR=75]="NOBR",goe[goe.NOFRAMES=76]="NOFRAMES",goe[goe.NOEMBED=77]="NOEMBED",goe[goe.NOSCRIPT=78]="NOSCRIPT",goe[goe.OBJECT=79]="OBJECT",goe[goe.OL=80]="OL",goe[goe.OPTGROUP=81]="OPTGROUP",goe[goe.OPTION=82]="OPTION",goe[goe.P=83]="P",goe[goe.PARAM=84]="PARAM",goe[goe.PLAINTEXT=85]="PLAINTEXT",goe[goe.PRE=86]="PRE",goe[goe.RB=87]="RB",goe[goe.RP=88]="RP",goe[goe.RT=89]="RT",goe[goe.RTC=90]="RTC",goe[goe.RUBY=91]="RUBY",goe[goe.S=92]="S",goe[goe.SCRIPT=93]="SCRIPT",goe[goe.SEARCH=94]="SEARCH",goe[goe.SECTION=95]="SECTION",goe[goe.SELECT=96]="SELECT",goe[goe.SOURCE=97]="SOURCE",goe[goe.SMALL=98]="SMALL",goe[goe.SPAN=99]="SPAN",goe[goe.STRIKE=100]="STRIKE",goe[goe.STRONG=101]="STRONG",goe[goe.STYLE=102]="STYLE",goe[goe.SUB=103]="SUB",goe[goe.SUMMARY=104]="SUMMARY",goe[goe.SUP=105]="SUP",goe[goe.TABLE=106]="TABLE",goe[goe.TBODY=107]="TBODY",goe[goe.TEMPLATE=108]="TEMPLATE",goe[goe.TEXTAREA=109]="TEXTAREA",goe[goe.TFOOT=110]="TFOOT",goe[goe.TD=111]="TD",goe[goe.TH=112]="TH",goe[goe.THEAD=113]="THEAD",goe[goe.TITLE=114]="TITLE",goe[goe.TR=115]="TR",goe[goe.TRACK=116]="TRACK",goe[goe.TT=117]="TT",goe[goe.U=118]="U",goe[goe.UL=119]="UL",goe[goe.SVG=120]="SVG",goe[goe.VAR=121]="VAR",goe[goe.WBR=122]="WBR",goe[goe.XMP=123]="XMP";const xoe=new Map([[foe.A,moe.A],[foe.ADDRESS,moe.ADDRESS],[foe.ANNOTATION_XML,moe.ANNOTATION_XML],[foe.APPLET,moe.APPLET],[foe.AREA,moe.AREA],[foe.ARTICLE,moe.ARTICLE],[foe.ASIDE,moe.ASIDE],[foe.B,moe.B],[foe.BASE,moe.BASE],[foe.BASEFONT,moe.BASEFONT],[foe.BGSOUND,moe.BGSOUND],[foe.BIG,moe.BIG],[foe.BLOCKQUOTE,moe.BLOCKQUOTE],[foe.BODY,moe.BODY],[foe.BR,moe.BR],[foe.BUTTON,moe.BUTTON],[foe.CAPTION,moe.CAPTION],[foe.CENTER,moe.CENTER],[foe.CODE,moe.CODE],[foe.COL,moe.COL],[foe.COLGROUP,moe.COLGROUP],[foe.DD,moe.DD],[foe.DESC,moe.DESC],[foe.DETAILS,moe.DETAILS],[foe.DIALOG,moe.DIALOG],[foe.DIR,moe.DIR],[foe.DIV,moe.DIV],[foe.DL,moe.DL],[foe.DT,moe.DT],[foe.EM,moe.EM],[foe.EMBED,moe.EMBED],[foe.FIELDSET,moe.FIELDSET],[foe.FIGCAPTION,moe.FIGCAPTION],[foe.FIGURE,moe.FIGURE],[foe.FONT,moe.FONT],[foe.FOOTER,moe.FOOTER],[foe.FOREIGN_OBJECT,moe.FOREIGN_OBJECT],[foe.FORM,moe.FORM],[foe.FRAME,moe.FRAME],[foe.FRAMESET,moe.FRAMESET],[foe.H1,moe.H1],[foe.H2,moe.H2],[foe.H3,moe.H3],[foe.H4,moe.H4],[foe.H5,moe.H5],[foe.H6,moe.H6],[foe.HEAD,moe.HEAD],[foe.HEADER,moe.HEADER],[foe.HGROUP,moe.HGROUP],[foe.HR,moe.HR],[foe.HTML,moe.HTML],[foe.I,moe.I],[foe.IMG,moe.IMG],[foe.IMAGE,moe.IMAGE],[foe.INPUT,moe.INPUT],[foe.IFRAME,moe.IFRAME],[foe.KEYGEN,moe.KEYGEN],[foe.LABEL,moe.LABEL],[foe.LI,moe.LI],[foe.LINK,moe.LINK],[foe.LISTING,moe.LISTING],[foe.MAIN,moe.MAIN],[foe.MALIGNMARK,moe.MALIGNMARK],[foe.MARQUEE,moe.MARQUEE],[foe.MATH,moe.MATH],[foe.MENU,moe.MENU],[foe.META,moe.META],[foe.MGLYPH,moe.MGLYPH],[foe.MI,moe.MI],[foe.MO,moe.MO],[foe.MN,moe.MN],[foe.MS,moe.MS],[foe.MTEXT,moe.MTEXT],[foe.NAV,moe.NAV],[foe.NOBR,moe.NOBR],[foe.NOFRAMES,moe.NOFRAMES],[foe.NOEMBED,moe.NOEMBED],[foe.NOSCRIPT,moe.NOSCRIPT],[foe.OBJECT,moe.OBJECT],[foe.OL,moe.OL],[foe.OPTGROUP,moe.OPTGROUP],[foe.OPTION,moe.OPTION],[foe.P,moe.P],[foe.PARAM,moe.PARAM],[foe.PLAINTEXT,moe.PLAINTEXT],[foe.PRE,moe.PRE],[foe.RB,moe.RB],[foe.RP,moe.RP],[foe.RT,moe.RT],[foe.RTC,moe.RTC],[foe.RUBY,moe.RUBY],[foe.S,moe.S],[foe.SCRIPT,moe.SCRIPT],[foe.SEARCH,moe.SEARCH],[foe.SECTION,moe.SECTION],[foe.SELECT,moe.SELECT],[foe.SOURCE,moe.SOURCE],[foe.SMALL,moe.SMALL],[foe.SPAN,moe.SPAN],[foe.STRIKE,moe.STRIKE],[foe.STRONG,moe.STRONG],[foe.STYLE,moe.STYLE],[foe.SUB,moe.SUB],[foe.SUMMARY,moe.SUMMARY],[foe.SUP,moe.SUP],[foe.TABLE,moe.TABLE],[foe.TBODY,moe.TBODY],[foe.TEMPLATE,moe.TEMPLATE],[foe.TEXTAREA,moe.TEXTAREA],[foe.TFOOT,moe.TFOOT],[foe.TD,moe.TD],[foe.TH,moe.TH],[foe.THEAD,moe.THEAD],[foe.TITLE,moe.TITLE],[foe.TR,moe.TR],[foe.TRACK,moe.TRACK],[foe.TT,moe.TT],[foe.U,moe.U],[foe.UL,moe.UL],[foe.SVG,moe.SVG],[foe.VAR,moe.VAR],[foe.WBR,moe.WBR],[foe.XMP,moe.XMP]]);function woe(e){var t;return null!==(t=xoe.get(e))&&void 0!==t?t:moe.UNKNOWN}const Eoe=moe,_oe={[soe.HTML]:new Set([Eoe.ADDRESS,Eoe.APPLET,Eoe.AREA,Eoe.ARTICLE,Eoe.ASIDE,Eoe.BASE,Eoe.BASEFONT,Eoe.BGSOUND,Eoe.BLOCKQUOTE,Eoe.BODY,Eoe.BR,Eoe.BUTTON,Eoe.CAPTION,Eoe.CENTER,Eoe.COL,Eoe.COLGROUP,Eoe.DD,Eoe.DETAILS,Eoe.DIR,Eoe.DIV,Eoe.DL,Eoe.DT,Eoe.EMBED,Eoe.FIELDSET,Eoe.FIGCAPTION,Eoe.FIGURE,Eoe.FOOTER,Eoe.FORM,Eoe.FRAME,Eoe.FRAMESET,Eoe.H1,Eoe.H2,Eoe.H3,Eoe.H4,Eoe.H5,Eoe.H6,Eoe.HEAD,Eoe.HEADER,Eoe.HGROUP,Eoe.HR,Eoe.HTML,Eoe.IFRAME,Eoe.IMG,Eoe.INPUT,Eoe.LI,Eoe.LINK,Eoe.LISTING,Eoe.MAIN,Eoe.MARQUEE,Eoe.MENU,Eoe.META,Eoe.NAV,Eoe.NOEMBED,Eoe.NOFRAMES,Eoe.NOSCRIPT,Eoe.OBJECT,Eoe.OL,Eoe.P,Eoe.PARAM,Eoe.PLAINTEXT,Eoe.PRE,Eoe.SCRIPT,Eoe.SECTION,Eoe.SELECT,Eoe.SOURCE,Eoe.STYLE,Eoe.SUMMARY,Eoe.TABLE,Eoe.TBODY,Eoe.TD,Eoe.TEMPLATE,Eoe.TEXTAREA,Eoe.TFOOT,Eoe.TH,Eoe.THEAD,Eoe.TITLE,Eoe.TR,Eoe.TRACK,Eoe.UL,Eoe.WBR,Eoe.XMP]),[soe.MATHML]:new Set([Eoe.MI,Eoe.MO,Eoe.MN,Eoe.MS,Eoe.MTEXT,Eoe.ANNOTATION_XML]),[soe.SVG]:new Set([Eoe.TITLE,Eoe.FOREIGN_OBJECT,Eoe.DESC]),[soe.XLINK]:new Set,[soe.XML]:new Set,[soe.XMLNS]:new Set},Soe=new Set([Eoe.H1,Eoe.H2,Eoe.H3,Eoe.H4,Eoe.H5,Eoe.H6]);var Toe,Coe;foe.STYLE,foe.SCRIPT,foe.XMP,foe.IFRAME,foe.NOEMBED,foe.NOFRAMES,foe.PLAINTEXT,(Coe=Toe||(Toe={}))[Coe.DATA=0]="DATA",Coe[Coe.RCDATA=1]="RCDATA",Coe[Coe.RAWTEXT=2]="RAWTEXT",Coe[Coe.SCRIPT_DATA=3]="SCRIPT_DATA",Coe[Coe.PLAINTEXT=4]="PLAINTEXT",Coe[Coe.TAG_OPEN=5]="TAG_OPEN",Coe[Coe.END_TAG_OPEN=6]="END_TAG_OPEN",Coe[Coe.TAG_NAME=7]="TAG_NAME",Coe[Coe.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",Coe[Coe.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",Coe[Coe.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",Coe[Coe.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",Coe[Coe.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",Coe[Coe.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",Coe[Coe.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",Coe[Coe.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",Coe[Coe.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",Coe[Coe.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",Coe[Coe.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",Coe[Coe.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",Coe[Coe.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",Coe[Coe.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",Coe[Coe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",Coe[Coe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",Coe[Coe.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",Coe[Coe.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",Coe[Coe.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",Coe[Coe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",Coe[Coe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",Coe[Coe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",Coe[Coe.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",Coe[Coe.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",Coe[Coe.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",Coe[Coe.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",Coe[Coe.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",Coe[Coe.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",Coe[Coe.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",Coe[Coe.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",Coe[Coe.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",Coe[Coe.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",Coe[Coe.BOGUS_COMMENT=40]="BOGUS_COMMENT",Coe[Coe.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",Coe[Coe.COMMENT_START=42]="COMMENT_START",Coe[Coe.COMMENT_START_DASH=43]="COMMENT_START_DASH",Coe[Coe.COMMENT=44]="COMMENT",Coe[Coe.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",Coe[Coe.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",Coe[Coe.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",Coe[Coe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",Coe[Coe.COMMENT_END_DASH=49]="COMMENT_END_DASH",Coe[Coe.COMMENT_END=50]="COMMENT_END",Coe[Coe.COMMENT_END_BANG=51]="COMMENT_END_BANG",Coe[Coe.DOCTYPE=52]="DOCTYPE",Coe[Coe.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",Coe[Coe.DOCTYPE_NAME=54]="DOCTYPE_NAME",Coe[Coe.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",Coe[Coe.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",Coe[Coe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",Coe[Coe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",Coe[Coe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",Coe[Coe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",Coe[Coe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",Coe[Coe.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",Coe[Coe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",Coe[Coe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",Coe[Coe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",Coe[Coe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",Coe[Coe.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",Coe[Coe.CDATA_SECTION=68]="CDATA_SECTION",Coe[Coe.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",Coe[Coe.CDATA_SECTION_END=70]="CDATA_SECTION_END",Coe[Coe.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",Coe[Coe.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND";const Aoe={DATA:Toe.DATA,RCDATA:Toe.RCDATA,RAWTEXT:Toe.RAWTEXT,SCRIPT_DATA:Toe.SCRIPT_DATA,PLAINTEXT:Toe.PLAINTEXT,CDATA_SECTION:Toe.CDATA_SECTION};function Noe(e){return e>=Lae.LATIN_CAPITAL_A&&e<=Lae.LATIN_CAPITAL_Z}function Ioe(e){return function(e){return e>=Lae.LATIN_SMALL_A&&e<=Lae.LATIN_SMALL_Z}(e)||Noe(e)}function Ooe(e){return Ioe(e)||function(e){return e>=Lae.DIGIT_0&&e<=Lae.DIGIT_9}(e)}function Roe(e){return e+32}function Poe(e){return e===Lae.SPACE||e===Lae.LINE_FEED||e===Lae.TABULATION||e===Lae.FORM_FEED}function Loe(e){return Poe(e)||e===Lae.SOLIDUS||e===Lae.GREATER_THAN_SIGN}class Doe{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=Toe.DATA,this.returnState=Toe.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Wae(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new voe(Xae,((e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)}),t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Gae.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(Gae.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{const t=function(e){return e===Lae.NULL?Gae.nullCharacterReference:e>1114111?Gae.characterReferenceOutsideUnicodeRange:Uae(e)?Gae.surrogateCharacterReference:Vae(e)?Gae.noncharacterCharacterReference:$ae(e)||e===Lae.CARRIAGE_RETURN?Gae.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:Yae.START_TAG,tagName:"",tagID:moe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Yae.END_TAG,tagName:"",tagID:moe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:Yae.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:Yae.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===Kae(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(Gae.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=woe(e.tagName),e.type===Yae.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(Gae.endTagWithAttributes),e.selfClosing&&this._err(Gae.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 Yae.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case Yae.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case Yae.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:Yae.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=Poe(e)?Yae.WHITESPACE_CHARACTER:e===Lae.NULL?Yae.NULL_CHARACTER:Yae.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Yae.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Toe.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ooe.Attribute:ooe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Toe.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Toe.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Toe.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Toe.DATA:this._stateData(e);break;case Toe.RCDATA:this._stateRcdata(e);break;case Toe.RAWTEXT:this._stateRawtext(e);break;case Toe.SCRIPT_DATA:this._stateScriptData(e);break;case Toe.PLAINTEXT:this._statePlaintext(e);break;case Toe.TAG_OPEN:this._stateTagOpen(e);break;case Toe.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Toe.TAG_NAME:this._stateTagName(e);break;case Toe.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Toe.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Toe.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Toe.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Toe.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Toe.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Toe.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Toe.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Toe.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Toe.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Toe.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Toe.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Toe.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Toe.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Toe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Toe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Toe.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Toe.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Toe.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Toe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Toe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Toe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Toe.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Toe.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Toe.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Toe.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Toe.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Toe.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Toe.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Toe.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Toe.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Toe.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Toe.BOGUS_COMMENT:this._stateBogusComment(e);break;case Toe.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Toe.COMMENT_START:this._stateCommentStart(e);break;case Toe.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Toe.COMMENT:this._stateComment(e);break;case Toe.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Toe.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Toe.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Toe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Toe.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Toe.COMMENT_END:this._stateCommentEnd(e);break;case Toe.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Toe.DOCTYPE:this._stateDoctype(e);break;case Toe.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Toe.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Toe.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Toe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Toe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Toe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Toe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Toe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Toe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Toe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Toe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Toe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Toe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Toe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Toe.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Toe.CDATA_SECTION:this._stateCdataSection(e);break;case Toe.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Toe.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Toe.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Toe.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Lae.LESS_THAN_SIGN:this.state=Toe.TAG_OPEN;break;case Lae.AMPERSAND:this._startCharacterReference();break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitCodePoint(e);break;case Lae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Lae.AMPERSAND:this._startCharacterReference();break;case Lae.LESS_THAN_SIGN:this.state=Toe.RCDATA_LESS_THAN_SIGN;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitChars(Pae);break;case Lae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Lae.LESS_THAN_SIGN:this.state=Toe.RAWTEXT_LESS_THAN_SIGN;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitChars(Pae);break;case Lae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_LESS_THAN_SIGN;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitChars(Pae);break;case Lae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitChars(Pae);break;case Lae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Ioe(e))this._createStartTagToken(),this.state=Toe.TAG_NAME,this._stateTagName(e);else switch(e){case Lae.EXCLAMATION_MARK:this.state=Toe.MARKUP_DECLARATION_OPEN;break;case Lae.SOLIDUS:this.state=Toe.END_TAG_OPEN;break;case Lae.QUESTION_MARK:this._err(Gae.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Toe.BOGUS_COMMENT,this._stateBogusComment(e);break;case Lae.EOF:this._err(Gae.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(Gae.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=Toe.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Ioe(e))this._createEndTagToken(),this.state=Toe.TAG_NAME,this._stateTagName(e);else switch(e){case Lae.GREATER_THAN_SIGN:this._err(Gae.missingEndTagName),this.state=Toe.DATA;break;case Lae.EOF:this._err(Gae.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(Gae.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Toe.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this.state=Toe.BEFORE_ATTRIBUTE_NAME;break;case Lae.SOLIDUS:this.state=Toe.SELF_CLOSING_START_TAG;break;case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentTagToken();break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.tagName+=Pae;break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Noe(e)?Roe(e):e)}}_stateRcdataLessThanSign(e){e===Lae.SOLIDUS?this.state=Toe.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=Toe.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Ioe(e)?(this.state=Toe.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=Toe.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 Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Toe.BEFORE_ATTRIBUTE_NAME,!1;case Lae.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Toe.SELF_CLOSING_START_TAG,!1;case Lae.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Toe.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Toe.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===Lae.SOLIDUS?this.state=Toe.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=Toe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Ioe(e)?(this.state=Toe.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=Toe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Toe.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case Lae.SOLIDUS:this.state=Toe.SCRIPT_DATA_END_TAG_OPEN;break;case Lae.EXCLAMATION_MARK:this.state=Toe.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=Toe.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Ioe(e)?(this.state=Toe.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=Toe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Toe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===Lae.HYPHEN_MINUS?(this.state=Toe.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=Toe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===Lae.HYPHEN_MINUS?(this.state=Toe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=Toe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitChars(Pae);break;case Lae.EOF:this._err(Gae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.state=Toe.SCRIPT_DATA_ESCAPED,this._emitChars(Pae);break;case Lae.EOF:this._err(Gae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Toe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case Lae.HYPHEN_MINUS:this._emitChars("-");break;case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Lae.GREATER_THAN_SIGN:this.state=Toe.SCRIPT_DATA,this._emitChars(">");break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.state=Toe.SCRIPT_DATA_ESCAPED,this._emitChars(Pae);break;case Lae.EOF:this._err(Gae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Toe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Lae.SOLIDUS?this.state=Toe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ioe(e)?(this._emitChars("<"),this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=Toe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Ioe(e)?(this.state=Toe.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=Toe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Toe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(zae,!1)&&Loe(this.preprocessor.peek(zae.length))){this._emitCodePoint(e);for(let e=0;e<zae.length;e++)this._emitCodePoint(this._consume());this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Toe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitChars(Pae);break;case Lae.EOF:this._err(Gae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pae);break;case Lae.EOF:this._err(Gae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case Lae.HYPHEN_MINUS:this._emitChars("-");break;case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Lae.GREATER_THAN_SIGN:this.state=Toe.SCRIPT_DATA,this._emitChars(">");break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pae);break;case Lae.EOF:this._err(Gae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Lae.SOLIDUS?(this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(zae,!1)&&Loe(this.preprocessor.peek(zae.length))){this._emitCodePoint(e);for(let e=0;e<zae.length;e++)this._emitCodePoint(this._consume());this.state=Toe.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.SOLIDUS:case Lae.GREATER_THAN_SIGN:case Lae.EOF:this.state=Toe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Lae.EQUALS_SIGN:this._err(Gae.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=Toe.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=Toe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:case Lae.SOLIDUS:case Lae.GREATER_THAN_SIGN:case Lae.EOF:this._leaveAttrName(),this.state=Toe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Lae.EQUALS_SIGN:this._leaveAttrName(),this.state=Toe.BEFORE_ATTRIBUTE_VALUE;break;case Lae.QUOTATION_MARK:case Lae.APOSTROPHE:case Lae.LESS_THAN_SIGN:this._err(Gae.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.currentAttr.name+=Pae;break;default:this.currentAttr.name+=String.fromCodePoint(Noe(e)?Roe(e):e)}}_stateAfterAttributeName(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.SOLIDUS:this.state=Toe.SELF_CLOSING_START_TAG;break;case Lae.EQUALS_SIGN:this.state=Toe.BEFORE_ATTRIBUTE_VALUE;break;case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentTagToken();break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=Toe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.QUOTATION_MARK:this.state=Toe.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:this.state=Toe.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.missingAttributeValue),this.state=Toe.DATA,this.emitCurrentTagToken();break;default:this.state=Toe.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Lae.QUOTATION_MARK:this.state=Toe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Lae.AMPERSAND:this._startCharacterReference();break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.currentAttr.value+=Pae;break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Lae.APOSTROPHE:this.state=Toe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Lae.AMPERSAND:this._startCharacterReference();break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.currentAttr.value+=Pae;break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this._leaveAttrValue(),this.state=Toe.BEFORE_ATTRIBUTE_NAME;break;case Lae.AMPERSAND:this._startCharacterReference();break;case Lae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Toe.DATA,this.emitCurrentTagToken();break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.currentAttr.value+=Pae;break;case Lae.QUOTATION_MARK:case Lae.APOSTROPHE:case Lae.LESS_THAN_SIGN:case Lae.EQUALS_SIGN:case Lae.GRAVE_ACCENT:this._err(Gae.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this._leaveAttrValue(),this.state=Toe.BEFORE_ATTRIBUTE_NAME;break;case Lae.SOLIDUS:this._leaveAttrValue(),this.state=Toe.SELF_CLOSING_START_TAG;break;case Lae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Toe.DATA,this.emitCurrentTagToken();break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:this._err(Gae.missingWhitespaceBetweenAttributes),this.state=Toe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Lae.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=Toe.DATA,this.emitCurrentTagToken();break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:this._err(Gae.unexpectedSolidusInTag),this.state=Toe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentComment(t);break;case Lae.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.data+=Pae;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Mae,!0)?(this._createCommentToken(Mae.length+1),this.state=Toe.COMMENT_START):this._consumeSequenceIfMatch(jae,!1)?(this.currentLocation=this.getCurrentLocation(jae.length+1),this.state=Toe.DOCTYPE):this._consumeSequenceIfMatch(Fae,!0)?this.inForeignNode?this.state=Toe.CDATA_SECTION:(this._err(Gae.cdataInHtmlContent),this._createCommentToken(Fae.length+1),this.currentToken.data="[CDATA[",this.state=Toe.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Gae.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Toe.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.COMMENT_START_DASH;break;case Lae.GREATER_THAN_SIGN:{this._err(Gae.abruptClosingOfEmptyComment),this.state=Toe.DATA;const e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Toe.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.COMMENT_END;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.abruptClosingOfEmptyComment),this.state=Toe.DATA,this.emitCurrentComment(t);break;case Lae.EOF:this._err(Gae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=Toe.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.COMMENT_END_DASH;break;case Lae.LESS_THAN_SIGN:t.data+="<",this.state=Toe.COMMENT_LESS_THAN_SIGN;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.data+=Pae;break;case Lae.EOF:this._err(Gae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case Lae.EXCLAMATION_MARK:t.data+="!",this.state=Toe.COMMENT_LESS_THAN_SIGN_BANG;break;case Lae.LESS_THAN_SIGN:t.data+="<";break;default:this.state=Toe.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Lae.HYPHEN_MINUS?this.state=Toe.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Toe.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Lae.HYPHEN_MINUS?this.state=Toe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Toe.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Lae.GREATER_THAN_SIGN&&e!==Lae.EOF&&this._err(Gae.nestedComment),this.state=Toe.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.COMMENT_END;break;case Lae.EOF:this._err(Gae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=Toe.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentComment(t);break;case Lae.EXCLAMATION_MARK:this.state=Toe.COMMENT_END_BANG;break;case Lae.HYPHEN_MINUS:t.data+="-";break;case Lae.EOF:this._err(Gae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=Toe.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case Lae.HYPHEN_MINUS:t.data+="--!",this.state=Toe.COMMENT_END_DASH;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.incorrectlyClosedComment),this.state=Toe.DATA,this.emitCurrentComment(t);break;case Lae.EOF:this._err(Gae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=Toe.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this.state=Toe.BEFORE_DOCTYPE_NAME;break;case Lae.GREATER_THAN_SIGN:this.state=Toe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Lae.EOF:{this._err(Gae.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(Gae.missingWhitespaceBeforeDoctypeName),this.state=Toe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Noe(e))this._createDoctypeToken(String.fromCharCode(Roe(e))),this.state=Toe.DOCTYPE_NAME;else switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._createDoctypeToken(Pae),this.state=Toe.DOCTYPE_NAME;break;case Lae.GREATER_THAN_SIGN:{this._err(Gae.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Toe.DATA;break}case Lae.EOF:{this._err(Gae.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=Toe.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this.state=Toe.AFTER_DOCTYPE_NAME;break;case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.name+=Pae;break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Noe(e)?Roe(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Bae,!1)?this.state=Toe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Hae,!1)?this.state=Toe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Gae.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this.state=Toe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Lae.QUOTATION_MARK:this._err(Gae.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=Toe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:this._err(Gae.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=Toe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.QUOTATION_MARK:t.publicId="",this.state=Toe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:t.publicId="",this.state=Toe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Lae.QUOTATION_MARK:this.state=Toe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.publicId+=Pae;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.EOF:this._err(Gae.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 Lae.APOSTROPHE:this.state=Toe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.publicId+=Pae;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.EOF:this._err(Gae.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 Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this.state=Toe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.QUOTATION_MARK:this._err(Gae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:this._err(Gae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.QUOTATION_MARK:t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this.state=Toe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Lae.QUOTATION_MARK:this._err(Gae.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:this._err(Gae.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.QUOTATION_MARK:t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Lae.QUOTATION_MARK:this.state=Toe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.systemId+=Pae;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.EOF:this._err(Gae.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 Lae.APOSTROPHE:this.state=Toe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.systemId+=Pae;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.EOF:this._err(Gae.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 Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case Lae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter);break;case Lae.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Lae.RIGHT_SQUARE_BRACKET:this.state=Toe.CDATA_SECTION_BRACKET;break;case Lae.EOF:this._err(Gae.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Lae.RIGHT_SQUARE_BRACKET?this.state=Toe.CDATA_SECTION_END:(this._emitChars("]"),this.state=Toe.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA;break;case Lae.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=Toe.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(Lae.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ooe(this.preprocessor.peek(1))?Toe.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Ooe(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===Lae.SEMICOLON&&this._err(Gae.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const Moe=new Set([moe.DD,moe.DT,moe.LI,moe.OPTGROUP,moe.OPTION,moe.P,moe.RB,moe.RP,moe.RT,moe.RTC]),Foe=new Set([...Moe,moe.CAPTION,moe.COLGROUP,moe.TBODY,moe.TD,moe.TFOOT,moe.TH,moe.THEAD,moe.TR]),joe=new Set([moe.APPLET,moe.CAPTION,moe.HTML,moe.MARQUEE,moe.OBJECT,moe.TABLE,moe.TD,moe.TEMPLATE,moe.TH]),zoe=new Set([...joe,moe.OL,moe.UL]),Boe=new Set([...joe,moe.BUTTON]),Hoe=new Set([moe.ANNOTATION_XML,moe.MI,moe.MN,moe.MO,moe.MS,moe.MTEXT]),Uoe=new Set([moe.DESC,moe.FOREIGN_OBJECT,moe.TITLE]),$oe=new Set([moe.TR,moe.TEMPLATE,moe.HTML]),Voe=new Set([moe.TBODY,moe.TFOOT,moe.THEAD,moe.TEMPLATE,moe.HTML]),Goe=new Set([moe.TABLE,moe.TEMPLATE,moe.HTML]),qoe=new Set([moe.TD,moe.TH]);class Woe{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=moe.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===moe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===soe.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])!==soe.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(Soe,soe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(qoe,soe.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(Goe,soe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Voe,soe.HTML)}clearBackToTableRowContext(){this.clearBackTo($oe,soe.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]===moe.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]===moe.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 soe.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case soe.SVG:if(Uoe.has(r))return!1;break;case soe.MATHML:if(Hoe.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,joe)}hasInListItemScope(e){return this.hasInDynamicScope(e,zoe)}hasInButtonScope(e){return this.hasInDynamicScope(e,Boe)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case soe.HTML:if(Soe.has(t))return!0;if(joe.has(t))return!1;break;case soe.SVG:if(Uoe.has(t))return!1;break;case soe.MATHML:if(Hoe.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===soe.HTML)switch(this.tagIDs[t]){case e:return!0;case moe.TABLE:case moe.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===soe.HTML)switch(this.tagIDs[e]){case moe.TBODY:case moe.THEAD:case moe.TFOOT:return!0;case moe.TABLE:case moe.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===soe.HTML)switch(this.tagIDs[t]){case e:return!0;case moe.OPTION:case moe.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;void 0!==this.currentTagId&&Moe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&Foe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&Foe.has(this.currentTagId);)this.pop()}}var Yoe,Zoe;(Zoe=Yoe||(Yoe={}))[Zoe.Marker=0]="Marker",Zoe[Zoe.Element=1]="Element";const Koe={type:Yoe.Marker};class Xoe{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===Yoe.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(Koe)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Yoe.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Yoe.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(Koe);-1===e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===Yoe.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===Yoe.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===Yoe.Element&&t.element===e))}}const Qoe={createDocument:()=>({nodeName:"#document",mode:doe.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};Qoe.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(Qoe.isTextNode(n))return void(n.value+=t)}Qoe.appendChild(e,Qoe.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Qoe.isTextNode(r)?r.value+=t:Qoe.insertBefore(e,Qoe.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}}},Joe="html",eie=["+//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//"],tie=[...eie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],nie=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),rie=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],aie=[...rie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function oie(e,t){return t.some((t=>e.startsWith(t)))}const iie="text/html",sie="application/xhtml+xml",lie=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]))),cie=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:soe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:soe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:soe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:soe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:soe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:soe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:soe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:soe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:soe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:soe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:soe.XMLNS}]]),uie=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]))),die=new Set([moe.B,moe.BIG,moe.BLOCKQUOTE,moe.BODY,moe.BR,moe.CENTER,moe.CODE,moe.DD,moe.DIV,moe.DL,moe.DT,moe.EM,moe.EMBED,moe.H1,moe.H2,moe.H3,moe.H4,moe.H5,moe.H6,moe.HEAD,moe.HR,moe.I,moe.IMG,moe.LI,moe.LISTING,moe.MENU,moe.META,moe.NOBR,moe.OL,moe.P,moe.PRE,moe.RUBY,moe.S,moe.SMALL,moe.SPAN,moe.STRONG,moe.STRIKE,moe.SUB,moe.SUP,moe.TABLE,moe.TT,moe.U,moe.UL,moe.VAR]);function pie(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function fie(e){for(let t=0;t<e.attrs.length;t++){const n=lie.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function hie(e){for(let t=0;t<e.attrs.length;t++){const n=cie.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 mie(e,t,n,r){return(!r||r===soe.HTML)&&function(e,t,n){if(t===soe.MATHML&&e===moe.ANNOTATION_XML)for(let r=0;r<n.length;r++)if(n[r].name===coe.ENCODING){const e=n[r].value.toLowerCase();return e===iie||e===sie}return t===soe.SVG&&(e===moe.FOREIGN_OBJECT||e===moe.DESC||e===moe.TITLE)}(e,t,n)||(!r||r===soe.MATHML)&&function(e,t){return t===soe.MATHML&&(e===moe.MI||e===moe.MO||e===moe.MN||e===moe.MS||e===moe.MTEXT)}(e,t)}var gie,yie;(yie=gie||(gie={}))[yie.INITIAL=0]="INITIAL",yie[yie.BEFORE_HTML=1]="BEFORE_HTML",yie[yie.BEFORE_HEAD=2]="BEFORE_HEAD",yie[yie.IN_HEAD=3]="IN_HEAD",yie[yie.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",yie[yie.AFTER_HEAD=5]="AFTER_HEAD",yie[yie.IN_BODY=6]="IN_BODY",yie[yie.TEXT=7]="TEXT",yie[yie.IN_TABLE=8]="IN_TABLE",yie[yie.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",yie[yie.IN_CAPTION=10]="IN_CAPTION",yie[yie.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",yie[yie.IN_TABLE_BODY=12]="IN_TABLE_BODY",yie[yie.IN_ROW=13]="IN_ROW",yie[yie.IN_CELL=14]="IN_CELL",yie[yie.IN_SELECT=15]="IN_SELECT",yie[yie.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",yie[yie.IN_TEMPLATE=17]="IN_TEMPLATE",yie[yie.AFTER_BODY=18]="AFTER_BODY",yie[yie.IN_FRAMESET=19]="IN_FRAMESET",yie[yie.AFTER_FRAMESET=20]="AFTER_FRAMESET",yie[yie.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",yie[yie.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET";const bie={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},vie=new Set([moe.TABLE,moe.TBODY,moe.TFOOT,moe.THEAD,moe.TR]),kie={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Qoe,onParseError:null};class xie{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=gie.INITIAL,this.originalInsertionMode=gie.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={...kie,...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 Doe(this.options,this),this.activeFormattingElements=new Xoe(this.treeAdapter),this.fragmentContextID=n?woe(this.treeAdapter.getTagName(n)):moe.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new Woe(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={...kie,...t};null!=e||(e=n.treeAdapter.createElement(foe.TEMPLATE,soe.HTML,[]));const r=n.treeAdapter.createElement("documentmock",soe.HTML,[]),a=new this(n,r,e);return a.fragmentContextID===moe.TEMPLATE&&a.tmplInsertionModeStack.unshift(gie.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:bie,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)===soe.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,soe.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=gie.TEXT}switchToPlaintextParsing(){this.insertionMode=gie.TEXT,this.originalInsertionMode=gie.IN_BODY,this.tokenizer.state=Aoe.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)===foe.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===soe.HTML)switch(this.fragmentContextID){case moe.TITLE:case moe.TEXTAREA:this.tokenizer.state=Aoe.RCDATA;break;case moe.STYLE:case moe.XMP:case moe.IFRAME:case moe.NOEMBED:case moe.NOFRAMES:case moe.NOSCRIPT:this.tokenizer.state=Aoe.RAWTEXT;break;case moe.SCRIPT:this.tokenizer.state=Aoe.SCRIPT_DATA;break;case moe.PLAINTEXT:this.tokenizer.state=Aoe.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,soe.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,soe.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(foe.HTML,soe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,moe.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===Yae.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!==moe.SVG||this.treeAdapter.getTagName(t)!==foe.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==soe.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===moe.MGLYPH||e.tagID===moe.MALIGNMARK)&&void 0!==n&&!this._isIntegrationPoint(n,t,soe.HTML))}_processToken(e){switch(e.type){case Yae.CHARACTER:this.onCharacter(e);break;case Yae.NULL_CHARACTER:this.onNullCharacter(e);break;case Yae.COMMENT:this.onComment(e);break;case Yae.DOCTYPE:this.onDoctype(e);break;case Yae.START_TAG:this._processStartTag(e);break;case Yae.END_TAG:this.onEndTag(e);break;case Yae.EOF:this.onEof(e);break;case Yae.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return mie(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===Yoe.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=gie.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(moe.P),this.openElements.popUntilTagNamePopped(moe.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case moe.TR:return void(this.insertionMode=gie.IN_ROW);case moe.TBODY:case moe.THEAD:case moe.TFOOT:return void(this.insertionMode=gie.IN_TABLE_BODY);case moe.CAPTION:return void(this.insertionMode=gie.IN_CAPTION);case moe.COLGROUP:return void(this.insertionMode=gie.IN_COLUMN_GROUP);case moe.TABLE:return void(this.insertionMode=gie.IN_TABLE);case moe.BODY:return void(this.insertionMode=gie.IN_BODY);case moe.FRAMESET:return void(this.insertionMode=gie.IN_FRAMESET);case moe.SELECT:return void this._resetInsertionModeForSelect(e);case moe.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case moe.HTML:return void(this.insertionMode=this.headElement?gie.AFTER_HEAD:gie.BEFORE_HEAD);case moe.TD:case moe.TH:if(e>0)return void(this.insertionMode=gie.IN_CELL);break;case moe.HEAD:if(e>0)return void(this.insertionMode=gie.IN_HEAD)}this.insertionMode=gie.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===moe.TEMPLATE)break;if(e===moe.TABLE)return void(this.insertionMode=gie.IN_SELECT_IN_TABLE)}this.insertionMode=gie.IN_SELECT}_isElementCausesFosterParenting(e){return vie.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 moe.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===soe.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case moe.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 _oe[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 gie.INITIAL:Oie(this,e);break;case gie.BEFORE_HTML:Rie(this,e);break;case gie.BEFORE_HEAD:Pie(this,e);break;case gie.IN_HEAD:Mie(this,e);break;case gie.IN_HEAD_NO_SCRIPT:Fie(this,e);break;case gie.AFTER_HEAD:jie(this,e);break;case gie.IN_BODY:case gie.IN_CAPTION:case gie.IN_CELL:case gie.IN_TEMPLATE:Hie(this,e);break;case gie.TEXT:case gie.IN_SELECT:case gie.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case gie.IN_TABLE:case gie.IN_TABLE_BODY:case gie.IN_ROW:Kie(this,e);break;case gie.IN_TABLE_TEXT:tse(this,e);break;case gie.IN_COLUMN_GROUP:ose(this,e);break;case gie.AFTER_BODY:hse(this,e);break;case gie.AFTER_AFTER_BODY:mse(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=Pae,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case gie.INITIAL:Oie(this,e);break;case gie.BEFORE_HTML:Rie(this,e);break;case gie.BEFORE_HEAD:Pie(this,e);break;case gie.IN_HEAD:Mie(this,e);break;case gie.IN_HEAD_NO_SCRIPT:Fie(this,e);break;case gie.AFTER_HEAD:jie(this,e);break;case gie.TEXT:this._insertCharacters(e);break;case gie.IN_TABLE:case gie.IN_TABLE_BODY:case gie.IN_ROW:Kie(this,e);break;case gie.IN_COLUMN_GROUP:ose(this,e);break;case gie.AFTER_BODY:hse(this,e);break;case gie.AFTER_AFTER_BODY:mse(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Nie(this,e);else switch(this.insertionMode){case gie.INITIAL:case gie.BEFORE_HTML:case gie.BEFORE_HEAD:case gie.IN_HEAD:case gie.IN_HEAD_NO_SCRIPT:case gie.AFTER_HEAD:case gie.IN_BODY:case gie.IN_TABLE:case gie.IN_CAPTION:case gie.IN_COLUMN_GROUP:case gie.IN_TABLE_BODY:case gie.IN_ROW:case gie.IN_CELL:case gie.IN_SELECT:case gie.IN_SELECT_IN_TABLE:case gie.IN_TEMPLATE:case gie.IN_FRAMESET:case gie.AFTER_FRAMESET:Nie(this,e);break;case gie.IN_TABLE_TEXT:nse(this,e);break;case gie.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case gie.AFTER_AFTER_BODY:case gie.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case gie.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?doe.QUIRKS:function(e){if(e.name!==Joe)return doe.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return doe.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),nie.has(n))return doe.QUIRKS;let e=null===t?tie:eie;if(oie(n,e))return doe.QUIRKS;if(e=null===t?rie:aie,oie(n,e))return doe.LIMITED_QUIRKS}return doe.NO_QUIRKS}(t);(function(e){return e.name===Joe&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err(t,Gae.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=gie.BEFORE_HTML}(this,e);break;case gie.BEFORE_HEAD:case gie.IN_HEAD:case gie.IN_HEAD_NO_SCRIPT:case gie.AFTER_HEAD:this._err(e,Gae.misplacedDoctype);break;case gie.IN_TABLE_TEXT:nse(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Gae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID;return t===moe.FONT&&e.attrs.some((({name:e})=>e===coe.COLOR||e===coe.SIZE||e===coe.FACE))||die.has(t)}(t))gse(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===soe.MATHML?pie(t):r===soe.SVG&&(!function(e){const t=uie.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=woe(e.tagName))}(t),fie(t)),hie(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 gie.INITIAL:Oie(this,e);break;case gie.BEFORE_HTML:!function(e,t){t.tagID===moe.HTML?(e._insertElement(t,soe.HTML),e.insertionMode=gie.BEFORE_HEAD):Rie(e,t)}(this,e);break;case gie.BEFORE_HEAD:!function(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.HEAD:e._insertElement(t,soe.HTML),e.headElement=e.openElements.current,e.insertionMode=gie.IN_HEAD;break;default:Pie(e,t)}}(this,e);break;case gie.IN_HEAD:Lie(this,e);break;case gie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.BASEFONT:case moe.BGSOUND:case moe.HEAD:case moe.LINK:case moe.META:case moe.NOFRAMES:case moe.STYLE:Lie(e,t);break;case moe.NOSCRIPT:e._err(t,Gae.nestedNoscriptInHead);break;default:Fie(e,t)}}(this,e);break;case gie.AFTER_HEAD:!function(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.BODY:e._insertElement(t,soe.HTML),e.framesetOk=!1,e.insertionMode=gie.IN_BODY;break;case moe.FRAMESET:e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_FRAMESET;break;case moe.BASE:case moe.BASEFONT:case moe.BGSOUND:case moe.LINK:case moe.META:case moe.NOFRAMES:case moe.SCRIPT:case moe.STYLE:case moe.TEMPLATE:case moe.TITLE:e._err(t,Gae.abandonedHeadElementChild),e.openElements.push(e.headElement,moe.HEAD),Lie(e,t),e.openElements.remove(e.headElement);break;case moe.HEAD:e._err(t,Gae.misplacedStartTagForHeadElement);break;default:jie(e,t)}}(this,e);break;case gie.IN_BODY:qie(this,e);break;case gie.IN_TABLE:Xie(this,e);break;case gie.IN_TABLE_TEXT:nse(this,e);break;case gie.IN_CAPTION:!function(e,t){const n=t.tagID;rse.has(n)?e.openElements.hasInTableScope(moe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(moe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=gie.IN_TABLE,Xie(e,t)):qie(e,t)}(this,e);break;case gie.IN_COLUMN_GROUP:ase(this,e);break;case gie.IN_TABLE_BODY:ise(this,e);break;case gie.IN_ROW:lse(this,e);break;case gie.IN_CELL:!function(e,t){const n=t.tagID;rse.has(n)?(e.openElements.hasInTableScope(moe.TD)||e.openElements.hasInTableScope(moe.TH))&&(e._closeTableCell(),lse(e,t)):qie(e,t)}(this,e);break;case gie.IN_SELECT:use(this,e);break;case gie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===moe.CAPTION||n===moe.TABLE||n===moe.TBODY||n===moe.TFOOT||n===moe.THEAD||n===moe.TR||n===moe.TD||n===moe.TH?(e.openElements.popUntilTagNamePopped(moe.SELECT),e._resetInsertionMode(),e._processStartTag(t)):use(e,t)}(this,e);break;case gie.IN_TEMPLATE:!function(e,t){switch(t.tagID){case moe.BASE:case moe.BASEFONT:case moe.BGSOUND:case moe.LINK:case moe.META:case moe.NOFRAMES:case moe.SCRIPT:case moe.STYLE:case moe.TEMPLATE:case moe.TITLE:Lie(e,t);break;case moe.CAPTION:case moe.COLGROUP:case moe.TBODY:case moe.TFOOT:case moe.THEAD:e.tmplInsertionModeStack[0]=gie.IN_TABLE,e.insertionMode=gie.IN_TABLE,Xie(e,t);break;case moe.COL:e.tmplInsertionModeStack[0]=gie.IN_COLUMN_GROUP,e.insertionMode=gie.IN_COLUMN_GROUP,ase(e,t);break;case moe.TR:e.tmplInsertionModeStack[0]=gie.IN_TABLE_BODY,e.insertionMode=gie.IN_TABLE_BODY,ise(e,t);break;case moe.TD:case moe.TH:e.tmplInsertionModeStack[0]=gie.IN_ROW,e.insertionMode=gie.IN_ROW,lse(e,t);break;default:e.tmplInsertionModeStack[0]=gie.IN_BODY,e.insertionMode=gie.IN_BODY,qie(e,t)}}(this,e);break;case gie.AFTER_BODY:!function(e,t){t.tagID===moe.HTML?qie(e,t):hse(e,t)}(this,e);break;case gie.IN_FRAMESET:!function(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.FRAMESET:e._insertElement(t,soe.HTML);break;case moe.FRAME:e._appendElement(t,soe.HTML),t.ackSelfClosing=!0;break;case moe.NOFRAMES:Lie(e,t)}}(this,e);break;case gie.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.NOFRAMES:Lie(e,t)}}(this,e);break;case gie.AFTER_AFTER_BODY:!function(e,t){t.tagID===moe.HTML?qie(e,t):mse(e,t)}(this,e);break;case gie.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.NOFRAMES:Lie(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===moe.P||t.tagID===moe.BR)return gse(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)===soe.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 gie.INITIAL:Oie(this,e);break;case gie.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==moe.HTML&&n!==moe.HEAD&&n!==moe.BODY&&n!==moe.BR||Rie(e,t)}(this,e);break;case gie.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===moe.HEAD||n===moe.BODY||n===moe.HTML||n===moe.BR?Pie(e,t):e._err(t,Gae.endTagWithoutMatchingOpenElement)}(this,e);break;case gie.IN_HEAD:!function(e,t){switch(t.tagID){case moe.HEAD:e.openElements.pop(),e.insertionMode=gie.AFTER_HEAD;break;case moe.BODY:case moe.BR:case moe.HTML:Mie(e,t);break;case moe.TEMPLATE:Die(e,t);break;default:e._err(t,Gae.endTagWithoutMatchingOpenElement)}}(this,e);break;case gie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case moe.NOSCRIPT:e.openElements.pop(),e.insertionMode=gie.IN_HEAD;break;case moe.BR:Fie(e,t);break;default:e._err(t,Gae.endTagWithoutMatchingOpenElement)}}(this,e);break;case gie.AFTER_HEAD:!function(e,t){switch(t.tagID){case moe.BODY:case moe.HTML:case moe.BR:jie(e,t);break;case moe.TEMPLATE:Die(e,t);break;default:e._err(t,Gae.endTagWithoutMatchingOpenElement)}}(this,e);break;case gie.IN_BODY:Yie(this,e);break;case gie.TEXT:!function(e,t){var n;t.tagID===moe.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 gie.IN_TABLE:Qie(this,e);break;case gie.IN_TABLE_TEXT:nse(this,e);break;case gie.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case moe.CAPTION:case moe.TABLE:e.openElements.hasInTableScope(moe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(moe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=gie.IN_TABLE,n===moe.TABLE&&Qie(e,t));break;case moe.BODY:case moe.COL:case moe.COLGROUP:case moe.HTML:case moe.TBODY:case moe.TD:case moe.TFOOT:case moe.TH:case moe.THEAD:case moe.TR:break;default:Yie(e,t)}}(this,e);break;case gie.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case moe.COLGROUP:e.openElements.currentTagId===moe.COLGROUP&&(e.openElements.pop(),e.insertionMode=gie.IN_TABLE);break;case moe.TEMPLATE:Die(e,t);break;case moe.COL:break;default:ose(e,t)}}(this,e);break;case gie.IN_TABLE_BODY:sse(this,e);break;case gie.IN_ROW:cse(this,e);break;case gie.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case moe.TD:case moe.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=gie.IN_ROW);break;case moe.TABLE:case moe.TBODY:case moe.TFOOT:case moe.THEAD:case moe.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),cse(e,t));break;case moe.BODY:case moe.CAPTION:case moe.COL:case moe.COLGROUP:case moe.HTML:break;default:Yie(e,t)}}(this,e);break;case gie.IN_SELECT:dse(this,e);break;case gie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===moe.CAPTION||n===moe.TABLE||n===moe.TBODY||n===moe.TFOOT||n===moe.THEAD||n===moe.TR||n===moe.TD||n===moe.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(moe.SELECT),e._resetInsertionMode(),e.onEndTag(t)):dse(e,t)}(this,e);break;case gie.IN_TEMPLATE:!function(e,t){t.tagID===moe.TEMPLATE&&Die(e,t)}(this,e);break;case gie.AFTER_BODY:fse(this,e);break;case gie.IN_FRAMESET:!function(e,t){t.tagID!==moe.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===moe.FRAMESET||(e.insertionMode=gie.AFTER_FRAMESET))}(this,e);break;case gie.AFTER_FRAMESET:!function(e,t){t.tagID===moe.HTML&&(e.insertionMode=gie.AFTER_AFTER_FRAMESET)}(this,e);break;case gie.AFTER_AFTER_BODY:mse(this,e)}}onEof(e){switch(this.insertionMode){case gie.INITIAL:Oie(this,e);break;case gie.BEFORE_HTML:Rie(this,e);break;case gie.BEFORE_HEAD:Pie(this,e);break;case gie.IN_HEAD:Mie(this,e);break;case gie.IN_HEAD_NO_SCRIPT:Fie(this,e);break;case gie.AFTER_HEAD:jie(this,e);break;case gie.IN_BODY:case gie.IN_TABLE:case gie.IN_CAPTION:case gie.IN_COLUMN_GROUP:case gie.IN_TABLE_BODY:case gie.IN_ROW:case gie.IN_CELL:case gie.IN_SELECT:case gie.IN_SELECT_IN_TABLE:Zie(this,e);break;case gie.TEXT:!function(e,t){e._err(t,Gae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case gie.IN_TABLE_TEXT:nse(this,e);break;case gie.IN_TEMPLATE:pse(this,e);break;case gie.AFTER_BODY:case gie.IN_FRAMESET:case gie.AFTER_FRAMESET:case gie.AFTER_AFTER_BODY:case gie.AFTER_AFTER_FRAMESET:Iie(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Lae.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 gie.IN_HEAD:case gie.IN_HEAD_NO_SCRIPT:case gie.AFTER_HEAD:case gie.TEXT:case gie.IN_COLUMN_GROUP:case gie.IN_SELECT:case gie.IN_SELECT_IN_TABLE:case gie.IN_FRAMESET:case gie.AFTER_FRAMESET:this._insertCharacters(e);break;case gie.IN_BODY:case gie.IN_CAPTION:case gie.IN_CELL:case gie.IN_TEMPLATE:case gie.AFTER_BODY:case gie.AFTER_AFTER_BODY:case gie.AFTER_AFTER_FRAMESET:Bie(this,e);break;case gie.IN_TABLE:case gie.IN_TABLE_BODY:case gie.IN_ROW:Kie(this,e);break;case gie.IN_TABLE_TEXT:ese(this,e)}}}function wie(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):Wie(e,t),n}function Eie(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 _ie(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=Sie(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function Sie(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 Tie(e,t,n){const r=woe(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);r===moe.TEMPLATE&&a===soe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Cie(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 Aie(e,t){for(let n=0;n<8;n++){const n=wie(e,t);if(!n)break;const r=Eie(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;const a=_ie(e,r,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),o&&Tie(e,o,a),Cie(e,r,n)}}function Nie(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Iie(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 Oie(e,t){e._err(t,Gae.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,doe.QUIRKS),e.insertionMode=gie.BEFORE_HTML,e._processToken(t)}function Rie(e,t){e._insertFakeRootElement(),e.insertionMode=gie.BEFORE_HEAD,e._processToken(t)}function Pie(e,t){e._insertFakeElement(foe.HEAD,moe.HEAD),e.headElement=e.openElements.current,e.insertionMode=gie.IN_HEAD,e._processToken(t)}function Lie(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.BASE:case moe.BASEFONT:case moe.BGSOUND:case moe.LINK:case moe.META:e._appendElement(t,soe.HTML),t.ackSelfClosing=!0;break;case moe.TITLE:e._switchToTextParsing(t,Aoe.RCDATA);break;case moe.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Aoe.RAWTEXT):(e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_HEAD_NO_SCRIPT);break;case moe.NOFRAMES:case moe.STYLE:e._switchToTextParsing(t,Aoe.RAWTEXT);break;case moe.SCRIPT:e._switchToTextParsing(t,Aoe.SCRIPT_DATA);break;case moe.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=gie.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(gie.IN_TEMPLATE);break;case moe.HEAD:e._err(t,Gae.misplacedStartTagForHeadElement);break;default:Mie(e,t)}}function Die(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==moe.TEMPLATE&&e._err(t,Gae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(moe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Gae.endTagWithoutMatchingOpenElement)}function Mie(e,t){e.openElements.pop(),e.insertionMode=gie.AFTER_HEAD,e._processToken(t)}function Fie(e,t){const n=t.type===Yae.EOF?Gae.openElementsLeftAfterEof:Gae.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=gie.IN_HEAD,e._processToken(t)}function jie(e,t){e._insertFakeElement(foe.BODY,moe.BODY),e.insertionMode=gie.IN_BODY,zie(e,t)}function zie(e,t){switch(t.type){case Yae.CHARACTER:Hie(e,t);break;case Yae.WHITESPACE_CHARACTER:Bie(e,t);break;case Yae.COMMENT:Nie(e,t);break;case Yae.START_TAG:qie(e,t);break;case Yae.END_TAG:Yie(e,t);break;case Yae.EOF:Zie(e,t)}}function Bie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Hie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Uie(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,soe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function $ie(e){const t=Kae(e,coe.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function Vie(e,t){e._switchToTextParsing(t,Aoe.RAWTEXT)}function Gie(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML)}function qie(e,t){switch(t.tagID){case moe.I:case moe.S:case moe.B:case moe.U:case moe.EM:case moe.TT:case moe.BIG:case moe.CODE:case moe.FONT:case moe.SMALL:case moe.STRIKE:case moe.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case moe.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(foe.A);n&&(Aie(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case moe.H1:case moe.H2:case moe.H3:case moe.H4:case moe.H5:case moe.H6:!function(e,t){e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),void 0!==e.openElements.currentTagId&&Soe.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,soe.HTML)}(e,t);break;case moe.P:case moe.DL:case moe.OL:case moe.UL:case moe.DIV:case moe.DIR:case moe.NAV:case moe.MAIN:case moe.MENU:case moe.ASIDE:case moe.CENTER:case moe.FIGURE:case moe.FOOTER:case moe.HEADER:case moe.HGROUP:case moe.DIALOG:case moe.DETAILS:case moe.ADDRESS:case moe.ARTICLE:case moe.SEARCH:case moe.SECTION:case moe.SUMMARY:case moe.FIELDSET:case moe.BLOCKQUOTE:case moe.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._insertElement(t,soe.HTML)}(e,t);break;case moe.LI:case moe.DD:case moe.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===moe.LI&&t===moe.LI||(n===moe.DD||n===moe.DT)&&(t===moe.DD||t===moe.DT)){e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t);break}if(t!==moe.ADDRESS&&t!==moe.DIV&&t!==moe.P&&e._isSpecialElement(e.openElements.items[r],t))break}e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._insertElement(t,soe.HTML)}(e,t);break;case moe.BR:case moe.IMG:case moe.WBR:case moe.AREA:case moe.EMBED:case moe.KEYGEN:Uie(e,t);break;case moe.HR:!function(e,t){e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._appendElement(t,soe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case moe.RB:case moe.RTC:!function(e,t){e.openElements.hasInScope(moe.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,soe.HTML)}(e,t);break;case moe.RT:case moe.RP:!function(e,t){e.openElements.hasInScope(moe.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(moe.RTC),e._insertElement(t,soe.HTML)}(e,t);break;case moe.PRE:case moe.LISTING:!function(e,t){e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._insertElement(t,soe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case moe.XMP:!function(e,t){e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Aoe.RAWTEXT)}(e,t);break;case moe.SVG:!function(e,t){e._reconstructActiveFormattingElements(),fie(t),hie(t),t.selfClosing?e._appendElement(t,soe.SVG):e._insertElement(t,soe.SVG),t.ackSelfClosing=!0}(e,t);break;case moe.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case moe.BASE:case moe.LINK:case moe.META:case moe.STYLE:case moe.TITLE:case moe.SCRIPT:case moe.BGSOUND:case moe.BASEFONT:case moe.TEMPLATE:Lie(e,t);break;case moe.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 moe.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._insertElement(t,soe.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case moe.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(moe.NOBR)&&(Aie(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,soe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case moe.MATH:!function(e,t){e._reconstructActiveFormattingElements(),pie(t),hie(t),t.selfClosing?e._appendElement(t,soe.MATHML):e._insertElement(t,soe.MATHML),t.ackSelfClosing=!0}(e,t);break;case moe.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==doe.QUIRKS&&e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._insertElement(t,soe.HTML),e.framesetOk=!1,e.insertionMode=gie.IN_TABLE}(e,t);break;case moe.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,soe.HTML),$ie(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case moe.PARAM:case moe.TRACK:case moe.SOURCE:!function(e,t){e._appendElement(t,soe.HTML),t.ackSelfClosing=!0}(e,t);break;case moe.IMAGE:!function(e,t){t.tagName=foe.IMG,t.tagID=moe.IMG,Uie(e,t)}(e,t);break;case moe.BUTTON:!function(e,t){e.openElements.hasInScope(moe.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(moe.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML),e.framesetOk=!1}(e,t);break;case moe.APPLET:case moe.OBJECT:case moe.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case moe.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Aoe.RAWTEXT)}(e,t);break;case moe.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===gie.IN_TABLE||e.insertionMode===gie.IN_CAPTION||e.insertionMode===gie.IN_TABLE_BODY||e.insertionMode===gie.IN_ROW||e.insertionMode===gie.IN_CELL?gie.IN_SELECT_IN_TABLE:gie.IN_SELECT}(e,t);break;case moe.OPTION:case moe.OPTGROUP:!function(e,t){e.openElements.currentTagId===moe.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML)}(e,t);break;case moe.NOEMBED:case moe.NOFRAMES:Vie(e,t);break;case moe.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_FRAMESET)}(e,t);break;case moe.TEXTAREA:!function(e,t){e._insertElement(t,soe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Aoe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=gie.TEXT}(e,t);break;case moe.NOSCRIPT:e.options.scriptingEnabled?Vie(e,t):Gie(e,t);break;case moe.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._insertElement(t,soe.HTML),e.tokenizer.state=Aoe.PLAINTEXT}(e,t);break;case moe.COL:case moe.TH:case moe.TD:case moe.TR:case moe.HEAD:case moe.FRAME:case moe.TBODY:case moe.TFOOT:case moe.THEAD:case moe.CAPTION:case moe.COLGROUP:break;default:Gie(e,t)}}function Wie(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!==moe.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 Yie(e,t){switch(t.tagID){case moe.A:case moe.B:case moe.I:case moe.S:case moe.U:case moe.EM:case moe.TT:case moe.BIG:case moe.CODE:case moe.FONT:case moe.NOBR:case moe.SMALL:case moe.STRIKE:case moe.STRONG:Aie(e,t);break;case moe.P:!function(e){e.openElements.hasInButtonScope(moe.P)||e._insertFakeElement(foe.P,moe.P),e._closePElement()}(e);break;case moe.DL:case moe.UL:case moe.OL:case moe.DIR:case moe.DIV:case moe.NAV:case moe.PRE:case moe.MAIN:case moe.MENU:case moe.ASIDE:case moe.BUTTON:case moe.CENTER:case moe.FIGURE:case moe.FOOTER:case moe.HEADER:case moe.HGROUP:case moe.DIALOG:case moe.ADDRESS:case moe.ARTICLE:case moe.DETAILS:case moe.SEARCH:case moe.SECTION:case moe.SUMMARY:case moe.LISTING:case moe.FIELDSET:case moe.BLOCKQUOTE:case moe.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case moe.LI:!function(e){e.openElements.hasInListItemScope(moe.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(moe.LI),e.openElements.popUntilTagNamePopped(moe.LI))}(e);break;case moe.DD:case moe.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case moe.H1:case moe.H2:case moe.H3:case moe.H4:case moe.H5:case moe.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case moe.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(foe.BR,moe.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case moe.BODY:!function(e,t){if(e.openElements.hasInScope(moe.BODY)&&(e.insertionMode=gie.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case moe.HTML:!function(e,t){e.openElements.hasInScope(moe.BODY)&&(e.insertionMode=gie.AFTER_BODY,fse(e,t))}(e,t);break;case moe.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(moe.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(moe.FORM):n&&e.openElements.remove(n))}(e);break;case moe.APPLET:case moe.OBJECT:case moe.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 moe.TEMPLATE:Die(e,t);break;default:Wie(e,t)}}function Zie(e,t){e.tmplInsertionModeStack.length>0?pse(e,t):Iie(e,t)}function Kie(e,t){if(void 0!==e.openElements.currentTagId&&vie.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=gie.IN_TABLE_TEXT,t.type){case Yae.CHARACTER:tse(e,t);break;case Yae.WHITESPACE_CHARACTER:ese(e,t)}else Jie(e,t)}function Xie(e,t){switch(t.tagID){case moe.TD:case moe.TH:case moe.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(foe.TBODY,moe.TBODY),e.insertionMode=gie.IN_TABLE_BODY,ise(e,t)}(e,t);break;case moe.STYLE:case moe.SCRIPT:case moe.TEMPLATE:Lie(e,t);break;case moe.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(foe.COLGROUP,moe.COLGROUP),e.insertionMode=gie.IN_COLUMN_GROUP,ase(e,t)}(e,t);break;case moe.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,soe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case moe.TABLE:!function(e,t){e.openElements.hasInTableScope(moe.TABLE)&&(e.openElements.popUntilTagNamePopped(moe.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case moe.TBODY:case moe.TFOOT:case moe.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_TABLE_BODY}(e,t);break;case moe.INPUT:!function(e,t){$ie(t)?e._appendElement(t,soe.HTML):Jie(e,t),t.ackSelfClosing=!0}(e,t);break;case moe.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_CAPTION}(e,t);break;case moe.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_COLUMN_GROUP}(e,t);break;default:Jie(e,t)}}function Qie(e,t){switch(t.tagID){case moe.TABLE:e.openElements.hasInTableScope(moe.TABLE)&&(e.openElements.popUntilTagNamePopped(moe.TABLE),e._resetInsertionMode());break;case moe.TEMPLATE:Die(e,t);break;case moe.BODY:case moe.CAPTION:case moe.COL:case moe.COLGROUP:case moe.HTML:case moe.TBODY:case moe.TD:case moe.TFOOT:case moe.TH:case moe.THEAD:case moe.TR:break;default:Jie(e,t)}}function Jie(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,zie(e,t),e.fosterParentingEnabled=n}function ese(e,t){e.pendingCharacterTokens.push(t)}function tse(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function nse(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Jie(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const rse=new Set([moe.CAPTION,moe.COL,moe.COLGROUP,moe.TBODY,moe.TD,moe.TFOOT,moe.TH,moe.THEAD,moe.TR]);function ase(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.COL:e._appendElement(t,soe.HTML),t.ackSelfClosing=!0;break;case moe.TEMPLATE:Lie(e,t);break;default:ose(e,t)}}function ose(e,t){e.openElements.currentTagId===moe.COLGROUP&&(e.openElements.pop(),e.insertionMode=gie.IN_TABLE,e._processToken(t))}function ise(e,t){switch(t.tagID){case moe.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_ROW;break;case moe.TH:case moe.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(foe.TR,moe.TR),e.insertionMode=gie.IN_ROW,lse(e,t);break;case moe.CAPTION:case moe.COL:case moe.COLGROUP:case moe.TBODY:case moe.TFOOT:case moe.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE,Xie(e,t));break;default:Xie(e,t)}}function sse(e,t){const n=t.tagID;switch(t.tagID){case moe.TBODY:case moe.TFOOT:case moe.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE);break;case moe.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE,Qie(e,t));break;case moe.BODY:case moe.CAPTION:case moe.COL:case moe.COLGROUP:case moe.HTML:case moe.TD:case moe.TH:case moe.TR:break;default:Qie(e,t)}}function lse(e,t){switch(t.tagID){case moe.TH:case moe.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_CELL,e.activeFormattingElements.insertMarker();break;case moe.CAPTION:case moe.COL:case moe.COLGROUP:case moe.TBODY:case moe.TFOOT:case moe.THEAD:case moe.TR:e.openElements.hasInTableScope(moe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE_BODY,ise(e,t));break;default:Xie(e,t)}}function cse(e,t){switch(t.tagID){case moe.TR:e.openElements.hasInTableScope(moe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE_BODY);break;case moe.TABLE:e.openElements.hasInTableScope(moe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE_BODY,sse(e,t));break;case moe.TBODY:case moe.TFOOT:case moe.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(moe.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE_BODY,sse(e,t));break;case moe.BODY:case moe.CAPTION:case moe.COL:case moe.COLGROUP:case moe.HTML:case moe.TD:case moe.TH:break;default:Qie(e,t)}}function use(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.OPTION:e.openElements.currentTagId===moe.OPTION&&e.openElements.pop(),e._insertElement(t,soe.HTML);break;case moe.OPTGROUP:e.openElements.currentTagId===moe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===moe.OPTGROUP&&e.openElements.pop(),e._insertElement(t,soe.HTML);break;case moe.HR:e.openElements.currentTagId===moe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===moe.OPTGROUP&&e.openElements.pop(),e._appendElement(t,soe.HTML),t.ackSelfClosing=!0;break;case moe.INPUT:case moe.KEYGEN:case moe.TEXTAREA:case moe.SELECT:e.openElements.hasInSelectScope(moe.SELECT)&&(e.openElements.popUntilTagNamePopped(moe.SELECT),e._resetInsertionMode(),t.tagID!==moe.SELECT&&e._processStartTag(t));break;case moe.SCRIPT:case moe.TEMPLATE:Lie(e,t)}}function dse(e,t){switch(t.tagID){case moe.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===moe.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===moe.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===moe.OPTGROUP&&e.openElements.pop();break;case moe.OPTION:e.openElements.currentTagId===moe.OPTION&&e.openElements.pop();break;case moe.SELECT:e.openElements.hasInSelectScope(moe.SELECT)&&(e.openElements.popUntilTagNamePopped(moe.SELECT),e._resetInsertionMode());break;case moe.TEMPLATE:Die(e,t)}}function pse(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(moe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Iie(e,t)}function fse(e,t){var n;if(t.tagID===moe.HTML){if(e.fragmentContext||(e.insertionMode=gie.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===moe.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 hse(e,t)}function hse(e,t){e.insertionMode=gie.IN_BODY,zie(e,t)}function mse(e,t){e.insertionMode=gie.IN_BODY,zie(e,t)}function gse(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==soe.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}foe.AREA,foe.BASE,foe.BASEFONT,foe.BGSOUND,foe.BR,foe.COL,foe.EMBED,foe.FRAME,foe.HR,foe.IMG,foe.INPUT,foe.KEYGEN,foe.LINK,foe.META,foe.PARAM,foe.SOURCE,foe.TRACK,foe.WBR;const yse=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,bse=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),vse={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function kse(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=_ae("type",{handlers:{root:wse,element:Ese,text:_se,comment:Cse,doctype:Sse,raw:Ase},unknown:Nse}),a={parser:n?new xie(vse):xie.getFragmentParser(void 0,vse),handle(e){r(e,a)},stitches:!1,options:t||{}};r(e,a),Ise(a,wee());const o=function(e,t){const n=t||{};return bae({file:n.file||void 0,location:!1,schema:"svg"===n.space?G7:V7,verbose:n.verbose||!1},e)}(n?a.parser.document:a.parser.getFragment(),{file:a.options.file});return a.stitches&&pre(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 xse(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function wse(e,t){xse(e.children,t)}function Ese(e,t){!function(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Aoe.PLAINTEXT)return;Ise(t,wee(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:mae.html;a===mae.html&&"svg"===n&&(a=mae.svg);const o=function(e,t){const n=(t||Sae).space;return Cae(e,"svg"===n?G7:V7)}({...e,children:[]},{space:a===mae.svg?"svg":"html"}),i={type:Yae.START_TAG,tagName:n,tagID:woe(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:Rse(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}(e,t),xse(e.children,t),function(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Oae.includes(n))return;if(t.parser.tokenizer.state===Aoe.PLAINTEXT)return;Ise(t,xee(e));const r={type:Yae.END_TAG,tagName:n,tagID:woe(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Rse(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n!==t.parser.tokenizer.lastStartTagName||t.parser.tokenizer.state!==Aoe.RCDATA&&t.parser.tokenizer.state!==Aoe.RAWTEXT&&t.parser.tokenizer.state!==Aoe.SCRIPT_DATA||(t.parser.tokenizer.state=Aoe.DATA)}(e,t)}function _se(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Yae.CHARACTER,chars:e.value,location:Rse(e)};Ise(t,wee(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Sse(e,t){const n={type:Yae.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Rse(e)};Ise(t,wee(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Tse(e,t){t.stitches=!0;const n=function(e){return nre("children"in e?{...e,children:[]}:e)}(e);if("children"in e&&"children"in n){const r=kse({type:"root",children:e.children},t.options);n.children=r.children}Cse({type:"comment",value:{stitch:n}},t)}function Cse(e,t){const n=e.value,r={type:Yae.COMMENT,data:n,location:Rse(e)};Ise(t,wee(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ase(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,Ose(t,wee(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(yse,"<$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 Nse(e,t){const n=e;if(!t.options.passThrough||!t.options.passThrough.includes(n.type)){let e="";throw bse.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)}Tse(n,t)}function Ise(e,t){Ose(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=Aoe.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 Ose(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 Rse(e){const t=wee(e)||{line:void 0,column:void 0,offset:void 0},n=xee(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 Pse(e){return function(t,n){return kse(t,{...e,file:n})}}function Lse(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 Dse(e,t,n){const r=ore((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([Mse(e[0]),Fse(e[1])])}return t}(t);let o=-1;for(;++o<a.length;)dre(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 Mse(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 Fse(e){return"function"==typeof e?e:function(){return e}}const jse="phrasing",zse=["autolink","link","image","label"];function Bse(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Hse(e){this.config.enter.autolinkProtocol.call(this,e)}function Use(e){this.config.exit.autolinkProtocol.call(this,e)}function $se(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 Vse(e){this.config.exit.autolinkEmail.call(this,e)}function Gse(e){this.exit(e)}function qse(e){Dse(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Wse],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Yse]],{ignore:["link","linkReference"]})}function Wse(e,t,n,r,a){let o="";if(!Zse(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=Lse(e,"(");let o=Lse(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 Yse(e,t,n,r){return!(!Zse(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Zse(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||yte(n)||gte(n))&&(!t||47!==n)}function Kse(){this.buffer()}function Xse(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Qse(){this.buffer()}function Jse(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ele(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ote(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tle(e){this.exit(e)}function nle(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ote(this.sliceSerialize(e)).toLowerCase(),n.label=t}function rle(e){this.exit(e)}function ale(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 ole(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?sle:ile)));return s(),i},footnoteReference:ale},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ile(e,t,n){return 0===t?e:sle(e,t,n)}function sle(e,t,n){return(n?"":" ")+e}ale.peek=function(){return"["};const lle=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function cle(e){this.enter({type:"delete",children:[]},e)}function ule(e){this.exit(e)}function dle(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 ple(e){return e.length}function fle(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 hle(e,t,n){return">"+(n?"":" ")+e}function mle(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 gle(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],mle(o,i.inConstruct,!0)&&!mle(o,i.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var o,i;return"\\\n"}function yle(e,t,n){return(n?"":" ")+e}function ble(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 vle(e){return"&#x"+e.toString(16).toUpperCase()+";"}function kle(e,t,n){const r=_te(e),a=_te(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 xle(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=kle(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=vle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=kle(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+vle(d));const f=i.move(a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function wle(e){return e.value||""}function Ele(e,t,n,r){const a=ble(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 _le(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 Sle(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 Tle(e,t){const n=Wee(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 Cle(e,t,n,r){const a=ble(n),o='"'===a?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(Tle(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 Ale(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 Nle(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 Ile(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}dle.peek=function(){return"~"},xle.peek=function(e,t,n){return n.options.emphasis||"*"},wle.peek=function(){return"<"},Ele.peek=function(){return"!"},_le.peek=function(){return"!"},Sle.peek=function(){return"`"},Cle.peek=function(e,t,n){return Tle(e,n)?"<":"["},Ale.peek=function(){return"["};const Ole=ore(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Rle(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=kle(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=vle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=kle(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+vle(d));const f=i.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}Rle.peek=function(e,t,n){return n.options.strong||"*"};const Ple={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()),hle);return a(),i},break:gle,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,yle);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=ble(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:xle,hardBreak:gle,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 pre(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,ure})),Boolean((!e.depth||e.depth<3)&&Wee(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=vle(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),l(),s(),c},html:wle,image:Ele,imageReference:_le,inlineCode:Sle,link:Cle,linkReference:Ale,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):Nle(n);const s=e.ordered?"."===i?")":".":function(e){const t=Nle(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),Ile(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||Nle(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 Ole(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Rle,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ile(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 Lle(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 Dle(e){this.exit(e),this.data.inTable=void 0}function Mle(e){this.enter({type:"tableRow",children:[]},e)}function Fle(e){this.exit(e)}function jle(e){this.enter({type:"tableCell",children:[]},e)}function zle(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ble));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ble(e,t){return"|"===t?t:e}function Hle(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=Ple.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||ple,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]=fle(r[p]);else{const e=fle(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 Ule(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function $le(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 Vle(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=Ple.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+i}))),l}const Gle={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},qle={tokenize:function(e,t,n){let r,a,o;return i;function i(t){return 46===t||95===t?e.check(Yle,l,s)(t):null===t||hte(t)||yte(t)||45!==t&>e(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},Wle={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(Yle,t,o)(i):null===i||hte(i)||yte(i)?t(i):(e.consume(i),a)}function o(t){return 41===t&&r++,e.consume(t),a}},partial:!0},Yle={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||hte(i)||yte(i)?t(i):n(i)}function a(e){return null===e||40===e||91===e||hte(e)||yte(e)?t(e):r(e)}function o(e){return ite(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):ite(t)?(e.consume(t),i):n(t)}},partial:!0},Zle={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return ste(e)?n(e):t(e)}},partial:!0},Kle={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!tce.call(r,r.previous)||oce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Gle,e.attempt(qle,e.attempt(Wle,a),n),n)(t)};function a(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:tce},Xle={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let a="",o=!1;return function(t){if((72===t||104===t)&&nce.call(r,r.previous)&&!oce(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(ite(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||cte(t)||hte(t)||yte(t)||gte(t)?n(t):e.attempt(qle,e.attempt(Wle,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:nce},Qle={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let a,o;return function(t){if(!ace(t)||!rce.call(r,r.previous)||oce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return ace(t)?(e.consume(t),i):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(Zle,c,l)(t):45===t||95===t||ste(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&&ite(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:rce},Jle={};let ece=48;for(;ece<123;)Jle[ece]=Qle,ece++,58===ece?ece=65:91===ece&&(ece=97);function tce(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||hte(e)}function nce(e){return!ite(e)}function rce(e){return!(47===e||ace(e))}function ace(e){return 43===e||45===e||46===e||95===e||ste(e)}function oce(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}Jle[43]=Qle,Jle[45]=Qle,Jle[46]=Qle,Jle[95]=Qle,Jle[72]=[Qle,Xle],Jle[104]=[Qle,Xle],Jle[87]=[Qle,Kle],Jle[119]=[Qle,Kle];const ice={tokenize:function(e,t,n){const r=this;return kte(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 sce(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=ote(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 lce(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 cce(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||hte(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return a.includes(ote(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return hte(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 uce(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||hte(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=ote(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return hte(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),kte(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function dce(e,t,n){return e.check(Nte,t,e.attempt(ice,t,n))}function pce(e){e.exit("gfmFootnoteDefinition")}function fce(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=_te(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=_te(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&&Qee(i,i.length,0,Ste(s,e.slice(r+1,n),t)),Qee(i,i.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",a,t]]),Qee(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 hce{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 mce(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 gce(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):fte(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):mte(t)?kte(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||hte(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,mte(t)?kte(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 mte(t)?kte(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||fte(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 mte(t)?kte(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||fte(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||fte(n)?(e.exit("tableRow"),t(n)):mte(n)?kte(e,x,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||hte(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 yce(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 hce;for(;++o<e.length;){const f=e[o],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(vce(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=bce(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=bce(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=bce(p,t,l,s,o,a)):0!==c[1]&&(a=bce(p,t,c,s,o,a)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=o)}for(0!==d&&vce(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=mce(t.events,o))}return e}function bce(e,t,n,r,a,o){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},kce(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=kce(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=kce(t.events,n[2]),o=kce(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({},kce(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function vce(e,t,n,r,a){const o=[],i=kce(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 kce(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const xce={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 hte(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 fte(r)?t(r):mte(r)?e.check({tokenize:wce},t,n)(r):n(r)}}};function wce(e,t,n){return kte(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const Ece={};function _ce(e){const t=e||Ece,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return tte([{text:Jle},{document:{91:{name:"gfmFootnoteDefinition",tokenize:uce,continuation:{tokenize:dce},exit:pce}},text:{91:{name:"gfmFootnoteCall",tokenize:cce},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sce,resolveTo:lce}}},fce(e),{flow:{null:{name:"table",tokenize:gce,resolveAll:yce}}},{text:{91:xce}}])}(t)),a.push([{transforms:[qse],enter:{literalAutolink:Bse,literalAutolinkEmail:Hse,literalAutolinkHttp:Hse,literalAutolinkWww:Hse},exit:{literalAutolink:Gse,literalAutolinkEmail:Vse,literalAutolinkHttp:Use,literalAutolinkWww:$se}},{enter:{gfmFootnoteCallString:Kse,gfmFootnoteCall:Xse,gfmFootnoteDefinitionLabelString:Qse,gfmFootnoteDefinition:Jse},exit:{gfmFootnoteCallString:ele,gfmFootnoteCall:tle,gfmFootnoteDefinitionLabelString:nle,gfmFootnoteDefinition:rle}},{canContainEols:["delete"],enter:{strikethrough:cle},exit:{strikethrough:ule}},{enter:{table:Lle,tableData:jle,tableHeader:jle,tableRow:Mle},exit:{codeText:zle,table:Dle,tableData:Fle,tableHeader:Fle,tableRow:Fle}},{exit:{taskListCheckValueChecked:Ule,taskListCheckValueUnchecked:Ule,paragraph:$le}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:jse,notInConstruct:zse},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:jse,notInConstruct:zse},{character:":",before:"[ps]",after:"\\/",inConstruct:jse,notInConstruct:zse}]},ole(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lle}],handlers:{delete:dle}},Hle(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Vle}}]}}(t))}const Sce=function(e){if(null==e)return Cce;if("string"==typeof e)return function(e){return Tce(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]=Sce(e[n]);return Tce(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 Tce(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 Tce(e);throw new Error("Expected function, string, or object as test")};function Tce(e){return function(t,...n){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...n)))}}function Cce(){return!0}const Ace=!0,Nce=!1,Ice=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);const a=Sce(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[Ace,e];return[e]}(n(i,l)),p[0]===Nce))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]===Nce)return c;u="number"==typeof c[1]?c[1]:u+o}return p}}(e,void 0,[])()};const Oce=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),Ice(e,t,(function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)};function Rce(){return e=>{Oce(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)})),Oce(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 Pce(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=Pce(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Lce(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Pce(e))&&(r&&(r+=" "),r+=t);return r}var Dce,Mce,Fce,jce,zce,Bce,Hce,Uce=Object.create,$ce=Object.defineProperty,Vce=Object.defineProperties,Gce=Object.getOwnPropertyDescriptor,qce=Object.getOwnPropertyDescriptors,Wce=Object.getOwnPropertyNames,Yce=Object.getOwnPropertySymbols,Zce=Object.getPrototypeOf,Kce=Object.prototype.hasOwnProperty,Xce=Object.prototype.propertyIsEnumerable,Qce=(e,t,n)=>t in e?$ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jce=(e,t)=>{for(var n in t||(t={}))Kce.call(t,n)&&Qce(e,n,t[n]);if(Yce)for(var n of Yce(t))Xce.call(t,n)&&Qce(e,n,t[n]);return e},eue=(e,t)=>Vce(e,qce(t)),tue=(e,t)=>{var n={};for(var r in e)Kce.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Yce)for(var r of Yce(e))t.indexOf(r)<0&&Xce.call(e,r)&&(n[r]=e[r]);return n},nue=(Dce={"../../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,"&").replace(/</g,"<").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,N=E;for(N+=w.value.length;C>=N;)N+=(w=w.next).value.length;if(E=N-=w.value.length,w.value instanceof a)continue;for(var I=w;I!==t.tail&&(N<A||"string"==typeof I.value);I=I.next)T++,N+=I.value.length;T--,_=e.slice(E,N),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,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},r}();t.exports=n,n.default=n}},function(){return Mce||(0,Dce[Wce(Dce)[0]])((Mce={exports:{}}).exports,Mce),Mce.exports}),rue=((e,t,n)=>(n=null!=e?Uce(Zce(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of Wce(t))Kce.call(e,a)||a===n||$ce(e,a,{get:()=>t[a],enumerable:!(r=Gce(t,a))||r.enumerable});return e})(e&&e.__esModule?n:$ce(n,"default",{value:e,enumerable:!0}),e)))(nue());rue.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]},rue.languages.markup.tag.inside["attr-value"].inside.entity=rue.languages.markup.entity,rue.languages.markup.doctype.inside["internal-subset"].inside=rue.languages.markup,rue.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(rue.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:rue.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:rue.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},rue.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(rue.languages.markup.tag,"addAttribute",{value:function(e,t){rue.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:rue.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),rue.languages.html=rue.languages.markup,rue.languages.mathml=rue.languages.markup,rue.languages.svg=rue.languages.markup,rue.languages.xml=rue.languages.extend("markup",{}),rue.languages.ssml=rue.languages.xml,rue.languages.atom=rue.languages.xml,rue.languages.rss=rue.languages.xml,Fce=rue,jce={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},Bce="(?:[^\\\\-]|"+(zce=/\\(?: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+")",Bce=RegExp(Bce+"-"+Bce),Hce={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},Fce.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:Bce,inside:{escape:zce,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":jce,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:zce}},"special-escape":jce,"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":Hce}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:zce,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":Hce}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},rue.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:/[{}[\];(),.:]/},rue.languages.javascript=rue.languages.extend("clike",{"class-name":[rue.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}|\?\?=?|\?\.?|[~:]/}),rue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,rue.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:rue.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:rue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:rue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:rue.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:rue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),rue.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:rue.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"}}),rue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),rue.languages.markup&&(rue.languages.markup.tag.addInlined("script","javascript"),rue.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")),rue.languages.js=rue.languages.javascript,rue.languages.actionscript=rue.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:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),rue.languages.actionscript["class-name"].alias="function",delete rue.languages.actionscript.parameter,delete rue.languages.actionscript["literal-property"],rue.languages.markup&&rue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:rue.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}(rue),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)}(rue),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"))}(rue),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})}(rue),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}(rue),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}(rue),rue.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:rue.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+/},rue.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)}})),rue.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)}))}(rue),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}(rue),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)}(rue),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})}(rue),rue.languages.n4js=rue.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/}),rue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),rue.languages.n4jsd=rue.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]*/}}(rue),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)}))}(rue),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}(rue),rue.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:/[{}[\]();,.:\\]/},rue.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=rue.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}(rue),rue.languages.c=rue.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|[?:~]|[-+*/%&|^!=<>]=?/}),rue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),rue.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},rue.languages.c.string],char:rue.languages.c.char,comment:rue.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:rue.languages.c}}}}),rue.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 rue.languages.c.boolean,rue.languages.objectivec=rue.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 rue.languages.objectivec["class-name"],rue.languages.objc=rue.languages.objectivec,rue.languages.reason=rue.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/}),rue.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 rue.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}(rue),rue.languages.go=rue.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/}),rue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete rue.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"])}(rue),rue.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://,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:/[{}[\];(),.:]/},rue.languages.python["string-interpolation"].inside.interpolation.inside.rest=rue.languages.python,rue.languages.py=rue.languages.python,rue.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"}},rue.languages.webmanifest=rue.languages.json;var aue={};((e,t)=>{for(var n in t)$ce(e,n,{get:t[n],enumerable:!0})})(aue,{dracula:()=>oue,duotoneDark:()=>iue,duotoneLight:()=>sue,github:()=>lue,gruvboxMaterialDark:()=>Sue,gruvboxMaterialLight:()=>Tue,jettwaveDark:()=>xue,jettwaveLight:()=>wue,nightOwl:()=>cue,nightOwlLight:()=>uue,oceanicNext:()=>fue,okaidia:()=>hue,oneDark:()=>Eue,oneLight:()=>_ue,palenight:()=>mue,shadesOfPurple:()=>gue,synthwave84:()=>yue,ultramin:()=>bue,vsDark:()=>vue,vsLight:()=>kue});var oue={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)"}}]},iue={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"}}]},sue={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"}}]},lue={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"}}]},cue={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)"}}]},uue={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)"}}]},due="#c5a5c5",pue="#8dc891",fue={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:due}},{types:["attr-value"],style:{color:pue}},{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:pue}},{types:["punctuation"],style:{color:pue}},{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:due}},{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}}]},hue={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"}}]},mue={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)"}}]},gue={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)"}}]},yue={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"}}]},bue={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)"}}]},vue={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)"}}]},kue={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)"}}]},xue={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"}}]},wue={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"}}]},Eue={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%)"}}]},_ue={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%)"}}]},Sue={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"}}]},Tue={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"}}]},Cue=/\r\n|\r|\n/,Aue=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)},Nue=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},Iue=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=Nue(c,u.type),u.alias&&(c=Nue(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(Cue),p=d.length;s.push({types:c,content:d[0]});for(let t=1;t<p;t++)Aue(s),l.push(s=[]),s.push({types:c,content:d[t]})}i--,t.pop(),n.pop(),r.pop(),a.pop()}return Aue(s),l},Oue=(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=Jce(Jce({},e[t]),a);e[t]=n})),e}),{});return r.root=n,r.plain=eue(Jce({},n),{backgroundColor:void 0}),r},Rue=({children:e,language:t,code:n,theme:r,prism:a})=>{const o=t.toLowerCase(),i=Oue(r,o),s=(e=>X.useCallback((t=>{var n=t,{className:r,style:a,line:o}=n,i=tue(n,["className","style","line"]);const s=eue(Jce({},i),{className:Lce("token-line",r)});return"object"==typeof e&&"plain"in e&&(s.style=e.plain),"object"==typeof a&&(s.style=Jce(Jce({},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=tue(n,["token","className","style"]);const s=eue(Jce({},i),{className:Lce("token",...r.types,a),children:r.content,style:t(r)});return null!=o&&(s.style=Jce(Jce({},s.style||{}),o)),s}),[t])})(i),c=(({prism:e,code:t,grammar:n,language:r})=>X.useMemo((()=>{if(null==n)return Iue([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),Iue(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})},Pue=e=>X.createElement(Rue,eue(Jce({},e),{prism:e.prism||rue,theme:e.theme||vue,code:e.code,language:e.language}))
|
|
70
|
+
*/const MG={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 FG({iconKey:e,...t}){var n;const r=MG[e],a=r?{builtIn:r}:{custom:""},{baseSettings:o}=rR(),i=(null==(n=o.customIcons)?void 0:n[e])||a;return rg.jsx(DG,{"data-icon":e,iconSettings:i,...t})}const jG=X.createContext(void 0),zG=({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 rg.jsx(jG.Provider,{value:o,children:e})},BG=()=>{const e=X.useContext(jG);if(!e)throw new Error("useImagePreview must be used within an ImagePreviewProvider");return e},HG=X.createContext(void 0),UG=({children:e,message:t})=>rg.jsx(HG.Provider,{value:{message:t},children:e}),$G=()=>{const e=X.useContext(HG);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e};var VG=(e,t=[])=>({parts:(...n)=>{if(qG(t))return VG(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>VG(e,[...t,...n]),omit:(...n)=>VG(e,t.filter((e=>!n.includes(e)))),rename:e=>VG(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${GG(e)}"][data-part="${GG(n)}"]`,`& [data-scope="${GG(e)}"][data-part="${GG(n)}"]`].join(", "),attrs:{"data-scope":GG(e),"data-part":GG(n)}}})),{})}),GG=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),qG=e=>0===e.length,WG=VG("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger").build(),YG=Object.defineProperty,ZG=(e,t,n)=>((e,t,n)=>t in e?YG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),KG=e=>"object"==typeof e&&null!==e,XG=e=>e?"":void 0,QG=e=>KG(e)&&1===e.nodeType&&"string"==typeof e.nodeName,JG=e=>KG(e)&&void 0!==e.nodeType,eq=e=>JG(e)&&11===e.nodeType&&"host"in e;function tq(e,t){var n;if(!e||!t)return!1;if(!QG(e)||!JG(t))return!1;if(QG(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&eq(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function nq(e){var t;return eq(e)?nq(e.host):(e=>KG(e)&&9===e.nodeType)(e)?e.defaultView??window:QG(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function rq(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 aq=(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)}},oq=class e{constructor(){ZG(this,"id",null),ZG(this,"fn_cleanup"),ZG(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 iq={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},sq=e=>e.isDirectory,lq=e=>e.isFile,cq=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),uq=(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?sq(e)?uq(e.createReader(),`${t}${e.name}`):lq(e)?new Promise((n=>{e.file((e=>{n(cq(e,t))}))})):void 0:null)).filter((e=>e));r.push(Promise.all(o)),a()}))};a()}));var dq=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 pq=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,fq=e=>null!=e;var hq=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 mq(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&&hq.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 gq=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 yq=["","kilo","mega","giga","tera"],bq=["","kilo","mega","giga","tera","peta"],vq=(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?yq:bq,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 gq(t,n).format(e)}(c?-p:p,t,{style:"unit",unit:l[d]+o,unitDisplay:i})};function kq(e){return e.reduce(((e,t)=>Array.isArray(t)?e.concat(kq(t)):e.concat(t)),[])}var xq=e=>String.fromCharCode(e+(e>25?39:97));var wq=e=>function(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=xq(t%52)+n;return xq(t%52)+n}(function(e,t){let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e}(5381,e)>>>0);function Eq(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}var _q=e=>{var t;return(null==(t=e.ids)?void 0:t.root)??`file:${e.id}`},Sq=e=>{var t;return(null==(t=e.ids)?void 0:t.dropzone)??`file:${e.id}:dropzone`},Tq=e=>{var t;return(null==(t=e.ids)?void 0:t.hiddenInput)??`file:${e.id}:input`},Cq=(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}`},Aq=e=>wq(`${e.name}-${e.size}`),Nq=e=>e.getById(Tq(e));function Iq(e){const t=rq(e);return e.dataTransfer?e.dataTransfer.types.some((e=>"Files"===e||"application/x-moz-file"===e)):!!t&&"files"in t}function Oq(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||mq(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}(e,o("acceptAttr")),[u,d]=function(e,t,n){if(fq(e.size))if(fq(t)&&fq(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(fq(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(fq(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}(e,a("minFileSize"),a("maxFileSize")),p=n.some((t=>pq(t,e)))||i.some((t=>pq(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 Rq="accepted";function Pq(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&&tq(t,n)}function Lq(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=Rq){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=>vq(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({...WG.root.attrs,dir:a("dir"),id:_q(i),"data-disabled":XG(l),"data-readonly":XG(c),"data-dragging":XG(f)}),getDropzoneProps:(e={})=>t.element({...WG.dropzone.attrs,dir:a("dir"),id:Sq(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":XG(a("invalid")),"data-disabled":XG(l),"data-readonly":XG(c),"data-dragging":XG(f),onKeyDown(t){if(l||c)return;if(t.defaultPrevented)return;const n=rq(t);tq(t.currentTarget,n)&&(Pq(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=rq(t);tq(t.currentTarget,n)&&(Pq(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(!Iq(e))return;const t=e.dataTransfer.items.length;r({type:"DROPZONE.DRAG_OVER",count:t})},onDragLeave(e){l||c||d&&(tq(e.currentTarget,e.relatedTarget)||r({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(e){if(l||c)return;d&&(e.preventDefault(),e.stopPropagation());var t,n;Iq(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(sq(t)&&n)return uq(t.createReader(),`${t.name}`);if(lq(t)&&"function"==typeof e.getAsFile){const t=e.getAsFile();return Promise.resolve(t?cq(t,""):null)}return lq(t)?new Promise((e=>{t.file((t=>{e(cq(t,""))}))})):void 0})).filter((e=>e)))).then((e=>{r({type:"DROPZONE.DROP",files:kq(e)})}))},onFocus(){l||c||r({type:"DROPZONE.FOCUS"})},onBlur(){l||c||r({type:"DROPZONE.BLUR"})}}),getTriggerProps(){return t.button({...WG.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":XG(l),"data-readonly":XG(c),"data-invalid":XG(a("invalid")),type:"button",onClick(e){l||c||(tq((e=>e.getById(Sq(e)))(i),e.currentTarget)&&e.stopPropagation(),r({type:"OPEN"}))}});var e,n},getHiddenInputProps:()=>t.input({id:Tq(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:iq}),getItemGroupProps(e={}){const{type:n=Rq}=e;return t.element({...WG.itemGroup.attrs,dir:a("dir"),"data-disabled":XG(l),"data-type":n})},getItemProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.item.attrs,dir:a("dir"),id:(o=i,s=Aq(n),(null==(u=null==(c=o.ids)?void 0:c.item)?void 0:u.call(c,s))??`file:${o.id}:item:${s}`),"data-disabled":XG(l),"data-type":r});var o,s,c,u},getItemNameProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.itemName.attrs,dir:a("dir"),id:(o=i,s=Aq(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":XG(l),"data-type":r});var o,s,c,u},getItemSizeTextProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.itemSizeText.attrs,dir:a("dir"),id:(o=i,s=Aq(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":XG(l),"data-type":r});var o,s,c,u},getItemPreviewProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.itemPreview.attrs,dir:a("dir"),id:(o=i,s=Aq(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":XG(l),"data-type":r});var o,s,c,u},getItemPreviewImageProps(e){var n;const{file:r,url:a,type:o=Rq}=e;if(!r.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...WG.itemPreviewImage.attrs,alt:null==(n=p.itemPreview)?void 0:n.call(p,r),src:a,"data-disabled":XG(l),"data-type":o})},getItemDeleteTriggerProps(e){var n;const{file:o,type:s=Rq}=e;return t.button({...WG.itemDeleteTrigger.attrs,dir:a("dir"),id:Cq(i,Aq(o)),type:"button",disabled:l||c,"data-disabled":XG(l),"data-readonly":XG(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({...WG.label.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.label)??`file:${e.id}:label`),htmlFor:Tq(i),"data-disabled":XG(l),"data-required":XG(u)});var e,n},getClearTriggerProps:()=>t.button({...WG.clearTrigger.attrs,dir:a("dir"),type:"button",disabled:l||c,hidden:0===m.length,"data-disabled":XG(l),"data-readonly":XG(c),onClick(e){e.defaultPrevented||l||c||r({type:"FILES.CLEAR"})}})}}var Dq=new WeakMap,Mq=new WeakMap;function Fq(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&Eq(`[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||Eq(`[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 jq,zq=(jq={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)=>pq(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)=>pq(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(dq).join(","):Object.entries(e).reduce(((e,[t,n])=>[...e,t,...n]),[]).filter(dq).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)}))})(aq(n,"dragover",(e=>{null==e||e.preventDefault()}),!1),aq(n,"drop",(e=>{var n;tq((n=t).getById(_q(n)),rq(e))||e.preventDefault()}),!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask((()=>{const n=Nq(e);if(!n)return;!function(e,t){const n=nq(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=oq.create();t.request(e),t.cleanup}((()=>{var t;null==(t=Nq(e))||t.click()}))},setFiles(e){const{computed:t,context:n,event:r}=e,{acceptedFiles:a,rejectedFiles:o}=Oq(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}=Oq(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=>!pq(e.file,t.file)));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter((e=>!pq(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=Dq.get(e);if(t)return t;const{index:n,idIndex:r}=Fq(e);Dq.set(e,n),Mq.set(e,r)}(jq),jq);var Bq=(e,...t)=>e.filter((e=>!t.includes(e))),Hq=(e,t)=>((e,t)=>-1!==e.indexOf(t))(e,t)?Bq(e,t):((e,...t)=>e.concat(t))(e,t),Uq=e=>"Array"===(null==e?void 0:e.constructor.name),$q=(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(Uq(e)&&Uq(t))return((e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!$q(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(!$q(e[r],t[r]))return!1}return!0},Vq=e=>null!=e&&"object"==typeof e,Gq=e=>Vq(e)&&!(e=>Array.isArray(e))(e),qq=e=>"function"==typeof e,Wq=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Yq=Function.prototype.toString,Zq=Yq.call(Object),Kq=e=>{if(!Vq(e)||"[object Object]"!=(e=>Object.prototype.toString.call(e))(e)||Xq(e))return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;const n=Wq(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Yq.call(n)==Zq},Xq=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),Qq=e=>e(),Jq=()=>{},eW=(...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))};function tW(e,t,...n){var r;if(e in t){const r=t[e];return qq(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,tW),a}function nW(e){if(!Kq(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]=nW(t))}return n}function rW(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function aW(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function oW(e,t){if(null==e)throw new Error(t())}var iW=".",sW=new WeakMap,lW=new WeakMap;function cW(e){return e.join(iW)}function uW(e){return e.startsWith("#")}function dW(e,t){return e?`${e}${iW}${t}`:t}function pW(e){const t=sW.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)&&aW(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){oW(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||aW(`[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=dW(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 sW.set(e,n),lW.set(e,r),n}function fW(e){return e?String(e).split(iW).filter(Boolean):[]}function hW(e,t){if(!t)return[];const n=pW(e),r=fW(t),a=[],o=[];for(const i of r){o.push(i);const e=cW(o),t=n.get(e);if(!t)break;a.push({path:e,state:t})}return a}function mW(e,t){const n=pW(e),r=fW(t);if(!r.length)return t;const a=[];for(const s of r){a.push(s);const e=cW(a);if(!n.has(e))return t}let o=cW(a),i=n.get(o);for(;null==i?void 0:i.initial;){const e=`${o}${iW}${i.initial}`,t=n.get(e);if(!t)break;o=e,i=t}return o}function gW(e,t){return pW(e).has(t)}function yW(e,t,n){const r=String(t);if(uW(r)){const t=function(e){return uW(e)?e.slice(1):e}(r),n=function(e,t){var n;return pW(e),null==(n=lW.get(e))?void 0:n.get(t)}(e,t);return oW(n,(()=>`[zag-js] Unknown state id: "${t}"`)),mW(e,n)}if(function(e){return e.startsWith(iW)}(r)&&n){return mW(e,dW(n,r.slice(1)))}if(!function(e){return e.includes(iW)}(r)&&n){const t=fW(n);for(let n=t.length-1;n>=1;n--){const a=dW(t.slice(0,n).join(iW),r);if(gW(e,a))return mW(e,a)}if(gW(e,r))return mW(e,r)}return mW(e,r)}function bW(e){return pW(e),e}var vW=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(vW||{}),kW="__init__",xW=Object.defineProperty,wW=(e,t,n)=>((e,t,n)=>t in e?xW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);function EW(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;const t=e.value.length;e.setSelectionRange(t,t)}catch{}}var _W=()=>{},SW=e=>"object"==typeof e&&null!==e,TW=e=>e?"":void 0,CW=e=>e?"true":void 0,AW=e=>SW(e)&&1===e.nodeType&&"string"==typeof e.nodeName,NW=e=>SW(e)&&9===e.nodeType,IW=e=>AW(e)?e.localName||"":"#document";var OW=e=>SW(e)&&void 0!==e.nodeType,RW=e=>OW(e)&&11===e.nodeType&&"host"in e,PW=e=>AW(e)&&"input"===e.localName;function LW(e){if(!e)return!1;return zW(e.getRootNode())===e}var DW=/(textarea|select)/;function MW(e,t){var n;if(!e||!t)return!1;if(!AW(e)||!OW(t))return!1;if(AW(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&RW(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function FW(e){return NW(e)?e:(e=>SW(e)&&e===e.window)(e)?e.document:(null==e?void 0:e.ownerDocument)??document}function jW(e){var t;return RW(e)?jW(e.host):NW(e)?e.defaultView??window:AW(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function zW(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 BW(e){if("html"===IW(e))return e;const t=e.assignedSlot||e.parentNode||RW(e)&&e.host||FW(e).documentElement;return RW(t)?t.host:t}function HW(e){let t;try{if(t=e.getRootNode({composed:!0}),NW(t)||RW(t))return t}catch{}return e.ownerDocument??document}var UW=new WeakMap;function $W(e){return UW.has(e)||UW.set(e,jW(e).getComputedStyle(e)),UW.get(e)}var VW=new Set(["menu","listbox","dialog","grid","tree","region"]),GW=e=>VW.has(e),qW=e=>{var t;return(null==(t=e.getAttribute("aria-controls"))?void 0:t.split(" "))||[]};function WW(e,t){const n=new Set,r=HW(e),a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=qW(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&&GW(n)&&!r){if(e===t||e.contains(t))return!0;if(a(e))return!0}}}}return!1};return a(e)}function YW(e){const t=new Set;return function(e,t){const n=HW(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=qW(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&&VW.has(n)&&!r&&(t(e),a(e))}}}};a(e)}(e,(n=>{e.contains(n)||t.add(n)})),Array.from(t)}function ZW(e){if(!e.id)return!1;const t=HW(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&&VW.has(t))}(e))}var KW=()=>"undefined"!=typeof document;var XW=e=>KW()&&e.test(function(){const e=navigator.userAgentData;return(null==e?void 0:e.platform)??navigator.platform}()),QW=e=>KW()&&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}()),JW=()=>KW()&&!!navigator.maxTouchPoints,eY=()=>XW(/^iPhone/i)||XW(/^iPad/i)||tY()&&navigator.maxTouchPoints>1,tY=()=>XW(/^Mac/i);function nY(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 rY(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,tY()?a.metaKey:a.ctrlKey);var a;return n||r}function aY(e){return!(""!==e.pointerType||!e.isTrusted)||(QW(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}var oY=e=>0===e.button,iY=e=>2===e.button||tY()&&e.ctrlKey&&0===e.button,sY={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},lY={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function cY(e,t={}){const{dir:n="ltr",orientation:r="horizontal"}=t;let a=e.key;a=sY[a]??a;return"rtl"===n&&"horizontal"===r&&a in lY&&(a=lY[a]),a}var uY=(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)}},dY=e=>AW(e)&&"IFRAME"===e.tagName,pY=/^(audio|video|details)$/;function fY(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function hY(e){if(!function(e){return PW(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&&vY(t))),a=r.find((e=>e.checked));return a?a===e:r[0]===e}function mY(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 gY(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=mY(e,t);if(l){const t=Array.from(l.querySelectorAll(yY)).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 yY="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",bY=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(yY));(1==n||"if-empty"==n&&0===a.length)&&AW(e)&&vY(e)&&a.unshift(e);const o=[];for(const i of a)if(vY(i))if(dY(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...bY(e,{getShadowRoot:r}))}else o.push(i);return r?gY(o,r,vY):o};function vY(e){return!(!AW(e)||e.closest("[inert]"))&&(e.matches(yY)&&(!!AW(t=e)&&(t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0)));var t}function kY(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(yY));n&&xY(e)&&a.unshift(e);const o=[];for(const i of a)if(xY(i))if(dY(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...kY(e,{getShadowRoot:r}))}else o.push(i);if(r){const e=gY(o,r,xY);return!e.length&&n?a:e}return!o.length&&n?a:o}function xY(e){return!!(AW(e)&&e.tabIndex>0)||!(!vY(e)||(e=>fY(e)<0)(e))&&hY(e)}function wY(e){return e.tabIndex<0&&(pY.test(e.localName)||function(e){if(null==e||!AW(e))return!1;try{return PW(e)&&null!=e.selectionStart||DW.test(e.localName)||e.isContentEditable||"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")}catch{return!1}}(e))&&(t=e,Number.isNaN(fY(t)))?0:e.tabIndex;var t}var EY=class e{constructor(){wW(this,"id",null),wW(this,"fn_cleanup"),wW(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 _Y(e){const t=EY.create();return t.request(e),t.cleanup}function SY(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 TY(e,t){const{defer:n}=t,r=n?_Y: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 CY(e){const t=()=>{const t=jW(e);e.dispatchEvent(new t.MouseEvent("click"))};QW(/Firefox/i)?function(e,t,n){const r=_Y((()=>{e.removeEventListener(t,a,!0),n()})),a=()=>{r(),n()};e.addEventListener(t,a,{once:!0,capture:!0})}(e,"keyup",t):queueMicrotask(t)}function AY(e){const t=BW(e);return["html","body","#document"].includes(IW(t))?FW(t).body:AW(t)&&OY(t)?t:AY(t)}var NY=/auto|scroll|overlay|hidden|clip/,IY=new Set(["inline","contents"]);function OY(e){const t=jW(e),{overflow:n,overflowX:r,overflowY:a,display:o}=t.getComputedStyle(e);return NY.test(n+a+r)&&!IY.has(o)}function RY(e,t){const{rootEl:n,...r}=t||{};e&&n&&OY(n)&&function(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}(n)&&e.scrollIntoView(r)}function PY(e,t){if(!e)return _W;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]))?_W:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),0===e.style.length&&e.removeAttribute("style")});var r,a}function LY(e,t){const{timeout:n,rootNode:r}=t,a=jW(r),o=FW(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 DY=void 0!==globalThis.document?X.useLayoutEffect:X.useEffect;function MY(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);DY((()=>{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:Qq)((()=>(t=>{var r,a;const s=l.current,c=qq(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)}}}MY.cleanup=e=>{X.useEffect((()=>e),[])},MY.ref=e=>{const t=X.useRef(e);return{get:()=>t.current,set:e=>{t.current=e}}};var FY=(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 jY(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=()=>FW(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>zW(t()),isActiveElement:LW,getById:e=>t().getElementById(e)}}({id:e,ids:n,getRootNode:r})}),[t]),s=(...t)=>{e.debug&&console.log(...t)},l=function(e){const t=zY(e);return function(e){return t.current[e]}}((null==(n=e.props)?void 0:n.call(e,{props:nW(t),scope:i}))??t),c=zY(null==(r=e.context)?void 0:r.call(e,{prop:l,bindable:MY,scope:i,flush:BY,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}${iW}`))}(_.ref.current,e))),hasTag:t=>function(e,t,n){return hW(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:FY,refs:y,computed:E,flush:BY,scope:i,choose:w}),v=t=>{const n=qq(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||rW(`[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 qq(t)?t(b()):null==(r=null==(n=e.implementations)?void 0:n.guards)?void 0:r[t](b())},x=t=>{const n=qq(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||rW(`[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):qq(e.guard)&&(t=e.guard(b())),t}));var t},E=t=>{oW(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})},_=MY((()=>({defaultValue:yW(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?hW(e,t):[],c=hW(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===kW){v(e.entry);const t=x(e.effects);t&&d.current.set(kW,t)}i.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.entry)}))}}))),S=X.useRef(void 0),T=X.useRef(vW.NotStarted);DY((()=>{queueMicrotask((()=>{const e=T.current===vW.Started;T.current=vW.Started,s(e?"rehydrating...":"initializing...");const t=S.current??_.initial;_.invoke(t,e?_.get():kW)}));const t=d.current;return()=>{const n=C();s("unmounting..."),S.current=n,T.current=vW.Stopped,t.forEach((e=>null==e?void 0:e())),d.current=new Map,p.current=null,queueMicrotask((()=>{v(e.exit),T.current=vW.Stopped}))}}),[]);const C=()=>"ref"in _?_.ref.current:_.get(),A=t=>{queueMicrotask((()=>{if(T.current!==vW.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=hW(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=yW(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 zY(e){const t=X.useRef(e);return t.current=e,t}function BY(e){queueMicrotask((()=>{ue.flushSync((()=>e()))}))}var HY,UY=(HY=e=>e,new Proxy({},{get:(e,t)=>"style"===t?e=>HY({style:e}).style:HY}));const $Y=X.createContext(null);function VY({children:e,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,onFileAccept:i,onFileChange:s,onFileReject:l}){const c=X.useId(),u=VO(),d=Lq(jY(zq,{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}),UY);return rg.jsx($Y.Provider,{value:d,children:e})}function GY(){const e=X.useContext($Y);if(!e)throw new Error("useFileUploadApi must be used within FileUploadRoot");return e}function qY(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 WY={"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 YY(e){return e.startsWith("image/")}const ZY={"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"]},KY=new Set(Object.keys(ZY)),XY=10485760,QY=Object.entries(ZY).reduce(((e,[t,n])=>{for(const r of n)e[r]=t;return e}),{});function JY(e){var t;if(e.type)return e;const n=`.${null==(t=e.name.split(".").pop())?void 0:t.toLowerCase()}`,r=QY[n];return r?new File([e],e.name,{type:r}):e}const eZ=vV("div",{_id:"aiChatMessage__Files"}),tZ=({children:e,...t})=>{const{message:n}=$G();if("user"!==n.role)return null;const r=(n.parts??[]).filter((e=>{if("file"!==e.type)return!1;const t=e.mediaType;return KY.has(t??"")}));return r.length?rg.jsx(eZ,{...t,children:e(r)}):null},nZ=vV("button",{_id:"aiChatMessage__File"}),rZ=({url:e,name:t,mediaType:n,onClick:r,...a})=>{const{openImagePreview:o}=BG(),[i,s]=X.useState(!0),l=X.useMemo((()=>new File([],t??"file",{type:n})),[t,n]);return rg.jsx(SZ.Provider,{value:{file:l,objectUrl:e,isLoading:i,setIsLoading:s,onRemove:()=>{}},children:rg.jsx(nZ,{type:"button","aria-label":YY(n??"")?`Preview ${t??"file"}`:`Open ${t??"file"} in new tab`,"data-loading":aV(i),onClick:qY(r,(()=>{if(YY(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})})},aZ=vV("div",{_id:"aiChatInput__Fieldset"}),oZ=e=>{const t=GY();return rg.jsx(aZ,{...t.getDropzoneProps({disableClick:!0}),"data-drag-over":aV(t.dragging),...e})},iZ=({...e})=>{const{files:t,setFiles:n,showInputNotification:r}=yJ();return rg.jsx(VY,{accept:ZY,maxFiles:10,maxFileSize:XY,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:rg.jsx(oZ,{...e})})},sZ=vV("div",{_id:"aiChatInput__DropZone"}),lZ=vV("div",{_id:"aiChatInput__Notification"}),cZ=e=>{const{inputNotification:t}=yJ();return t?rg.jsx(lZ,{role:"alert",...e}):null},uZ=vV("p",{_id:"aiChatInput__NotificationTitle"}),dZ=({children:e,...t})=>{const{inputNotification:n}=yJ();return(null==n?void 0:n.title)?rg.jsxs(uZ,{...t,children:[e,n.title]}):null},pZ=vV("p",{_id:"aiChatInput__NotificationMessage"}),fZ=e=>{const{inputNotification:t}=yJ();return rg.jsx(pZ,{...e,children:null==t?void 0:t.message})},hZ=vV("button",{_id:"aiChatInput__NotificationClose"}),mZ=({onClick:e,...t})=>{const{clearInputNotification:n}=yJ();return rg.jsx(hZ,{type:"button","aria-label":"Dismiss",onClick:qY(e,n),...t})},gZ=vV("div",{_id:"aiChatInput__NotificationContent"}),yZ=vV("div",{_id:"aiChatInput__NotificationHeader"}),bZ=vV(FG,{_id:"aiChatInput__FileUploadButtonIcon",iconKey:"fileUpload"}),vZ=vV("button",{_id:"aiChatInput__FileUploadButton"}),kZ=e=>{const{aiChatSettings:t}=rR(),n=GY(),{onClick:r,...a}=e;return rg.jsx(vZ,{type:"button","aria-label":"Upload file",disabled:t.isViewOnly,onClick:qY(r,(()=>n.openFilePicker())),...a})},xZ=vV("input",{_id:"aiChatInput__FileInput"}),wZ=e=>{const t=GY();return rg.jsx(xZ,{...e,...t.getHiddenInputProps()})},EZ=vV("div",{_id:"aiChatInput__FileList"}),_Z=({children:e,...t})=>{const n=GY().acceptedFiles;return n.length?rg.jsx(EZ,{...t,children:e(n)}):null},SZ=Q.createContext(null);function TZ(){const e=Q.useContext(SZ);if(!e)throw new Error("useFileContext must be used within EmbeddedChatPrimitiveFileItem");return e}const CZ=vV("div",{_id:"aiChatInput__FileItem"}),AZ=({file:e,...t})=>{const n=GY(),[r,a]=X.useState(void 0),[o,i]=X.useState(!0);X.useEffect((()=>n.createFileUrl(e,(e=>{a(e),i(!0)}))),[e]);return rg.jsx(SZ.Provider,{value:{file:e,objectUrl:r,isLoading:o,setIsLoading:i,onRemove:()=>n.deleteFile(e)},children:rg.jsx(CZ,{"data-loading":aV(o),...t})})},NZ=vV("button",{_id:"aiChatInput__FilePreviewTrigger"}),IZ=({onClick:e,...t})=>{const{objectUrl:n,file:r}=TZ(),{openImagePreview:a}=BG();return rg.jsx(NZ,{type:"button","aria-label":`Preview ${r.name}`,disabled:!n,onClick:qY(e,(()=>{n&&a({url:n,name:r.name})})),...t})},OZ=vV("span",{_id:"aiChatInput__FileContent"}),RZ=e=>rg.jsx(OZ,{...e}),PZ=vV("img",{_id:"aiChatInput__FileThumbnail"}),LZ=({onLoad:e,...t})=>{const{objectUrl:n,file:r,setIsLoading:a}=TZ();return rg.jsx(PZ,{src:n,alt:r.name,onLoad:qY(e,(()=>a(!1))),...t})},DZ=({className:e})=>{const{file:t}=TZ(),n=WY[JY(t).type]??"file";return rg.jsx(FG,{iconKey:n,className:e})},MZ=vV("span",{_id:"aiChatInput__FileName"}),FZ=e=>{const{file:t}=TZ();return rg.jsx(MZ,{...e,children:t.name})},jZ=vV("button",{_id:"aiChatInput__FileRemove"}),zZ=vV(FG,{_id:"aiChatInput__FileRemoveIcon",iconKey:"close"}),BZ=({onClick:e,...t})=>{const{onRemove:n}=TZ();return rg.jsx(jZ,{type:"button","aria-label":"Remove file",onClick:qY(e,n),...t})},HZ=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},UZ=()=>{};function $Z(e=21){const t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,(e=>e.toString(36))).join("").slice(0,e)}const VZ=new Map;function GZ(e="id"){const t=(VZ.get(e)||0)+1;return VZ.set(e,t),`${e}${t}`}var qZ=J[" useInsertionEffect ".trim().toString()]||zO;function WZ({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,i]=function({defaultProp:e,onChange:t}){const[n,r]=X.useState(e),a=X.useRef(n),o=X.useRef(t);return qZ((()=>{o.current=t}),[t]),X.useEffect((()=>{var e;a.current!==n&&(null==(e=o.current)||e.call(o,n),a.current=n)}),[n,a]),[n,r,o]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:a;{const t=X.useRef(void 0!==e);X.useEffect((()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s}),[s,r])}const c=X.useCallback((t=>{var n;if(s){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&(null==(n=i.current)||n.call(i,r))}else o(t)}),[s,e,o,i]);return[l,c]}function YZ(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 ZZ="Hmm.. \n\nIt seems I might be having some issues right now. Please clear the chat and try again.",KZ="Please try again.",XZ=()=>{const{baseSettings:e,aiChatSettings:t}=rR(),[n="",r]=WZ({prop:t.conversationIdOverride,defaultProp:t.conversationIdOverride??""}),{logEvent:a}=iR(),{setConversationId:o,emitToParent:i}=function(){const e=VO(),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}=ER(),{onInputMessageChange:_,filters:S,baseUrl:T,agentUrl:C,context:A,headers:N,appId:I,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}=gR({appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a??UZ,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(eNe){return eNe instanceof Error&&"AbortError"===eNe.name||console.error("[useConversationLoader]",eNe),null}}),[e,n,i])}})({baseUrl:T,appId:I,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(N);W.current=N;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 GU({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",...I?{"x-inkeep-app-id":I}:{},...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,I,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 k$(a));("chat"in n&&n.chat!==o.current||"id"in n&&o.current.id!==n.id)&&(o.current="chat"in n?n.chat:new k$(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=YZ(e),n=fR(t??0,{detail:e.message??""});return null!==n?n:401===t?"session":403===t?"captcha":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=ZZ;return"user"===n.role?t.push({id:$Z(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=YZ(e);return 400===t||429===t}(t),l=(t=>{var n,r;switch(YZ(t)){case 400:try{const e=JSON.parse(t.message??"");return e.detail??(null==(n=e.error)?void 0:n.message)??KZ}catch{return(null==(r=t.message)?void 0:r.trim())||KZ}case 401:return g?"Authentication failed. Please try again.":ZZ;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 ZZ}})(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:$Z(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=HZ("(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_${$Z(16)}`,r(s));const u=$Z(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=JY(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]),Ne=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:$Z(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(eNe){n.signal.aborted||r(eNe)}})(),()=>{a.current=null,n.abort()}}),[e,t])})({conversationId:t.conversationId,effectiveAuthToken:w,loadAndRestoreSession:Ne,onLoadFailed:()=>Ae("",[])});const{openForm:Ie}=tL(),Oe=KJ();return X.useImperativeHandle(t.chatFunctionsRef,(()=>({submitMessage:_e,updateInputMessage(e){c(e)},clearChat:Ce,openForm:e=>{null==Oe||Oe.setView("chat"),Ie(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:Ne,isSessionLoading:M,authToken:m?h:b,refreshSession:m?y:v,getCaptchaHeader:k,invalidateCaptcha:x,inputNotification:ke,showInputNotification:xe,clearInputNotification:we}},QZ=()=>{};const JZ=X.createContext(void 0);function eK(){const{baseSettings:e,aiChatSettings:t}=rR(),[n,r]=X.useState(null),[a,o]=X.useState({}),{conversationId:i,messages:s,authToken:l,getCaptchaHeader:c,invalidateCaptcha:u,refreshSession:d}=yJ(),{analyticsProperties:p}=e,{logEvent:f}=iR(),{submitFeedback:h}=function({baseUrl:e,appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a,refreshSession:o,headers:i}){const{fetchWithAuth:s}=gR({appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a??QZ,refreshSession:o}),l=X.useRef(i);return l.current=i,{submitFeedback:X.useCallback((async({conversationId:t,messageId:n,type:r,details:a})=>{if(!e)return;const o=`${e}/run/v1/feedback`,i=await s(o,{method:"POST",headers:{"Content-Type":"application/json",...l.current},body:JSON.stringify({conversationId:t,messageId:n,type:r,details:a})});if(!i.ok)throw new Error(`Feedback submission failed: ${i.status}`);return i.json()}),[e,s])}}({baseUrl:t.baseUrl,appId:t.appId,authToken:l,getCaptchaHeader:c,invalidateCaptcha:u,refreshSession:d,headers:t.headers}),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:lV(s[a-1]),answer:lV(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 tK=({children:e})=>{const t=eK();return rg.jsx(JZ.Provider,{value:t,children:e})},nK=()=>{const e=X.useContext(JZ);if(!e)throw new Error("useFeedback must be used within a FeedbackProvider");return e};function rK(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 aK(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function oK(...e){return t=>{let n=!1;const r=e.map((e=>{const r=aK(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():aK(e[t],null)}}}}function iK(...e){return X.useCallback(oK(...e),e)}function sK(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 rg.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}\``)}]},lK(r,...t)]}function lK(...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 cK=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.Children.toArray(n),o=a.find(pK);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 rg.jsx(uK,{...r,ref:t,children:X.isValidElement(e)?X.cloneElement(e,void 0,n):null})}return rg.jsx(uK,{...r,ref:t,children:n})}));cK.displayName="Slot";var uK=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,{...fK(r,n.props),ref:t?oK(t,e):e})}return X.Children.count(n)>1?X.Children.only(null):null}));uK.displayName="SlotClone";var dK=({children:e})=>rg.jsx(rg.Fragment,{children:e});function pK(e){return X.isValidElement(e)&&e.type===dK}function fK(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 hK=["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?cK:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),rg.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function mK(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 gK(e,t=(null==globalThis?void 0:globalThis.document)){const n=mK(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 yK,bK="dismissableLayer.update",vK="dismissableLayer.pointerDownOutside",kK="dismissableLayer.focusOutside",xK=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wK=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(xK),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=iK(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=mK(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){_K(vK,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=mK(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){_K(kK,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 gK((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&&(yK=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),EK(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=yK)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),EK())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(bK,e),()=>document.removeEventListener(bK,e)}),[]),rg.jsx(hK.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:rK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:rK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:rK(e.onPointerDownCapture,x.onPointerDownCapture)})}));wK.displayName="DismissableLayer";function EK(){const e=new CustomEvent(bK);document.dispatchEvent(e)}function _K(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(xK),r=X.useRef(null),a=iK(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),rg.jsx(hK.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var SK=Boolean(null==globalThis?void 0:globalThis.document)?X.useLayoutEffect:()=>{},TK=J["useId".toString()]||(()=>{}),CK=0;function AK(e){const[t,n]=X.useState(TK());return SK((()=>{n((e=>e??String(CK++)))}),[e]),e||(t?`radix-${t}`:"")}const NK=["top","right","bottom","left"],IK=Math.min,OK=Math.max,RK=Math.round,PK=Math.floor,LK=e=>({x:e,y:e}),DK={left:"right",right:"left",bottom:"top",top:"bottom"};function MK(e,t,n){return OK(e,IK(t,n))}function FK(e,t){return"function"==typeof e?e(t):e}function jK(e){return e.split("-")[0]}function zK(e){return e.split("-")[1]}function BK(e){return"x"===e?"y":"x"}function HK(e){return"y"===e?"height":"width"}function UK(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function $K(e){return BK(UK(e))}function VK(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const GK=["left","right"],qK=["right","left"],WK=["top","bottom"],YK=["bottom","top"];function ZK(e,t,n,r){const a=zK(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?qK:GK:t?GK:qK;case"left":case"right":return t?WK:YK;default:return[]}}(jK(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(VK)))),o}function KK(e){const t=jK(e);return DK[t]+e.slice(t.length)}function XK(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 QK(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 JK(e,t,n){let{reference:r,floating:a}=e;const o=UK(t),i=$K(t),s=HK(i),l=jK(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(zK(t)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1)}return f}async function eX(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}=FK(t,e),h=XK(f),m=s[p?"floating"===d?"reference":"floating":d],g=QK(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=QK(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 tX(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nX(e){return NK.some((t=>e[t]>=0))}const rX=new Set(["left","top"]);function aX(){return"undefined"!=typeof window}function oX(e){return lX(e)?(e.nodeName||"").toLowerCase():"#document"}function iX(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function sX(e){var t;return null==(t=(lX(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function lX(e){return!!aX()&&(e instanceof Node||e instanceof iX(e).Node)}function cX(e){return!!aX()&&(e instanceof Element||e instanceof iX(e).Element)}function uX(e){return!!aX()&&(e instanceof HTMLElement||e instanceof iX(e).HTMLElement)}function dX(e){return!(!aX()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof iX(e).ShadowRoot)}function pX(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=wX(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function fX(e){return/^(table|td|th)$/.test(oX(e))}function hX(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const mX=/transform|translate|scale|rotate|perspective|filter/,gX=/paint|layout|strict|content/,yX=e=>!!e&&"none"!==e;let bX;function vX(e){const t=cX(e)?wX(e):e;return yX(t.transform)||yX(t.translate)||yX(t.scale)||yX(t.rotate)||yX(t.perspective)||!kX()&&(yX(t.backdropFilter)||yX(t.filter))||mX.test(t.willChange||"")||gX.test(t.contain||"")}function kX(){return null==bX&&(bX="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),bX}function xX(e){return/^(html|body|#document)$/.test(oX(e))}function wX(e){return iX(e).getComputedStyle(e)}function EX(e){return cX(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _X(e){if("html"===oX(e))return e;const t=e.assignedSlot||e.parentNode||dX(e)&&e.host||sX(e);return dX(t)?t.host:t}function SX(e){const t=_X(e);return xX(t)?e.ownerDocument?e.ownerDocument.body:e.body:uX(t)&&pX(t)?t:SX(t)}function TX(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=SX(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=iX(a);if(o){const e=CX(i);return t.concat(i,i.visualViewport||[],pX(a)?a:[],e&&n?TX(e):[])}return t.concat(a,TX(a,[],n))}function CX(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function AX(e){const t=wX(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=uX(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=RK(n)!==o||RK(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function NX(e){return cX(e)?e:e.contextElement}function IX(e){const t=NX(e);if(!uX(t))return LK(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=AX(t);let i=(o?RK(n.width):n.width)/r,s=(o?RK(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const OX=LK(0);function RX(e){const t=iX(e);return kX()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:OX}function PX(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=NX(e);let i=LK(1);t&&(r?cX(r)&&(i=IX(r)):i=IX(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==iX(e))&&t}(o,n,r)?RX(o):LK(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=iX(o),t=r&&cX(r)?iX(r):r;let n=e,a=CX(n);for(;a&&r&&t!==n;){const e=IX(a),t=a.getBoundingClientRect(),r=wX(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=iX(a),a=CX(n)}}return QK({width:u,height:d,x:l,y:c})}function LX(e,t){const n=EX(e).scrollLeft;return t?t.left+n:PX(sX(e)).left+n}function DX(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-LX(e,n),y:n.top+t.scrollTop}}function MX(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=iX(e),r=sX(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=kX();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}const c=LX(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=sX(e),n=EX(e),r=e.ownerDocument.body,a=OK(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=OK(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+LX(e);const s=-n.scrollTop;return"rtl"===wX(r).direction&&(i+=OK(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(sX(e));else if(cX(t))r=function(e,t){const n=PX(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=uX(e)?IX(e):LK(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=RX(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return QK(r)}function FX(e,t){const n=_X(e);return!(n===t||!cX(n)||xX(n))&&("fixed"===wX(n).position||FX(n,t))}function jX(e,t,n){const r=uX(t),a=sX(t),o="fixed"===n,i=PX(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=LK(0);function c(){l.x=LX(a)}if(r||!r&&!o)if(("body"!==oX(t)||pX(a))&&(s=EX(t)),r){const e=PX(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?LK(0):DX(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 zX(e){return"static"===wX(e).position}function BX(e,t){if(!uX(e)||"fixed"===wX(e).position)return null;if(t)return t(e);let n=e.offsetParent;return sX(e)===n&&(n=n.ownerDocument.body),n}function HX(e,t){const n=iX(e);if(hX(e))return n;if(!uX(e)){let t=_X(e);for(;t&&!xX(t);){if(cX(t)&&!zX(t))return t;t=_X(t)}return n}let r=BX(e,t);for(;r&&fX(r)&&zX(r);)r=BX(r,t);return r&&xX(r)&&zX(r)&&!vX(r)?n:r||function(e){let t=_X(e);for(;uX(t)&&!xX(t);){if(vX(t))return t;if(hX(t))return null;t=_X(t)}return null}(e)||n}const UX={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=sX(r),s=!!t&&hX(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=LK(1);const u=LK(0),d=uX(r);if((d||!d&&!o)&&(("body"!==oX(r)||pX(i))&&(l=EX(r)),d)){const e=PX(r);c=IX(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!i||d||o?LK(0):DX(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:sX,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?hX(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=TX(e,[],!1).filter((e=>cX(e)&&"body"!==oX(e))),a=null;const o="fixed"===wX(e).position;let i=o?_X(e):e;for(;cX(i)&&!xX(i);){const t=wX(i),n=vX(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&("absolute"===a.position||"fixed"===a.position)||pX(i)&&!n&&FX(e,i))?r=r.filter((e=>e!==i)):a=t,i=_X(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=MX(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=MX(t,o[d],a);s=OK(e.top,s),l=IK(e.right,l),c=IK(e.bottom,c),u=OK(e.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:HX,getElementRects:async function(e){const t=this.getOffsetParent||HX,n=this.getDimensions,r=await n(e.floating);return{reference:jX(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}=AX(e);return{width:t,height:n}},getScale:IX,isElement:cX,isRTL:function(e){return"rtl"===wX(e).direction}};function $X(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function VX(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=NX(e),u=a||o?[...c?TX(c):[],...t?TX(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=sX(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:-PK(d)+"px "+-PK(a.clientWidth-(u+p))+"px "+-PK(a.clientHeight-(d+f))+"px "+-PK(u)+"px",threshold:OK(0,IK(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||$X(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?PX(e):null;return l&&function t(){const r=PX(e);m&&!$X(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 GX=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=jK(n),s=zK(n),l="y"===UK(n),c=rX.has(i)?-1:1,u=o&&l?-1:1,d=FK(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}}}}},qX=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}=FK(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),p=UK(jK(a)),f=BK(p);let h=u[f],m=u[p];if(i){const e="y"===f?"bottom":"right";h=MK(h+d["y"===f?"top":"left"],h,h-d[e])}if(s){const e="y"===p?"bottom":"right";m=MK(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}}}}}},WX=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}=FK(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=jK(a),b=UK(s),v=jK(s)===s,k=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[KK(s)]:function(e){const t=KK(e);return[VK(e),t,VK(t)]}(s)),w="none"!==h;!p&&w&&x.push(...ZK(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=zK(e),a=$K(e),o=HK(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=KK(i)),[i,KK(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!==UK(t))||T.every((e=>UK(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 N;const e=null==(N=T.filter((e=>{if(w){const t=UK(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:N[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}},YX=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}=FK(e,t),u=await i.detectOverflow(t,c),d=jK(a),p=zK(a),f="y"===UK(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=IK(m-u[g],b),x=IK(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=OK(u.left,0),t=OK(u.right,0),n=OK(u.top,0),r=OK(u.bottom,0);f?_=h-2*(0!==e||0!==t?e+t:OK(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:OK(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}}:{}}}},ZX=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=FK(e,t);switch(a){case"referenceHidden":{const e=tX(await r.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:nX(e)}}}case"escaped":{const e=tX(await r.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:nX(e)}}}default:return{}}}}},KX=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}=FK(e,t)||{};if(null==c)return{};const d=XK(u),p={x:n,y:r},f=$K(a),h=HK(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=IK(d[y],S),C=IK(d[b],S),A=T,N=E-m[h]-C,I=E/2-m[h]/2+_,O=MK(A,I,N),R=!l.arrow&&null!=zK(a)&&I!==O&&o.reference[h]/2-(I<A?T:C)-m[h]/2<0,P=R?I<A?I-A:I-N:0;return{[f]:p[f]+P,data:{[f]:O,centerOffset:I-O-P,...R&&{alignmentOffset:P}},reset:R}}}),XX=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}=FK(e,t),u={x:n,y:r},d=UK(a),p=BK(d);let f=u[p],h=u[d];const m=FK(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=rX.has(jK(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}}}},QX=(e,t,n)=>{const r=new Map,a={platform:UX,...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:eX},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}=JK(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}=JK(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var JX="undefined"!=typeof document?X.useLayoutEffect:function(){};function eQ(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(!eQ(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)&&!eQ(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function tQ(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nQ(e,t){const n=tQ(e);return Math.round(t*n)/n}function rQ(e){const t=X.useRef(e);return JX((()=>{t.current=e})),t}function aQ(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);eQ(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=rQ(l),C=rQ(a),A=rQ(c),N=X.useCallback((()=>{if(!w.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};C.current&&(e.platform=C.current),QX(w.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};I.current&&!eQ(_.current,t)&&(_.current=t,ue.flushSync((()=>{d(t)})))}))}),[p,t,n,C,A]);JX((()=>{!1===c&&_.current.isPositioned&&(_.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const I=X.useRef(!1);JX((()=>(I.current=!0,()=>{I.current=!1})),[]),JX((()=>{if(k&&(w.current=k),x&&(E.current=x),k&&x){if(T.current)return T.current(k,x,N);N()}}),[k,x,N,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=nQ(R.floating,u.x),r=nQ(R.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...tQ(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:N,refs:O,elements:R,floatingStyles:P})),[u,N,O,R,P])}const oQ=(e,t)=>{const n=GX(e);return{name:n.name,fn:n.fn,options:[e,t]}},iQ=(e,t)=>{const n=qX(e);return{name:n.name,fn:n.fn,options:[e,t]}},sQ=(e,t)=>({fn:XX(e).fn,options:[e,t]}),lQ=(e,t)=>{const n=WX(e);return{name:n.name,fn:n.fn,options:[e,t]}},cQ=(e,t)=>{const n=YX(e);return{name:n.name,fn:n.fn,options:[e,t]}},uQ=(e,t)=>{const n=ZX(e);return{name:n.name,fn:n.fn,options:[e,t]}},dQ=(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?KX({element:n.current,padding:r}).fn(t):{}:n?KX({element:n,padding:r}).fn(t):{};var a}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var pQ=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return rg.jsx(hK.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:rg.jsx("polygon",{points:"0,0 30,0 15,10"})})}));pQ.displayName="Arrow";var fQ=pQ;function hQ(e){const[t,n]=X.useState(void 0);return SK((()=>{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 mQ="Popper",[gQ,yQ]=sK(mQ),[bQ,vQ]=gQ(mQ),kQ=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return rg.jsx(bQ,{scope:t,anchor:r,onAnchorChange:a,children:n})};kQ.displayName=mQ;var xQ="PopperAnchor",wQ=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=vQ(xQ,n),i=X.useRef(null),s=iK(t,i);return X.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:rg.jsx(hK.div,{...a,ref:s})}));wQ.displayName=xQ;var EQ="PopperContent",[_Q,SQ]=gQ(EQ),TQ=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=vQ(EQ,l),[E,_]=X.useState(null),S=iK(t,(e=>_(e))),[T,C]=X.useState(null),A=hQ(T),N=(null==A?void 0:A.width)??0,I=(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(IQ),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=aQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>VX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[oQ({mainAxis:u+I,alignmentAxis:p}),h&&iQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?sQ():void 0,...D}),h&&lQ({...D}),cQ({...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&&dQ({element:T,padding:f}),OQ({arrowWidth:N,arrowHeight:I}),b&&uQ({strategy:"referenceHidden",...D})]}),[H,U]=RQ(j),$=mK(k);SK((()=>{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 SK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),rg.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:rg.jsx(_Q,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:rg.jsx(hK.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));TQ.displayName=EQ;var CQ="PopperArrow",AQ={top:"bottom",right:"left",bottom:"top",left:"right"},NQ=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=SQ(CQ,n),o=AQ[a.placedSide];return rg.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:rg.jsx(fQ,{...r,ref:t,style:{...r.style,display:"block"}})})}));function IQ(e){return null!==e}NQ.displayName=CQ;var OQ=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]=RQ(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 RQ(e){const[t,n="center"]=e.split("-");return[t,n]}var PQ=kQ,LQ=wQ,DQ=TQ,MQ=NQ;var FQ=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=jQ(r.current);o.current="mounted"===s?e:"none"}),[s]),SK((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=jQ(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]),SK((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=jQ(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=jQ(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=iK(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 jQ(e){return(null==e?void 0:e.animationName)||"none"}function zQ({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=mK(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=mK(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])]}FQ.displayName="Presence";var BQ=X.forwardRef(((e,t)=>rg.jsx(hK.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}})));BQ.displayName="VisuallyHidden";var HQ=BQ,[UQ]=sK("Tooltip",[yQ]),$Q=yQ(),VQ="TooltipProvider",GQ=700,qQ="tooltip.open",[WQ,YQ]=UQ(VQ),ZQ=e=>{const{__scopeTooltip:t,delayDuration:n=GQ,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)}),[]),rg.jsx(WQ,{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})};ZQ.displayName=VQ;var KQ="Tooltip",[XQ,QQ]=UQ(KQ),JQ=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,l=YQ(KQ,e.__scopeTooltip),c=$Q(t),[u,d]=X.useState(null),p=AK(),f=X.useRef(0),h=i??l.disableHoverableContent,m=s??l.delayDuration,g=X.useRef(!1),[y=!1,b]=zQ({prop:r,defaultProp:a,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(qQ))):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)}),[]),rg.jsx(PQ,{...c,children:rg.jsx(XQ,{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})})};JQ.displayName=KQ;var eJ="TooltipTrigger",tJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=QQ(eJ,n),o=YQ(eJ,n),i=$Q(n),s=iK(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]),rg.jsx(LQ,{asChild:!0,...i,children:rg.jsx(hK.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:s,onPointerMove:rK(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(c.current||o.isPointerInTransitRef.current||(a.onTriggerEnter(),c.current=!0))})),onPointerLeave:rK(e.onPointerLeave,(()=>{a.onTriggerLeave(),c.current=!1})),onPointerDown:rK(e.onPointerDown,(()=>{l.current=!0,document.addEventListener("pointerup",u,{once:!0})})),onFocus:rK(e.onFocus,(()=>{l.current||a.onOpen()})),onBlur:rK(e.onBlur,a.onClose),onClick:rK(e.onClick,a.onClose)})})}));tJ.displayName=eJ;var[nJ,rJ]=UQ("TooltipPortal",{forceMount:void 0}),aJ="TooltipContent",oJ=X.forwardRef(((e,t)=>{const n=rJ(aJ,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=QQ(aJ,e.__scopeTooltip);return rg.jsx(FQ,{present:r||i.open,children:i.disableHoverableContent?rg.jsx(cJ,{side:a,...o,ref:t}):rg.jsx(iJ,{side:a,...o,ref:t})})})),iJ=X.forwardRef(((e,t)=>{const n=QQ(aJ,e.__scopeTooltip),r=YQ(aJ,e.__scopeTooltip),a=X.useRef(null),o=iK(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]),rg.jsx(cJ,{...e,ref:o})})),[sJ,lJ]=UQ(KQ,{isInside:!1}),cJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,l=QQ(aJ,n),c=$Q(n),{onClose:u}=l;return X.useEffect((()=>(document.addEventListener(qQ,u),()=>document.removeEventListener(qQ,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]),rg.jsx(wK,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:rg.jsxs(DQ,{"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:[rg.jsx(dK,{children:r}),rg.jsx(sJ,{scope:n,isInside:!0,children:rg.jsx(HQ,{id:l.contentId,role:"tooltip",children:a||r})})]})})}));oJ.displayName=aJ;var uJ="TooltipArrow",dJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=$Q(n);return lJ(uJ,n).isInside?null:rg.jsx(MQ,{...a,...r,ref:t})}));dJ.displayName=uJ;var pJ=ZQ,fJ=tJ,hJ=dJ;const mJ=X.createContext(void 0),gJ=({children:e,...t})=>{const n=XZ();return rg.jsx(mJ.Provider,{value:{...n,...t},children:rg.jsx(tK,{children:rg.jsx(pJ,{children:e})})})},yJ=()=>{const e=X.useContext(mJ);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},bJ=X.createContext(void 0);const vJ=({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}=yJ(),{aiChatSettings:u,baseSettings:d}=rR(),{baseUrl:p,appId:f,apiKey:h}=u,m=!!d.getAuthToken,g=!h&&!!f&&(!!i||m),{fetchWithAuth:y}=gR({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),N=X.useRef(null),I=X.useRef(m),O=X.useRef(i);X.useEffect((()=>{const e=I.current,t=O.current;I.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(eNe){console.error("[useChatHistory] Failed to load conversations:",eNe)}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=N.current)||n.abort();const r=new AbortController;N.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 rg.jsx(bJ.Provider,{value:n,children:"function"==typeof t?t(n):t})},kJ=()=>{const e=X.useContext(bJ);if(!e)throw new Error("useChatHistory must be used within a ChatHistoryProvider");return e},xJ=X.createContext(void 0),wJ=({children:e,field:t,fieldProps:n,autoFocus:r})=>{const{errors:a}=tL(),o=a[t.name];return rg.jsx(xJ.Provider,{value:{field:t,fieldProps:n,error:o,autoFocus:r},children:e})},EJ=()=>{const e=X.useContext(xJ);if(!e)throw new Error("useFormField must be used within a FormFieldProvider");return e},_J=X.createContext(void 0);const SJ=({children:e,value:t})=>rg.jsx(_J.Provider,{value:t,children:e}),TJ=["light","dark"],CJ="(prefers-color-scheme: dark)",AJ="undefined"==typeof window,NJ=X.createContext(void 0),IJ={setColorMode:e=>{},colorModes:[]};function OJ(e,t){const n=X.useContext(NJ)??IJ;return"dark"===(n.forcedColorMode??n.resolvedColorMode)?t:e}const RJ=e=>(X.useContext(NJ),rg.jsx(LJ,{...e})),PJ=["light","dark"],LJ=({forcedColorMode:e,disableTransitionOnChange:t=!1,enableSystem:n=!1,enableColorScheme:r=!0,storageKey:a="inkeep-colorMode",colorModes:o=PJ,defaultColorMode:i=(n?"system":"light"),attribute:s="data-theme",value:l,children:c,nonce:u,shadowHostId:d,rootId:p})=>{const[f,h]=X.useState((()=>MJ(a,i))),[m,g]=X.useState((()=>MJ(a))),y=l?Object.values(l):o,b=X.useCallback((e=>{var a;let o=e;if(!o)return;"system"===e&&n&&(o=jJ());const c=l?l[o]:o,u=t?FJ():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=TJ.includes(i)?i:null,t=TJ.includes(o)?o:e;h.style.colorScheme=t}null==u||u()}),[]),v=X.useCallback((e=>{h(e);try{localStorage.setItem(a,e)}catch(Fce){}}),[e]),k=X.useCallback((t=>{const r=jJ(t);g(r),"system"===f&&n&&!e&&b("system")}),[f,e]);X.useEffect((()=>{const e=window.matchMedia(CJ);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 rg.jsxs(NJ.Provider,{value:x,children:[rg.jsx(DJ,{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]})},DJ=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(TJ.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&&TJ.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='${CJ}',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 rg.jsx("script",{nonce:l,dangerouslySetInnerHTML:{__html:m}})}),(()=>!0)),MJ=(e,t)=>{if(AJ)return;let n;try{n=localStorage.getItem(e)||void 0}catch(Fce){}return n||t},FJ=()=>{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)}},jJ=e=>{e||(e=window.matchMedia(CJ));return e.matches?"dark":"light"};var zJ=Object.prototype.hasOwnProperty;function BJ(e,t,n){for(n of e.keys())if(HJ(n,t))return n}function HJ(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--&&HJ(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=BJ(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=BJ(t,a)))return!1;if(!HJ(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(zJ.call(e,n)&&++r&&!zJ.call(t,n))return!1;if(!(n in t)||!HJ(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function UJ(){const{baseSettings:e}=rR(),[t,n]=X.useState([]),r=function(e){const t=X.useRef(void 0);HJ(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=>rg.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:e.value}},e.key??GZ("link_")))),o=e.map((e=>{const t=e.key??GZ("stylesheet_");return rg.jsx("link",{id:t,rel:"stylesheet",type:"text/css",href:e.value,onLoad:()=>{n((t=>[...new Set([...t,e.value])]))}},t)}));return{customStyles:rg.jsxs(rg.Fragment,{children:[o,a]}),linksCount:e.length}}),[r]);return{customStyles:a,loaded:t.length>=(o??0)}}const $J=({children:e})=>{const{baseSettings:t}=rR(),{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=gk(s,r),h=function(e){const t={};for(const[n,r]of Object.entries(e)){const e=bk[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}=UJ(),{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]),rg.jsxs(rg.Fragment,{children:[!c&&rg.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&&rg.jsx(RJ,{forcedColorMode:b??k,...v,shadowHostId:null==a?void 0:a.id,rootId:null==o?void 0:o.id,children:rg.jsx("div",{className:l,style:{display:"contents",...h},children:e})})]})};function VJ(e){const{children:t,config:n,componentType:r}=e;return rg.jsx(nR,{value:{...n,componentType:r},children:rg.jsx($J,{children:rg.jsx(oR,{children:t})})})}const GJ=X.createContext(void 0),qJ=({children:e,source:t})=>rg.jsx(GJ.Provider,{value:{source:t},children:e}),WJ=()=>{const e=X.useContext(GJ);if(!e)throw new Error("useSourceItem must be used within a SourceItemProvider");return e},YJ=X.createContext(void 0),ZJ=({children:e,widget:t})=>rg.jsx(YJ.Provider,{value:t,children:e}),KJ=()=>X.useContext(YJ),XJ=(e,t)=>{const{isOpen:n,onOpenChange:r,defaultOpen:a=!1,shortcutKey:o,triggerSelector:i=t.defaultTriggerSelector}=e??{},{logEvent:s}=iR(),[l=a,c]=WZ({prop:n,defaultProp:a??!1,onChange:r}),u=i||t.defaultTriggerSelector;(e=>{const{triggerSelector:t,onTriggerClick:n}=e;X.useEffect((()=>{const e=e=>{var r;const a=e.target;t&&(null==(r=null==a?void 0:a.matches)?void 0:r.call(a,t))&&(null==n||n())};return t&&document.addEventListener("click",e),()=>{t&&document.removeEventListener("click",e)}}),[t,n])})({triggerSelector:u,onTriggerClick:u?()=>c(!l):void 0});const d=X.useRef(!0);X.useEffect((()=>{d.current?d.current=!1:s({eventName:l?`${t.eventNamePrefix}_opened`:`${t.eventNamePrefix}_closed`,properties:{}})}),[l,t.eventNamePrefix]);const p=X.useRef(l);return p.current=l,X.useEffect((()=>{const e=e=>{o&&(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===o.toLowerCase()&&(e.preventDefault(),e.stopPropagation(),c(!0)),"Escape"===e.key&&p.current&&(e.preventDefault(),c(!1))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[o,c]),{isOpen:l,setOpen:c,shortcutKey:o}},QJ=X.createContext(void 0),JJ=({children:e,value:t})=>rg.jsx(QJ.Provider,{value:t,children:e}),e0=()=>{const e=X.useContext(QJ);if(!e)throw new Error("useSidebarChat must be used within a SidebarChatProvider");return e},t0=X.createContext(void 0),n0=({children:e,value:t})=>rg.jsx(t0.Provider,{value:t,children:e});var r0=X.useLayoutEffect,a0=function(e,t){"function"!=typeof e?e.current=t:e(t)},o0={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},i0=function(e){Object.keys(o0).forEach((function(t){e.style.setProperty(t,o0[t],"important")}))},s0=null,l0=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize};var c0=function(){},u0=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],d0=!!document.documentElement.currentStyle,p0=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,u0.reduce((function(e,t){return e[t]=n[t],e}),{})),a=r.boxSizing;return""===a?null:(d0&&"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 f0(e,t,n){var r,a,o=(r=n,a=Q.useRef(r),r0((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 h0=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],m0=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,a=e.minRows,o=e.onChange,i=void 0===o?c0:o,s=e.onHeightChange,l=void 0===s?c0:s,c=x$(e,h0),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&&a0(n.current,null),n.current=t,t&&a0(t,r)}),[t])}(d,t),f=X.useRef(0),h=X.useRef(),m=function(){var e=d.current,t=n&&h.current?h.current:p0(e);if(t){h.current=t;var o=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),s0||((s0=document.createElement("textarea")).setAttribute("tabindex","-1"),s0.setAttribute("aria-hidden","true"),i0(s0)),null===s0.parentNode&&document.body.appendChild(s0);var a=e.paddingSize,o=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach((function(e){var t=e;s0.style[t]=i[t]})),i0(s0),s0.value=t;var l=l0(s0,e);s0.value=t,l=l0(s0,e),s0.value="x";var c=s0.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){f0(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()}))}})),f0(window,"resize",m),function(e){f0(document.fonts,"loadingdone",e)}(m),X.createElement("textarea",w$({},c,{onChange:function(e){u||m(),i(e)},ref:p}))},g0=X.forwardRef(m0),y0="Avatar",[b0]=sK(y0),[v0,k0]=b0(y0),x0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,o]=X.useState("idle");return rg.jsx(v0,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:o,children:rg.jsx(hK.span,{...r,ref:t})})}));x0.displayName=y0;var w0="AvatarImage",E0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...o}=e,i=k0(w0,n),s=function(e,t){const[n,r]=X.useState("idle");return SK((()=>{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=mK((e=>{a(e),i.onImageLoadingStatusChange(e)}));return SK((()=>{"idle"!==s&&l(s)}),[s,l]),"loaded"===s?rg.jsx(hK.img,{...o,ref:t,src:r}):null}));E0.displayName=w0;var _0="AvatarFallback",S0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,o=k0(_0,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?rg.jsx(hK.span,{...a,ref:t}):null}));S0.displayName=_0;var T0=x0,C0=E0,A0=S0;var N0="Checkbox",[I0]=sK(N0),[O0,R0]=I0(N0),P0=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=iK(t,(e=>f(e))),m=X.useRef(!1),g=!p||(u||!!p.closest("form")),[y=!1,b]=zQ({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]),rg.jsxs(O0,{scope:n,state:y,disabled:s,children:[rg.jsx(hK.button,{type:"button",role:"checkbox","aria-checked":F0(y)?"mixed":y,"aria-required":i,"data-state":j0(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onKeyDown:rK(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:rK(e.onClick,(e=>{b((e=>!!F0(e)||!e)),g&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))}),g&&rg.jsx(M0,{control:p,bubbles:!m.current,name:r,value:l,checked:y,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"},defaultChecked:!F0(o)&&o})]})}));P0.displayName=N0;var L0="CheckboxIndicator",D0=X.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=R0(L0,n);return rg.jsx(FQ,{present:r||F0(o.state)||!0===o.state,children:rg.jsx(hK.span,{"data-state":j0(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})}));D0.displayName=L0;var M0=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=hQ(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=F0(n),a.call(e,!F0(n)&&n),e.dispatchEvent(t)}}),[s,n,r]);const c=X.useRef(!F0(n)&&n);return rg.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 F0(e){return"indeterminate"===e}function j0(e){return F0(e)?"indeterminate":e?"checked":"unchecked"}var z0=P0,B0=D0,H0=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.Children.toArray(n),o=a.find(V0);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 rg.jsx(U0,{...r,ref:t,children:X.isValidElement(e)?X.cloneElement(e,void 0,n):null})}return rg.jsx(U0,{...r,ref:t,children:n})}));H0.displayName="Slot";var U0=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?oK(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));U0.displayName="SlotClone";var $0=({children:e})=>rg.jsx(rg.Fragment,{children:e});function V0(e){return X.isValidElement(e)&&e.type===$0}var G0=["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?H0:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),rg.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});var q0,W0="dismissableLayer.update",Y0="dismissableLayer.pointerDownOutside",Z0="dismissableLayer.focusOutside",K0=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),X0=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(K0),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=iK(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=mK(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){J0(Y0,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=mK(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){J0(Z0,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 gK((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&&(q0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Q0(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=q0)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Q0())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(W0,e),()=>document.removeEventListener(W0,e)}),[]),rg.jsx(G0.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:rK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:rK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:rK(e.onPointerDownCapture,x.onPointerDownCapture)})}));X0.displayName="DismissableLayer";function Q0(){const e=new CustomEvent(W0);document.dispatchEvent(e)}function J0(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(K0),r=X.useRef(null),a=iK(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),rg.jsx(G0.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var e1=0;function t1(){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 n1="focusScope.autoFocusOnMount",r1="focusScope.autoFocusOnUnmount",a1={bubbles:!1,cancelable:!0},o1=X.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=X.useState(null),c=mK(a),u=mK(o),d=X.useRef(null),p=iK(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:c1(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||c1(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&c1(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){u1.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(n1,a1);s.addEventListener(n1,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(c1(r,{select:t}),document.activeElement!==n)return}((e=i1(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&c1(s))}return()=>{s.removeEventListener(n1,c),setTimeout((()=>{const e=new CustomEvent(r1,a1);s.addEventListener(r1,u),s.dispatchEvent(e),e.defaultPrevented||c1(t??document.body,{select:!0}),s.removeEventListener(r1,u),u1.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=i1(e),n=s1(t,e),r=s1(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&c1(o,{select:!0})):(e.preventDefault(),n&&c1(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return rg.jsx(G0.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function i1(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 s1(e,t){for(const n of e)if(!l1(n,{upTo:t}))return n}function l1(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 c1(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()}}o1.displayName="FocusScope";var u1=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=d1(e,t),e.unshift(t)},remove(t){var n;e=d1(e,t),null==(n=e[0])||n.resume()}}}();function d1(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var p1=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return rg.jsx(G0.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:rg.jsx("polygon",{points:"0,0 30,0 15,10"})})}));p1.displayName="Arrow";var f1=p1,h1="Popper",[m1,g1]=sK(h1),[y1,b1]=m1(h1),v1=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return rg.jsx(y1,{scope:t,anchor:r,onAnchorChange:a,children:n})};v1.displayName=h1;var k1="PopperAnchor",x1=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=b1(k1,n),i=X.useRef(null),s=iK(t,i);return X.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:rg.jsx(G0.div,{...a,ref:s})}));x1.displayName=k1;var w1="PopperContent",[E1,_1]=m1(w1),S1=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=b1(w1,l),[E,_]=X.useState(null),S=iK(t,(e=>_(e))),[T,C]=X.useState(null),A=hQ(T),N=(null==A?void 0:A.width)??0,I=(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(N1),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=aQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>VX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[oQ({mainAxis:u+I,alignmentAxis:p}),h&&iQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?sQ():void 0,...D}),h&&lQ({...D}),cQ({...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&&dQ({element:T,padding:f}),I1({arrowWidth:N,arrowHeight:I}),b&&uQ({strategy:"referenceHidden",...D})]}),[H,U]=O1(j),$=mK(k);SK((()=>{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 SK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),rg.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:rg.jsx(E1,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:rg.jsx(G0.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));S1.displayName=w1;var T1="PopperArrow",C1={top:"bottom",right:"left",bottom:"top",left:"right"},A1=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=_1(T1,n),o=C1[a.placedSide];return rg.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:rg.jsx(f1,{...r,ref:t,style:{...r.style,display:"block"}})})}));function N1(e){return null!==e}A1.displayName=T1;var I1=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]=O1(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 O1(e){const[t,n="center"]=e.split("-");return[t,n]}var R1=v1,P1=x1,L1=S1,D1=A1,M1=new WeakMap,F1=new WeakMap,j1={},z1=0,B1=function(e){return e&&(e.host||B1(e.parentNode))},H1=function(e,t,n,r){var a=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=B1(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]);j1[n]||(j1[n]=new WeakMap);var o=j1[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=(M1.get(e)||0)+1,c=(o.get(e)||0)+1;M1.set(e,l),o.set(e,c),i.push(e),1===l&&a&&F1.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(Fce){console.error("aria-hidden: cannot operate on ",e,Fce)}}))};return u(t),s.clear(),z1++,function(){i.forEach((function(e){var t=M1.get(e)-1,a=o.get(e)-1;M1.set(e,t),o.set(e,a),t||(F1.has(e)||e.removeAttribute(r),F1.delete(e)),a||e.removeAttribute(n)})),--z1||(M1=new WeakMap,M1=new WeakMap,F1=new WeakMap,j1={})}},U1=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"))),H1(r,a,n,"aria-hidden")):function(){return null}},$1="right-scroll-bar-position",V1="width-before-scroll-bar";function G1(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var q1="undefined"!=typeof window?X.useLayoutEffect:X.useEffect,W1=new WeakMap;function Y1(e,t){var n,r,a,o=(n=null,r=function(t){return e.forEach((function(e){return G1(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 q1((function(){var t=W1.get(o);if(t){var n=new Set(t),r=new Set(e),a=o.current;n.forEach((function(e){r.has(e)||G1(e,null)})),r.forEach((function(e){n.has(e)||G1(e,a)}))}W1.set(o,e)}),[e]),o}function Z1(e){return e}var K1=function(e){var t=e.sideCar,n=S$(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,_$({},n))};K1.isSideCarExport=!0;var X1=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Z1);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=_$({async:!0,ssr:!1},e),t}(),Q1=function(){},J1=X.forwardRef((function(e,t){var n=X.useRef(null),r=X.useState({onScrollCapture:Q1,onWheelCapture:Q1,onTouchMoveCapture:Q1}),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=S$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,w=Y1([n,t]),E=_$(_$({},k),a);return X.createElement(X.Fragment,null,u&&X.createElement(x,{sideCar:X1,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),_$(_$({},E),{ref:w})):X.createElement(b,_$({},E,{className:l,ref:w}),s))}));J1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},J1.classNames={fullWidth:V1,zeroRight:$1};function e2(){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 t2=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=e2())&&(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)}}},n2=function(){var e,t=(e=t2(),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}},r2={left:0,top:0,right:0,gap:0},a2=function(e){return parseInt(e||"",10)||0},o2=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return r2;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[a2(n),a2(r),a2(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])}},i2=n2(),s2="data-scroll-locked",l2=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(s2,"] {\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($1," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(V1," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat($1," .").concat($1," {\n right: 0 ").concat(r,";\n }\n \n .").concat(V1," .").concat(V1," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(s2,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},c2=function(){var e=parseInt(document.body.getAttribute(s2)||"0",10);return isFinite(e)?e:0},u2=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(s2,(c2()+1).toString()),function(){var e=c2()-1;e<=0?document.body.removeAttribute(s2):document.body.setAttribute(s2,e.toString())}}),[]);var o=X.useMemo((function(){return o2(a)}),[a]);return X.createElement(i2,{styles:l2(o,!t,a,n?"":"!important")})},d2=!1;if("undefined"!=typeof window)try{var p2=Object.defineProperty({},"passive",{get:function(){return d2=!0,!0}});window.addEventListener("test",p2,p2),window.removeEventListener("test",p2,p2)}catch(eNe){d2=!1}var f2=!!d2&&{passive:!1},h2=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])},m2=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),g2(e,r)){var a=y2(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},g2=function(e,t){return"v"===e?function(e){return h2(e,"overflowY")}(t):function(e){return h2(e,"overflowX")}(t)},y2=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},b2=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},v2=function(e){return[e.deltaX,e.deltaY]},k2=function(e){return e&&"current"in e?e.current:e},x2=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},w2=0,E2=[];function _2(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const S2=(T2=function(e){var t=X.useRef([]),n=X.useRef([0,0]),r=X.useRef(),a=X.useState(w2++)[0],o=X.useState(n2)[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=T$([e.lockRef.current],(e.shards||[]).map(k2),!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=b2(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=m2(d,u);if(!h)return!0;if(h?a=d:(a="v"===d?"h":"v",h=m2(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=y2(e,i),f=p[0],h=p[1]-p[2]-a*f;(f||h)&&g2(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(E2.length&&E2[E2.length-1]===o){var r="deltaY"in n?v2(n):b2(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(k2).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:_2(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=b2(e),r.current=void 0}),[]),d=X.useCallback((function(t){c(t.type,v2(t),t.target,s(t,e.lockRef.current))}),[]),p=X.useCallback((function(t){c(t.type,b2(t),t.target,s(t,e.lockRef.current))}),[]);X.useEffect((function(){return E2.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,f2),document.addEventListener("touchmove",l,f2),document.addEventListener("touchstart",u,f2),function(){E2=E2.filter((function(e){return e!==o})),document.removeEventListener("wheel",l,f2),document.removeEventListener("touchmove",l,f2),document.removeEventListener("touchstart",u,f2)}}),[]);var f=e.removeScrollBar,h=e.inert;return X.createElement(X.Fragment,null,h?X.createElement(o,{styles:x2(a)}):null,f?X.createElement(u2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},X1.useMedium(T2),K1);var T2,C2=X.forwardRef((function(e,t){return X.createElement(J1,_$({},e,{ref:t,sideCar:S2}))}));C2.classNames=J1.classNames;var A2="Popover",[N2]=sK(A2,[g1]),I2=g1(),[O2,R2]=N2(A2),P2=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!1}=e,s=I2(t),l=X.useRef(null),[c,u]=X.useState(!1),[d=!1,p]=zQ({prop:r,defaultProp:a,onChange:o});return rg.jsx(R1,{...s,children:rg.jsx(O2,{scope:t,contentId:AK(),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})})};P2.displayName=A2;var L2="PopoverAnchor";X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=R2(L2,n),o=I2(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=a;return X.useEffect((()=>(i(),()=>s())),[i,s]),rg.jsx(P1,{...o,...r,ref:t})})).displayName=L2;var D2="PopoverTrigger",M2=X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=R2(D2,n),o=I2(n),i=iK(t,a.triggerRef),s=rg.jsx(G0.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":q2(a.open),...r,ref:i,onClick:rK(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:rg.jsx(P1,{asChild:!0,...o,children:s})}));M2.displayName=D2;var[F2,j2]=N2("PopoverPortal",{forceMount:void 0}),z2="PopoverContent",B2=X.forwardRef(((e,t)=>{const n=j2(z2,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,o=R2(z2,e.__scopePopover);return rg.jsx(FQ,{present:r||o.open,children:o.modal?rg.jsx(H2,{...a,ref:t}):rg.jsx(U2,{...a,ref:t})})}));B2.displayName=z2;var H2=X.forwardRef(((e,t)=>{const n=R2(z2,e.__scopePopover),r=X.useRef(null),a=iK(t,r),o=X.useRef(!1);return X.useEffect((()=>{const e=r.current;if(e)return U1(e)}),[]),rg.jsx(C2,{as:H0,allowPinchZoom:!0,children:rg.jsx($2,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:rK(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),o.current||null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:rK(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:rK(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),U2=X.forwardRef(((e,t)=>{const n=R2(z2,e.__scopePopover),r=X.useRef(!1),a=X.useRef(!1);return rg.jsx($2,{...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()}})})),$2=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=R2(z2,n),f=I2(n);return X.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??t1()),document.body.insertAdjacentElement("beforeend",e[1]??t1()),e1++,()=>{1===e1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),e1--}}),[]),rg.jsx(o1,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:rg.jsx(X0,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:rg.jsx(L1,{"data-state":q2(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)"}})})})})),V2="PopoverClose";X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=R2(V2,n);return rg.jsx(G0.button,{type:"button",...r,ref:t,onClick:rK(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=V2;var G2=X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=I2(n);return rg.jsx(D1,{...a,...r,ref:t})}));function q2(e){return e?"open":"closed"}G2.displayName="PopoverArrow";var W2=P2,Y2=M2,Z2=B2,K2=G2,X2=X.createContext(void 0);var Q2="ScrollArea",[J2]=sK(Q2),[e5,t5]=J2(Q2),n5=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=iK(t,(e=>l(e))),T=function(e){const t=X.useContext(X2);return e||t||"ltr"}(a);return rg.jsx(e5,{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:rg.jsx(hK.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}})})}));n5.displayName=Q2;var r5="ScrollAreaViewport",a5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,i=t5(r5,n),s=iK(t,X.useRef(null),i.onViewportChange);return rg.jsxs(rg.Fragment,{children:[rg.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}),rg.jsx(hK.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:rg.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})}));a5.displayName=r5;var o5="ScrollAreaScrollbar",i5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=t5(o5,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?rg.jsx(s5,{...r,ref:t,forceMount:n}):"scroll"===a.type?rg.jsx(l5,{...r,ref:t,forceMount:n}):"auto"===a.type?rg.jsx(c5,{...r,ref:t,forceMount:n}):"always"===a.type?rg.jsx(u5,{...r,ref:t}):null}));i5.displayName=o5;var s5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=t5(o5,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]),rg.jsx(FQ,{present:n||o,children:rg.jsx(c5,{"data-state":o?"visible":"hidden",...r,ref:t})})})),l5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=t5(o5,e.__scopeScrollArea),o="horizontal"===e.orientation,i=N5((()=>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]),rg.jsx(FQ,{present:n||"hidden"!==s,children:rg.jsx(u5,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:rK(e.onPointerEnter,(()=>l("POINTER_ENTER"))),onPointerLeave:rK(e.onPointerLeave,(()=>l("POINTER_LEAVE")))})})})),c5=X.forwardRef(((e,t)=>{const n=t5(o5,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,i]=X.useState(!1),s="horizontal"===e.orientation,l=N5((()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}}),10);return I5(n.viewport,l),I5(n.content,l),rg.jsx(FQ,{present:r||o,children:rg.jsx(u5,{"data-state":o?"visible":"hidden",...a,ref:t})})})),u5=X.forwardRef(((e,t)=>{const{orientation:n="vertical",...r}=e,a=t5(o5,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=E5(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=_5(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 T5([l,c],d)(e)}(e,i.current,s,t)}return"horizontal"===n?rg.jsx(d5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=S5(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?rg.jsx(p5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=S5(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})),d5=X.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=t5(o5,e.__scopeScrollArea),[i,s]=X.useState(),l=X.useRef(null),c=iK(t,l,o.onScrollbarXChange);return X.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),rg.jsx(m5,{"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":_5(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),C5(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:w5(i.paddingLeft),paddingEnd:w5(i.paddingRight)}})}})})),p5=X.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=t5(o5,e.__scopeScrollArea),[i,s]=X.useState(),l=X.useRef(null),c=iK(t,l,o.onScrollbarYChange);return X.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),rg.jsx(m5,{"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":_5(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),C5(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:w5(i.paddingTop),paddingEnd:w5(i.paddingBottom)}})}})})),[f5,h5]=J2(o5),m5=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=t5(o5,n),[h,m]=X.useState(null),g=iK(t,(e=>m(e))),y=X.useRef(null),b=X.useRef(""),v=f.viewport,k=r.content-r.viewport,x=mK(u),w=mK(l),E=N5(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]),I5(h,E),I5(f.content,E),rg.jsx(f5,{scope:n,scrollbar:h,hasThumb:a,onThumbChange:mK(o),onThumbPointerUp:mK(i),onThumbPositionChange:w,onThumbPointerDown:mK(s),children:rg.jsx(hK.div,{...p,ref:g,style:{position:"absolute",...p.style},onPointerDown:rK(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:rK(e.onPointerMove,_),onPointerUp:rK(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}))})})})),g5="ScrollAreaThumb",y5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=h5(g5,e.__scopeScrollArea);return rg.jsx(FQ,{present:n||a.hasThumb,children:rg.jsx(b5,{ref:t,...r})})})),b5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=t5(g5,n),i=h5(g5,n),{onThumbPositionChange:s}=i,l=iK(t,(e=>i.onThumbChange(e))),c=X.useRef(void 0),u=N5((()=>{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=A5(e,s);c.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[o.viewport,u,s]),rg.jsx(hK.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:rK(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:rK(e.onPointerUp,i.onThumbPointerUp)})}));y5.displayName=g5;var v5="ScrollAreaCorner",k5=X.forwardRef(((e,t)=>{const n=t5(v5,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?rg.jsx(x5,{...e,ref:t}):null}));k5.displayName=v5;var x5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=t5(v5,n),[o,i]=X.useState(0),[s,l]=X.useState(0),c=Boolean(o&&s);return I5(a.scrollbarX,(()=>{var e;const t=(null==(e=a.scrollbarX)?void 0:e.offsetHeight)||0;a.onCornerHeightChange(t),l(t)})),I5(a.scrollbarY,(()=>{var e;const t=(null==(e=a.scrollbarY)?void 0:e.offsetWidth)||0;a.onCornerWidthChange(t),i(t)})),c?rg.jsx(hK.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 w5(e){return e?parseInt(e,10):0}function E5(e,t){const n=e/t;return isNaN(n)?0:n}function _5(e){const t=E5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function S5(e,t,n="ltr"){const r=_5(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 T5([0,i],[0,s])(l)}function T5(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 C5(e,t){return e>0&&e<t}var A5=(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 N5(e,t){const n=mK(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 I5(e,t){const n=mK(t);SK((()=>{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 O5=n5,R5=a5,P5=k5;function L5(e,[t,n]){return Math.min(n,Math.max(t,e))}function D5(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 M5(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 rg.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}\``)}]},F5(r,...t)]}function F5(...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 j5(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function z5(...e){return t=>{let n=!1;const r=e.map((e=>{const r=j5(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():j5(e[t],null)}}}}function B5(...e){return X.useCallback(z5(...e),e)}var H5=Symbol.for("react.lazy"),U5=J[" use ".trim().toString()];function $5(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===H5&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function V5(e){const t=G5(e),n=X.forwardRef(((e,n)=>{let{children:r,...a}=e;$5(r)&&"function"==typeof U5&&(r=U5(r._payload));const o=X.Children.toArray(r),i=o.find(W5);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 rg.jsx(t,{...a,ref:n,children:X.isValidElement(e)?X.cloneElement(e,void 0,r):null})}return rg.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function G5(e){const t=X.forwardRef(((e,t)=>{let{children:n,...r}=e;if($5(n)&&"function"==typeof U5&&(n=U5(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?z5(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 q5=Symbol("radix.slottable");function W5(e){return X.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===q5}var Y5=X.createContext(void 0);function Z5(e){const t=X.useContext(Y5);return e||t||"ltr"}function K5(e){const t=X5(e),n=X.forwardRef(((e,n)=>{const{children:r,...a}=e,o=X.Children.toArray(r),i=o.find(J5);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 rg.jsx(t,{...a,ref:n,children:X.isValidElement(e)?X.cloneElement(e,void 0,r):null})}return rg.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function X5(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?z5(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 Q5=Symbol("radix.slottable");function J5(e){return X.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Q5}var e3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=K5(`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),rg.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function t3(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 n3,r3="dismissableLayer.update",a3="dismissableLayer.pointerDownOutside",o3="dismissableLayer.focusOutside",i3=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),s3=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(i3),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=B5(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=t3(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){c3(a3,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=t3(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){c3(o3,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=t3(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&&(n3=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),l3(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=n3)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),l3())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(r3,e),()=>document.removeEventListener(r3,e)}),[]),rg.jsx(e3.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:D5(e.onFocusCapture,w.onFocusCapture),onBlurCapture:D5(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:D5(e.onPointerDownCapture,x.onPointerDownCapture)})}));s3.displayName="DismissableLayer";function l3(){const e=new CustomEvent(r3);document.dispatchEvent(e)}function c3(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(i3),r=X.useRef(null),a=B5(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),rg.jsx(e3.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var u3=0;function d3(){X.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??p3()),document.body.insertAdjacentElement("beforeend",e[1]??p3()),u3++,()=>{1===u3&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),u3--}}),[])}function p3(){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 f3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=V5(`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),rg.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),h3="focusScope.autoFocusOnMount",m3="focusScope.autoFocusOnUnmount",g3={bubbles:!1,cancelable:!0},y3=X.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=X.useState(null),c=t3(a),u=t3(o),d=X.useRef(null),p=B5(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:x3(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||x3(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&x3(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){w3.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(h3,g3);s.addEventListener(h3,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(x3(r,{select:t}),document.activeElement!==n)return}((e=b3(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&x3(s))}return()=>{s.removeEventListener(h3,c),setTimeout((()=>{const e=new CustomEvent(m3,g3);s.addEventListener(m3,u),s.dispatchEvent(e),e.defaultPrevented||x3(t??document.body,{select:!0}),s.removeEventListener(m3,u),w3.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=b3(e),n=v3(t,e),r=v3(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&x3(o,{select:!0})):(e.preventDefault(),n&&x3(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return rg.jsx(f3.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function b3(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 v3(e,t){for(const n of e)if(!k3(n,{upTo:t}))return n}function k3(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 x3(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()}}y3.displayName="FocusScope";var w3=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=E3(e,t),e.unshift(t)},remove(t){var n;e=E3(e,t),null==(n=e[0])||n.resume()}}}();function E3(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var _3=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return rg.jsx(e3.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:rg.jsx("polygon",{points:"0,0 30,0 15,10"})})}));_3.displayName="Arrow";var S3=_3;function T3(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 rg.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}\``)}]},C3(r,...t)]}function C3(...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 A3="Popper",[N3,I3]=T3(A3),[O3,R3]=N3(A3),P3=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return rg.jsx(O3,{scope:t,anchor:r,onAnchorChange:a,children:n})};P3.displayName=A3;var L3="PopperAnchor",D3=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=R3(L3,n),i=X.useRef(null),s=B5(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:rg.jsx(e3.div,{...a,ref:s})}));D3.displayName=L3;var M3="PopperContent",[F3,j3]=N3(M3),z3=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=R3(M3,l),[E,_]=X.useState(null),S=B5(t,(e=>_(e))),[T,C]=X.useState(null),A=function(e){const[t,n]=X.useState(void 0);return zO((()=>{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),N=(null==A?void 0:A.width)??0,I=(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($3),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=aQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>VX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[oQ({mainAxis:u+I,alignmentAxis:p}),h&&iQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?sQ():void 0,...D}),h&&lQ({...D}),cQ({...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&&dQ({element:T,padding:f}),V3({arrowWidth:N,arrowHeight:I}),b&&uQ({strategy:"referenceHidden",...D})]}),[H,U]=G3(j),$=t3(k);zO((()=>{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 zO((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),rg.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:rg.jsx(F3,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:rg.jsx(e3.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));z3.displayName=M3;var B3="PopperArrow",H3={top:"bottom",right:"left",bottom:"top",left:"right"},U3=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=j3(B3,n),o=H3[a.placedSide];return rg.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:rg.jsx(S3,{...r,ref:t,style:{...r.style,display:"block"}})})}));function $3(e){return null!==e}U3.displayName=B3;var V3=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]=G3(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 G3(e){const[t,n="center"]=e.split("-");return[t,n]}var q3=P3,W3=D3,Y3=z3,Z3=U3,K3=X.forwardRef(((e,t)=>{var n;const{container:r,...a}=e,[o,i]=X.useState(!1);zO((()=>i(!0)),[]);const s=r||o&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?de.createPortal(rg.jsx(f3.div,{...a,ref:t}),s):null}));K3.displayName="Portal";const X3=[" ","Enter","ArrowUp","ArrowDown"],Q3=[" ","Enter"],J3="Select",[e4,t4,n4]=function(e){const t=e+"CollectionProvider",[n,r]=M5(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 rg.jsx(a,{scope:t,itemMap:o,collectionRef:r,children:n})};i.displayName=t;const s=e+"CollectionSlot",l=V5(s),c=Q.forwardRef(((e,t)=>{const{scope:n,children:r}=e,a=B5(t,o(s,n).collectionRef);return rg.jsx(l,{ref:a,children:r})}));c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=V5(u),f=Q.forwardRef(((e,t)=>{const{scope:n,children:r,...a}=e,i=Q.useRef(null),s=B5(t,i),l=o(u,n);return Q.useEffect((()=>(l.itemMap.set(i,{ref:i,...a}),()=>{l.itemMap.delete(i)}))),rg.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]}(J3),[r4]=M5(J3,[n4,I3]),a4=I3(),[o4,i4]=r4(J3),[s4,l4]=r4(J3),c4=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=a4(t),[f,h]=X.useState(null),[m,g]=X.useState(null),[y,b]=X.useState(!1),v=Z5(c),[k,x]=WZ({prop:r,defaultProp:a??!1,onChange:o,caller:J3}),[w,E]=WZ({prop:i,defaultProp:s,onChange:l,caller:J3}),_=X.useRef(null),[S,T]=X.useState(new Set);return rg.jsx(q3,{...p,children:rg.jsx(o4,{required:d,scope:t,trigger:f,onTriggerChange:h,valueNode:m,onValueNodeChange:g,valueNodeHasChildren:y,onValueNodeHasChildrenChange:b,contentId:UO(),value:w,onValueChange:E,open:!!k,onOpenChange:x,dir:v,triggerPointerDownPosRef:_,disabled:u,children:rg.jsx(e4.Provider,{scope:t,children:rg.jsx(s4,{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})})})})};c4.displayName=J3;const u4="SelectTrigger",d4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=a4(n),i=i4(u4,n),s=i.disabled||r,l=B5(t,i.onTriggerChange),c=t4(n),u=X.useRef("touch"),[d,p,f]=G4((e=>{const t=c().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=q4(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 rg.jsx(W3,{asChild:!0,...o,children:rg.jsx(f3.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":V4(i.value)?"":void 0,...a,ref:l,onClick:D5(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==u.current&&h(e)})),onPointerDown:D5(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:D5(a.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||X3.includes(e.key)&&(h(),e.preventDefault())}))})})}));d4.displayName=u4;const p4="SelectValue",f4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...s}=e,l=i4(p4,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==o,d=B5(t,l.onValueNodeChange);return zO((()=>{c(u)}),[c,u]),rg.jsx(f3.span,{...s,ref:d,style:{pointerEvents:"none"},children:V4(l.value)?rg.jsx(rg.Fragment,{children:i}):o})}));f4.displayName=p4;const h4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return rg.jsx(f3.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})}));h4.displayName="SelectIcon";const m4="SelectContent",g4=X.forwardRef(((e,t)=>{const n=i4(m4,e.__scopeSelect),[r,a]=X.useState();if(zO((()=>{a(new DocumentFragment)}),[]),!n.open){const t=r;return t?ue.createPortal(rg.jsx(b4,{scope:e.__scopeSelect,children:rg.jsx(e4.Slot,{scope:e.__scopeSelect,children:rg.jsx("div",{children:e.children})})}),t):null}return rg.jsx(x4,{...e,ref:t})}));g4.displayName=m4;const y4=10,[b4,v4]=r4(m4),k4=V5("SelectContent.RemoveScroll"),x4=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=i4(m4,n),[v,k]=X.useState(null),[x,w]=X.useState(null),E=B5(t,(e=>k(e))),[_,S]=X.useState(null),[T,C]=X.useState(null),A=t4(n),[N,I]=X.useState(!1),O=X.useRef(!1);X.useEffect((()=>{if(v)return U1(v)}),[v]),d3();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((()=>{N&&P()}),[N,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]=G4((e=>{const t=A().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=q4(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?E4:w4,U=H===E4?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g}:{};return rg.jsx(b4,{scope:n,content:v,viewport:x,onViewportChange:w,itemRefCallback:j,selectedItem:_,onItemLeave:z,itemTextRefCallback:B,focusSelectedItem:P,selectedItemText:T,position:r,isPositioned:N,searchRef:M,children:rg.jsx(C2,{as:k4,allowPinchZoom:!0,removeScrollBar:!1,children:rg.jsx(y3,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:D5(a,(e=>{var t;null==(t=b.trigger)||t.focus({preventScroll:!0}),e.preventDefault()})),children:rg.jsx(s3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:rg.jsx(H,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...U,onPlaced:()=>I(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:D5(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()}}))})})})})})}));x4.displayName="SelectContentImpl";const w4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=i4(m4,n),i=v4(m4,n),[s,l]=X.useState(null),[c,u]=X.useState(null),d=B5(t,(e=>u(e))),p=t4(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-y4,d=L5(o,[y4,Math.max(y4,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-y4,d=L5(o,[y4,Math.max(y4,u-c)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=p(),l=window.innerHeight-2*y4,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-y4,T=l-S,C=g.offsetHeight/2,A=h+b+(g.offsetTop+C),N=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)+N;s.style.height=t+"px",m.scrollTop=A-S+m.offsetTop}s.style.margin=`${y4}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]);zO((()=>v()),[v]);const[k,x]=X.useState();zO((()=>{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 rg.jsx(_4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:f,onScrollButtonChange:w,children:rg.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:rg.jsx(f3.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));w4.displayName="SelectItemAlignedPosition";const E4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=y4,...o}=e,i=a4(n);return rg.jsx(Y3,{...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)"}})}));E4.displayName="SelectPopperPosition";const[_4,S4]=r4(m4,{}),T4="SelectViewport",C4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=v4(T4,n),i=S4(T4,n),s=B5(t,o.onViewportChange),l=X.useRef(0);return rg.jsxs(rg.Fragment,{children:[rg.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}),rg.jsx(e4.Slot,{scope:n,children:rg.jsx(f3.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:D5(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*y4,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}))})})]})}));C4.displayName=T4;const A4="SelectGroup",[N4,I4]=r4(A4);X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=UO();return rg.jsx(N4,{scope:n,id:a,children:rg.jsx(f3.div,{role:"group","aria-labelledby":a,...r,ref:t})})})).displayName=A4;const O4="SelectLabel";X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=I4(O4,n);return rg.jsx(f3.div,{id:a.id,...r,ref:t})})).displayName=O4;const R4="SelectItem",[P4,L4]=r4(R4),D4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,s=i4(R4,n),l=v4(R4,n),c=s.value===r,[u,d]=X.useState(o??""),[p,f]=X.useState(!1),h=B5(t,(e=>{var t;return null==(t=l.itemRefCallback)?void 0:t.call(l,e,r,a)})),m=UO(),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 rg.jsx(P4,{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:rg.jsx(e4.ItemSlot,{scope:n,value:r,disabled:a,textValue:u,children:rg.jsx(f3.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:D5(i.onFocus,(()=>f(!0))),onBlur:D5(i.onBlur,(()=>f(!1))),onClick:D5(i.onClick,(()=>{"mouse"!==g.current&&y()})),onPointerUp:D5(i.onPointerUp,(()=>{"mouse"===g.current&&y()})),onPointerDown:D5(i.onPointerDown,(e=>{g.current=e.pointerType})),onPointerMove:D5(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:D5(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null==(t=l.onItemLeave)||t.call(l))})),onKeyDown:D5(i.onKeyDown,(e=>{var t;""!==(null==(t=l.searchRef)?void 0:t.current)&&" "===e.key||(Q3.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));D4.displayName=R4;const M4="SelectItemText",F4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=i4(M4,n),s=v4(M4,n),l=L4(M4,n),c=l4(M4,n),[u,d]=X.useState(null),p=B5(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((()=>rg.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value)),[l.disabled,l.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return zO((()=>(m(h),()=>g(h))),[m,g,h]),rg.jsxs(rg.Fragment,{children:[rg.jsx(f3.span,{id:l.textId,...o,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ue.createPortal(o.children,i.valueNode):null]})}));F4.displayName=M4;const j4="SelectItemIndicator",z4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return L4(j4,n).isSelected?rg.jsx(f3.span,{"aria-hidden":!0,...r,ref:t}):null}));z4.displayName=j4;const B4="SelectScrollUpButton";X.forwardRef(((e,t)=>{const n=v4(B4,e.__scopeSelect),r=S4(B4,e.__scopeSelect),[a,o]=X.useState(!1),i=B5(t,r.onScrollButtonChange);return zO((()=>{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?rg.jsx(U4,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null})).displayName=B4;const H4="SelectScrollDownButton";X.forwardRef(((e,t)=>{const n=v4(H4,e.__scopeSelect),r=S4(H4,e.__scopeSelect),[a,o]=X.useState(!1),i=B5(t,r.onScrollButtonChange);return zO((()=>{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?rg.jsx(U4,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null})).displayName=H4;const U4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=v4("SelectScrollButton",n),i=X.useRef(null),s=t4(n),l=X.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return X.useEffect((()=>()=>l()),[l]),zO((()=>{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]),rg.jsx(f3.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:D5(a.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:D5(a.onPointerMove,(()=>{var e;null==(e=o.onItemLeave)||e.call(o),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:D5(a.onPointerLeave,(()=>{l()}))})}));X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return rg.jsx(f3.div,{"aria-hidden":!0,...r,ref:t})})).displayName="SelectSeparator";const $4="SelectArrow";function V4(e){return""===e||void 0===e}function G4(e){const t=t3(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 q4(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=a4(n),o=i4($4,n),i=v4($4,n);return o.open&&"popper"===i.position?rg.jsx(Z3,{...a,...r,ref:t}):null})).displayName=$4;const W4=c4,Y4=d4,Z4=f4,K4=h4,X4=g4,Q4=C4,J4=D4,e6=F4,t6=z4;var n6=(e,t=[])=>({parts:(...n)=>{if(a6(t))return n6(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>n6(e,[...t,...n]),omit:(...n)=>n6(e,t.filter((e=>!n.includes(e)))),rename:e=>n6(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${r6(e)}"][data-part="${r6(n)}"]`,`& [data-scope="${r6(e)}"][data-part="${r6(n)}"]`].join(", "),attrs:{"data-scope":r6(e),"data-part":r6(n)}}})),{})}),r6=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),a6=e=>0===e.length,o6=n6("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger").build(),i6=Object.defineProperty,s6=(e,t,n)=>((e,t,n)=>t in e?i6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),l6={itemToValue:e=>"string"==typeof e?e:Gq(e)&&Wq(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:Gq(e)&&Wq(e,"label")?e.label:l6.itemToValue(e),isItemDisabled:e=>!(!Gq(e)||!Wq(e,"disabled"))&&!!e.disabled},c6=class e{constructor(t){this.options=t,s6(this,"items"),s6(this,"indexMap",null),s6(this,"copy",(t=>new e({...this.options,items:t??[...this.items]}))),s6(this,"isEqual",(e=>$q(this.items,e.items))),s6(this,"setItems",(e=>this.copy(e))),s6(this,"getValues",((e=this.items)=>{const t=[];for(const n of e){const e=this.getItemValue(n);null!=e&&t.push(e)}return t})),s6(this,"find",(e=>{if(null==e)return null;const t=this.indexOf(e);return-1!==t?this.at(t):null})),s6(this,"findMany",(e=>{const t=[];for(const n of e){const e=this.find(n);null!=e&&t.push(e)}return t})),s6(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})),s6(this,"sortFn",((e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0))),s6(this,"sort",(e=>[...e].sort(this.sortFn.bind(this)))),s6(this,"getItemValue",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToValue)?void 0:n.call(t,e))??l6.itemToValue(e)})),s6(this,"getItemDisabled",(e=>{var t,n;return null!=e&&((null==(n=(t=this.options).isItemDisabled)?void 0:n.call(t,e))??l6.isItemDisabled(e))})),s6(this,"stringifyItem",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToString)?void 0:n.call(t,e))??l6.itemToString(e)})),s6(this,"stringify",(e=>null==e?null:this.stringifyItem(this.find(e)))),s6(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)})),s6(this,"stringifyMany",((e,t)=>this.stringifyItems(this.findMany(e),t))),s6(this,"has",(e=>-1!==this.indexOf(e))),s6(this,"hasItem",(e=>null!=e&&this.has(this.getItemValue(e)))),s6(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})),s6(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))})),s6(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))})),s6(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})),s6(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)&&u6(this.stringifyItem(o),e)))return o}})),s6(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})),s6(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)])})),s6(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)])})),s6(this,"insert",((e,...t)=>this.copy(d6(this.items,e,...t)))),s6(this,"insertBefore",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(d6(this.items,n,...t))})),s6(this,"insertAfter",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(d6(this.items,n+1,...t))})),s6(this,"prepend",((...e)=>this.copy(d6(this.items,0,...e)))),s6(this,"append",((...e)=>this.copy(d6(this.items,this.items.length,...e)))),s6(this,"filter",(e=>{const t=this.items.filter(((t,n)=>e(this.stringifyItem(t),n,t)));return this.copy(t)})),s6(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)})))})),s6(this,"move",((e,t)=>{const n=this.indexOf(e);return-1===n?this:this.copy(p6(this.items,[n],t))})),s6(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(p6(this.items,r,n))})),s6(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(p6(this.items,r,n+1))})),s6(this,"reorder",((e,t)=>this.copy(p6(this.items,[e],t)))),s6(this,"compareValue",((e,t)=>{const n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:n>r?1:0})),s6(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[]})),s6(this,"getValueRange",((e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[])),s6(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})),s6(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}},u6=(e,t)=>!!(null==e?void 0:e.toLowerCase().startsWith(t.toLowerCase()));function d6(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function p6(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 f6({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 h6({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 m6({values:e,collection:t,selectedItemMap:n}){const r=f6({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:h6({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function g6({selectedItems:e,collection:t}){return h6({selectedItemMap:new Map,values:e.map((e=>t.getItemValue(e))).filter(Boolean),selectedItems:e,collection:t})}var y6=e=>new c6(e);function b6(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 v6(e,t){return{contextElement:AW(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 b6();const{x:t,y:n,width:r,height:a}=e;return b6(t,n,r,a)}(r):n.getBoundingClientRect()}}}y6.empty=()=>new c6({items:[]});var k6=e=>({variable:e,reference:`var(${e})`}),x6={arrowSize:k6("--arrow-size"),arrowSizeHalf:k6("--arrow-size-half"),arrowBg:k6("--arrow-background"),transformOrigin:k6("--transform-origin"),arrowOffset:k6("--arrow-offset")};function w6(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(x6.transformOrigin.variable,A?C:T),{data:{transformOrigin:A?C:T}}}}}var E6={name:"rects",fn:({rects:e})=>({data:e})},_6=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% + ${x6.arrowOffset.reference})`}),{}}}};var S6={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 T6(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function C6(e,t){return null!=e&&Math.abs(e-t)<.5}function A6(e){return"function"==typeof e?e():"clipping-ancestors"===e?"clippingAncestors":e}function N6(e,t,n){const r=e||t.createElement("div");return KX({element:r,padding:n.arrowPadding})}function I6(e,t){if(null!=(t.offset??t.gutter))return GX((({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 nW({crossAxis:(null==(a=t.offset)?void 0:a.crossAxis)??c,mainAxis:s,alignmentAxis:t.shift})}))}function O6(e){if(!e.flip)return;const t=A6(e.boundary);return WX({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:!0===e.flip?void 0:e.flip})}function R6(e){if(!e.slide&&!e.overlap)return;const t=A6(e.boundary);return qX({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:XX()})}function P6(e){if(!1===e.sizeMiddleware&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,a;return YX({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),C6(t,c)||(l.style.setProperty("--reference-width",`${c}px`),t=c),C6(n,u)||(l.style.setProperty("--reference-height",`${u}px`),n=u),C6(r,s)||(l.style.setProperty("--available-width",`${s}px`),r=s),C6(a,i)||(l.style.setProperty("--available-height",`${i}px`),a=i)}})}function L6(e){if(e.hideWhenDetached)return ZX({strategy:"referenceHidden",boundary:A6(e.boundary)??"clippingAncestors"})}var D6=["transform","visibility","pointer-events","--x","--y","--z-index","--reference-width","--reference-height","--available-width","--available-height","--transform-origin"],M6=["top","right","bottom","left"];function F6(e,t){if(!e)return Jq;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 j6(e,t,n={}){const{defer:r,...a}=n,o=r?_Y: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=v6((null==(r=n.getAnchorElement)?void 0:r.call(n))??e,n.getAnchorRect);if(!t||!a)return;const o=Object.assign({},S6,n),i=t.querySelector("[data-part=arrow]"),s=o.restoreStyles?F6(t,D6):void 0,l=o.restoreStyles?F6(i,M6):void 0,c=[I6(i,o),O6(o),R6(o),N6(i,t.ownerDocument,o),_6(i),w6({gutter:o.gutter,offset:o.offset,overlap:o.overlap},i),P6(o),L6(o),E6],{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 QX(a,t,{placement:u,middleware:c,strategy:d});null==p||p(n);const r=jW(t),i=T6(r,n.x),s=T6(r,n.y);if(t.style.transform=`translate3d(${i}px, ${s}px, 0)`,C6(h,i)||(t.style.setProperty("--x",`${i}px`),h=i),C6(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",$W(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?VX(a,t,b,v):Jq;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 z6={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};var B6=e=>{var t;return(null==(t=e.ids)?void 0:t.label)??`combobox:${e.id}:label`},H6=e=>{var t;return(null==(t=e.ids)?void 0:t.control)??`combobox:${e.id}:control`},U6=e=>{var t;return(null==(t=e.ids)?void 0:t.input)??`combobox:${e.id}:input`},$6=e=>{var t;return(null==(t=e.ids)?void 0:t.content)??`combobox:${e.id}:content`},V6=e=>{var t;return(null==(t=e.ids)?void 0:t.positioner)??`combobox:${e.id}:popper`},G6=e=>{var t;return(null==(t=e.ids)?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},q6=e=>{var t;return(null==(t=e.ids)?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},W6=(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}`},Y6=(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}`},Z6=(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}`},K6=e=>e.getById($6(e)),X6=e=>e.getById(U6(e)),Q6=e=>e.getById(V6(e)),J6=e=>e.getById(H6(e)),e8=e=>e.getById(G6(e)),t8=(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}(K6(e),n)},n8=e=>{const t=X6(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0}),EW(t)};function r8(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:x6.arrowSize.reference,height:x6.arrowSize.reference,[x6.arrowSizeHalf.variable]:`calc(${x6.arrowSize.reference} / 2)`,[x6.arrowOffset.variable]:`calc(${x6.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?z6[t.split("-")[0]]:void 0,background:x6.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 oW(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=X6(i))||e.focus()},setOpen(e,t="script"){a.hasTag("open")!==e&&o({type:e?"OPEN":"CLOSE",src:t})},getRootProps(){return t.element({...o6.root.attrs,dir:r("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.root)??`combobox:${e.id}`),"data-invalid":TW(f),"data-readonly":TW(m)});var e,n},getLabelProps:()=>t.label({...o6.label.attrs,dir:r("dir"),htmlFor:U6(i),id:B6(i),"data-readonly":TW(m),"data-disabled":TW(d),"data-invalid":TW(f),"data-required":TW(h),"data-focus":TW(y),onClick(e){var t;b||(e.preventDefault(),null==(t=e8(i))||t.focus({preventScroll:!0}))}}),getControlProps:()=>t.element({...o6.control.attrs,dir:r("dir"),id:H6(i),"data-state":g?"open":"closed","data-focus":TW(y),"data-disabled":TW(d),"data-invalid":TW(f)}),getPositionerProps:()=>t.element({...o6.positioner.attrs,dir:r("dir"),id:V6(i),style:k.floating}),getInputProps:()=>t.input({...o6.input.attrs,dir:r("dir"),"aria-invalid":CW(f),"data-invalid":TW(f),"data-autofocus":TW(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:U6(i),type:"text",role:"combobox",defaultValue:n.get("inputValue"),"aria-autocomplete":s("autoComplete")?"both":"list","aria-controls":$6(i),"aria-expanded":g,"data-state":g?"open":"closed","aria-activedescendant":v?Z6(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=t8(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()}}[cY(e,{dir:r("dir")})];null==l||l(e)}}),getTriggerProps:(e={})=>t.button({...o6.trigger.attrs,dir:r("dir"),id:G6(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?$6(i):void 0,disabled:d,"data-invalid":TW(f),"data-focusable":TW(e.focusable),"data-readonly":TW(m),"data-disabled":TW(d),onFocus(){e.focusable&&o({type:"INPUT.FOCUS",src:"trigger"})},onClick(e){e.defaultPrevented||p&&oY(e)&&o({type:"TRIGGER.CLICK",src:"trigger-click"})},onPointerDown(e){p&&"touch"!==e.pointerType&&oY(e)&&(e.preventDefault(),queueMicrotask((()=>{n8(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"})}}[cY(e,{dir:r("dir")})];t&&(t(e),e.preventDefault())}}),getContentProps:()=>t.element({...o6.content.attrs,dir:r("dir"),id:$6(i),role:b?"listbox":"dialog",tabIndex:-1,hidden:!g,"data-state":g?"open":"closed","data-placement":n.get("currentPlacement"),"aria-labelledby":B6(i),"aria-multiselectable":!(!r("multiple")||!b)||void 0,"data-empty":TW(0===u.size),onPointerDown(e){oY(e)&&e.preventDefault()}}),getListProps:()=>t.element({...o6.list.attrs,role:b?void 0:"listbox","data-empty":TW(0===u.size),"aria-labelledby":B6(i),"aria-multiselectable":!(!r("multiple")||b)||void 0}),getClearTriggerProps:()=>t.button({...o6.clearTrigger.attrs,dir:r("dir"),id:q6(i),type:"button",tabIndex:-1,disabled:d,"data-invalid":TW(f),"aria-label":c.clearTriggerLabel,"aria-controls":U6(i),hidden:!n.get("value").length,onPointerDown(e){oY(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({...o6.item.attrs,dir:r("dir"),id:Z6(i,a),role:"option",tabIndex:-1,"data-highlighted":TW(n.highlighted),"data-state":n.selected?"checked":"unchecked","aria-selected":CW(n.selected),"aria-disabled":CW(n.disabled),"data-disabled":TW(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)||rY(e)||iY(e)||n.disabled||o({type:"ITEM.CLICK",src:"item-select",value:a})}})},getItemTextProps(e){const n=x(e);return t.element({...o6.itemText.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked","data-disabled":TW(n.disabled),"data-highlighted":TW(n.highlighted)})},getItemIndicatorProps(e){const n=x(e);return t.element({"aria-hidden":!0,...o6.itemIndicator.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked",hidden:!n.selected})},getItemGroupProps(e){const{id:n}=e;return t.element({...o6.itemGroup.attrs,dir:r("dir"),id:W6(i,n),"aria-labelledby":Y6(i,n),"data-empty":TW(0===u.size),role:"group"})},getItemGroupLabelProps(e){const{htmlFor:n}=e;return t.element({...o6.itemGroupLabel.attrs,dir:r("dir"),id:Y6(i,n),role:"presentation"})}}}var a8="pointerdown.outside",o8="focus.outside";function i8(e){for(const t of e)if(AW(t)&&vY(t))return!0;return!1}var s8=e=>"clientY"in e;function l8(e,t){if(!t||!s8(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 c8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:a,onInteractOutside:o,defer:i,followControlledElements:s=!0}=t;if(!e)return;const l=FW(e),c=jW(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(!AW(r))return!1;if(!r.isConnected)return!1;if(MW(e,r))return!1;if(function(e,t){if(!s8(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&&WW(e,r))return!1;const a=l.querySelector(`[aria-controls="${e.id}"]`);if(a){if(l8(t,AY(a)))return!1}return!l8(t,AY(e))&&!(null==n?void 0:n(r))}const f=new Set,h=RW(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&&!JW()?_Y: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]:nY(t);if(e&&p(t,n)){if(a||o){const t=eW(a,o);e.addEventListener(a8,t,{once:!0})}d8(e,a8,{bubbles:!1,cancelable:!0,detail:{originalEvent:l,contextmenu:iY(l),focusable:i8(c),target:n}})}}))}l.addEventListener("pointerup",n,{once:!0}),c.addEventListener("pointerup",n,{once:!0}),"touch"===t.pointerType?(f.forEach((e=>e())),f.add(uY(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(uY(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?_Y: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]:nY(t);if(e&&p(t,i)){if(r||o){const t=eW(r,o);e.addEventListener(o8,t,{once:!0})}d8(e,o8,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:vY(i),target:i}})}}))}return JW()||(y.add(uY(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 u8(e,t){const{defer:n}=t,r=n?_Y:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(c8(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function d8(e,t,n){const r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function p8(e,t){return uY(FW(e),"keydown",(e=>{"Escape"===e.key&&(e.isComposing||null==t||t(e))}),{capture:!0})}var f8,h8="layer:request-dismiss",m8={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=>MW(e.node,t)))||this.recentlyRemoved.size>0},isInBranch(e){return Array.from(this.branches).some((t=>MW(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),SY((()=>this.recentlyRemoved.delete(e))),t<this.count()-1){this.getNestedLayers(e).forEach((t=>m8.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=h8,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,h8,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function g8(){m8.layers.forEach((({node:e})=>{e.style.pointerEvents=m8.isBelowPointerBlockingLayer(e)?"none":"auto"}))}function y8(e,t){const n=FW(e),r=[];return m8.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(f8=document.body.style.pointerEvents,queueMicrotask((()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")}))),null==t||t.forEach((e=>{const[t,n]=LY((()=>{const t=e();return AW(t)?t:null}),{timeout:1e3});t.then((e=>r.push(PY(e,{pointerEvents:"auto"})))),r.push(n)})),()=>{m8.hasPointerBlockingLayer()||(queueMicrotask((()=>{n.body.style.pointerEvents=f8,n.body.removeAttribute("data-inert"),0===n.body.style.length&&n.body.removeAttribute("style")})),r.forEach((e=>e())))}}function b8(e,t){const{defer:n}=t,r=n?_Y:e=>e(),a=[];return a.push(r((()=>{const n=qq(e)?e():e;a.push(function(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e)return void rW("[@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};m8.add(c),g8();const u=[o?y8(e,t.persistentElements):void 0,p8(e,(function(n){var a;m8.isTopMost(e)&&(null==(a=t.onEscapeKeyDown)||a.call(t,n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))})),u8(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(AW);return s&&o.push(...s),o.some((e=>MW(e,n)))||m8.isInNestedLayer(e,n)},onFocusOutside:function(e){var n,a;const o=nY(e.detail.originalEvent);m8.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=nY(n.detail.originalEvent);m8.isBelowPointerBlockingLayer(e)||m8.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()=>{m8.remove(e),g8(),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 v8=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);var k8=null,x8=new Set,w8=new Map,E8=!1,_8=!1,S8={Tab:!0,Escape:!0};function T8(e,t){for(let n of x8)n(e,t)}function C8(e){E8=!0,function(e){return!(e.metaKey||!tY()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(k8="keyboard",T8("keyboard",e))}function A8(e){k8="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(E8=!0,T8("pointer",e))}function N8(e){aY(e)&&(E8=!0,k8="virtual")}function I8(e){const t=nY(e);t!==jW(t)&&t!==FW(t)&&e.isTrusted&&(E8||_8||(k8="virtual",T8("virtual",e)),E8=!1,_8=!1)}function O8(){E8=!1,_8=!0}var R8=(e,t)=>{const n=jW(e),r=FW(e),a=w8.get(n);if(a){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:a.focus})}catch{}r.removeEventListener("keydown",C8,!0),r.removeEventListener("keyup",C8,!0),r.removeEventListener("click",N8,!0),n.removeEventListener("focus",I8,!0),n.removeEventListener("blur",O8,!1),void 0!==n.PointerEvent?(r.removeEventListener("pointerdown",A8,!0),r.removeEventListener("pointermove",A8,!0),r.removeEventListener("pointerup",A8,!0)):(r.removeEventListener("mousedown",A8,!0),r.removeEventListener("mousemove",A8,!0),r.removeEventListener("mouseup",A8,!0)),w8.delete(n)}};function P8(){return"keyboard"===k8||"virtual"===k8}function L8(e={}){const{isTextInput:t,autoFocus:n,onChange:r,root:a}=e;!function(e){if("undefined"==typeof window||w8.get(jW(e)))return;const t=jW(e),n=FW(e);let r=t.HTMLElement.prototype.focus;try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:function(){E8=!0,r.apply(this,arguments)}})}catch{}n.addEventListener("keydown",C8,!0),n.addEventListener("keyup",C8,!0),n.addEventListener("click",N8,!0),t.addEventListener("focus",I8,!0),t.addEventListener("blur",O8,!1),void 0!==t.PointerEvent?(n.addEventListener("pointerdown",A8,!0),n.addEventListener("pointermove",A8,!0),n.addEventListener("pointerup",A8,!0)):(n.addEventListener("mousedown",A8,!0),n.addEventListener("mousemove",A8,!0),n.addEventListener("mouseup",A8,!0)),t.addEventListener("beforeunload",(()=>{R8(e)}),{once:!0}),w8.set(t,{focus:r})}(a),null==r||r({isFocusVisible:n||P8(),modality:k8});const o=(e,n)=>{(function(e,t,n){const r=n?nY(n):null,a=FW(r),o=jW(r),i=zW(a);return!((e=e||i instanceof o.HTMLInputElement&&!v8.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(S8,n.key))})(!!t,e,n)&&(null==r||r({isFocusVisible:P8(),modality:e}))};return x8.add(o),()=>{x8.delete(o)}}var{guards:D8,createMachine:M8,choose:F8}={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=>bW(e),choose:e=>function({choose:t}){var n;return null==(n=t(e))?void 0:n.actions}},{and:j8,not:z8}=D8,B8=M8({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}){CY(e)},collection:y6.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:$q,hash:e=>e.join(","),onChange(t){var r;const a=n(),o=e("collection"),i=m6({values:t,collection:o,selectedItemMap:a.get("selectedItemMap")}),s=e("value")??t,l=s===t?i:m6({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=tW(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:g6({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})=>f6({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:F8([{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:j8("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:j8("isCustomValue",z8("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:j8("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:j8("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:j8("isOpenControlled","isCustomValue",z8("hasHighlightedItem"),z8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:j8("isCustomValue",z8("hasHighlightedItem"),z8("allowCustomValue")),target:"closed.focused",actions:["revertInputValue","invokeOnClose"]},{guard:j8("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"ITEM.CLICK":[{guard:j8("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:j8("isOpenControlled","isCustomValue",z8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:j8("isCustomValue",z8("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:j8("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:j8("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:j8("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:j8("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 L8({root:null==(t=e.getRootNode)?void 0:t.call(e)})},trackDismissableLayer({send:e,prop:t,scope:n}){if(t("disableLayer"))return;return b8((()=>K6(n)),{type:"listbox",defer:!0,exclude:()=>{return[X6(n),e8(n),(e=n,e.getById(q6(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),j6((()=>J6(n)||e8(n)),(()=>Q6(n)),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})),scrollToHighlightedItem({context:e,prop:t,scope:n}){const r=X6(n);let a=[];const o=r=>{if("pointer"===k8)return;const o=e.get("highlightedValue");if(!o)return;const i=K6(n),s=t("scrollToIndexFn");if(s){return void s({index:t("collection").indexOf(o),immediate:r,getElement:()=>t8(n,o)})}const l=t8(n,o),c=_Y((()=>{RY(l,{rootEl:i,block:"nearest"})}));a.push(c)},i=_Y((()=>{var e;k8=e="virtual",T8(e,null),o(!0)}));a.push(i);const s=TY(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}){j6((()=>J6(n)),(()=>Q6(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")?Hq(n.get("value"),o):[o];null==(t=r("onSelect"))||t({value:i,itemValue:o}),n.set("value",i);const s=tW(r("selectionBehavior"),{preserve:n.get("inputValue"),replace:a.stringifyMany(i),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){SY((()=>{const r=e.get("highlightedValue");if(null==r)return;const a=t8(n,r),o=K6(n),i=t("scrollToIndexFn");if(i){i({index:t("collection").indexOf(r),immediate:!0,getElement:()=>t8(n,r)})}else RY(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")?Hq(t.get("value"),n.value):[n.value];null==(e=a("onSelect"))||e({value:r,itemValue:n.value}),t.set("value",r);const o=tW(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=Bq(t.get("value"),n.value);t.set("value",e);const r=tW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(e),clear:""});t.set("inputValue",r)}))},setInitialFocus({scope:e}){_Y((()=>{n8(e)}))},setFinalFocus({scope:e}){_Y((()=>{const t=e8(e);null==(null==t?void 0:t.dataset.focusable)?n8(e):(e=>{const t=e8(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0})})(e)}))},syncInputValue({context:e,scope:t,event:n}){const r=X6(t);r&&(r.value=e.get("inputValue"),queueMicrotask((()=>{"INPUT.CHANGE"!==n.current().type&&EW(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=tW(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=tW(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=tW(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:()=>t8(t,r)})}else{const e=K6(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){var r;const a=H8(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=H8(t);null==(r=e("onOpenChange"))||r({open:!1,reason:a,value:n.get("value")})},highlightFirstItem({context:e,prop:t,scope:n}){(K6(n)?queueMicrotask:_Y)((()=>{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}){(K6(n)?queueMicrotask:_Y)((()=>{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}){_Y((()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)}))},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){_Y((()=>{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}){_Y((()=>{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=X6(a),i=n("collection");if(!t("autoComplete")||!o||!r.keypress)return;const s=i.stringify(e.get("highlightedValue"));_Y((()=>{o.value=s||e.get("inputValue")}))},syncSelectedItems(e){queueMicrotask((()=>{const{context:t,prop:n}=e,r=n("collection"),a=t.get("value"),o=m6({values:a,collection:r,selectedItemMap:t.get("selectedItemMap")});t.set("selectedItemMap",o.nextSelectedItemMap);const i=tW(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 H8(e){return(e.previousEvent||e).src}const U8=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=VO(),[m,g]=X.useState(a),y=X.useMemo((()=>y6({items:m,itemToValue:e=>e.value,itemToString:e=>e.label})),[m]),b=r8(jY(B8,{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)}}),UY),v=X.useMemo((()=>({api:b,options:m})),[b,m]),k=b.getRootProps();return rg.jsx("div",{"data-scope":"combobox","data-part":"root",...k,children:rg.jsx(n9.Provider,{value:v,children:n})})}));U8.displayName="ComboboxRoot";const $8=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=r9(),o=a.getControlProps();return rg.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:V8(t,o.ref),...r,children:n})}));function V8(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))}}$8.displayName="ComboboxControl";const G8=X.forwardRef(((e,t)=>{const n=r9(),r=n.getInputProps();return rg.jsx("input",{"data-scope":"combobox","data-part":"input","data-state":n.open?"open":"closed",...r,...e,ref:V8(t,r.ref)})}));G8.displayName="ComboboxInput";const q8=X.forwardRef(((e,t)=>{const n=r9(),r=n.getTriggerProps();return rg.jsx("button",{type:"button","data-scope":"combobox","data-part":"trigger","data-state":n.open?"open":"closed","data-disabled":n.disabled?"":void 0,...r,ref:V8(t,r.ref),...e,children:e.children??"▼"})}));q8.displayName="ComboboxTrigger";const W8=X.forwardRef((function(e,t){const n=r9();return rg.jsx("div",{ref:t,...n.getPositionerProps(),...e})})),Y8=X.forwardRef(((e,t)=>{const n=r9(),r=n.getContentProps();return rg.jsx("div",{"data-scope":"combobox","data-part":"content","data-state":n.open?"open":"closed",...r,ref:V8(t,r.ref),...e,children:e.children})}));Y8.displayName="ComboboxContent";const Z8=X.forwardRef(((e,t)=>{const n=r9().getListProps();return rg.jsx("div",{ref:V8(t,n.ref),"data-scope":"combobox","data-part":"list",...n,...e,children:e.children})}));Z8.displayName="ComboboxList";const K8=({children:e})=>{const t=function(){const e=X.useContext(n9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.options}();return rg.jsx(rg.Fragment,{children:e(t)})};K8.displayName="ComboboxListItems";const X8=X.forwardRef(((e,t)=>{const{children:n="No results found",...r}=e;return rg.jsx("div",{ref:t,"data-scope":"combobox","data-part":"list-empty",...r,children:n})}));X8.displayName="ComboboxListEmpty";const Q8=X.createContext(null),J8=X.forwardRef(((e,t)=>{const{item:n,...r}=e,a=r9(),o=a.getItemState({item:n}),i=a.getItemProps({item:n});return rg.jsx(Q8.Provider,{value:n,children:rg.jsx("div",{ref:V8(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})})}));J8.displayName="ComboboxItem";const e9=X.forwardRef(((e,t)=>{const n=X.useContext(Q8),r=r9(),a=n?r.getItemTextProps({item:n}):{};return rg.jsx("span",{ref:V8(t,a.ref),"data-scope":"combobox","data-part":"item-text",...a,...e})}));e9.displayName="ComboboxItemText";const t9=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.useContext(Q8),o=r9(),i=a?o.getItemState({item:a}):{selected:!1},s=a?o.getItemIndicatorProps({item:a}):{};return i.selected?rg.jsx("span",{ref:V8(t,s.ref),"data-scope":"combobox","data-part":"item-indicator","data-state":"checked","aria-hidden":!0,...s,...r,children:n??rg.jsx(DG,{iconSettings:{builtIn:"LuCheck"}})}):null}));t9.displayName="ComboboxItemIndicator";const n9=X.createContext(null);function r9(){const e=X.useContext(n9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.api}const a9=X.forwardRef(((e,t)=>{const n=r9(),r=n.selectedItems??[],a=n.clearValue;return 0===r.length?null:rg.jsx("div",{ref:t,"data-scope":"combobox","data-part":"selected-tags",className:e.className,style:e.style,children:r.map((t=>rg.jsxs("span",{"data-scope":"combobox","data-part":"tag",children:[e.renderTag?e.renderTag(t):t.label,rg.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:rg.jsx(DG,{iconSettings:{builtIn:"IoCloseOutline"}})})]},t.value)))})}));a9.displayName="ComboboxSelectedTags";var o9=Object.defineProperty,i9=(e,t,n)=>((e,t,n)=>t in e?o9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),s9={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()}},l9=[],c9=class{constructor(e,t){i9(this,"trapStack"),i9(this,"config"),i9(this,"doc"),i9(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),i9(this,"portalContainers",new Set),i9(this,"listenerCleanups",[]),i9(this,"handleFocus",(e=>{const t=nY(e),n=this.findContainerIndex(t,e)>=0;if(n||NW(t))n&&(this.state.mostRecentlyFocusedNode=t);else{let t;e.stopImmediatePropagation();let n=!0;if(this.state.mostRecentlyFocusedNode)if(wY(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=>wY(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})),i9(this,"handlePointerDown",(e=>{const t=nY(e);this.findContainerIndex(t,e)>=0||(h9(this.config.clickOutsideDeactivates,e)?this.deactivate({returnFocus:this.config.returnFocusOnDeactivate}):h9(this.config.allowOutsideClick,e)||e.preventDefault())})),i9(this,"handleClick",(e=>{const t=nY(e);this.findContainerIndex(t,e)>=0||h9(this.config.clickOutsideDeactivates,e)||h9(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())})),i9(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;d9(e)&&e.preventDefault(),this.tryFocus(n)}})),i9(this,"handleEscapeKey",(e=>{m9(e)&&!1!==h9(this.config.escapeDeactivates,e)&&(e.preventDefault(),this.deactivate())})),i9(this,"_mutationObserver"),i9(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))))&&ZW(t)}))))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())}))})),i9(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)})))})),i9(this,"getInitialFocusNode",(()=>{let e=this.getNodeForOption("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!vY(e)){const t=zW(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})),i9(this,"tryFocus",(e=>{!1!==e&&e!==zW(this.doc)&&(e&&e.focus?(e.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=e,y9(e)&&e.select()):this.tryFocus(this.getInitialFocusNode()))})),i9(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(),s9.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=()=>{g9((()=>{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})),i9(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})),i9(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})),i9(this,"updateContainerElements",(e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this))),i9(this,"getReturnFocusNode",(e=>{const t=this.getNodeForOption("setReturnFocus",{params:[e]});return t||!1!==t&&e})),i9(this,"getOption",((e,t,n)=>e&&void 0!==e[t]?e[t]:this.config[n||t])),i9(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(eNe){throw new Error(`\`${e}\` appears to be an invalid selector; error="${eNe.message}"`)}if(!a&&!t)throw new Error(`\`${e}\` as selector refers to no known node`)}return a})),i9(this,"findNextNavNode",(e=>{const{event:t,isBackward:n=!1}=e,r=e.target||nY(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||vY(r)&&!xY(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=wY(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else d9(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||vY(r)&&!xY(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=wY(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else d9(t)||(a=null==o?void 0:o.nextTabbableNode(r))}}else a=this.getNodeForOption("fallbackFocus");return a})),this.trapStack=t.trapStack||l9;const n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:p9,isKeyBackward:f9,...t};this.doc=n.document||FW(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=>{YW(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&&WW(e,t)}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map((e=>{const t=kY(e,{getShadowRoot:this.config.getShadowRoot}),n=bY(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(wY(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(xY(n[t]))return n[t]}else for(let t=o-1;t>=0;t--)if(xY(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 s9.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?g9((()=>{this.tryFocus(this.getInitialFocusNode())})):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(uY(this.doc,"focusin",this.handleFocus,!0),uY(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),uY(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),uY(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),uY(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),uY(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=zW(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)}},u9=e=>"keydown"===(null==e?void 0:e.type),d9=e=>u9(e)&&"Tab"===(null==e?void 0:e.key),p9=e=>u9(e)&&"Tab"===e.key&&!(null==e?void 0:e.shiftKey),f9=e=>u9(e)&&"Tab"===e.key&&(null==e?void 0:e.shiftKey),h9=(e,...t)=>"function"==typeof e?e(...t):e,m9=e=>!e.isComposing&&"Escape"===e.key,g9=e=>setTimeout(e,0),y9=e=>"input"===e.localName&&"select"in e&&"function"==typeof e.select;var b9=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=v9(r.current);o.current="mounted"===s?e:"none"}),[s]),zO((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=v9(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]),zO((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=v9(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=v9(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=B5(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 v9(e){return(null==e?void 0:e.animationName)||"none"}b9.displayName="Presence";var k9="data-scroll-lock";function x9(e){const t=$W(e),n=null==t?void 0:t.scrollbarGutter;return"stable"===n||!0===(null==n?void 0:n.startsWith("stable "))}function w9(e){const t=e??document,n=t.defaultView??window,{documentElement:r,body:a}=t;if(a.hasAttribute(k9))return;const o=x9(r)||x9(a),i=n.innerWidth-r.clientWidth;a.setAttribute(k9,"");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 _W;const r=e.style.getPropertyValue(t);return r===n?_W:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),0===e.style.length&&e.removeAttribute("style")})}(r,"--scrollbar-width",`${i}px`),eY()?(()=>{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=PY(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`),PY(a,e)})()];return()=>{l.forEach((e=>null==e?void 0:e())),a.removeAttribute(k9)}}const E9="Dialog",[_9]=M5(E9),[S9,T9]=_9(E9),C9=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]=WZ({prop:r,defaultProp:a??!1,onChange:o});return rg.jsx(S9,{scope:t,triggerRef:s,contentRef:l,contentId:UO(),titleId:UO(),descriptionId:UO(),open:c,onOpenChange:u,onOpenToggle:X.useCallback((()=>u((e=>!e))),[u]),modal:i,children:n})};C9.displayName=E9;const A9="DialogTrigger";X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=T9(A9,n),o=B5(t,a.triggerRef);return rg.jsx(f3.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":q9(a.open),...r,ref:o,onClick:D5(e.onClick,a.onOpenToggle)})})).displayName=A9;const N9="DialogPortal",[I9,O9]=_9(N9,{forceMount:void 0}),R9=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=T9(N9,t);return rg.jsx(I9,{scope:t,forceMount:n,children:X.Children.map(r,(e=>rg.jsx(b9,{present:n||o.open,children:rg.jsx(K3,{asChild:!0,container:a,children:e})})))})};R9.displayName=N9;const P9="DialogOverlay",L9=X.forwardRef(((e,t)=>{const n=O9(P9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=T9(P9,e.__scopeDialog);return o.modal?rg.jsx(b9,{present:r||o.open,children:rg.jsx(D9,{...a,ref:t})}):null}));L9.displayName=P9;const D9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=T9(P9,n),o=VO();return X.useEffect((()=>{var e;return w9((null==(e=null==o?void 0:o.rootElement)?void 0:e.ownerDocument)??document)}),[o]),rg.jsx(f3.div,{"data-dialog-overlay":"","data-state":q9(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})),M9="DialogContent",F9=X.forwardRef(((e,t)=>{const n=O9(M9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=T9(M9,e.__scopeDialog);return rg.jsx(b9,{present:r||o.open,children:o.modal?rg.jsx(j9,{...a,ref:t}):rg.jsx(z9,{...a,ref:t})})}));F9.displayName=M9;const j9=X.forwardRef(((e,t)=>{const n=T9(M9,e.__scopeDialog),r=X.useRef(null),a=B5(t,n.contentRef,r);return X.useEffect((()=>{const e=r.current;if(e){const t=document.querySelectorAll("[data-ikp-component]");return U1([e,...Array.from(t)])}}),[]),rg.jsx(B9,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onPointerDownOutside:D5(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:D5(e.onFocusOutside,(e=>e.preventDefault()))})})),z9=X.forwardRef(((e,t)=>{const n=T9(M9,e.__scopeDialog),r=X.useRef(!1),a=X.useRef(!1);return rg.jsx(B9,{...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()}})})),B9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=T9(M9,n),l=X.useRef(null),c=B5(t,l);return d3(),X.useEffect((()=>{if(r)return function(e,t={}){let n;const r=_Y((()=>{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 c9(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a,...t,document:FW(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]")}})}),[]),rg.jsx(s3,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":q9(s.open),...i,ref:c,onDismiss:()=>s.onOpenChange(!1)})})),H9="DialogTitle",U9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=T9(H9,n);return rg.jsx(f3.h2,{id:a.titleId,...r,ref:t})}));U9.displayName=H9;const $9="DialogDescription";X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=T9($9,n);return rg.jsx(f3.p,{id:a.descriptionId,...r,ref:t})})).displayName=$9;const V9="DialogClose",G9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=T9(V9,n);return rg.jsx(f3.button,{type:"button",...r,ref:t,onClick:D5(e.onClick,(()=>a.onOpenChange(!1)))})}));function q9(e){return e?"open":"closed"}G9.displayName=V9;const W9=C9,Y9=R9,Z9=L9,K9=F9,X9=U9,Q9=G9,J9=X.forwardRef(((e,t)=>{const n=X.useId();return rg.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:"100%",width:"100%",ref:t,...e,children:[rg.jsx("title",{children:"AI Avatar"}),rg.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"}),rg.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"}),rg.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"}),rg.jsxs("defs",{children:[rg.jsxs("linearGradient",{id:`${n}-stroke1`,x1:"0.149625",y1:"0.148102",x2:"23.8539",y2:"23.8524",gradientUnits:"userSpaceOnUse",children:[rg.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),rg.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),rg.jsxs("linearGradient",{id:`${n}-stroke2`,x1:"16.537",y1:"1.53728",x2:"22.463",y2:"7.46321",gradientUnits:"userSpaceOnUse",children:[rg.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),rg.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),rg.jsxs("linearGradient",{id:`${n}-stroke3`,x1:"1.53704",y1:"16.5373",x2:"7.46296",y2:"22.4632",gradientUnits:"userSpaceOnUse",children:[rg.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),rg.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]})]})]})})),e7=X.forwardRef(((e,t)=>rg.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"32px",viewBox:"0 96 960 960",width:"32px",ref:t,...e,children:[rg.jsx("title",{children:"User Avatar"}),rg.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"})]}))),t7=X.forwardRef((({isExternal:e,...t},n)=>rg.jsx("a",{target:e?"_blank":void 0,rel:e?"noopener":void 0,...t,ref:n})));t7.displayName="Link";const n7=X.forwardRef((({href:e,appendToUrl:t,...n},r)=>{const{baseSettings:a}=rR(),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 rg.jsx(t7,{ref:r,href:i,...n})}));function r7(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 a7(e,t){const n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}n7.displayName="LinkWithQueryParams";const o7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,i7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s7={};function l7(e,t){return(s7.jsx?i7:o7).test(e)}const c7=/[ \t\n\f\r]/g;function u7(e){return""===e.replace(c7,"")}class d7{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function p7(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new d7(n,r,t)}function f7(e){return e.toLowerCase()}d7.prototype.normal={},d7.prototype.property={},d7.prototype.space=void 0;class h7{constructor(e,t){this.attribute=t,this.property=e}}h7.prototype.attribute="",h7.prototype.booleanish=!1,h7.prototype.boolean=!1,h7.prototype.commaOrSpaceSeparated=!1,h7.prototype.commaSeparated=!1,h7.prototype.defined=!1,h7.prototype.mustUseProperty=!1,h7.prototype.number=!1,h7.prototype.overloadedBoolean=!1,h7.prototype.property="",h7.prototype.spaceSeparated=!1,h7.prototype.space=void 0;let m7=0;const g7=E7(),y7=E7(),b7=E7(),v7=E7(),k7=E7(),x7=E7(),w7=E7();function E7(){return 2**++m7}const _7=Object.freeze(Object.defineProperty({__proto__:null,boolean:g7,booleanish:y7,commaOrSpaceSeparated:w7,commaSeparated:x7,number:v7,overloadedBoolean:b7,spaceSeparated:k7},Symbol.toStringTag,{value:"Module"})),S7=Object.keys(_7);class T7 extends h7{constructor(e,t,n,r){let a=-1;if(super(e,t),C7(this,"space",r),"number"==typeof n)for(;++a<S7.length;){const e=S7[a];C7(this,S7[a],(n&_7[e])===_7[e])}}}function C7(e,t,n){n&&(e[t]=n)}function A7(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new T7(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[f7(r)]=r,n[f7(o.attribute)]=r}return new d7(t,n,e.space)}T7.prototype.defined=!0;const N7=A7({properties:{ariaActiveDescendant:null,ariaAtomic:y7,ariaAutoComplete:null,ariaBusy:y7,ariaChecked:y7,ariaColCount:v7,ariaColIndex:v7,ariaColSpan:v7,ariaControls:k7,ariaCurrent:null,ariaDescribedBy:k7,ariaDetails:null,ariaDisabled:y7,ariaDropEffect:k7,ariaErrorMessage:null,ariaExpanded:y7,ariaFlowTo:k7,ariaGrabbed:y7,ariaHasPopup:null,ariaHidden:y7,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:k7,ariaLevel:v7,ariaLive:null,ariaModal:y7,ariaMultiLine:y7,ariaMultiSelectable:y7,ariaOrientation:null,ariaOwns:k7,ariaPlaceholder:null,ariaPosInSet:v7,ariaPressed:y7,ariaReadOnly:y7,ariaRelevant:null,ariaRequired:y7,ariaRoleDescription:k7,ariaRowCount:v7,ariaRowIndex:v7,ariaRowSpan:v7,ariaSelected:y7,ariaSetSize:v7,ariaSort:null,ariaValueMax:v7,ariaValueMin:v7,ariaValueNow:v7,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function I7(e,t){return t in e?e[t]:t}function O7(e,t){return I7(e,t.toLowerCase())}const R7=A7({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:x7,acceptCharset:k7,accessKey:k7,action:null,allow:null,allowFullScreen:g7,allowPaymentRequest:g7,allowUserMedia:g7,alt:null,as:null,async:g7,autoCapitalize:null,autoComplete:k7,autoFocus:g7,autoPlay:g7,blocking:k7,capture:null,charSet:null,checked:g7,cite:null,className:k7,cols:v7,colSpan:null,content:null,contentEditable:y7,controls:g7,controlsList:k7,coords:v7|x7,crossOrigin:null,data:null,dateTime:null,decoding:null,default:g7,defer:g7,dir:null,dirName:null,disabled:g7,download:b7,draggable:y7,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:g7,formTarget:null,headers:k7,height:v7,hidden:b7,high:v7,href:null,hrefLang:null,htmlFor:k7,httpEquiv:k7,id:null,imageSizes:null,imageSrcSet:null,inert:g7,inputMode:null,integrity:null,is:null,isMap:g7,itemId:null,itemProp:k7,itemRef:k7,itemScope:g7,itemType:k7,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:g7,low:v7,manifest:null,max:null,maxLength:v7,media:null,method:null,min:null,minLength:v7,multiple:g7,muted:g7,name:null,nonce:null,noModule:g7,noValidate:g7,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:g7,optimum:v7,pattern:null,ping:k7,placeholder:null,playsInline:g7,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:g7,referrerPolicy:null,rel:k7,required:g7,reversed:g7,rows:v7,rowSpan:v7,sandbox:k7,scope:null,scoped:g7,seamless:g7,selected:g7,shadowRootClonable:g7,shadowRootDelegatesFocus:g7,shadowRootMode:null,shape:null,size:v7,sizes:null,slot:null,span:v7,spellCheck:y7,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v7,step:null,style:null,tabIndex:v7,target:null,title:null,translate:null,type:null,typeMustMatch:g7,useMap:null,value:y7,width:v7,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:k7,axis:null,background:null,bgColor:null,border:v7,borderColor:null,bottomMargin:v7,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:g7,declare:g7,event:null,face:null,frame:null,frameBorder:null,hSpace:v7,leftMargin:v7,link:null,longDesc:null,lowSrc:null,marginHeight:v7,marginWidth:v7,noResize:g7,noHref:g7,noShade:g7,noWrap:g7,object:null,profile:null,prompt:null,rev:null,rightMargin:v7,rules:null,scheme:null,scrolling:y7,standby:null,summary:null,text:null,topMargin:v7,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v7,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:g7,disableRemotePlayback:g7,prefix:null,property:null,results:v7,security:null,unselectable:null},space:"html",transform:O7}),P7=A7({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:w7,accentHeight:v7,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v7,amplitude:v7,arabicForm:null,ascent:v7,attributeName:null,attributeType:null,azimuth:v7,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v7,by:null,calcMode:null,capHeight:v7,className:k7,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:v7,diffuseConstant:v7,direction:null,display:null,dur:null,divisor:v7,dominantBaseline:null,download:g7,dx:null,dy:null,edgeMode:null,editable:null,elevation:v7,enableBackground:null,end:null,event:null,exponent:v7,externalResourcesRequired:null,fill:null,fillOpacity:v7,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:x7,g2:x7,glyphName:x7,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v7,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v7,horizOriginX:v7,horizOriginY:v7,id:null,ideographic:v7,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v7,k:v7,k1:v7,k2:v7,k3:v7,k4:v7,kernelMatrix:w7,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v7,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:v7,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:v7,overlineThickness:v7,paintOrder:null,panose1:null,path:null,pathLength:v7,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:k7,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v7,pointsAtY:v7,pointsAtZ:v7,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:w7,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:w7,rev:w7,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:w7,requiredFeatures:w7,requiredFonts:w7,requiredFormats:w7,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:v7,specularExponent:v7,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v7,strikethroughThickness:v7,string:null,stroke:null,strokeDashArray:w7,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v7,strokeOpacity:v7,strokeWidth:null,style:null,surfaceScale:v7,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:w7,tabIndex:v7,tableValues:null,target:null,targetX:v7,targetY:v7,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:w7,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:v7,underlineThickness:v7,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v7,values:null,vAlphabetic:v7,vMathematical:v7,vectorEffect:null,vHanging:v7,vIdeographic:v7,version:null,vertAdvY:v7,vertOriginX:v7,vertOriginY:v7,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v7,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:I7}),L7=A7({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()}),D7=A7({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:O7}),M7=A7({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),F7={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"},j7=/[A-Z]/g,z7=/-[a-z]/g,B7=/^data[-\w.:]+$/i;function H7(e,t){const n=f7(t);let r=t,a=h7;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&B7.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(z7,$7);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!z7.test(e)){let n=e.replace(j7,U7);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=T7}return new a(r,t)}function U7(e){return"-"+e.toLowerCase()}function $7(e){return e.charAt(1).toUpperCase()}const V7=p7([N7,R7,L7,D7,M7],"html"),G7=p7([N7,P7,L7,D7,M7],"svg");function q7(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function W7(e){return e.join(" ").trim()}var Y7={},Z7=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,K7=/\n/g,X7=/^\s*/,Q7=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,J7=/^:\s*/,eee=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,tee=/^[;\s]*/,nee=/^\s+|\s+$/g,ree="";function aee(e){return e?e.replace(nee,ree):ree}var oee=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(K7);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(X7)}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;ree!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,ree===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(Q7);if(t){if(d(),!l(J7))return s("property missing ':'");var n=l(eee),r=e({type:"declaration",property:aee(t[0].replace(Z7,ree)),value:n?aee(n[0].replace(Z7,ree)):ree});return l(tee),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}()},iee=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Y7,"__esModule",{value:!0}),Y7.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,see.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 see=iee(oee);var lee={};Object.defineProperty(lee,"__esModule",{value:!0}),lee.camelCase=void 0;var cee=/^--[a-zA-Z0-9_-]+$/,uee=/-([a-z])/g,dee=/^[^-]+$/,pee=/^-(webkit|moz|ms|o|khtml)-/,fee=/^-(ms)-/,hee=function(e,t){return t.toUpperCase()},mee=function(e,t){return"".concat(t,"-")};lee.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||dee.test(e)||cee.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(fee,mee):e.replace(pee,mee)).replace(uee,hee))};var gee=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},yee=gee(Y7),bee=lee;function vee(e,t){var n={};return e&&"string"==typeof e?((0,yee.default)(e,(function(e,r){e&&r&&(n[(0,bee.camelCase)(e,t)]=r)})),n):n}vee.default=vee;const kee=l(vee),xee=Eee("end"),wee=Eee("start");function Eee(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 _ee(e){return e&&"object"==typeof e?"position"in e||"type"in e?Tee(e.position):"start"in e||"end"in e?Tee(e):"line"in e||"column"in e?See(e):"":""}function See(e){return Cee(e&&e.line)+":"+Cee(e&&e.column)}function Tee(e){return See(e&&e.start)+"-"+See(e&&e.end)}function Cee(e){return e&&"number"==typeof e?e:1}class Aee 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=_ee(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}}Aee.prototype.file="",Aee.prototype.name="",Aee.prototype.reason="",Aee.prototype.message="",Aee.prototype.stack="",Aee.prototype.column=void 0,Aee.prototype.line=void 0,Aee.prototype.ancestors=void 0,Aee.prototype.cause=void 0,Aee.prototype.fatal=void 0,Aee.prototype.place=void 0,Aee.prototype.ruleId=void 0,Aee.prototype.source=void 0;const Nee={}.hasOwnProperty,Iee=new Map,Oee=/[A-Z]/g,Ree=new Set(["table","tbody","thead","tfoot","tr"]),Pee=new Set(["td","th"]),Lee="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Dee(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=wee(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?G7:V7,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=Mee(a,e,void 0);return o&&"string"!=typeof o?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Mee(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=G7,e.schema=a);e.ancestors.push(t);const o=Hee(e,t.tagName,!1),i=function(e,t){const n={};let r,a;for(a in t.properties)if("children"!==a&&Nee.call(t.properties,a)){const o=Bee(e,a,t.properties[a]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&"align"===a&&"string"==typeof i&&Pee.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=zee(e,t);Ree.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&u7(t.value):u7(t));var t})));return Fee(e,i,o,t),jee(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)}Uee(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=G7,e.schema=a);e.ancestors.push(t);const o=null===t.name?e.Fragment:Hee(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 Uee(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 Uee(e,t.position);else o=null===r.value||r.value;n[a]=o}return n}(e,t),s=zee(e,t);return Fee(e,i,o,t),jee(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);Uee(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return jee(r,zee(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 Fee(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function jee(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function zee(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Iee;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=Mee(e,o,i);void 0!==s&&n.push(s)}return n}function Bee(e,t,n){const r=H7(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?a7(n):W7(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return kee(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Aee("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=Lee+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Nee.call(e,n)&&(t[$ee(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?F7[r.property]||r.property:r.attribute,n]}}function Hee(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,a=-1;for(;++a<e.length;){const t=l7(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=l7(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 Nee.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Uee(e)}function Uee(e,t){const n=new Aee("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=Lee+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $ee(e){let t=e.replace(Oee,Vee);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Vee(e){return"-"+e.toLowerCase()}const Gee={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"]},qee={};function Wee(e,t){return Yee(e,"boolean"!=typeof qee.includeImageAlt||qee.includeImageAlt,"boolean"!=typeof qee.includeHtml||qee.includeHtml)}function Yee(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 Zee(e.children,t,n)}return Array.isArray(e)?Zee(e,t,n):""}function Zee(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=Yee(e[a],t,n);return r.join("")}const Kee=document.createElement("i");function Xee(e){const t="&"+e+";";Kee.innerHTML=t;const n=Kee.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Qee(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 Jee(e,t){return e.length>0?(Qee(e,e.length,0,t),e):t}const ete={}.hasOwnProperty;function tte(e){const t={};let n=-1;for(;++n<e.length;)nte(t,e[n]);return t}function nte(e,t){let n;for(n in t){const r=(ete.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){ete.call(r,o)||(r[o]=[]);const e=a[o];rte(r[o],Array.isArray(e)?e:e?[e]:[])}}}function rte(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Qee(e,0,0,r)}function ate(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 ote(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ite=bte(/[A-Za-z]/),ste=bte(/[\dA-Za-z]/),lte=bte(/[#-'*+\--9=?A-Z^-~]/);function cte(e){return null!==e&&(e<32||127===e)}const ute=bte(/\d/),dte=bte(/[\dA-Fa-f]/),pte=bte(/[!-/:-@[-`{-~]/);function fte(e){return null!==e&&e<-2}function hte(e){return null!==e&&(e<0||32===e)}function mte(e){return-2===e||-1===e||32===e}const gte=bte(new RegExp("\\p{P}|\\p{S}","u")),yte=bte(/\s/);function bte(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function vte(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(37===o&&ste(e.charCodeAt(n+1))&&ste(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 kte(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(mte(r))return e.enter(n),i(r);return t(r)};function i(r){return mte(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}const xte={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"),kte(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)):fte(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}};const wte={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 Qee(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(Ete,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(Ete,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)):fte(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++;Qee(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}}},Ete={tokenize:function(e,t,n){return kte(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function _te(e){return null===e||hte(e)||yte(e)?1:gte(e)?2:void 0}function Ste(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 Tte={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};Cte(d,-s),Cte(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=Jee(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Jee(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=Jee(l,Ste(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Jee(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=Jee(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Qee(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=_te(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=_te(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 Cte(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ate={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 ite(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||ste(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||ste(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||cte(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):lte(t)?(e.consume(t),l):n(t)}function c(e){return ste(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||ste(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Nte={partial:!0,tokenize:function(e,t,n){return function(t){return mte(t)?kte(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||fte(e)?t(e):n(e)}}};const Ite={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(mte(t))return kte(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(r){return e.attempt(Ite,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 mte(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Ote={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 pte(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Rte={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=ste,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=dte,c):(e.enter("characterReferenceValue"),a=7,o=ute,c(t))}function c(s){if(59===s&&i){const a=e.exit("characterReferenceValue");return o!==ste||Xee(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 Pte={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)}}},Lte={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"),mte(t)?kte(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"),mte(t)?kte(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||fte(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"),mte(t)?kte(e,c,"whitespace")(t):c(t))}function c(n){return null===n||fte(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Pte,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||fte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):mte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),kte(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||fte(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||fte(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&&mte(t)?kte(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||fte(t)?e.check(Pte,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||fte(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const Dte={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),kte(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):fte(t)?e.attempt(Mte,o,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||fte(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},Mte={partial:!0,tokenize:function(e,t,n){const r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):fte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):kte(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):fte(e)?a(e):n(e)}}};const Fte={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)):fte(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||fte(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 jte{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&&zte(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),zte(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),zte(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);zte(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);zte(this.left,t.reverse())}}}function zte(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 Bte(e){const t={};let n,r,a,o,i,s,l,c=-1;const u=new jte(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,Hte(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 Qee(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Hte(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 Ute={resolve:function(e){return Bte(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):fte(t)?e.check($te,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}}},$te={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"),kte(e,a,"linePrefix")};function a(a){if(null===a||fte(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 Vte(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||cte(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||fte(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&&!hte(a)?u<c&&40===a?(e.consume(a),u++,h):41===a?(e.consume(a),u--,h):null===a||32===a||40===a||cte(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 Gte(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):fte(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||fte(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!mte(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function qte(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):fte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),kte(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||fte(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 Wte(e,t){let n;return function r(a){if(fte(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r;if(mte(a))return kte(e,r,n?"linePrefix":"lineSuffix")(a);return t(a)}}const Yte={name:"definition",tokenize:function(e,t,n){const r=this;let a;return function(t){return e.enter("definition"),function(t){return Gte.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return a=ote(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 hte(t)?Wte(e,s)(t):s(t)}function s(t){return Vte(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Zte,c,c)(t)}function c(t){return mte(t)?kte(e,u,"whitespace")(t):u(t)}function u(o){return null===o||fte(o)?(e.exit("definition"),r.parser.defined.push(a),t(o)):n(o)}}},Zte={partial:!0,tokenize:function(e,t,n){return function(t){return hte(t)?Wte(e,r)(t):n(t)};function r(t){return qte(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return mte(t)?kte(e,o,"whitespace")(t):o(t)}function o(e){return null===e||fte(e)?t(e):n(e)}}};const Kte={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return fte(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Xte={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"},Qee(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||hte(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||fte(n)?(e.exit("atxHeading"),t(n)):mte(n)?kte(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||hte(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}};const Qte=["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"],Jte=["pre","script","style","textarea"],ene={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):ite(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):ite(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 ite(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||hte(s)){const l=47===s,c=i.toLowerCase();return l||o||!Jte.includes(c)?Qte.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||ste(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 mte(t)?(e.consume(t),g):_(t)}function y(t){return 47===t?(e.consume(t),_):58===t||95===t||ite(t)?(e.consume(t),b):mte(t)?(e.consume(t),y):_(t)}function b(t){return 45===t||46===t||58===t||95===t||ste(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),k):mte(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):mte(t)?(e.consume(t),k):w(t)}function x(t){return t===l?(e.consume(t),l=null,E):null===t||fte(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||hte(t)?v(t):(e.consume(t),w)}function E(e){return 47===e||62===e||mte(e)?y(e):n(e)}function _(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||fte(t)?T(t):mte(t)?(e.consume(t),S):n(t)}function T(t){return 45===t&&2===a?(e.consume(t),I):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):!fte(t)||6!==a&&7!==a?null===t||fte(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(tne,M,C)(t))}function C(t){return e.check(nne,A,M)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||fte(t)?C(t):(e.enter("htmlFlowData"),T(t))}function I(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 Jte.includes(n)?(e.consume(t),D):T(t)}return ite(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||fte(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},tne={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Nte,t,n)}}},nne={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(fte(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 rne={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):ite(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):ite(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):fte(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):fte(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):fte(t)?(i=y,R(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):fte(t)?(i=b,R(t)):(e.consume(t),b)}function v(e){return 62===e?O(e):b(e)}function k(t){return ite(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||ste(t)?(e.consume(t),x):w(t)}function w(t){return fte(t)?(i=w,R(t)):mte(t)?(e.consume(t),w):O(t)}function E(t){return 45===t||ste(t)?(e.consume(t),E):47===t||62===t||hte(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),O):58===t||95===t||ite(t)?(e.consume(t),S):fte(t)?(i=_,R(t)):mte(t)?(e.consume(t),_):O(t)}function S(t){return 45===t||46===t||58===t||95===t||ste(t)?(e.consume(t),S):T(t)}function T(t){return 61===t?(e.consume(t),C):fte(t)?(i=T,R(t)):mte(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):fte(t)?(i=C,R(t)):mte(t)?(e.consume(t),C):(e.consume(t),N)}function A(t){return t===a?(e.consume(t),a=void 0,I):null===t?n(t):fte(t)?(i=A,R(t)):(e.consume(t),A)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||hte(t)?_(t):(e.consume(t),N)}function I(e){return 47===e||62===e||hte(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 mte(t)?kte(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 ane={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&&Qee(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=Jee(o,e.slice(r+1,r+s+3)),o=Jee(o,[["enter",u,t]]),o=Jee(o,Ste(t.parser.constructs.insideSpan.null,e.slice(r+s+4,a-3),t)),o=Jee(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=Jee(o,e.slice(a+1)),o=Jee(o,[["exit",l,t]]),Qee(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(ote(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(one,c,o?c:u)(t):91===t?e.attempt(ine,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(sne,c,u)(t)}function c(e){return t(e)}function u(e){return a._balanced=!0,n(e)}}},one={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 hte(t)?Wte(e,a)(t):a(t)}function a(t){return 41===t?c(t):Vte(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return hte(t)?Wte(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?qte(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return hte(t)?Wte(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)}}},ine={tokenize:function(e,t,n){const r=this;return function(t){return Gte.call(r,e,a,o,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(ote(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},sne={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 lne={name:"labelStartImage",resolveAll:ane.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 cne={name:"labelStartLink",resolveAll:ane.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 une={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),kte(e,t,"linePrefix")}}};const dne={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||fte(o))?(e.exit("thematicBreak"),t(o)):n(o)}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),mte(t)?kte(e,o,"whitespace")(t):o(t))}}};const pne={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Nte,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,kte(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){if(r.containerState.furtherBlankLines||!mte(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(hne,t,a)(n)}));function a(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,kte(e,e.attempt(pne,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:ute(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(dne,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 ute(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(Nte,r.interrupt?n:c,e.attempt(fne,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return mte(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)}}},fne={partial:!0,tokenize:function(e,t,n){const r=this;return kte(e,(function(e){const a=r.events[r.events.length-1];return!mte(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},hne={partial:!0,tokenize:function(e,t,n){const r=this;return kte(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 mne={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"),mte(t)?kte(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||fte(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const gne={tokenize:function(e){const t=this,n=e.attempt(Nte,(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,kte(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Ute,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 yne={resolveAll:xne()},bne=kne("string"),vne=kne("text");function kne(e){return{resolveAll:xne("text"===e?wne: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 xne(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 wne(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 Ene={42:pne,43:pne,45:pne,48:pne,49:pne,50:pne,51:pne,52:pne,53:pne,54:pne,55:pne,56:pne,57:pne,62:Ite},_ne={91:Yte},Sne={[-2]:Dte,[-1]:Dte,32:Dte},Tne={35:Xte,42:dne,45:[mne,dne],60:ene,61:mne,95:dne,96:Lte,126:Lte},Cne={38:Rte,92:Ote},Ane={[-5]:une,[-4]:une,[-3]:une,33:lne,38:Rte,42:Tte,60:[Ate,rne],91:cne,92:[Kte,Ote],93:ane,95:Tte,96:Fte},Nne={null:[Tte,yne]},Ine=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:_ne,disable:{null:[]},document:Ene,flow:Tne,flowInitial:Sne,insideSpan:Nne,string:Cne,text:Ane},Symbol.toStringTag,{value:"Module"}));function One(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){fte(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=Jee(i,e),f(),null!==i[i.length-1])return[];return y(t,0),c.events=Ste(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&&Qee(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 Rne=/[\0\t\n\r]/g;const Pne=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Lne(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return ate(n.slice(t?2:1),t?16:10)}return Xee(n)||e}const Dne={}.hasOwnProperty;function Mne(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(N),htmlFlowData:T,htmlText:l(I),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()}};jne(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]];Dne.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]||Bne).call(o,void 0,e[0])}for(r.position={start:Fne(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Fne(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:Fne(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+"` ("+_ee({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]||Bne).call(this,e,r[0])}n.position.end=Fne(e.end)}function u(){return Wee(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=ote(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:Fne(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=Fne(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=Fne(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 N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function 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(Pne,Lne)}(t),n.identifier=ote(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=ote(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=ate(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Xee(t)}this.stack[this.stack.length-1].value+=r}function $(e){this.stack.pop().position.end=Fne(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(;!Bte(e););return e}(function(e){const t={constructs:tte([Ine,...(e||{}).extensions||[]]),content:n(xte),defined:[],document:n(wte),flow:n(gne),lazy:{},string:n(bne),text:n(vne)};return t;function n(e){return function(n){return One(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(Rne.lastIndex=u,l=Rne.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 Fne(e){return{line:e.line,column:e.column,offset:e.offset}}function jne(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jne(e,r):zne(e,r)}}function zne(e,t){let n;for(n in t)if(Dne.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 Bne(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+_ee({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_ee({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+_ee({start:t.start,end:t.end})+") is still open")}function Hne(e){const t=this;t.parser=function(n){return Mne(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Une(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 $ne(e){const t=e.spread;return null==t?e.children.length>1:t}function Vne(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(Gne(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(Gne(t.slice(a),a>0,!1)),o.join("")}function Gne(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 qne={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=vte(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 Une(e,t);const a={src:vte(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:vte(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 Une(e,t);const a={href:vte(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:vte(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=$ne(n[r])}return t}(n):$ne(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=wee(t.children[1]),i=xee(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:Vne(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:Wne,yaml:Wne,definition:Wne,footnoteDefinition:Wne};function Wne(){}const Yne="object"==typeof self?self:globalThis,Zne=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 Yne[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 Yne[o](i),a)};return r})(new Map,e)(0),Kne="",{toString:Xne}={},{keys:Qne}=Object,Jne=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Xne.call(e).slice(8,-1);switch(n){case"Array":return[1,Kne];case"Object":return[2,Kne];case"Date":return[3,Kne];case"RegExp":return[4,Kne];case"Map":return[5,Kne];case"Set":return[6,Kne];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},ere=([e,t])=>0===e&&("function"===t||"symbol"===t),tre=(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]=Jne(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 Qne(r))!e&&ere(Jne(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||!ere(Jne(a))&&!ere(Jne(i)))&&t.push([o(a),o(i)]);return n}case 6:{const t=[],n=a([i,t],r);for(const a of r)!e&&ere(Jne(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},nre="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Zne(tre(e,t)):structuredClone(e):(e,t)=>Zne(tre(e,t));function rre(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 are(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const ore=function(e){if(null==e)return sre;if("function"==typeof e)return ire(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ore(e[n]);return ire(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 ire(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 ire(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function ire(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 sre(){return!0}const lre=[],cre=!0,ure=!1;function dre(e,t,n,r){let a;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):a=t;const o=ore(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=lre;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[cre,e];return null==e?lre:[e]}(n(a,l)),p[0]===ure))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]===ure)return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function pre(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),dre(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 fre={}.hasOwnProperty,hre={};function mre(e,t){e.position&&(t.position=function(e){const t=wee(e),n=xee(e);if(t&&n)return{start:t,end:n}}(e))}function gre(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,nre(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function yre(e,t){const n=t.data||{},r=!("value"in t)||fre.call(n,"hProperties")||fre.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 bre(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 vre(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function kre(e,t){const n=function(e,t){const n=t||hre,r=new Map,a=new Map,o=new Map,i={...qne,...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=vre(a.value)),!Array.isArray(a)&&"element"===a.type)){const e=a.children[0];e&&"text"===e.type&&(e.value=vre(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:gre,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(fre.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=nre(n);return r.children=s.all(e),r}return nre(e)}return(s.options.unknownHandler||yre)(s,e,t)},options:n,patch:mre,wrap:bre};return pre(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||rre,r=e.options.footnoteBackLabel||are,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=vte(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:{...nre(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 xre(e,t){return e&&"run"in e?async function(n,r){const a=kre(n,{file:r,...t});await e.run(a,r)}:function(n,r){return kre(n,{file:r,...e||t})}}function wre(e){if(e)throw e}var Ere=Object.prototype.hasOwnProperty,_re=Object.prototype.toString,Sre=Object.defineProperty,Tre=Object.getOwnPropertyDescriptor,Cre=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===_re.call(e)},Are=function(e){if(!e||"[object Object]"!==_re.call(e))return!1;var t,n=Ere.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Ere.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Ere.call(e,t)},Nre=function(e,t){Sre&&"__proto__"===t.name?Sre(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ire=function(e,t){if("__proto__"===t){if(!Ere.call(e,t))return;if(Tre)return Tre(e,t).value}return e[t]},Ore=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=Ire(s,n),s!==(a=Ire(t,n))&&(u&&a&&(Are(a)||(o=Cre(a)))?(o?(o=!1,i=r&&Cre(r)?r:[]):i=r&&Are(r)?r:{},Nre(s,{name:n,newValue:e(u,i,a)})):void 0!==a&&Nre(s,{name:n,newValue:a}));return s};const Rre=l(Ore);function Pre(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 Lre(){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 Dre={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Mre(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(Mre(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){Mre(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;)Mre(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Mre(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 Mre(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Fre={cwd:function(){return"/"}};function jre(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function zre(e){if("string"==typeof e)e=new URL(e);else if(!jre(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 Bre=["history","path","basename","stem","extname","dirname"];class Hre{constructor(e){let t;t=e?jre(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?"":Fre.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Bre.length;){const e=Bre[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Bre.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Dre.basename(this.path):void 0}set basename(e){$re(e,"basename"),Ure(e,"basename"),this.path=Dre.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Dre.dirname(this.path):void 0}set dirname(e){Vre(this.basename,"dirname"),this.path=Dre.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Dre.extname(this.path):void 0}set extname(e){if(Ure(e,"extname"),Vre(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=Dre.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){jre(e)&&(e=zre(e)),$re(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Dre.basename(this.path,this.extname):void 0}set stem(e){$re(e,"stem"),Ure(e,"stem"),this.path=Dre.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 Aee(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 Ure(e,t){if(e&&e.includes(Dre.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Dre.sep+"`")}function $re(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Vre(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Gre=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},qre={}.hasOwnProperty;class Wre extends Gre{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=Lre()}copy(){const e=new Wre;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Rre(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Xre("data",this.frozen),this.namespace[e]=t,this):qre.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Xre("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=eae(e),n=this.parser||this.Parser;return Zre("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Zre("process",this.parser||this.Parser),Kre("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,a){const o=eae(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(),Zre("processSync",this.parser||this.Parser),Kre("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,wre(e),t=r})),Jre("processSync","process",n),t}run(e,t,n){Qre(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=eae(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){wre(e),n=t,r=!0})),Jre("runSync","run",r),n}stringify(e,t){this.freeze();const n=eae(t),r=this.compiler||this.Compiler;return Kre("stringify",r),Qre(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Xre("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=Rre(!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];Pre(i)&&Pre(r)&&(r=Rre(!0,i,r)),n[a]=[e,r,...o]}}}}const Yre=(new Wre).freeze();function Zre(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Kre(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xre(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 Qre(e){if(!Pre(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Jre(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function eae(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Hre(e)}const tae=[],nae={allowDangerousHtml:!0},rae=/^(https?|ircs?|mailto|xmpp)$/i,aae=[{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 oae(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",a=e.className,o=e.components,i=e.disallowedElements,s=e.rehypePlugins||tae,l=e.remarkPlugins||tae,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...nae}:nae,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||iae,f=Yre().use(Hne).use(l).use(xre,c).use(s),h=new Hre;"string"==typeof r&&(h.value=r);for(const y of aae)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]}),pre(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 Gee)if(Object.hasOwn(Gee,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Gee[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}})),Dee(g,{Fragment:rg.Fragment,components:o,ignoreInvalidStyle:!0,jsx:rg.jsx,jsxs:rg.jsxs,passKeys:!0,passNode:!0})}function iae(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||rae.test(e.slice(0,t))?e:""}const sae=/[#.]/g;function lae(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;){sae.lastIndex=i;const e=sae.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))cae(e,i.properties,t,n)}for(const e of o)uae(i.children,e);return"element"===i.type&&"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]),i}}function cae(e,t,n,r){const a=H7(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?q7(r):a.commaSeparated?r7(r):a.commaOrSpaceSeparated?q7(r7(r).join(" ")):dae(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(dae(a,a.property,t));o=e}"className"===a.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function uae(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)uae(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?uae(e,t.children):e.push(t)}}function dae(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||f7(n)===f7(t)))return!0}return n}const pae=lae(V7,"div"),fae=lae(G7,"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 hae(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 mae={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/"},gae={}.hasOwnProperty,yae=Object.prototype;function bae(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},kae(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:vae(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=hae(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=hae(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"},kae(e,t,n),n;case"#text":{const r=t;return n={type:"text",value:r.value},kae(e,r,n),n}default:return n=function(e,t){const n=e.schema;e.schema=t.namespaceURI===mae.svg?G7:V7;let r=-1;const a={};for(;++r<t.attrs.length;){const e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;gae.call(yae,n)||(a[n]=e.value)}const o="svg"===e.schema.space?fae:pae,i=o(t.tagName,a,vae(e,t.childNodes));if(kae(e,t,i),"template"===i.tagName){const n=t,r=n.sourceCodeLocation,a=r&&r.startTag&&xae(r.startTag),o=r&&r.endTag&&xae(r.endTag),s=bae(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 vae(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=bae(e,t[n]);r.push(a)}return r}function kae(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=function(e,t,n){const r=xae(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)gae.call(n.attrs,a)&&(r[H7(e.schema,a).property]=xae(n.attrs[a]));n.startTag;const o=xae(n.startTag),i=n.endTag?xae(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 xae(e){const t=wae({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=wae({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function wae(e){return e.line&&e.column?e:void 0}const Eae={}.hasOwnProperty;function _ae(e,t){const n=t||{};function r(t,...n){let a=r.invalid;const o=r.handlers;if(t&&Eae.call(t,e)){const n=String(t[e]);a=Eae.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 Sae={},Tae={}.hasOwnProperty,Cae=_ae("type",{handlers:{root:function(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Nae(e.children,n,t),Iae(e,n),n},element:function(e,t){const n=t;let r=n;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===n.space&&(r=G7);const a=[];let o;if(e.properties)for(o in e.properties)if("children"!==o&&Tae.call(e.properties,o)){const t=Aae(r,o,e.properties[o]);t&&a.push(t)}const i=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:mae[i],childNodes:[],parentNode:null};s.childNodes=Nae(e.children,s,r),Iae(e,s),"template"===e.tagName&&e.content&&(s.content=function(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Nae(e.children,n,t),Iae(e,n),n}(e.content,r));return s},text:function(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Iae(e,t),t},comment:function(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Iae(e,t),t},doctype:function(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Iae(e,t),t}}});function Aae(e,t,n){const r=H7(e,t);if(!1===n||null==n||"number"==typeof n&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?a7(n):W7(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=mae[r.space]}return a}function Nae(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const o=Cae(e[r],n);o.parentNode=t,a.push(o)}return a}function Iae(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 Oae=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Rae=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]),Pae="�";var Lae,Dae;(Dae=Lae||(Lae={}))[Dae.EOF=-1]="EOF",Dae[Dae.NULL=0]="NULL",Dae[Dae.TABULATION=9]="TABULATION",Dae[Dae.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",Dae[Dae.LINE_FEED=10]="LINE_FEED",Dae[Dae.FORM_FEED=12]="FORM_FEED",Dae[Dae.SPACE=32]="SPACE",Dae[Dae.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",Dae[Dae.QUOTATION_MARK=34]="QUOTATION_MARK",Dae[Dae.AMPERSAND=38]="AMPERSAND",Dae[Dae.APOSTROPHE=39]="APOSTROPHE",Dae[Dae.HYPHEN_MINUS=45]="HYPHEN_MINUS",Dae[Dae.SOLIDUS=47]="SOLIDUS",Dae[Dae.DIGIT_0=48]="DIGIT_0",Dae[Dae.DIGIT_9=57]="DIGIT_9",Dae[Dae.SEMICOLON=59]="SEMICOLON",Dae[Dae.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",Dae[Dae.EQUALS_SIGN=61]="EQUALS_SIGN",Dae[Dae.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",Dae[Dae.QUESTION_MARK=63]="QUESTION_MARK",Dae[Dae.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",Dae[Dae.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",Dae[Dae.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",Dae[Dae.GRAVE_ACCENT=96]="GRAVE_ACCENT",Dae[Dae.LATIN_SMALL_A=97]="LATIN_SMALL_A",Dae[Dae.LATIN_SMALL_Z=122]="LATIN_SMALL_Z";const Mae="--",Fae="[CDATA[",jae="doctype",zae="script",Bae="public",Hae="system";function Uae(e){return e>=55296&&e<=57343}function $ae(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function Vae(e){return e>=64976&&e<=65007||Rae.has(e)}var Gae,qae;(qae=Gae||(Gae={})).controlCharacterInInputStream="control-character-in-input-stream",qae.noncharacterInInputStream="noncharacter-in-input-stream",qae.surrogateInInputStream="surrogate-in-input-stream",qae.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",qae.endTagWithAttributes="end-tag-with-attributes",qae.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",qae.unexpectedSolidusInTag="unexpected-solidus-in-tag",qae.unexpectedNullCharacter="unexpected-null-character",qae.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",qae.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",qae.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",qae.missingEndTagName="missing-end-tag-name",qae.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",qae.unknownNamedCharacterReference="unknown-named-character-reference",qae.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",qae.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",qae.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",qae.eofBeforeTagName="eof-before-tag-name",qae.eofInTag="eof-in-tag",qae.missingAttributeValue="missing-attribute-value",qae.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",qae.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",qae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",qae.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",qae.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",qae.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",qae.missingDoctypePublicIdentifier="missing-doctype-public-identifier",qae.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",qae.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",qae.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",qae.cdataInHtmlContent="cdata-in-html-content",qae.incorrectlyOpenedComment="incorrectly-opened-comment",qae.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",qae.eofInDoctype="eof-in-doctype",qae.nestedComment="nested-comment",qae.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",qae.eofInComment="eof-in-comment",qae.incorrectlyClosedComment="incorrectly-closed-comment",qae.eofInCdata="eof-in-cdata",qae.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",qae.nullCharacterReference="null-character-reference",qae.surrogateCharacterReference="surrogate-character-reference",qae.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",qae.controlCharacterReference="control-character-reference",qae.noncharacterCharacterReference="noncharacter-character-reference",qae.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",qae.missingDoctypeName="missing-doctype-name",qae.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",qae.duplicateAttribute="duplicate-attribute",qae.nonConformingDoctype="non-conforming-doctype",qae.missingDoctype="missing-doctype",qae.misplacedDoctype="misplaced-doctype",qae.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",qae.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",qae.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",qae.openElementsLeftAfterEof="open-elements-left-after-eof",qae.abandonedHeadElementChild="abandoned-head-element-child",qae.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",qae.nestedNoscriptInHead="nested-noscript-in-head",qae.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text";class Wae{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,Lae.EOF;return this._err(Gae.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,Lae.EOF;const n=this.html.charCodeAt(t);return n===Lae.CARRIAGE_RETURN?Lae.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,Lae.EOF;let e=this.html.charCodeAt(this.pos);if(e===Lae.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,Lae.LINE_FEED;if(e===Lae.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,Uae(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===Lae.LINE_FEED||e===Lae.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){$ae(e)?this._err(Gae.controlCharacterInInputStream):Vae(e)&&this._err(Gae.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Yae,Zae;function Kae(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}(Zae=Yae||(Yae={}))[Zae.CHARACTER=0]="CHARACTER",Zae[Zae.NULL_CHARACTER=1]="NULL_CHARACTER",Zae[Zae.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",Zae[Zae.START_TAG=3]="START_TAG",Zae[Zae.END_TAG=4]="END_TAG",Zae[Zae.COMMENT=5]="COMMENT",Zae[Zae.DOCTYPE=6]="DOCTYPE",Zae[Zae.EOF=7]="EOF",Zae[Zae.HIBERNATION=8]="HIBERNATION";const Xae=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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)))),Qae=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 Jae,eoe;(eoe=Jae||(Jae={}))[eoe.NUM=35]="NUM",eoe[eoe.SEMI=59]="SEMI",eoe[eoe.EQUALS=61]="EQUALS",eoe[eoe.ZERO=48]="ZERO",eoe[eoe.NINE=57]="NINE",eoe[eoe.LOWER_A=97]="LOWER_A",eoe[eoe.LOWER_F=102]="LOWER_F",eoe[eoe.LOWER_X=120]="LOWER_X",eoe[eoe.LOWER_Z=122]="LOWER_Z",eoe[eoe.UPPER_A=65]="UPPER_A",eoe[eoe.UPPER_F=70]="UPPER_F",eoe[eoe.UPPER_Z=90]="UPPER_Z";var toe,noe,roe,aoe,ooe,ioe,soe,loe,coe,uoe,doe,poe,foe,hoe,moe,goe;function yoe(e){return e>=Jae.ZERO&&e<=Jae.NINE}function boe(e){return e===Jae.EQUALS||function(e){return e>=Jae.UPPER_A&&e<=Jae.UPPER_Z||e>=Jae.LOWER_A&&e<=Jae.LOWER_Z||yoe(e)}(e)}(noe=toe||(toe={}))[noe.VALUE_LENGTH=49152]="VALUE_LENGTH",noe[noe.BRANCH_LENGTH=16256]="BRANCH_LENGTH",noe[noe.JUMP_TABLE=127]="JUMP_TABLE",(aoe=roe||(roe={}))[aoe.EntityStart=0]="EntityStart",aoe[aoe.NumericStart=1]="NumericStart",aoe[aoe.NumericDecimal=2]="NumericDecimal",aoe[aoe.NumericHex=3]="NumericHex",aoe[aoe.NamedEntity=4]="NamedEntity",(ioe=ooe||(ooe={}))[ioe.Legacy=0]="Legacy",ioe[ioe.Strict=1]="Strict",ioe[ioe.Attribute=2]="Attribute";class voe{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=roe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ooe.Strict}startEntity(e){this.decodeMode=e,this.state=roe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case roe.EntityStart:return e.charCodeAt(t)===Jae.NUM?(this.state=roe.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=roe.NamedEntity,this.stateNamedEntity(e,t));case roe.NumericStart:return this.stateNumericStart(e,t);case roe.NumericDecimal:return this.stateNumericDecimal(e,t);case roe.NumericHex:return this.stateNumericHex(e,t);case roe.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===Jae.LOWER_X?(this.state=roe.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=roe.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(!(yoe(a)||(r=a,r>=Jae.UPPER_A&&r<=Jae.UPPER_F||r>=Jae.LOWER_A&&r<=Jae.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(!yoe(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===Jae.SEMI)this.consumed+=1;else if(this.decodeMode===ooe.Strict)return 0;return this.emitCodePoint(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=Qae.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==Jae.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&toe.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const o=e.charCodeAt(t);if(this.treeIndex=koe(n,r,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return 0===this.result||this.decodeMode===ooe.Attribute&&(0===a||boe(o))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],a=(r&toe.VALUE_LENGTH)>>14,0!==a){if(o===Jae.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ooe.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]&toe.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]&~toe.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case roe.NamedEntity:return 0===this.result||this.decodeMode===ooe.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case roe.NumericDecimal:return this.emitNumericEntity(0,2);case roe.NumericHex:return this.emitNumericEntity(0,3);case roe.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case roe.EntityStart:return 0}}}function koe(e,t,n,r){const a=(t&toe.BRANCH_LENGTH)>>7,o=t&toe.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}(loe=soe||(soe={})).HTML="http://www.w3.org/1999/xhtml",loe.MATHML="http://www.w3.org/1998/Math/MathML",loe.SVG="http://www.w3.org/2000/svg",loe.XLINK="http://www.w3.org/1999/xlink",loe.XML="http://www.w3.org/XML/1998/namespace",loe.XMLNS="http://www.w3.org/2000/xmlns/",(uoe=coe||(coe={})).TYPE="type",uoe.ACTION="action",uoe.ENCODING="encoding",uoe.PROMPT="prompt",uoe.NAME="name",uoe.COLOR="color",uoe.FACE="face",uoe.SIZE="size",(poe=doe||(doe={})).NO_QUIRKS="no-quirks",poe.QUIRKS="quirks",poe.LIMITED_QUIRKS="limited-quirks",(hoe=foe||(foe={})).A="a",hoe.ADDRESS="address",hoe.ANNOTATION_XML="annotation-xml",hoe.APPLET="applet",hoe.AREA="area",hoe.ARTICLE="article",hoe.ASIDE="aside",hoe.B="b",hoe.BASE="base",hoe.BASEFONT="basefont",hoe.BGSOUND="bgsound",hoe.BIG="big",hoe.BLOCKQUOTE="blockquote",hoe.BODY="body",hoe.BR="br",hoe.BUTTON="button",hoe.CAPTION="caption",hoe.CENTER="center",hoe.CODE="code",hoe.COL="col",hoe.COLGROUP="colgroup",hoe.DD="dd",hoe.DESC="desc",hoe.DETAILS="details",hoe.DIALOG="dialog",hoe.DIR="dir",hoe.DIV="div",hoe.DL="dl",hoe.DT="dt",hoe.EM="em",hoe.EMBED="embed",hoe.FIELDSET="fieldset",hoe.FIGCAPTION="figcaption",hoe.FIGURE="figure",hoe.FONT="font",hoe.FOOTER="footer",hoe.FOREIGN_OBJECT="foreignObject",hoe.FORM="form",hoe.FRAME="frame",hoe.FRAMESET="frameset",hoe.H1="h1",hoe.H2="h2",hoe.H3="h3",hoe.H4="h4",hoe.H5="h5",hoe.H6="h6",hoe.HEAD="head",hoe.HEADER="header",hoe.HGROUP="hgroup",hoe.HR="hr",hoe.HTML="html",hoe.I="i",hoe.IMG="img",hoe.IMAGE="image",hoe.INPUT="input",hoe.IFRAME="iframe",hoe.KEYGEN="keygen",hoe.LABEL="label",hoe.LI="li",hoe.LINK="link",hoe.LISTING="listing",hoe.MAIN="main",hoe.MALIGNMARK="malignmark",hoe.MARQUEE="marquee",hoe.MATH="math",hoe.MENU="menu",hoe.META="meta",hoe.MGLYPH="mglyph",hoe.MI="mi",hoe.MO="mo",hoe.MN="mn",hoe.MS="ms",hoe.MTEXT="mtext",hoe.NAV="nav",hoe.NOBR="nobr",hoe.NOFRAMES="noframes",hoe.NOEMBED="noembed",hoe.NOSCRIPT="noscript",hoe.OBJECT="object",hoe.OL="ol",hoe.OPTGROUP="optgroup",hoe.OPTION="option",hoe.P="p",hoe.PARAM="param",hoe.PLAINTEXT="plaintext",hoe.PRE="pre",hoe.RB="rb",hoe.RP="rp",hoe.RT="rt",hoe.RTC="rtc",hoe.RUBY="ruby",hoe.S="s",hoe.SCRIPT="script",hoe.SEARCH="search",hoe.SECTION="section",hoe.SELECT="select",hoe.SOURCE="source",hoe.SMALL="small",hoe.SPAN="span",hoe.STRIKE="strike",hoe.STRONG="strong",hoe.STYLE="style",hoe.SUB="sub",hoe.SUMMARY="summary",hoe.SUP="sup",hoe.TABLE="table",hoe.TBODY="tbody",hoe.TEMPLATE="template",hoe.TEXTAREA="textarea",hoe.TFOOT="tfoot",hoe.TD="td",hoe.TH="th",hoe.THEAD="thead",hoe.TITLE="title",hoe.TR="tr",hoe.TRACK="track",hoe.TT="tt",hoe.U="u",hoe.UL="ul",hoe.SVG="svg",hoe.VAR="var",hoe.WBR="wbr",hoe.XMP="xmp",(goe=moe||(moe={}))[goe.UNKNOWN=0]="UNKNOWN",goe[goe.A=1]="A",goe[goe.ADDRESS=2]="ADDRESS",goe[goe.ANNOTATION_XML=3]="ANNOTATION_XML",goe[goe.APPLET=4]="APPLET",goe[goe.AREA=5]="AREA",goe[goe.ARTICLE=6]="ARTICLE",goe[goe.ASIDE=7]="ASIDE",goe[goe.B=8]="B",goe[goe.BASE=9]="BASE",goe[goe.BASEFONT=10]="BASEFONT",goe[goe.BGSOUND=11]="BGSOUND",goe[goe.BIG=12]="BIG",goe[goe.BLOCKQUOTE=13]="BLOCKQUOTE",goe[goe.BODY=14]="BODY",goe[goe.BR=15]="BR",goe[goe.BUTTON=16]="BUTTON",goe[goe.CAPTION=17]="CAPTION",goe[goe.CENTER=18]="CENTER",goe[goe.CODE=19]="CODE",goe[goe.COL=20]="COL",goe[goe.COLGROUP=21]="COLGROUP",goe[goe.DD=22]="DD",goe[goe.DESC=23]="DESC",goe[goe.DETAILS=24]="DETAILS",goe[goe.DIALOG=25]="DIALOG",goe[goe.DIR=26]="DIR",goe[goe.DIV=27]="DIV",goe[goe.DL=28]="DL",goe[goe.DT=29]="DT",goe[goe.EM=30]="EM",goe[goe.EMBED=31]="EMBED",goe[goe.FIELDSET=32]="FIELDSET",goe[goe.FIGCAPTION=33]="FIGCAPTION",goe[goe.FIGURE=34]="FIGURE",goe[goe.FONT=35]="FONT",goe[goe.FOOTER=36]="FOOTER",goe[goe.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",goe[goe.FORM=38]="FORM",goe[goe.FRAME=39]="FRAME",goe[goe.FRAMESET=40]="FRAMESET",goe[goe.H1=41]="H1",goe[goe.H2=42]="H2",goe[goe.H3=43]="H3",goe[goe.H4=44]="H4",goe[goe.H5=45]="H5",goe[goe.H6=46]="H6",goe[goe.HEAD=47]="HEAD",goe[goe.HEADER=48]="HEADER",goe[goe.HGROUP=49]="HGROUP",goe[goe.HR=50]="HR",goe[goe.HTML=51]="HTML",goe[goe.I=52]="I",goe[goe.IMG=53]="IMG",goe[goe.IMAGE=54]="IMAGE",goe[goe.INPUT=55]="INPUT",goe[goe.IFRAME=56]="IFRAME",goe[goe.KEYGEN=57]="KEYGEN",goe[goe.LABEL=58]="LABEL",goe[goe.LI=59]="LI",goe[goe.LINK=60]="LINK",goe[goe.LISTING=61]="LISTING",goe[goe.MAIN=62]="MAIN",goe[goe.MALIGNMARK=63]="MALIGNMARK",goe[goe.MARQUEE=64]="MARQUEE",goe[goe.MATH=65]="MATH",goe[goe.MENU=66]="MENU",goe[goe.META=67]="META",goe[goe.MGLYPH=68]="MGLYPH",goe[goe.MI=69]="MI",goe[goe.MO=70]="MO",goe[goe.MN=71]="MN",goe[goe.MS=72]="MS",goe[goe.MTEXT=73]="MTEXT",goe[goe.NAV=74]="NAV",goe[goe.NOBR=75]="NOBR",goe[goe.NOFRAMES=76]="NOFRAMES",goe[goe.NOEMBED=77]="NOEMBED",goe[goe.NOSCRIPT=78]="NOSCRIPT",goe[goe.OBJECT=79]="OBJECT",goe[goe.OL=80]="OL",goe[goe.OPTGROUP=81]="OPTGROUP",goe[goe.OPTION=82]="OPTION",goe[goe.P=83]="P",goe[goe.PARAM=84]="PARAM",goe[goe.PLAINTEXT=85]="PLAINTEXT",goe[goe.PRE=86]="PRE",goe[goe.RB=87]="RB",goe[goe.RP=88]="RP",goe[goe.RT=89]="RT",goe[goe.RTC=90]="RTC",goe[goe.RUBY=91]="RUBY",goe[goe.S=92]="S",goe[goe.SCRIPT=93]="SCRIPT",goe[goe.SEARCH=94]="SEARCH",goe[goe.SECTION=95]="SECTION",goe[goe.SELECT=96]="SELECT",goe[goe.SOURCE=97]="SOURCE",goe[goe.SMALL=98]="SMALL",goe[goe.SPAN=99]="SPAN",goe[goe.STRIKE=100]="STRIKE",goe[goe.STRONG=101]="STRONG",goe[goe.STYLE=102]="STYLE",goe[goe.SUB=103]="SUB",goe[goe.SUMMARY=104]="SUMMARY",goe[goe.SUP=105]="SUP",goe[goe.TABLE=106]="TABLE",goe[goe.TBODY=107]="TBODY",goe[goe.TEMPLATE=108]="TEMPLATE",goe[goe.TEXTAREA=109]="TEXTAREA",goe[goe.TFOOT=110]="TFOOT",goe[goe.TD=111]="TD",goe[goe.TH=112]="TH",goe[goe.THEAD=113]="THEAD",goe[goe.TITLE=114]="TITLE",goe[goe.TR=115]="TR",goe[goe.TRACK=116]="TRACK",goe[goe.TT=117]="TT",goe[goe.U=118]="U",goe[goe.UL=119]="UL",goe[goe.SVG=120]="SVG",goe[goe.VAR=121]="VAR",goe[goe.WBR=122]="WBR",goe[goe.XMP=123]="XMP";const xoe=new Map([[foe.A,moe.A],[foe.ADDRESS,moe.ADDRESS],[foe.ANNOTATION_XML,moe.ANNOTATION_XML],[foe.APPLET,moe.APPLET],[foe.AREA,moe.AREA],[foe.ARTICLE,moe.ARTICLE],[foe.ASIDE,moe.ASIDE],[foe.B,moe.B],[foe.BASE,moe.BASE],[foe.BASEFONT,moe.BASEFONT],[foe.BGSOUND,moe.BGSOUND],[foe.BIG,moe.BIG],[foe.BLOCKQUOTE,moe.BLOCKQUOTE],[foe.BODY,moe.BODY],[foe.BR,moe.BR],[foe.BUTTON,moe.BUTTON],[foe.CAPTION,moe.CAPTION],[foe.CENTER,moe.CENTER],[foe.CODE,moe.CODE],[foe.COL,moe.COL],[foe.COLGROUP,moe.COLGROUP],[foe.DD,moe.DD],[foe.DESC,moe.DESC],[foe.DETAILS,moe.DETAILS],[foe.DIALOG,moe.DIALOG],[foe.DIR,moe.DIR],[foe.DIV,moe.DIV],[foe.DL,moe.DL],[foe.DT,moe.DT],[foe.EM,moe.EM],[foe.EMBED,moe.EMBED],[foe.FIELDSET,moe.FIELDSET],[foe.FIGCAPTION,moe.FIGCAPTION],[foe.FIGURE,moe.FIGURE],[foe.FONT,moe.FONT],[foe.FOOTER,moe.FOOTER],[foe.FOREIGN_OBJECT,moe.FOREIGN_OBJECT],[foe.FORM,moe.FORM],[foe.FRAME,moe.FRAME],[foe.FRAMESET,moe.FRAMESET],[foe.H1,moe.H1],[foe.H2,moe.H2],[foe.H3,moe.H3],[foe.H4,moe.H4],[foe.H5,moe.H5],[foe.H6,moe.H6],[foe.HEAD,moe.HEAD],[foe.HEADER,moe.HEADER],[foe.HGROUP,moe.HGROUP],[foe.HR,moe.HR],[foe.HTML,moe.HTML],[foe.I,moe.I],[foe.IMG,moe.IMG],[foe.IMAGE,moe.IMAGE],[foe.INPUT,moe.INPUT],[foe.IFRAME,moe.IFRAME],[foe.KEYGEN,moe.KEYGEN],[foe.LABEL,moe.LABEL],[foe.LI,moe.LI],[foe.LINK,moe.LINK],[foe.LISTING,moe.LISTING],[foe.MAIN,moe.MAIN],[foe.MALIGNMARK,moe.MALIGNMARK],[foe.MARQUEE,moe.MARQUEE],[foe.MATH,moe.MATH],[foe.MENU,moe.MENU],[foe.META,moe.META],[foe.MGLYPH,moe.MGLYPH],[foe.MI,moe.MI],[foe.MO,moe.MO],[foe.MN,moe.MN],[foe.MS,moe.MS],[foe.MTEXT,moe.MTEXT],[foe.NAV,moe.NAV],[foe.NOBR,moe.NOBR],[foe.NOFRAMES,moe.NOFRAMES],[foe.NOEMBED,moe.NOEMBED],[foe.NOSCRIPT,moe.NOSCRIPT],[foe.OBJECT,moe.OBJECT],[foe.OL,moe.OL],[foe.OPTGROUP,moe.OPTGROUP],[foe.OPTION,moe.OPTION],[foe.P,moe.P],[foe.PARAM,moe.PARAM],[foe.PLAINTEXT,moe.PLAINTEXT],[foe.PRE,moe.PRE],[foe.RB,moe.RB],[foe.RP,moe.RP],[foe.RT,moe.RT],[foe.RTC,moe.RTC],[foe.RUBY,moe.RUBY],[foe.S,moe.S],[foe.SCRIPT,moe.SCRIPT],[foe.SEARCH,moe.SEARCH],[foe.SECTION,moe.SECTION],[foe.SELECT,moe.SELECT],[foe.SOURCE,moe.SOURCE],[foe.SMALL,moe.SMALL],[foe.SPAN,moe.SPAN],[foe.STRIKE,moe.STRIKE],[foe.STRONG,moe.STRONG],[foe.STYLE,moe.STYLE],[foe.SUB,moe.SUB],[foe.SUMMARY,moe.SUMMARY],[foe.SUP,moe.SUP],[foe.TABLE,moe.TABLE],[foe.TBODY,moe.TBODY],[foe.TEMPLATE,moe.TEMPLATE],[foe.TEXTAREA,moe.TEXTAREA],[foe.TFOOT,moe.TFOOT],[foe.TD,moe.TD],[foe.TH,moe.TH],[foe.THEAD,moe.THEAD],[foe.TITLE,moe.TITLE],[foe.TR,moe.TR],[foe.TRACK,moe.TRACK],[foe.TT,moe.TT],[foe.U,moe.U],[foe.UL,moe.UL],[foe.SVG,moe.SVG],[foe.VAR,moe.VAR],[foe.WBR,moe.WBR],[foe.XMP,moe.XMP]]);function woe(e){var t;return null!==(t=xoe.get(e))&&void 0!==t?t:moe.UNKNOWN}const Eoe=moe,_oe={[soe.HTML]:new Set([Eoe.ADDRESS,Eoe.APPLET,Eoe.AREA,Eoe.ARTICLE,Eoe.ASIDE,Eoe.BASE,Eoe.BASEFONT,Eoe.BGSOUND,Eoe.BLOCKQUOTE,Eoe.BODY,Eoe.BR,Eoe.BUTTON,Eoe.CAPTION,Eoe.CENTER,Eoe.COL,Eoe.COLGROUP,Eoe.DD,Eoe.DETAILS,Eoe.DIR,Eoe.DIV,Eoe.DL,Eoe.DT,Eoe.EMBED,Eoe.FIELDSET,Eoe.FIGCAPTION,Eoe.FIGURE,Eoe.FOOTER,Eoe.FORM,Eoe.FRAME,Eoe.FRAMESET,Eoe.H1,Eoe.H2,Eoe.H3,Eoe.H4,Eoe.H5,Eoe.H6,Eoe.HEAD,Eoe.HEADER,Eoe.HGROUP,Eoe.HR,Eoe.HTML,Eoe.IFRAME,Eoe.IMG,Eoe.INPUT,Eoe.LI,Eoe.LINK,Eoe.LISTING,Eoe.MAIN,Eoe.MARQUEE,Eoe.MENU,Eoe.META,Eoe.NAV,Eoe.NOEMBED,Eoe.NOFRAMES,Eoe.NOSCRIPT,Eoe.OBJECT,Eoe.OL,Eoe.P,Eoe.PARAM,Eoe.PLAINTEXT,Eoe.PRE,Eoe.SCRIPT,Eoe.SECTION,Eoe.SELECT,Eoe.SOURCE,Eoe.STYLE,Eoe.SUMMARY,Eoe.TABLE,Eoe.TBODY,Eoe.TD,Eoe.TEMPLATE,Eoe.TEXTAREA,Eoe.TFOOT,Eoe.TH,Eoe.THEAD,Eoe.TITLE,Eoe.TR,Eoe.TRACK,Eoe.UL,Eoe.WBR,Eoe.XMP]),[soe.MATHML]:new Set([Eoe.MI,Eoe.MO,Eoe.MN,Eoe.MS,Eoe.MTEXT,Eoe.ANNOTATION_XML]),[soe.SVG]:new Set([Eoe.TITLE,Eoe.FOREIGN_OBJECT,Eoe.DESC]),[soe.XLINK]:new Set,[soe.XML]:new Set,[soe.XMLNS]:new Set},Soe=new Set([Eoe.H1,Eoe.H2,Eoe.H3,Eoe.H4,Eoe.H5,Eoe.H6]);var Toe,Coe;foe.STYLE,foe.SCRIPT,foe.XMP,foe.IFRAME,foe.NOEMBED,foe.NOFRAMES,foe.PLAINTEXT,(Coe=Toe||(Toe={}))[Coe.DATA=0]="DATA",Coe[Coe.RCDATA=1]="RCDATA",Coe[Coe.RAWTEXT=2]="RAWTEXT",Coe[Coe.SCRIPT_DATA=3]="SCRIPT_DATA",Coe[Coe.PLAINTEXT=4]="PLAINTEXT",Coe[Coe.TAG_OPEN=5]="TAG_OPEN",Coe[Coe.END_TAG_OPEN=6]="END_TAG_OPEN",Coe[Coe.TAG_NAME=7]="TAG_NAME",Coe[Coe.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",Coe[Coe.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",Coe[Coe.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",Coe[Coe.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",Coe[Coe.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",Coe[Coe.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",Coe[Coe.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",Coe[Coe.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",Coe[Coe.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",Coe[Coe.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",Coe[Coe.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",Coe[Coe.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",Coe[Coe.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",Coe[Coe.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",Coe[Coe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",Coe[Coe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",Coe[Coe.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",Coe[Coe.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",Coe[Coe.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",Coe[Coe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",Coe[Coe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",Coe[Coe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",Coe[Coe.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",Coe[Coe.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",Coe[Coe.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",Coe[Coe.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",Coe[Coe.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",Coe[Coe.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",Coe[Coe.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",Coe[Coe.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",Coe[Coe.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",Coe[Coe.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",Coe[Coe.BOGUS_COMMENT=40]="BOGUS_COMMENT",Coe[Coe.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",Coe[Coe.COMMENT_START=42]="COMMENT_START",Coe[Coe.COMMENT_START_DASH=43]="COMMENT_START_DASH",Coe[Coe.COMMENT=44]="COMMENT",Coe[Coe.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",Coe[Coe.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",Coe[Coe.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",Coe[Coe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",Coe[Coe.COMMENT_END_DASH=49]="COMMENT_END_DASH",Coe[Coe.COMMENT_END=50]="COMMENT_END",Coe[Coe.COMMENT_END_BANG=51]="COMMENT_END_BANG",Coe[Coe.DOCTYPE=52]="DOCTYPE",Coe[Coe.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",Coe[Coe.DOCTYPE_NAME=54]="DOCTYPE_NAME",Coe[Coe.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",Coe[Coe.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",Coe[Coe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",Coe[Coe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",Coe[Coe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",Coe[Coe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",Coe[Coe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",Coe[Coe.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",Coe[Coe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",Coe[Coe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",Coe[Coe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",Coe[Coe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",Coe[Coe.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",Coe[Coe.CDATA_SECTION=68]="CDATA_SECTION",Coe[Coe.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",Coe[Coe.CDATA_SECTION_END=70]="CDATA_SECTION_END",Coe[Coe.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",Coe[Coe.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND";const Aoe={DATA:Toe.DATA,RCDATA:Toe.RCDATA,RAWTEXT:Toe.RAWTEXT,SCRIPT_DATA:Toe.SCRIPT_DATA,PLAINTEXT:Toe.PLAINTEXT,CDATA_SECTION:Toe.CDATA_SECTION};function Noe(e){return e>=Lae.LATIN_CAPITAL_A&&e<=Lae.LATIN_CAPITAL_Z}function Ioe(e){return function(e){return e>=Lae.LATIN_SMALL_A&&e<=Lae.LATIN_SMALL_Z}(e)||Noe(e)}function Ooe(e){return Ioe(e)||function(e){return e>=Lae.DIGIT_0&&e<=Lae.DIGIT_9}(e)}function Roe(e){return e+32}function Poe(e){return e===Lae.SPACE||e===Lae.LINE_FEED||e===Lae.TABULATION||e===Lae.FORM_FEED}function Loe(e){return Poe(e)||e===Lae.SOLIDUS||e===Lae.GREATER_THAN_SIGN}class Doe{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=Toe.DATA,this.returnState=Toe.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Wae(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new voe(Xae,((e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)}),t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Gae.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(Gae.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{const t=function(e){return e===Lae.NULL?Gae.nullCharacterReference:e>1114111?Gae.characterReferenceOutsideUnicodeRange:Uae(e)?Gae.surrogateCharacterReference:Vae(e)?Gae.noncharacterCharacterReference:$ae(e)||e===Lae.CARRIAGE_RETURN?Gae.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:Yae.START_TAG,tagName:"",tagID:moe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Yae.END_TAG,tagName:"",tagID:moe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:Yae.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:Yae.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===Kae(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(Gae.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=woe(e.tagName),e.type===Yae.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(Gae.endTagWithAttributes),e.selfClosing&&this._err(Gae.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 Yae.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case Yae.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case Yae.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:Yae.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=Poe(e)?Yae.WHITESPACE_CHARACTER:e===Lae.NULL?Yae.NULL_CHARACTER:Yae.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Yae.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Toe.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ooe.Attribute:ooe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Toe.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Toe.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Toe.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Toe.DATA:this._stateData(e);break;case Toe.RCDATA:this._stateRcdata(e);break;case Toe.RAWTEXT:this._stateRawtext(e);break;case Toe.SCRIPT_DATA:this._stateScriptData(e);break;case Toe.PLAINTEXT:this._statePlaintext(e);break;case Toe.TAG_OPEN:this._stateTagOpen(e);break;case Toe.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Toe.TAG_NAME:this._stateTagName(e);break;case Toe.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Toe.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Toe.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Toe.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Toe.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Toe.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Toe.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Toe.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Toe.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Toe.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Toe.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Toe.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Toe.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Toe.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Toe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Toe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Toe.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Toe.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Toe.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Toe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Toe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Toe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Toe.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Toe.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Toe.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Toe.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Toe.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Toe.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Toe.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Toe.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Toe.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Toe.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Toe.BOGUS_COMMENT:this._stateBogusComment(e);break;case Toe.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Toe.COMMENT_START:this._stateCommentStart(e);break;case Toe.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Toe.COMMENT:this._stateComment(e);break;case Toe.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Toe.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Toe.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Toe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Toe.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Toe.COMMENT_END:this._stateCommentEnd(e);break;case Toe.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Toe.DOCTYPE:this._stateDoctype(e);break;case Toe.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Toe.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Toe.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Toe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Toe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Toe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Toe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Toe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Toe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Toe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Toe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Toe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Toe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Toe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Toe.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Toe.CDATA_SECTION:this._stateCdataSection(e);break;case Toe.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Toe.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Toe.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Toe.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Lae.LESS_THAN_SIGN:this.state=Toe.TAG_OPEN;break;case Lae.AMPERSAND:this._startCharacterReference();break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitCodePoint(e);break;case Lae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Lae.AMPERSAND:this._startCharacterReference();break;case Lae.LESS_THAN_SIGN:this.state=Toe.RCDATA_LESS_THAN_SIGN;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitChars(Pae);break;case Lae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Lae.LESS_THAN_SIGN:this.state=Toe.RAWTEXT_LESS_THAN_SIGN;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitChars(Pae);break;case Lae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_LESS_THAN_SIGN;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitChars(Pae);break;case Lae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitChars(Pae);break;case Lae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Ioe(e))this._createStartTagToken(),this.state=Toe.TAG_NAME,this._stateTagName(e);else switch(e){case Lae.EXCLAMATION_MARK:this.state=Toe.MARKUP_DECLARATION_OPEN;break;case Lae.SOLIDUS:this.state=Toe.END_TAG_OPEN;break;case Lae.QUESTION_MARK:this._err(Gae.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Toe.BOGUS_COMMENT,this._stateBogusComment(e);break;case Lae.EOF:this._err(Gae.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(Gae.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=Toe.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Ioe(e))this._createEndTagToken(),this.state=Toe.TAG_NAME,this._stateTagName(e);else switch(e){case Lae.GREATER_THAN_SIGN:this._err(Gae.missingEndTagName),this.state=Toe.DATA;break;case Lae.EOF:this._err(Gae.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(Gae.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Toe.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this.state=Toe.BEFORE_ATTRIBUTE_NAME;break;case Lae.SOLIDUS:this.state=Toe.SELF_CLOSING_START_TAG;break;case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentTagToken();break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.tagName+=Pae;break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Noe(e)?Roe(e):e)}}_stateRcdataLessThanSign(e){e===Lae.SOLIDUS?this.state=Toe.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=Toe.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Ioe(e)?(this.state=Toe.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=Toe.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 Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Toe.BEFORE_ATTRIBUTE_NAME,!1;case Lae.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Toe.SELF_CLOSING_START_TAG,!1;case Lae.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Toe.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Toe.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===Lae.SOLIDUS?this.state=Toe.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=Toe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Ioe(e)?(this.state=Toe.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=Toe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Toe.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case Lae.SOLIDUS:this.state=Toe.SCRIPT_DATA_END_TAG_OPEN;break;case Lae.EXCLAMATION_MARK:this.state=Toe.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=Toe.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Ioe(e)?(this.state=Toe.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=Toe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Toe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===Lae.HYPHEN_MINUS?(this.state=Toe.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=Toe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===Lae.HYPHEN_MINUS?(this.state=Toe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=Toe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitChars(Pae);break;case Lae.EOF:this._err(Gae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.state=Toe.SCRIPT_DATA_ESCAPED,this._emitChars(Pae);break;case Lae.EOF:this._err(Gae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Toe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case Lae.HYPHEN_MINUS:this._emitChars("-");break;case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Lae.GREATER_THAN_SIGN:this.state=Toe.SCRIPT_DATA,this._emitChars(">");break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.state=Toe.SCRIPT_DATA_ESCAPED,this._emitChars(Pae);break;case Lae.EOF:this._err(Gae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Toe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Lae.SOLIDUS?this.state=Toe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ioe(e)?(this._emitChars("<"),this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=Toe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Ioe(e)?(this.state=Toe.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=Toe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Toe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(zae,!1)&&Loe(this.preprocessor.peek(zae.length))){this._emitCodePoint(e);for(let e=0;e<zae.length;e++)this._emitCodePoint(this._consume());this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Toe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._emitChars(Pae);break;case Lae.EOF:this._err(Gae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pae);break;case Lae.EOF:this._err(Gae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case Lae.HYPHEN_MINUS:this._emitChars("-");break;case Lae.LESS_THAN_SIGN:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Lae.GREATER_THAN_SIGN:this.state=Toe.SCRIPT_DATA,this._emitChars(">");break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pae);break;case Lae.EOF:this._err(Gae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Lae.SOLIDUS?(this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(zae,!1)&&Loe(this.preprocessor.peek(zae.length))){this._emitCodePoint(e);for(let e=0;e<zae.length;e++)this._emitCodePoint(this._consume());this.state=Toe.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Toe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.SOLIDUS:case Lae.GREATER_THAN_SIGN:case Lae.EOF:this.state=Toe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Lae.EQUALS_SIGN:this._err(Gae.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=Toe.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=Toe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:case Lae.SOLIDUS:case Lae.GREATER_THAN_SIGN:case Lae.EOF:this._leaveAttrName(),this.state=Toe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Lae.EQUALS_SIGN:this._leaveAttrName(),this.state=Toe.BEFORE_ATTRIBUTE_VALUE;break;case Lae.QUOTATION_MARK:case Lae.APOSTROPHE:case Lae.LESS_THAN_SIGN:this._err(Gae.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.currentAttr.name+=Pae;break;default:this.currentAttr.name+=String.fromCodePoint(Noe(e)?Roe(e):e)}}_stateAfterAttributeName(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.SOLIDUS:this.state=Toe.SELF_CLOSING_START_TAG;break;case Lae.EQUALS_SIGN:this.state=Toe.BEFORE_ATTRIBUTE_VALUE;break;case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentTagToken();break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=Toe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.QUOTATION_MARK:this.state=Toe.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:this.state=Toe.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.missingAttributeValue),this.state=Toe.DATA,this.emitCurrentTagToken();break;default:this.state=Toe.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Lae.QUOTATION_MARK:this.state=Toe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Lae.AMPERSAND:this._startCharacterReference();break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.currentAttr.value+=Pae;break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Lae.APOSTROPHE:this.state=Toe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Lae.AMPERSAND:this._startCharacterReference();break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.currentAttr.value+=Pae;break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this._leaveAttrValue(),this.state=Toe.BEFORE_ATTRIBUTE_NAME;break;case Lae.AMPERSAND:this._startCharacterReference();break;case Lae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Toe.DATA,this.emitCurrentTagToken();break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this.currentAttr.value+=Pae;break;case Lae.QUOTATION_MARK:case Lae.APOSTROPHE:case Lae.LESS_THAN_SIGN:case Lae.EQUALS_SIGN:case Lae.GRAVE_ACCENT:this._err(Gae.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this._leaveAttrValue(),this.state=Toe.BEFORE_ATTRIBUTE_NAME;break;case Lae.SOLIDUS:this._leaveAttrValue(),this.state=Toe.SELF_CLOSING_START_TAG;break;case Lae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Toe.DATA,this.emitCurrentTagToken();break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:this._err(Gae.missingWhitespaceBetweenAttributes),this.state=Toe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Lae.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=Toe.DATA,this.emitCurrentTagToken();break;case Lae.EOF:this._err(Gae.eofInTag),this._emitEOFToken();break;default:this._err(Gae.unexpectedSolidusInTag),this.state=Toe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentComment(t);break;case Lae.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.data+=Pae;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Mae,!0)?(this._createCommentToken(Mae.length+1),this.state=Toe.COMMENT_START):this._consumeSequenceIfMatch(jae,!1)?(this.currentLocation=this.getCurrentLocation(jae.length+1),this.state=Toe.DOCTYPE):this._consumeSequenceIfMatch(Fae,!0)?this.inForeignNode?this.state=Toe.CDATA_SECTION:(this._err(Gae.cdataInHtmlContent),this._createCommentToken(Fae.length+1),this.currentToken.data="[CDATA[",this.state=Toe.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Gae.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Toe.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.COMMENT_START_DASH;break;case Lae.GREATER_THAN_SIGN:{this._err(Gae.abruptClosingOfEmptyComment),this.state=Toe.DATA;const e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Toe.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.COMMENT_END;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.abruptClosingOfEmptyComment),this.state=Toe.DATA,this.emitCurrentComment(t);break;case Lae.EOF:this._err(Gae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=Toe.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.COMMENT_END_DASH;break;case Lae.LESS_THAN_SIGN:t.data+="<",this.state=Toe.COMMENT_LESS_THAN_SIGN;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.data+=Pae;break;case Lae.EOF:this._err(Gae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case Lae.EXCLAMATION_MARK:t.data+="!",this.state=Toe.COMMENT_LESS_THAN_SIGN_BANG;break;case Lae.LESS_THAN_SIGN:t.data+="<";break;default:this.state=Toe.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Lae.HYPHEN_MINUS?this.state=Toe.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Toe.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Lae.HYPHEN_MINUS?this.state=Toe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Toe.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Lae.GREATER_THAN_SIGN&&e!==Lae.EOF&&this._err(Gae.nestedComment),this.state=Toe.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case Lae.HYPHEN_MINUS:this.state=Toe.COMMENT_END;break;case Lae.EOF:this._err(Gae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=Toe.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentComment(t);break;case Lae.EXCLAMATION_MARK:this.state=Toe.COMMENT_END_BANG;break;case Lae.HYPHEN_MINUS:t.data+="-";break;case Lae.EOF:this._err(Gae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=Toe.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case Lae.HYPHEN_MINUS:t.data+="--!",this.state=Toe.COMMENT_END_DASH;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.incorrectlyClosedComment),this.state=Toe.DATA,this.emitCurrentComment(t);break;case Lae.EOF:this._err(Gae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=Toe.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this.state=Toe.BEFORE_DOCTYPE_NAME;break;case Lae.GREATER_THAN_SIGN:this.state=Toe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Lae.EOF:{this._err(Gae.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(Gae.missingWhitespaceBeforeDoctypeName),this.state=Toe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Noe(e))this._createDoctypeToken(String.fromCharCode(Roe(e))),this.state=Toe.DOCTYPE_NAME;else switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),this._createDoctypeToken(Pae),this.state=Toe.DOCTYPE_NAME;break;case Lae.GREATER_THAN_SIGN:{this._err(Gae.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Toe.DATA;break}case Lae.EOF:{this._err(Gae.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=Toe.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this.state=Toe.AFTER_DOCTYPE_NAME;break;case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.name+=Pae;break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Noe(e)?Roe(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Bae,!1)?this.state=Toe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Hae,!1)?this.state=Toe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Gae.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this.state=Toe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Lae.QUOTATION_MARK:this._err(Gae.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=Toe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:this._err(Gae.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=Toe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.QUOTATION_MARK:t.publicId="",this.state=Toe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:t.publicId="",this.state=Toe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Lae.QUOTATION_MARK:this.state=Toe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.publicId+=Pae;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.EOF:this._err(Gae.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 Lae.APOSTROPHE:this.state=Toe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.publicId+=Pae;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.EOF:this._err(Gae.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 Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this.state=Toe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.QUOTATION_MARK:this._err(Gae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:this._err(Gae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.QUOTATION_MARK:t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:this.state=Toe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Lae.QUOTATION_MARK:this._err(Gae.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:this._err(Gae.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.QUOTATION_MARK:t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Lae.APOSTROPHE:t.systemId="",this.state=Toe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Toe.DATA,this.emitCurrentDoctype(t);break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Lae.QUOTATION_MARK:this.state=Toe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.systemId+=Pae;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.EOF:this._err(Gae.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 Lae.APOSTROPHE:this.state=Toe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter),t.systemId+=Pae;break;case Lae.GREATER_THAN_SIGN:this._err(Gae.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.EOF:this._err(Gae.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 Lae.SPACE:case Lae.LINE_FEED:case Lae.TABULATION:case Lae.FORM_FEED:break;case Lae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.EOF:this._err(Gae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Gae.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Toe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case Lae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Toe.DATA;break;case Lae.NULL:this._err(Gae.unexpectedNullCharacter);break;case Lae.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Lae.RIGHT_SQUARE_BRACKET:this.state=Toe.CDATA_SECTION_BRACKET;break;case Lae.EOF:this._err(Gae.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Lae.RIGHT_SQUARE_BRACKET?this.state=Toe.CDATA_SECTION_END:(this._emitChars("]"),this.state=Toe.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Lae.GREATER_THAN_SIGN:this.state=Toe.DATA;break;case Lae.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=Toe.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(Lae.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ooe(this.preprocessor.peek(1))?Toe.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Ooe(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===Lae.SEMICOLON&&this._err(Gae.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const Moe=new Set([moe.DD,moe.DT,moe.LI,moe.OPTGROUP,moe.OPTION,moe.P,moe.RB,moe.RP,moe.RT,moe.RTC]),Foe=new Set([...Moe,moe.CAPTION,moe.COLGROUP,moe.TBODY,moe.TD,moe.TFOOT,moe.TH,moe.THEAD,moe.TR]),joe=new Set([moe.APPLET,moe.CAPTION,moe.HTML,moe.MARQUEE,moe.OBJECT,moe.TABLE,moe.TD,moe.TEMPLATE,moe.TH]),zoe=new Set([...joe,moe.OL,moe.UL]),Boe=new Set([...joe,moe.BUTTON]),Hoe=new Set([moe.ANNOTATION_XML,moe.MI,moe.MN,moe.MO,moe.MS,moe.MTEXT]),Uoe=new Set([moe.DESC,moe.FOREIGN_OBJECT,moe.TITLE]),$oe=new Set([moe.TR,moe.TEMPLATE,moe.HTML]),Voe=new Set([moe.TBODY,moe.TFOOT,moe.THEAD,moe.TEMPLATE,moe.HTML]),Goe=new Set([moe.TABLE,moe.TEMPLATE,moe.HTML]),qoe=new Set([moe.TD,moe.TH]);class Woe{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=moe.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===moe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===soe.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])!==soe.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(Soe,soe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(qoe,soe.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(Goe,soe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Voe,soe.HTML)}clearBackToTableRowContext(){this.clearBackTo($oe,soe.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]===moe.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]===moe.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 soe.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case soe.SVG:if(Uoe.has(r))return!1;break;case soe.MATHML:if(Hoe.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,joe)}hasInListItemScope(e){return this.hasInDynamicScope(e,zoe)}hasInButtonScope(e){return this.hasInDynamicScope(e,Boe)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case soe.HTML:if(Soe.has(t))return!0;if(joe.has(t))return!1;break;case soe.SVG:if(Uoe.has(t))return!1;break;case soe.MATHML:if(Hoe.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===soe.HTML)switch(this.tagIDs[t]){case e:return!0;case moe.TABLE:case moe.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===soe.HTML)switch(this.tagIDs[e]){case moe.TBODY:case moe.THEAD:case moe.TFOOT:return!0;case moe.TABLE:case moe.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===soe.HTML)switch(this.tagIDs[t]){case e:return!0;case moe.OPTION:case moe.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;void 0!==this.currentTagId&&Moe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&Foe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&Foe.has(this.currentTagId);)this.pop()}}var Yoe,Zoe;(Zoe=Yoe||(Yoe={}))[Zoe.Marker=0]="Marker",Zoe[Zoe.Element=1]="Element";const Koe={type:Yoe.Marker};class Xoe{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===Yoe.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(Koe)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Yoe.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Yoe.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(Koe);-1===e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===Yoe.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===Yoe.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===Yoe.Element&&t.element===e))}}const Qoe={createDocument:()=>({nodeName:"#document",mode:doe.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};Qoe.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(Qoe.isTextNode(n))return void(n.value+=t)}Qoe.appendChild(e,Qoe.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Qoe.isTextNode(r)?r.value+=t:Qoe.insertBefore(e,Qoe.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}}},Joe="html",eie=["+//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//"],tie=[...eie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],nie=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),rie=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],aie=[...rie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function oie(e,t){return t.some((t=>e.startsWith(t)))}const iie="text/html",sie="application/xhtml+xml",lie=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]))),cie=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:soe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:soe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:soe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:soe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:soe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:soe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:soe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:soe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:soe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:soe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:soe.XMLNS}]]),uie=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]))),die=new Set([moe.B,moe.BIG,moe.BLOCKQUOTE,moe.BODY,moe.BR,moe.CENTER,moe.CODE,moe.DD,moe.DIV,moe.DL,moe.DT,moe.EM,moe.EMBED,moe.H1,moe.H2,moe.H3,moe.H4,moe.H5,moe.H6,moe.HEAD,moe.HR,moe.I,moe.IMG,moe.LI,moe.LISTING,moe.MENU,moe.META,moe.NOBR,moe.OL,moe.P,moe.PRE,moe.RUBY,moe.S,moe.SMALL,moe.SPAN,moe.STRONG,moe.STRIKE,moe.SUB,moe.SUP,moe.TABLE,moe.TT,moe.U,moe.UL,moe.VAR]);function pie(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function fie(e){for(let t=0;t<e.attrs.length;t++){const n=lie.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function hie(e){for(let t=0;t<e.attrs.length;t++){const n=cie.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 mie(e,t,n,r){return(!r||r===soe.HTML)&&function(e,t,n){if(t===soe.MATHML&&e===moe.ANNOTATION_XML)for(let r=0;r<n.length;r++)if(n[r].name===coe.ENCODING){const e=n[r].value.toLowerCase();return e===iie||e===sie}return t===soe.SVG&&(e===moe.FOREIGN_OBJECT||e===moe.DESC||e===moe.TITLE)}(e,t,n)||(!r||r===soe.MATHML)&&function(e,t){return t===soe.MATHML&&(e===moe.MI||e===moe.MO||e===moe.MN||e===moe.MS||e===moe.MTEXT)}(e,t)}var gie,yie;(yie=gie||(gie={}))[yie.INITIAL=0]="INITIAL",yie[yie.BEFORE_HTML=1]="BEFORE_HTML",yie[yie.BEFORE_HEAD=2]="BEFORE_HEAD",yie[yie.IN_HEAD=3]="IN_HEAD",yie[yie.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",yie[yie.AFTER_HEAD=5]="AFTER_HEAD",yie[yie.IN_BODY=6]="IN_BODY",yie[yie.TEXT=7]="TEXT",yie[yie.IN_TABLE=8]="IN_TABLE",yie[yie.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",yie[yie.IN_CAPTION=10]="IN_CAPTION",yie[yie.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",yie[yie.IN_TABLE_BODY=12]="IN_TABLE_BODY",yie[yie.IN_ROW=13]="IN_ROW",yie[yie.IN_CELL=14]="IN_CELL",yie[yie.IN_SELECT=15]="IN_SELECT",yie[yie.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",yie[yie.IN_TEMPLATE=17]="IN_TEMPLATE",yie[yie.AFTER_BODY=18]="AFTER_BODY",yie[yie.IN_FRAMESET=19]="IN_FRAMESET",yie[yie.AFTER_FRAMESET=20]="AFTER_FRAMESET",yie[yie.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",yie[yie.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET";const bie={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},vie=new Set([moe.TABLE,moe.TBODY,moe.TFOOT,moe.THEAD,moe.TR]),kie={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Qoe,onParseError:null};class xie{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=gie.INITIAL,this.originalInsertionMode=gie.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={...kie,...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 Doe(this.options,this),this.activeFormattingElements=new Xoe(this.treeAdapter),this.fragmentContextID=n?woe(this.treeAdapter.getTagName(n)):moe.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new Woe(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={...kie,...t};null!=e||(e=n.treeAdapter.createElement(foe.TEMPLATE,soe.HTML,[]));const r=n.treeAdapter.createElement("documentmock",soe.HTML,[]),a=new this(n,r,e);return a.fragmentContextID===moe.TEMPLATE&&a.tmplInsertionModeStack.unshift(gie.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:bie,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)===soe.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,soe.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=gie.TEXT}switchToPlaintextParsing(){this.insertionMode=gie.TEXT,this.originalInsertionMode=gie.IN_BODY,this.tokenizer.state=Aoe.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)===foe.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===soe.HTML)switch(this.fragmentContextID){case moe.TITLE:case moe.TEXTAREA:this.tokenizer.state=Aoe.RCDATA;break;case moe.STYLE:case moe.XMP:case moe.IFRAME:case moe.NOEMBED:case moe.NOFRAMES:case moe.NOSCRIPT:this.tokenizer.state=Aoe.RAWTEXT;break;case moe.SCRIPT:this.tokenizer.state=Aoe.SCRIPT_DATA;break;case moe.PLAINTEXT:this.tokenizer.state=Aoe.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,soe.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,soe.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(foe.HTML,soe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,moe.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===Yae.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!==moe.SVG||this.treeAdapter.getTagName(t)!==foe.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==soe.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===moe.MGLYPH||e.tagID===moe.MALIGNMARK)&&void 0!==n&&!this._isIntegrationPoint(n,t,soe.HTML))}_processToken(e){switch(e.type){case Yae.CHARACTER:this.onCharacter(e);break;case Yae.NULL_CHARACTER:this.onNullCharacter(e);break;case Yae.COMMENT:this.onComment(e);break;case Yae.DOCTYPE:this.onDoctype(e);break;case Yae.START_TAG:this._processStartTag(e);break;case Yae.END_TAG:this.onEndTag(e);break;case Yae.EOF:this.onEof(e);break;case Yae.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return mie(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===Yoe.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=gie.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(moe.P),this.openElements.popUntilTagNamePopped(moe.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case moe.TR:return void(this.insertionMode=gie.IN_ROW);case moe.TBODY:case moe.THEAD:case moe.TFOOT:return void(this.insertionMode=gie.IN_TABLE_BODY);case moe.CAPTION:return void(this.insertionMode=gie.IN_CAPTION);case moe.COLGROUP:return void(this.insertionMode=gie.IN_COLUMN_GROUP);case moe.TABLE:return void(this.insertionMode=gie.IN_TABLE);case moe.BODY:return void(this.insertionMode=gie.IN_BODY);case moe.FRAMESET:return void(this.insertionMode=gie.IN_FRAMESET);case moe.SELECT:return void this._resetInsertionModeForSelect(e);case moe.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case moe.HTML:return void(this.insertionMode=this.headElement?gie.AFTER_HEAD:gie.BEFORE_HEAD);case moe.TD:case moe.TH:if(e>0)return void(this.insertionMode=gie.IN_CELL);break;case moe.HEAD:if(e>0)return void(this.insertionMode=gie.IN_HEAD)}this.insertionMode=gie.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===moe.TEMPLATE)break;if(e===moe.TABLE)return void(this.insertionMode=gie.IN_SELECT_IN_TABLE)}this.insertionMode=gie.IN_SELECT}_isElementCausesFosterParenting(e){return vie.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 moe.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===soe.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case moe.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 _oe[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 gie.INITIAL:Oie(this,e);break;case gie.BEFORE_HTML:Rie(this,e);break;case gie.BEFORE_HEAD:Pie(this,e);break;case gie.IN_HEAD:Mie(this,e);break;case gie.IN_HEAD_NO_SCRIPT:Fie(this,e);break;case gie.AFTER_HEAD:jie(this,e);break;case gie.IN_BODY:case gie.IN_CAPTION:case gie.IN_CELL:case gie.IN_TEMPLATE:Hie(this,e);break;case gie.TEXT:case gie.IN_SELECT:case gie.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case gie.IN_TABLE:case gie.IN_TABLE_BODY:case gie.IN_ROW:Kie(this,e);break;case gie.IN_TABLE_TEXT:tse(this,e);break;case gie.IN_COLUMN_GROUP:ose(this,e);break;case gie.AFTER_BODY:hse(this,e);break;case gie.AFTER_AFTER_BODY:mse(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=Pae,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case gie.INITIAL:Oie(this,e);break;case gie.BEFORE_HTML:Rie(this,e);break;case gie.BEFORE_HEAD:Pie(this,e);break;case gie.IN_HEAD:Mie(this,e);break;case gie.IN_HEAD_NO_SCRIPT:Fie(this,e);break;case gie.AFTER_HEAD:jie(this,e);break;case gie.TEXT:this._insertCharacters(e);break;case gie.IN_TABLE:case gie.IN_TABLE_BODY:case gie.IN_ROW:Kie(this,e);break;case gie.IN_COLUMN_GROUP:ose(this,e);break;case gie.AFTER_BODY:hse(this,e);break;case gie.AFTER_AFTER_BODY:mse(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Nie(this,e);else switch(this.insertionMode){case gie.INITIAL:case gie.BEFORE_HTML:case gie.BEFORE_HEAD:case gie.IN_HEAD:case gie.IN_HEAD_NO_SCRIPT:case gie.AFTER_HEAD:case gie.IN_BODY:case gie.IN_TABLE:case gie.IN_CAPTION:case gie.IN_COLUMN_GROUP:case gie.IN_TABLE_BODY:case gie.IN_ROW:case gie.IN_CELL:case gie.IN_SELECT:case gie.IN_SELECT_IN_TABLE:case gie.IN_TEMPLATE:case gie.IN_FRAMESET:case gie.AFTER_FRAMESET:Nie(this,e);break;case gie.IN_TABLE_TEXT:nse(this,e);break;case gie.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case gie.AFTER_AFTER_BODY:case gie.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case gie.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?doe.QUIRKS:function(e){if(e.name!==Joe)return doe.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return doe.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),nie.has(n))return doe.QUIRKS;let e=null===t?tie:eie;if(oie(n,e))return doe.QUIRKS;if(e=null===t?rie:aie,oie(n,e))return doe.LIMITED_QUIRKS}return doe.NO_QUIRKS}(t);(function(e){return e.name===Joe&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err(t,Gae.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=gie.BEFORE_HTML}(this,e);break;case gie.BEFORE_HEAD:case gie.IN_HEAD:case gie.IN_HEAD_NO_SCRIPT:case gie.AFTER_HEAD:this._err(e,Gae.misplacedDoctype);break;case gie.IN_TABLE_TEXT:nse(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Gae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID;return t===moe.FONT&&e.attrs.some((({name:e})=>e===coe.COLOR||e===coe.SIZE||e===coe.FACE))||die.has(t)}(t))gse(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===soe.MATHML?pie(t):r===soe.SVG&&(!function(e){const t=uie.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=woe(e.tagName))}(t),fie(t)),hie(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 gie.INITIAL:Oie(this,e);break;case gie.BEFORE_HTML:!function(e,t){t.tagID===moe.HTML?(e._insertElement(t,soe.HTML),e.insertionMode=gie.BEFORE_HEAD):Rie(e,t)}(this,e);break;case gie.BEFORE_HEAD:!function(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.HEAD:e._insertElement(t,soe.HTML),e.headElement=e.openElements.current,e.insertionMode=gie.IN_HEAD;break;default:Pie(e,t)}}(this,e);break;case gie.IN_HEAD:Lie(this,e);break;case gie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.BASEFONT:case moe.BGSOUND:case moe.HEAD:case moe.LINK:case moe.META:case moe.NOFRAMES:case moe.STYLE:Lie(e,t);break;case moe.NOSCRIPT:e._err(t,Gae.nestedNoscriptInHead);break;default:Fie(e,t)}}(this,e);break;case gie.AFTER_HEAD:!function(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.BODY:e._insertElement(t,soe.HTML),e.framesetOk=!1,e.insertionMode=gie.IN_BODY;break;case moe.FRAMESET:e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_FRAMESET;break;case moe.BASE:case moe.BASEFONT:case moe.BGSOUND:case moe.LINK:case moe.META:case moe.NOFRAMES:case moe.SCRIPT:case moe.STYLE:case moe.TEMPLATE:case moe.TITLE:e._err(t,Gae.abandonedHeadElementChild),e.openElements.push(e.headElement,moe.HEAD),Lie(e,t),e.openElements.remove(e.headElement);break;case moe.HEAD:e._err(t,Gae.misplacedStartTagForHeadElement);break;default:jie(e,t)}}(this,e);break;case gie.IN_BODY:qie(this,e);break;case gie.IN_TABLE:Xie(this,e);break;case gie.IN_TABLE_TEXT:nse(this,e);break;case gie.IN_CAPTION:!function(e,t){const n=t.tagID;rse.has(n)?e.openElements.hasInTableScope(moe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(moe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=gie.IN_TABLE,Xie(e,t)):qie(e,t)}(this,e);break;case gie.IN_COLUMN_GROUP:ase(this,e);break;case gie.IN_TABLE_BODY:ise(this,e);break;case gie.IN_ROW:lse(this,e);break;case gie.IN_CELL:!function(e,t){const n=t.tagID;rse.has(n)?(e.openElements.hasInTableScope(moe.TD)||e.openElements.hasInTableScope(moe.TH))&&(e._closeTableCell(),lse(e,t)):qie(e,t)}(this,e);break;case gie.IN_SELECT:use(this,e);break;case gie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===moe.CAPTION||n===moe.TABLE||n===moe.TBODY||n===moe.TFOOT||n===moe.THEAD||n===moe.TR||n===moe.TD||n===moe.TH?(e.openElements.popUntilTagNamePopped(moe.SELECT),e._resetInsertionMode(),e._processStartTag(t)):use(e,t)}(this,e);break;case gie.IN_TEMPLATE:!function(e,t){switch(t.tagID){case moe.BASE:case moe.BASEFONT:case moe.BGSOUND:case moe.LINK:case moe.META:case moe.NOFRAMES:case moe.SCRIPT:case moe.STYLE:case moe.TEMPLATE:case moe.TITLE:Lie(e,t);break;case moe.CAPTION:case moe.COLGROUP:case moe.TBODY:case moe.TFOOT:case moe.THEAD:e.tmplInsertionModeStack[0]=gie.IN_TABLE,e.insertionMode=gie.IN_TABLE,Xie(e,t);break;case moe.COL:e.tmplInsertionModeStack[0]=gie.IN_COLUMN_GROUP,e.insertionMode=gie.IN_COLUMN_GROUP,ase(e,t);break;case moe.TR:e.tmplInsertionModeStack[0]=gie.IN_TABLE_BODY,e.insertionMode=gie.IN_TABLE_BODY,ise(e,t);break;case moe.TD:case moe.TH:e.tmplInsertionModeStack[0]=gie.IN_ROW,e.insertionMode=gie.IN_ROW,lse(e,t);break;default:e.tmplInsertionModeStack[0]=gie.IN_BODY,e.insertionMode=gie.IN_BODY,qie(e,t)}}(this,e);break;case gie.AFTER_BODY:!function(e,t){t.tagID===moe.HTML?qie(e,t):hse(e,t)}(this,e);break;case gie.IN_FRAMESET:!function(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.FRAMESET:e._insertElement(t,soe.HTML);break;case moe.FRAME:e._appendElement(t,soe.HTML),t.ackSelfClosing=!0;break;case moe.NOFRAMES:Lie(e,t)}}(this,e);break;case gie.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.NOFRAMES:Lie(e,t)}}(this,e);break;case gie.AFTER_AFTER_BODY:!function(e,t){t.tagID===moe.HTML?qie(e,t):mse(e,t)}(this,e);break;case gie.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.NOFRAMES:Lie(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===moe.P||t.tagID===moe.BR)return gse(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)===soe.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 gie.INITIAL:Oie(this,e);break;case gie.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==moe.HTML&&n!==moe.HEAD&&n!==moe.BODY&&n!==moe.BR||Rie(e,t)}(this,e);break;case gie.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===moe.HEAD||n===moe.BODY||n===moe.HTML||n===moe.BR?Pie(e,t):e._err(t,Gae.endTagWithoutMatchingOpenElement)}(this,e);break;case gie.IN_HEAD:!function(e,t){switch(t.tagID){case moe.HEAD:e.openElements.pop(),e.insertionMode=gie.AFTER_HEAD;break;case moe.BODY:case moe.BR:case moe.HTML:Mie(e,t);break;case moe.TEMPLATE:Die(e,t);break;default:e._err(t,Gae.endTagWithoutMatchingOpenElement)}}(this,e);break;case gie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case moe.NOSCRIPT:e.openElements.pop(),e.insertionMode=gie.IN_HEAD;break;case moe.BR:Fie(e,t);break;default:e._err(t,Gae.endTagWithoutMatchingOpenElement)}}(this,e);break;case gie.AFTER_HEAD:!function(e,t){switch(t.tagID){case moe.BODY:case moe.HTML:case moe.BR:jie(e,t);break;case moe.TEMPLATE:Die(e,t);break;default:e._err(t,Gae.endTagWithoutMatchingOpenElement)}}(this,e);break;case gie.IN_BODY:Yie(this,e);break;case gie.TEXT:!function(e,t){var n;t.tagID===moe.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 gie.IN_TABLE:Qie(this,e);break;case gie.IN_TABLE_TEXT:nse(this,e);break;case gie.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case moe.CAPTION:case moe.TABLE:e.openElements.hasInTableScope(moe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(moe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=gie.IN_TABLE,n===moe.TABLE&&Qie(e,t));break;case moe.BODY:case moe.COL:case moe.COLGROUP:case moe.HTML:case moe.TBODY:case moe.TD:case moe.TFOOT:case moe.TH:case moe.THEAD:case moe.TR:break;default:Yie(e,t)}}(this,e);break;case gie.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case moe.COLGROUP:e.openElements.currentTagId===moe.COLGROUP&&(e.openElements.pop(),e.insertionMode=gie.IN_TABLE);break;case moe.TEMPLATE:Die(e,t);break;case moe.COL:break;default:ose(e,t)}}(this,e);break;case gie.IN_TABLE_BODY:sse(this,e);break;case gie.IN_ROW:cse(this,e);break;case gie.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case moe.TD:case moe.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=gie.IN_ROW);break;case moe.TABLE:case moe.TBODY:case moe.TFOOT:case moe.THEAD:case moe.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),cse(e,t));break;case moe.BODY:case moe.CAPTION:case moe.COL:case moe.COLGROUP:case moe.HTML:break;default:Yie(e,t)}}(this,e);break;case gie.IN_SELECT:dse(this,e);break;case gie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===moe.CAPTION||n===moe.TABLE||n===moe.TBODY||n===moe.TFOOT||n===moe.THEAD||n===moe.TR||n===moe.TD||n===moe.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(moe.SELECT),e._resetInsertionMode(),e.onEndTag(t)):dse(e,t)}(this,e);break;case gie.IN_TEMPLATE:!function(e,t){t.tagID===moe.TEMPLATE&&Die(e,t)}(this,e);break;case gie.AFTER_BODY:fse(this,e);break;case gie.IN_FRAMESET:!function(e,t){t.tagID!==moe.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===moe.FRAMESET||(e.insertionMode=gie.AFTER_FRAMESET))}(this,e);break;case gie.AFTER_FRAMESET:!function(e,t){t.tagID===moe.HTML&&(e.insertionMode=gie.AFTER_AFTER_FRAMESET)}(this,e);break;case gie.AFTER_AFTER_BODY:mse(this,e)}}onEof(e){switch(this.insertionMode){case gie.INITIAL:Oie(this,e);break;case gie.BEFORE_HTML:Rie(this,e);break;case gie.BEFORE_HEAD:Pie(this,e);break;case gie.IN_HEAD:Mie(this,e);break;case gie.IN_HEAD_NO_SCRIPT:Fie(this,e);break;case gie.AFTER_HEAD:jie(this,e);break;case gie.IN_BODY:case gie.IN_TABLE:case gie.IN_CAPTION:case gie.IN_COLUMN_GROUP:case gie.IN_TABLE_BODY:case gie.IN_ROW:case gie.IN_CELL:case gie.IN_SELECT:case gie.IN_SELECT_IN_TABLE:Zie(this,e);break;case gie.TEXT:!function(e,t){e._err(t,Gae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case gie.IN_TABLE_TEXT:nse(this,e);break;case gie.IN_TEMPLATE:pse(this,e);break;case gie.AFTER_BODY:case gie.IN_FRAMESET:case gie.AFTER_FRAMESET:case gie.AFTER_AFTER_BODY:case gie.AFTER_AFTER_FRAMESET:Iie(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Lae.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 gie.IN_HEAD:case gie.IN_HEAD_NO_SCRIPT:case gie.AFTER_HEAD:case gie.TEXT:case gie.IN_COLUMN_GROUP:case gie.IN_SELECT:case gie.IN_SELECT_IN_TABLE:case gie.IN_FRAMESET:case gie.AFTER_FRAMESET:this._insertCharacters(e);break;case gie.IN_BODY:case gie.IN_CAPTION:case gie.IN_CELL:case gie.IN_TEMPLATE:case gie.AFTER_BODY:case gie.AFTER_AFTER_BODY:case gie.AFTER_AFTER_FRAMESET:Bie(this,e);break;case gie.IN_TABLE:case gie.IN_TABLE_BODY:case gie.IN_ROW:Kie(this,e);break;case gie.IN_TABLE_TEXT:ese(this,e)}}}function wie(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):Wie(e,t),n}function Eie(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 _ie(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=Sie(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function Sie(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 Tie(e,t,n){const r=woe(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);r===moe.TEMPLATE&&a===soe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Cie(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 Aie(e,t){for(let n=0;n<8;n++){const n=wie(e,t);if(!n)break;const r=Eie(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;const a=_ie(e,r,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),o&&Tie(e,o,a),Cie(e,r,n)}}function Nie(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Iie(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 Oie(e,t){e._err(t,Gae.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,doe.QUIRKS),e.insertionMode=gie.BEFORE_HTML,e._processToken(t)}function Rie(e,t){e._insertFakeRootElement(),e.insertionMode=gie.BEFORE_HEAD,e._processToken(t)}function Pie(e,t){e._insertFakeElement(foe.HEAD,moe.HEAD),e.headElement=e.openElements.current,e.insertionMode=gie.IN_HEAD,e._processToken(t)}function Lie(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.BASE:case moe.BASEFONT:case moe.BGSOUND:case moe.LINK:case moe.META:e._appendElement(t,soe.HTML),t.ackSelfClosing=!0;break;case moe.TITLE:e._switchToTextParsing(t,Aoe.RCDATA);break;case moe.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Aoe.RAWTEXT):(e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_HEAD_NO_SCRIPT);break;case moe.NOFRAMES:case moe.STYLE:e._switchToTextParsing(t,Aoe.RAWTEXT);break;case moe.SCRIPT:e._switchToTextParsing(t,Aoe.SCRIPT_DATA);break;case moe.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=gie.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(gie.IN_TEMPLATE);break;case moe.HEAD:e._err(t,Gae.misplacedStartTagForHeadElement);break;default:Mie(e,t)}}function Die(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==moe.TEMPLATE&&e._err(t,Gae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(moe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Gae.endTagWithoutMatchingOpenElement)}function Mie(e,t){e.openElements.pop(),e.insertionMode=gie.AFTER_HEAD,e._processToken(t)}function Fie(e,t){const n=t.type===Yae.EOF?Gae.openElementsLeftAfterEof:Gae.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=gie.IN_HEAD,e._processToken(t)}function jie(e,t){e._insertFakeElement(foe.BODY,moe.BODY),e.insertionMode=gie.IN_BODY,zie(e,t)}function zie(e,t){switch(t.type){case Yae.CHARACTER:Hie(e,t);break;case Yae.WHITESPACE_CHARACTER:Bie(e,t);break;case Yae.COMMENT:Nie(e,t);break;case Yae.START_TAG:qie(e,t);break;case Yae.END_TAG:Yie(e,t);break;case Yae.EOF:Zie(e,t)}}function Bie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Hie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Uie(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,soe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function $ie(e){const t=Kae(e,coe.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function Vie(e,t){e._switchToTextParsing(t,Aoe.RAWTEXT)}function Gie(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML)}function qie(e,t){switch(t.tagID){case moe.I:case moe.S:case moe.B:case moe.U:case moe.EM:case moe.TT:case moe.BIG:case moe.CODE:case moe.FONT:case moe.SMALL:case moe.STRIKE:case moe.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case moe.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(foe.A);n&&(Aie(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case moe.H1:case moe.H2:case moe.H3:case moe.H4:case moe.H5:case moe.H6:!function(e,t){e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),void 0!==e.openElements.currentTagId&&Soe.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,soe.HTML)}(e,t);break;case moe.P:case moe.DL:case moe.OL:case moe.UL:case moe.DIV:case moe.DIR:case moe.NAV:case moe.MAIN:case moe.MENU:case moe.ASIDE:case moe.CENTER:case moe.FIGURE:case moe.FOOTER:case moe.HEADER:case moe.HGROUP:case moe.DIALOG:case moe.DETAILS:case moe.ADDRESS:case moe.ARTICLE:case moe.SEARCH:case moe.SECTION:case moe.SUMMARY:case moe.FIELDSET:case moe.BLOCKQUOTE:case moe.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._insertElement(t,soe.HTML)}(e,t);break;case moe.LI:case moe.DD:case moe.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===moe.LI&&t===moe.LI||(n===moe.DD||n===moe.DT)&&(t===moe.DD||t===moe.DT)){e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t);break}if(t!==moe.ADDRESS&&t!==moe.DIV&&t!==moe.P&&e._isSpecialElement(e.openElements.items[r],t))break}e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._insertElement(t,soe.HTML)}(e,t);break;case moe.BR:case moe.IMG:case moe.WBR:case moe.AREA:case moe.EMBED:case moe.KEYGEN:Uie(e,t);break;case moe.HR:!function(e,t){e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._appendElement(t,soe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case moe.RB:case moe.RTC:!function(e,t){e.openElements.hasInScope(moe.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,soe.HTML)}(e,t);break;case moe.RT:case moe.RP:!function(e,t){e.openElements.hasInScope(moe.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(moe.RTC),e._insertElement(t,soe.HTML)}(e,t);break;case moe.PRE:case moe.LISTING:!function(e,t){e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._insertElement(t,soe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case moe.XMP:!function(e,t){e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Aoe.RAWTEXT)}(e,t);break;case moe.SVG:!function(e,t){e._reconstructActiveFormattingElements(),fie(t),hie(t),t.selfClosing?e._appendElement(t,soe.SVG):e._insertElement(t,soe.SVG),t.ackSelfClosing=!0}(e,t);break;case moe.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case moe.BASE:case moe.LINK:case moe.META:case moe.STYLE:case moe.TITLE:case moe.SCRIPT:case moe.BGSOUND:case moe.BASEFONT:case moe.TEMPLATE:Lie(e,t);break;case moe.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 moe.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._insertElement(t,soe.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case moe.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(moe.NOBR)&&(Aie(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,soe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case moe.MATH:!function(e,t){e._reconstructActiveFormattingElements(),pie(t),hie(t),t.selfClosing?e._appendElement(t,soe.MATHML):e._insertElement(t,soe.MATHML),t.ackSelfClosing=!0}(e,t);break;case moe.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==doe.QUIRKS&&e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._insertElement(t,soe.HTML),e.framesetOk=!1,e.insertionMode=gie.IN_TABLE}(e,t);break;case moe.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,soe.HTML),$ie(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case moe.PARAM:case moe.TRACK:case moe.SOURCE:!function(e,t){e._appendElement(t,soe.HTML),t.ackSelfClosing=!0}(e,t);break;case moe.IMAGE:!function(e,t){t.tagName=foe.IMG,t.tagID=moe.IMG,Uie(e,t)}(e,t);break;case moe.BUTTON:!function(e,t){e.openElements.hasInScope(moe.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(moe.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML),e.framesetOk=!1}(e,t);break;case moe.APPLET:case moe.OBJECT:case moe.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case moe.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Aoe.RAWTEXT)}(e,t);break;case moe.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===gie.IN_TABLE||e.insertionMode===gie.IN_CAPTION||e.insertionMode===gie.IN_TABLE_BODY||e.insertionMode===gie.IN_ROW||e.insertionMode===gie.IN_CELL?gie.IN_SELECT_IN_TABLE:gie.IN_SELECT}(e,t);break;case moe.OPTION:case moe.OPTGROUP:!function(e,t){e.openElements.currentTagId===moe.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,soe.HTML)}(e,t);break;case moe.NOEMBED:case moe.NOFRAMES:Vie(e,t);break;case moe.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_FRAMESET)}(e,t);break;case moe.TEXTAREA:!function(e,t){e._insertElement(t,soe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Aoe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=gie.TEXT}(e,t);break;case moe.NOSCRIPT:e.options.scriptingEnabled?Vie(e,t):Gie(e,t);break;case moe.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(moe.P)&&e._closePElement(),e._insertElement(t,soe.HTML),e.tokenizer.state=Aoe.PLAINTEXT}(e,t);break;case moe.COL:case moe.TH:case moe.TD:case moe.TR:case moe.HEAD:case moe.FRAME:case moe.TBODY:case moe.TFOOT:case moe.THEAD:case moe.CAPTION:case moe.COLGROUP:break;default:Gie(e,t)}}function Wie(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!==moe.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 Yie(e,t){switch(t.tagID){case moe.A:case moe.B:case moe.I:case moe.S:case moe.U:case moe.EM:case moe.TT:case moe.BIG:case moe.CODE:case moe.FONT:case moe.NOBR:case moe.SMALL:case moe.STRIKE:case moe.STRONG:Aie(e,t);break;case moe.P:!function(e){e.openElements.hasInButtonScope(moe.P)||e._insertFakeElement(foe.P,moe.P),e._closePElement()}(e);break;case moe.DL:case moe.UL:case moe.OL:case moe.DIR:case moe.DIV:case moe.NAV:case moe.PRE:case moe.MAIN:case moe.MENU:case moe.ASIDE:case moe.BUTTON:case moe.CENTER:case moe.FIGURE:case moe.FOOTER:case moe.HEADER:case moe.HGROUP:case moe.DIALOG:case moe.ADDRESS:case moe.ARTICLE:case moe.DETAILS:case moe.SEARCH:case moe.SECTION:case moe.SUMMARY:case moe.LISTING:case moe.FIELDSET:case moe.BLOCKQUOTE:case moe.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case moe.LI:!function(e){e.openElements.hasInListItemScope(moe.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(moe.LI),e.openElements.popUntilTagNamePopped(moe.LI))}(e);break;case moe.DD:case moe.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case moe.H1:case moe.H2:case moe.H3:case moe.H4:case moe.H5:case moe.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case moe.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(foe.BR,moe.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case moe.BODY:!function(e,t){if(e.openElements.hasInScope(moe.BODY)&&(e.insertionMode=gie.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case moe.HTML:!function(e,t){e.openElements.hasInScope(moe.BODY)&&(e.insertionMode=gie.AFTER_BODY,fse(e,t))}(e,t);break;case moe.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(moe.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(moe.FORM):n&&e.openElements.remove(n))}(e);break;case moe.APPLET:case moe.OBJECT:case moe.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 moe.TEMPLATE:Die(e,t);break;default:Wie(e,t)}}function Zie(e,t){e.tmplInsertionModeStack.length>0?pse(e,t):Iie(e,t)}function Kie(e,t){if(void 0!==e.openElements.currentTagId&&vie.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=gie.IN_TABLE_TEXT,t.type){case Yae.CHARACTER:tse(e,t);break;case Yae.WHITESPACE_CHARACTER:ese(e,t)}else Jie(e,t)}function Xie(e,t){switch(t.tagID){case moe.TD:case moe.TH:case moe.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(foe.TBODY,moe.TBODY),e.insertionMode=gie.IN_TABLE_BODY,ise(e,t)}(e,t);break;case moe.STYLE:case moe.SCRIPT:case moe.TEMPLATE:Lie(e,t);break;case moe.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(foe.COLGROUP,moe.COLGROUP),e.insertionMode=gie.IN_COLUMN_GROUP,ase(e,t)}(e,t);break;case moe.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,soe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case moe.TABLE:!function(e,t){e.openElements.hasInTableScope(moe.TABLE)&&(e.openElements.popUntilTagNamePopped(moe.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case moe.TBODY:case moe.TFOOT:case moe.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_TABLE_BODY}(e,t);break;case moe.INPUT:!function(e,t){$ie(t)?e._appendElement(t,soe.HTML):Jie(e,t),t.ackSelfClosing=!0}(e,t);break;case moe.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_CAPTION}(e,t);break;case moe.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_COLUMN_GROUP}(e,t);break;default:Jie(e,t)}}function Qie(e,t){switch(t.tagID){case moe.TABLE:e.openElements.hasInTableScope(moe.TABLE)&&(e.openElements.popUntilTagNamePopped(moe.TABLE),e._resetInsertionMode());break;case moe.TEMPLATE:Die(e,t);break;case moe.BODY:case moe.CAPTION:case moe.COL:case moe.COLGROUP:case moe.HTML:case moe.TBODY:case moe.TD:case moe.TFOOT:case moe.TH:case moe.THEAD:case moe.TR:break;default:Jie(e,t)}}function Jie(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,zie(e,t),e.fosterParentingEnabled=n}function ese(e,t){e.pendingCharacterTokens.push(t)}function tse(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function nse(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Jie(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const rse=new Set([moe.CAPTION,moe.COL,moe.COLGROUP,moe.TBODY,moe.TD,moe.TFOOT,moe.TH,moe.THEAD,moe.TR]);function ase(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.COL:e._appendElement(t,soe.HTML),t.ackSelfClosing=!0;break;case moe.TEMPLATE:Lie(e,t);break;default:ose(e,t)}}function ose(e,t){e.openElements.currentTagId===moe.COLGROUP&&(e.openElements.pop(),e.insertionMode=gie.IN_TABLE,e._processToken(t))}function ise(e,t){switch(t.tagID){case moe.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_ROW;break;case moe.TH:case moe.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(foe.TR,moe.TR),e.insertionMode=gie.IN_ROW,lse(e,t);break;case moe.CAPTION:case moe.COL:case moe.COLGROUP:case moe.TBODY:case moe.TFOOT:case moe.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE,Xie(e,t));break;default:Xie(e,t)}}function sse(e,t){const n=t.tagID;switch(t.tagID){case moe.TBODY:case moe.TFOOT:case moe.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE);break;case moe.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE,Qie(e,t));break;case moe.BODY:case moe.CAPTION:case moe.COL:case moe.COLGROUP:case moe.HTML:case moe.TD:case moe.TH:case moe.TR:break;default:Qie(e,t)}}function lse(e,t){switch(t.tagID){case moe.TH:case moe.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,soe.HTML),e.insertionMode=gie.IN_CELL,e.activeFormattingElements.insertMarker();break;case moe.CAPTION:case moe.COL:case moe.COLGROUP:case moe.TBODY:case moe.TFOOT:case moe.THEAD:case moe.TR:e.openElements.hasInTableScope(moe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE_BODY,ise(e,t));break;default:Xie(e,t)}}function cse(e,t){switch(t.tagID){case moe.TR:e.openElements.hasInTableScope(moe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE_BODY);break;case moe.TABLE:e.openElements.hasInTableScope(moe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE_BODY,sse(e,t));break;case moe.TBODY:case moe.TFOOT:case moe.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(moe.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=gie.IN_TABLE_BODY,sse(e,t));break;case moe.BODY:case moe.CAPTION:case moe.COL:case moe.COLGROUP:case moe.HTML:case moe.TD:case moe.TH:break;default:Qie(e,t)}}function use(e,t){switch(t.tagID){case moe.HTML:qie(e,t);break;case moe.OPTION:e.openElements.currentTagId===moe.OPTION&&e.openElements.pop(),e._insertElement(t,soe.HTML);break;case moe.OPTGROUP:e.openElements.currentTagId===moe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===moe.OPTGROUP&&e.openElements.pop(),e._insertElement(t,soe.HTML);break;case moe.HR:e.openElements.currentTagId===moe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===moe.OPTGROUP&&e.openElements.pop(),e._appendElement(t,soe.HTML),t.ackSelfClosing=!0;break;case moe.INPUT:case moe.KEYGEN:case moe.TEXTAREA:case moe.SELECT:e.openElements.hasInSelectScope(moe.SELECT)&&(e.openElements.popUntilTagNamePopped(moe.SELECT),e._resetInsertionMode(),t.tagID!==moe.SELECT&&e._processStartTag(t));break;case moe.SCRIPT:case moe.TEMPLATE:Lie(e,t)}}function dse(e,t){switch(t.tagID){case moe.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===moe.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===moe.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===moe.OPTGROUP&&e.openElements.pop();break;case moe.OPTION:e.openElements.currentTagId===moe.OPTION&&e.openElements.pop();break;case moe.SELECT:e.openElements.hasInSelectScope(moe.SELECT)&&(e.openElements.popUntilTagNamePopped(moe.SELECT),e._resetInsertionMode());break;case moe.TEMPLATE:Die(e,t)}}function pse(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(moe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Iie(e,t)}function fse(e,t){var n;if(t.tagID===moe.HTML){if(e.fragmentContext||(e.insertionMode=gie.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===moe.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 hse(e,t)}function hse(e,t){e.insertionMode=gie.IN_BODY,zie(e,t)}function mse(e,t){e.insertionMode=gie.IN_BODY,zie(e,t)}function gse(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==soe.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}foe.AREA,foe.BASE,foe.BASEFONT,foe.BGSOUND,foe.BR,foe.COL,foe.EMBED,foe.FRAME,foe.HR,foe.IMG,foe.INPUT,foe.KEYGEN,foe.LINK,foe.META,foe.PARAM,foe.SOURCE,foe.TRACK,foe.WBR;const yse=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,bse=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),vse={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function kse(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=_ae("type",{handlers:{root:wse,element:Ese,text:_se,comment:Cse,doctype:Sse,raw:Ase},unknown:Nse}),a={parser:n?new xie(vse):xie.getFragmentParser(void 0,vse),handle(e){r(e,a)},stitches:!1,options:t||{}};r(e,a),Ise(a,wee());const o=function(e,t){const n=t||{};return bae({file:n.file||void 0,location:!1,schema:"svg"===n.space?G7:V7,verbose:n.verbose||!1},e)}(n?a.parser.document:a.parser.getFragment(),{file:a.options.file});return a.stitches&&pre(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 xse(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function wse(e,t){xse(e.children,t)}function Ese(e,t){!function(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Aoe.PLAINTEXT)return;Ise(t,wee(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:mae.html;a===mae.html&&"svg"===n&&(a=mae.svg);const o=function(e,t){const n=(t||Sae).space;return Cae(e,"svg"===n?G7:V7)}({...e,children:[]},{space:a===mae.svg?"svg":"html"}),i={type:Yae.START_TAG,tagName:n,tagID:woe(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:Rse(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}(e,t),xse(e.children,t),function(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Oae.includes(n))return;if(t.parser.tokenizer.state===Aoe.PLAINTEXT)return;Ise(t,xee(e));const r={type:Yae.END_TAG,tagName:n,tagID:woe(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Rse(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n!==t.parser.tokenizer.lastStartTagName||t.parser.tokenizer.state!==Aoe.RCDATA&&t.parser.tokenizer.state!==Aoe.RAWTEXT&&t.parser.tokenizer.state!==Aoe.SCRIPT_DATA||(t.parser.tokenizer.state=Aoe.DATA)}(e,t)}function _se(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Yae.CHARACTER,chars:e.value,location:Rse(e)};Ise(t,wee(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Sse(e,t){const n={type:Yae.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Rse(e)};Ise(t,wee(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Tse(e,t){t.stitches=!0;const n=function(e){return nre("children"in e?{...e,children:[]}:e)}(e);if("children"in e&&"children"in n){const r=kse({type:"root",children:e.children},t.options);n.children=r.children}Cse({type:"comment",value:{stitch:n}},t)}function Cse(e,t){const n=e.value,r={type:Yae.COMMENT,data:n,location:Rse(e)};Ise(t,wee(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ase(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,Ose(t,wee(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(yse,"<$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 Nse(e,t){const n=e;if(!t.options.passThrough||!t.options.passThrough.includes(n.type)){let e="";throw bse.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)}Tse(n,t)}function Ise(e,t){Ose(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=Aoe.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 Ose(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 Rse(e){const t=wee(e)||{line:void 0,column:void 0,offset:void 0},n=xee(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 Pse(e){return function(t,n){return kse(t,{...e,file:n})}}function Lse(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 Dse(e,t,n){const r=ore((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([Mse(e[0]),Fse(e[1])])}return t}(t);let o=-1;for(;++o<a.length;)dre(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 Mse(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 Fse(e){return"function"==typeof e?e:function(){return e}}const jse="phrasing",zse=["autolink","link","image","label"];function Bse(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Hse(e){this.config.enter.autolinkProtocol.call(this,e)}function Use(e){this.config.exit.autolinkProtocol.call(this,e)}function $se(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 Vse(e){this.config.exit.autolinkEmail.call(this,e)}function Gse(e){this.exit(e)}function qse(e){Dse(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Wse],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Yse]],{ignore:["link","linkReference"]})}function Wse(e,t,n,r,a){let o="";if(!Zse(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=Lse(e,"(");let o=Lse(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 Yse(e,t,n,r){return!(!Zse(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Zse(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||yte(n)||gte(n))&&(!t||47!==n)}function Kse(){this.buffer()}function Xse(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Qse(){this.buffer()}function Jse(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ele(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ote(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tle(e){this.exit(e)}function nle(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ote(this.sliceSerialize(e)).toLowerCase(),n.label=t}function rle(e){this.exit(e)}function ale(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 ole(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?sle:ile)));return s(),i},footnoteReference:ale},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ile(e,t,n){return 0===t?e:sle(e,t,n)}function sle(e,t,n){return(n?"":" ")+e}ale.peek=function(){return"["};const lle=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function cle(e){this.enter({type:"delete",children:[]},e)}function ule(e){this.exit(e)}function dle(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 ple(e){return e.length}function fle(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 hle(e,t,n){return">"+(n?"":" ")+e}function mle(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 gle(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],mle(o,i.inConstruct,!0)&&!mle(o,i.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var o,i;return"\\\n"}function yle(e,t,n){return(n?"":" ")+e}function ble(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 vle(e){return"&#x"+e.toString(16).toUpperCase()+";"}function kle(e,t,n){const r=_te(e),a=_te(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 xle(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=kle(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=vle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=kle(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+vle(d));const f=i.move(a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function wle(e){return e.value||""}function Ele(e,t,n,r){const a=ble(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 _le(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 Sle(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 Tle(e,t){const n=Wee(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 Cle(e,t,n,r){const a=ble(n),o='"'===a?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(Tle(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 Ale(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 Nle(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 Ile(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}dle.peek=function(){return"~"},xle.peek=function(e,t,n){return n.options.emphasis||"*"},wle.peek=function(){return"<"},Ele.peek=function(){return"!"},_le.peek=function(){return"!"},Sle.peek=function(){return"`"},Cle.peek=function(e,t,n){return Tle(e,n)?"<":"["},Ale.peek=function(){return"["};const Ole=ore(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Rle(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=kle(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=vle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=kle(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+vle(d));const f=i.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}Rle.peek=function(e,t,n){return n.options.strong||"*"};const Ple={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()),hle);return a(),i},break:gle,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,yle);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=ble(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:xle,hardBreak:gle,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 pre(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,ure})),Boolean((!e.depth||e.depth<3)&&Wee(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=vle(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),l(),s(),c},html:wle,image:Ele,imageReference:_le,inlineCode:Sle,link:Cle,linkReference:Ale,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):Nle(n);const s=e.ordered?"."===i?")":".":function(e){const t=Nle(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),Ile(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||Nle(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 Ole(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Rle,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ile(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 Lle(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 Dle(e){this.exit(e),this.data.inTable=void 0}function Mle(e){this.enter({type:"tableRow",children:[]},e)}function Fle(e){this.exit(e)}function jle(e){this.enter({type:"tableCell",children:[]},e)}function zle(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ble));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ble(e,t){return"|"===t?t:e}function Hle(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=Ple.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||ple,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]=fle(r[p]);else{const e=fle(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 Ule(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function $le(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 Vle(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=Ple.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+i}))),l}const Gle={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},qle={tokenize:function(e,t,n){let r,a,o;return i;function i(t){return 46===t||95===t?e.check(Yle,l,s)(t):null===t||hte(t)||yte(t)||45!==t&>e(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},Wle={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(Yle,t,o)(i):null===i||hte(i)||yte(i)?t(i):(e.consume(i),a)}function o(t){return 41===t&&r++,e.consume(t),a}},partial:!0},Yle={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||hte(i)||yte(i)?t(i):n(i)}function a(e){return null===e||40===e||91===e||hte(e)||yte(e)?t(e):r(e)}function o(e){return ite(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):ite(t)?(e.consume(t),i):n(t)}},partial:!0},Zle={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return ste(e)?n(e):t(e)}},partial:!0},Kle={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!tce.call(r,r.previous)||oce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Gle,e.attempt(qle,e.attempt(Wle,a),n),n)(t)};function a(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:tce},Xle={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let a="",o=!1;return function(t){if((72===t||104===t)&&nce.call(r,r.previous)&&!oce(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(ite(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||cte(t)||hte(t)||yte(t)||gte(t)?n(t):e.attempt(qle,e.attempt(Wle,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:nce},Qle={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let a,o;return function(t){if(!ace(t)||!rce.call(r,r.previous)||oce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return ace(t)?(e.consume(t),i):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(Zle,c,l)(t):45===t||95===t||ste(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&&ite(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:rce},Jle={};let ece=48;for(;ece<123;)Jle[ece]=Qle,ece++,58===ece?ece=65:91===ece&&(ece=97);function tce(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||hte(e)}function nce(e){return!ite(e)}function rce(e){return!(47===e||ace(e))}function ace(e){return 43===e||45===e||46===e||95===e||ste(e)}function oce(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}Jle[43]=Qle,Jle[45]=Qle,Jle[46]=Qle,Jle[95]=Qle,Jle[72]=[Qle,Xle],Jle[104]=[Qle,Xle],Jle[87]=[Qle,Kle],Jle[119]=[Qle,Kle];const ice={tokenize:function(e,t,n){const r=this;return kte(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 sce(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=ote(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 lce(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 cce(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||hte(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return a.includes(ote(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return hte(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 uce(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||hte(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=ote(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return hte(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),kte(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function dce(e,t,n){return e.check(Nte,t,e.attempt(ice,t,n))}function pce(e){e.exit("gfmFootnoteDefinition")}function fce(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=_te(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=_te(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&&Qee(i,i.length,0,Ste(s,e.slice(r+1,n),t)),Qee(i,i.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",a,t]]),Qee(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 hce{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 mce(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 gce(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):fte(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):mte(t)?kte(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||hte(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,mte(t)?kte(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 mte(t)?kte(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||fte(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 mte(t)?kte(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||fte(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||fte(n)?(e.exit("tableRow"),t(n)):mte(n)?kte(e,x,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||hte(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 yce(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 hce;for(;++o<e.length;){const f=e[o],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(vce(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=bce(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=bce(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=bce(p,t,l,s,o,a)):0!==c[1]&&(a=bce(p,t,c,s,o,a)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=o)}for(0!==d&&vce(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=mce(t.events,o))}return e}function bce(e,t,n,r,a,o){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},kce(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=kce(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=kce(t.events,n[2]),o=kce(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({},kce(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function vce(e,t,n,r,a){const o=[],i=kce(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 kce(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const xce={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 hte(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 fte(r)?t(r):mte(r)?e.check({tokenize:wce},t,n)(r):n(r)}}};function wce(e,t,n){return kte(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const Ece={};function _ce(e){const t=e||Ece,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return tte([{text:Jle},{document:{91:{name:"gfmFootnoteDefinition",tokenize:uce,continuation:{tokenize:dce},exit:pce}},text:{91:{name:"gfmFootnoteCall",tokenize:cce},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sce,resolveTo:lce}}},fce(e),{flow:{null:{name:"table",tokenize:gce,resolveAll:yce}}},{text:{91:xce}}])}(t)),a.push([{transforms:[qse],enter:{literalAutolink:Bse,literalAutolinkEmail:Hse,literalAutolinkHttp:Hse,literalAutolinkWww:Hse},exit:{literalAutolink:Gse,literalAutolinkEmail:Vse,literalAutolinkHttp:Use,literalAutolinkWww:$se}},{enter:{gfmFootnoteCallString:Kse,gfmFootnoteCall:Xse,gfmFootnoteDefinitionLabelString:Qse,gfmFootnoteDefinition:Jse},exit:{gfmFootnoteCallString:ele,gfmFootnoteCall:tle,gfmFootnoteDefinitionLabelString:nle,gfmFootnoteDefinition:rle}},{canContainEols:["delete"],enter:{strikethrough:cle},exit:{strikethrough:ule}},{enter:{table:Lle,tableData:jle,tableHeader:jle,tableRow:Mle},exit:{codeText:zle,table:Dle,tableData:Fle,tableHeader:Fle,tableRow:Fle}},{exit:{taskListCheckValueChecked:Ule,taskListCheckValueUnchecked:Ule,paragraph:$le}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:jse,notInConstruct:zse},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:jse,notInConstruct:zse},{character:":",before:"[ps]",after:"\\/",inConstruct:jse,notInConstruct:zse}]},ole(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lle}],handlers:{delete:dle}},Hle(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Vle}}]}}(t))}const Sce=function(e){if(null==e)return Cce;if("string"==typeof e)return function(e){return Tce(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]=Sce(e[n]);return Tce(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 Tce(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 Tce(e);throw new Error("Expected function, string, or object as test")};function Tce(e){return function(t,...n){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...n)))}}function Cce(){return!0}const Ace=!0,Nce=!1,Ice=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);const a=Sce(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[Ace,e];return[e]}(n(i,l)),p[0]===Nce))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]===Nce)return c;u="number"==typeof c[1]?c[1]:u+o}return p}}(e,void 0,[])()};const Oce=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),Ice(e,t,(function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)};function Rce(){return e=>{Oce(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)})),Oce(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 Pce(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=Pce(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Lce(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Pce(e))&&(r&&(r+=" "),r+=t);return r}var Dce,Mce,Fce,jce,zce,Bce,Hce,Uce=Object.create,$ce=Object.defineProperty,Vce=Object.defineProperties,Gce=Object.getOwnPropertyDescriptor,qce=Object.getOwnPropertyDescriptors,Wce=Object.getOwnPropertyNames,Yce=Object.getOwnPropertySymbols,Zce=Object.getPrototypeOf,Kce=Object.prototype.hasOwnProperty,Xce=Object.prototype.propertyIsEnumerable,Qce=(e,t,n)=>t in e?$ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jce=(e,t)=>{for(var n in t||(t={}))Kce.call(t,n)&&Qce(e,n,t[n]);if(Yce)for(var n of Yce(t))Xce.call(t,n)&&Qce(e,n,t[n]);return e},eue=(e,t)=>Vce(e,qce(t)),tue=(e,t)=>{var n={};for(var r in e)Kce.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Yce)for(var r of Yce(e))t.indexOf(r)<0&&Xce.call(e,r)&&(n[r]=e[r]);return n},nue=(Dce={"../../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,"&").replace(/</g,"<").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,N=E;for(N+=w.value.length;C>=N;)N+=(w=w.next).value.length;if(E=N-=w.value.length,w.value instanceof a)continue;for(var I=w;I!==t.tail&&(N<A||"string"==typeof I.value);I=I.next)T++,N+=I.value.length;T--,_=e.slice(E,N),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,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},r}();t.exports=n,n.default=n}},function(){return Mce||(0,Dce[Wce(Dce)[0]])((Mce={exports:{}}).exports,Mce),Mce.exports}),rue=((e,t,n)=>(n=null!=e?Uce(Zce(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of Wce(t))Kce.call(e,a)||a===n||$ce(e,a,{get:()=>t[a],enumerable:!(r=Gce(t,a))||r.enumerable});return e})(e&&e.__esModule?n:$ce(n,"default",{value:e,enumerable:!0}),e)))(nue());rue.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]},rue.languages.markup.tag.inside["attr-value"].inside.entity=rue.languages.markup.entity,rue.languages.markup.doctype.inside["internal-subset"].inside=rue.languages.markup,rue.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(rue.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:rue.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:rue.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},rue.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(rue.languages.markup.tag,"addAttribute",{value:function(e,t){rue.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:rue.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),rue.languages.html=rue.languages.markup,rue.languages.mathml=rue.languages.markup,rue.languages.svg=rue.languages.markup,rue.languages.xml=rue.languages.extend("markup",{}),rue.languages.ssml=rue.languages.xml,rue.languages.atom=rue.languages.xml,rue.languages.rss=rue.languages.xml,Fce=rue,jce={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},Bce="(?:[^\\\\-]|"+(zce=/\\(?: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+")",Bce=RegExp(Bce+"-"+Bce),Hce={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},Fce.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:Bce,inside:{escape:zce,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":jce,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:zce}},"special-escape":jce,"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":Hce}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:zce,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":Hce}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},rue.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:/[{}[\];(),.:]/},rue.languages.javascript=rue.languages.extend("clike",{"class-name":[rue.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}|\?\?=?|\?\.?|[~:]/}),rue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,rue.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:rue.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:rue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:rue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:rue.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:rue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),rue.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:rue.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"}}),rue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),rue.languages.markup&&(rue.languages.markup.tag.addInlined("script","javascript"),rue.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")),rue.languages.js=rue.languages.javascript,rue.languages.actionscript=rue.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:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),rue.languages.actionscript["class-name"].alias="function",delete rue.languages.actionscript.parameter,delete rue.languages.actionscript["literal-property"],rue.languages.markup&&rue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:rue.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}(rue),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)}(rue),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"))}(rue),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})}(rue),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}(rue),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}(rue),rue.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:rue.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+/},rue.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)}})),rue.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)}))}(rue),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}(rue),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)}(rue),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})}(rue),rue.languages.n4js=rue.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/}),rue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),rue.languages.n4jsd=rue.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]*/}}(rue),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)}))}(rue),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}(rue),rue.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:/[{}[\]();,.:\\]/},rue.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=rue.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}(rue),rue.languages.c=rue.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|[?:~]|[-+*/%&|^!=<>]=?/}),rue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),rue.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},rue.languages.c.string],char:rue.languages.c.char,comment:rue.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:rue.languages.c}}}}),rue.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 rue.languages.c.boolean,rue.languages.objectivec=rue.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 rue.languages.objectivec["class-name"],rue.languages.objc=rue.languages.objectivec,rue.languages.reason=rue.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/}),rue.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 rue.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}(rue),rue.languages.go=rue.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/}),rue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete rue.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"])}(rue),rue.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://,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:/[{}[\];(),.:]/},rue.languages.python["string-interpolation"].inside.interpolation.inside.rest=rue.languages.python,rue.languages.py=rue.languages.python,rue.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"}},rue.languages.webmanifest=rue.languages.json;var aue={};((e,t)=>{for(var n in t)$ce(e,n,{get:t[n],enumerable:!0})})(aue,{dracula:()=>oue,duotoneDark:()=>iue,duotoneLight:()=>sue,github:()=>lue,gruvboxMaterialDark:()=>Sue,gruvboxMaterialLight:()=>Tue,jettwaveDark:()=>xue,jettwaveLight:()=>wue,nightOwl:()=>cue,nightOwlLight:()=>uue,oceanicNext:()=>fue,okaidia:()=>hue,oneDark:()=>Eue,oneLight:()=>_ue,palenight:()=>mue,shadesOfPurple:()=>gue,synthwave84:()=>yue,ultramin:()=>bue,vsDark:()=>vue,vsLight:()=>kue});var oue={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)"}}]},iue={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"}}]},sue={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"}}]},lue={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"}}]},cue={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)"}}]},uue={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)"}}]},due="#c5a5c5",pue="#8dc891",fue={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:due}},{types:["attr-value"],style:{color:pue}},{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:pue}},{types:["punctuation"],style:{color:pue}},{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:due}},{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}}]},hue={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"}}]},mue={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)"}}]},gue={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)"}}]},yue={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"}}]},bue={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)"}}]},vue={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)"}}]},kue={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)"}}]},xue={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"}}]},wue={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"}}]},Eue={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%)"}}]},_ue={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%)"}}]},Sue={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"}}]},Tue={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"}}]},Cue=/\r\n|\r|\n/,Aue=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)},Nue=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},Iue=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=Nue(c,u.type),u.alias&&(c=Nue(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(Cue),p=d.length;s.push({types:c,content:d[0]});for(let t=1;t<p;t++)Aue(s),l.push(s=[]),s.push({types:c,content:d[t]})}i--,t.pop(),n.pop(),r.pop(),a.pop()}return Aue(s),l},Oue=(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=Jce(Jce({},e[t]),a);e[t]=n})),e}),{});return r.root=n,r.plain=eue(Jce({},n),{backgroundColor:void 0}),r},Rue=({children:e,language:t,code:n,theme:r,prism:a})=>{const o=t.toLowerCase(),i=Oue(r,o),s=(e=>X.useCallback((t=>{var n=t,{className:r,style:a,line:o}=n,i=tue(n,["className","style","line"]);const s=eue(Jce({},i),{className:Lce("token-line",r)});return"object"==typeof e&&"plain"in e&&(s.style=e.plain),"object"==typeof a&&(s.style=Jce(Jce({},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=tue(n,["token","className","style"]);const s=eue(Jce({},i),{className:Lce("token",...r.types,a),children:r.content,style:t(r)});return null!=o&&(s.style=Jce(Jce({},s.style||{}),o)),s}),[t])})(i),c=(({prism:e,code:t,grammar:n,language:r})=>X.useMemo((()=>{if(null==n)return Iue([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),Iue(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})},Pue=e=>X.createElement(Rue,eue(Jce({},e),{prism:e.prism||rue,theme:e.theme||vue,code:e.code,language:e.language}))
|
|
71
71
|
/*! Bundled license information:
|
|
72
72
|
|
|
73
73
|
prismjs/prism.js:
|