@cimulate/copilot-widget 1.32.0 → 1.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,46 +1,46 @@
1
- (function(De,$e){typeof exports=="object"&&typeof module!="undefined"?$e(exports):typeof define=="function"&&define.amd?define(["exports"],$e):(De=typeof globalThis!="undefined"?globalThis:De||self,$e(De.CimulateCopilot={}))})(this,(function(De){"use strict";var w7=Object.defineProperty,A7=Object.defineProperties;var C7=Object.getOwnPropertyDescriptors;var Sd=Object.getOwnPropertySymbols;var N2=Object.prototype.hasOwnProperty,P2=Object.prototype.propertyIsEnumerable;var Jo=(De,$e)=>($e=Symbol[De])?$e:Symbol.for("Symbol."+De),v7=De=>{throw TypeError(De)},Mu=Math.pow,s0=(De,$e,Qe)=>$e in De?w7(De,$e,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):De[$e]=Qe,F=(De,$e)=>{for(var Qe in $e||($e={}))N2.call($e,Qe)&&s0(De,Qe,$e[Qe]);if(Sd)for(var Qe of Sd($e))P2.call($e,Qe)&&s0(De,Qe,$e[Qe]);return De},de=(De,$e)=>A7(De,C7($e));var dn=(De,$e)=>{var Qe={};for(var ct in De)N2.call(De,ct)&&$e.indexOf(ct)<0&&(Qe[ct]=De[ct]);if(De!=null&&Sd)for(var ct of Sd(De))$e.indexOf(ct)<0&&P2.call(De,ct)&&(Qe[ct]=De[ct]);return Qe};var Se=(De,$e,Qe)=>s0(De,typeof $e!="symbol"?$e+"":$e,Qe);var Ke=(De,$e,Qe)=>new Promise((ct,Ot)=>{var Et=yt=>{try{nn(Qe.next(yt))}catch(xn){Ot(xn)}},Fe=yt=>{try{nn(Qe.throw(yt))}catch(xn){Ot(xn)}},nn=yt=>yt.done?ct(yt.value):Promise.resolve(yt.value).then(Et,Fe);nn((Qe=Qe.apply(De,$e)).next())}),Qr=function(De,$e){this[0]=De,this[1]=$e},xd=(De,$e,Qe)=>{var ct=(nn,yt,xn,fr)=>{try{var Ki=Qe[nn](yt),Ms=(yt=Ki.value)instanceof Qr,Fs=Ki.done;Promise.resolve(Ms?yt[0]:yt).then(Pn=>Ms?ct(nn==="return"?nn:"next",yt[1]?{done:Pn.done,value:Pn.value}:Pn,xn,fr):xn({value:Pn,done:Fs})).catch(Pn=>ct("throw",Pn,xn,fr))}catch(Pn){fr(Pn)}},Ot=(nn,yt,xn,fr)=>Fe[nn]=Ki=>(yt=new Promise((Ms,Fs,Pn)=>(Pn=()=>ct(nn,Ki,Ms,Fs),Et?Et.then(Pn):Pn())),fr=()=>Et===xn&&(Et=0),Et=xn=yt.then(fr,fr),yt),Et,Fe={};return Qe=Qe.apply(De,$e),Fe[Jo("asyncIterator")]=()=>Fe,Ot("next"),Ot("throw"),Ot("return"),Fe},o0=De=>{var $e=De[Jo("asyncIterator")],Qe=!1,ct,Ot={};return $e==null?($e=De[Jo("iterator")](),ct=Et=>Ot[Et]=Fe=>$e[Et](Fe)):($e=$e.call(De),ct=Et=>Ot[Et]=Fe=>{if(Qe){if(Qe=!1,Et==="throw")throw Fe;return Fe}return Qe=!0,{done:!1,value:new Qr(new Promise(nn=>{var yt=$e[Et](Fe);yt instanceof Object||v7("Object expected"),nn(yt)}),1)}}),Ot[Jo("iterator")]=()=>Ot,ct("next"),"throw"in $e?ct("throw"):Ot.throw=Et=>{throw Et},"return"in $e&&ct("return"),Ot},O2=(De,$e,Qe)=>($e=De[Jo("asyncIterator")])?$e.call(De):(De=De[Jo("iterator")](),$e={},Qe=(ct,Ot)=>(Ot=De[ct])&&($e[ct]=Et=>new Promise((Fe,nn,yt)=>(Et=Ot.call(De,Et),yt=Et.done,Promise.resolve(Et.value).then(xn=>Fe({value:xn,done:yt}),nn)))),Qe("next"),Qe("return"),$e);var $e=document.createElement("style");$e.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:#fff;border-radius:var(--cim-widget-border-radius);box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex;flex-direction:column}.cim-widget-user-search.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
2
- /*$vite$:1*/`,document.head.appendChild($e);function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}},Ot={},Et={exports:{}},Fe={};var nn;function yt(){if(nn)return Fe;nn=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,A={};function v(D,ee,I){this.props=D,this.context=ee,this.refs=A,this.updater=I||y}v.prototype.isReactComponent={},v.prototype.setState=function(D,ee){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,ee,"setState")},v.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function w(){}w.prototype=v.prototype;function N(D,ee,I){this.props=D,this.context=ee,this.refs=A,this.updater=I||y}var C=N.prototype=new w;C.constructor=N,_(C,v.prototype),C.isPureReactComponent=!0;var U=Array.isArray,Y=Object.prototype.hasOwnProperty,R={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function ne(D,ee,I){var _e,Ue={},ye=null,Re=null;if(ee!=null)for(_e in ee.ref!==void 0&&(Re=ee.ref),ee.key!==void 0&&(ye=""+ee.key),ee)Y.call(ee,_e)&&!q.hasOwnProperty(_e)&&(Ue[_e]=ee[_e]);var He=arguments.length-2;if(He===1)Ue.children=I;else if(1<He){for(var Ye=Array(He),bt=0;bt<He;bt++)Ye[bt]=arguments[bt+2];Ue.children=Ye}if(D&&D.defaultProps)for(_e in He=D.defaultProps,He)Ue[_e]===void 0&&(Ue[_e]=He[_e]);return{$$typeof:e,type:D,key:ye,ref:Re,props:Ue,_owner:R.current}}function me(D,ee){return{$$typeof:e,type:D.type,key:ee,ref:D.ref,props:D.props,_owner:D._owner}}function V(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function se(D){var ee={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(I){return ee[I]})}var he=/\/+/g;function ve(D,ee){return typeof D=="object"&&D!==null&&D.key!=null?se(""+D.key):ee.toString(36)}function re(D,ee,I,_e,Ue){var ye=typeof D;(ye==="undefined"||ye==="boolean")&&(D=null);var Re=!1;if(D===null)Re=!0;else switch(ye){case"string":case"number":Re=!0;break;case"object":switch(D.$$typeof){case e:case t:Re=!0}}if(Re)return Re=D,Ue=Ue(Re),D=_e===""?"."+ve(Re,0):_e,U(Ue)?(I="",D!=null&&(I=D.replace(he,"$&/")+"/"),re(Ue,ee,I,"",function(bt){return bt})):Ue!=null&&(V(Ue)&&(Ue=me(Ue,I+(!Ue.key||Re&&Re.key===Ue.key?"":(""+Ue.key).replace(he,"$&/")+"/")+D)),ee.push(Ue)),1;if(Re=0,_e=_e===""?".":_e+":",U(D))for(var He=0;He<D.length;He++){ye=D[He];var Ye=_e+ve(ye,He);Re+=re(ye,ee,I,Ye,Ue)}else if(Ye=b(D),typeof Ye=="function")for(D=Ye.call(D),He=0;!(ye=D.next()).done;)ye=ye.value,Ye=_e+ve(ye,He++),Re+=re(ye,ee,I,Ye,Ue);else if(ye==="object")throw ee=String(D),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return Re}function oe(D,ee,I){if(D==null)return D;var _e=[],Ue=0;return re(D,_e,"","",function(ye){return ee.call(I,ye,Ue++)}),_e}function xe(D){if(D._status===-1){var ee=D._result;ee=ee(),ee.then(function(I){(D._status===0||D._status===-1)&&(D._status=1,D._result=I)},function(I){(D._status===0||D._status===-1)&&(D._status=2,D._result=I)}),D._status===-1&&(D._status=0,D._result=ee)}if(D._status===1)return D._result.default;throw D._result}var ae={current:null},Q={transition:null},ie={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:Q,ReactCurrentOwner:R};function k(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:oe,forEach:function(D,ee,I){oe(D,function(){ee.apply(this,arguments)},I)},count:function(D){var ee=0;return oe(D,function(){ee++}),ee},toArray:function(D){return oe(D,function(ee){return ee})||[]},only:function(D){if(!V(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Fe.Component=v,Fe.Fragment=n,Fe.Profiler=s,Fe.PureComponent=N,Fe.StrictMode=r,Fe.Suspense=d,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Fe.act=k,Fe.cloneElement=function(D,ee,I){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var _e=_({},D.props),Ue=D.key,ye=D.ref,Re=D._owner;if(ee!=null){if(ee.ref!==void 0&&(ye=ee.ref,Re=R.current),ee.key!==void 0&&(Ue=""+ee.key),D.type&&D.type.defaultProps)var He=D.type.defaultProps;for(Ye in ee)Y.call(ee,Ye)&&!q.hasOwnProperty(Ye)&&(_e[Ye]=ee[Ye]===void 0&&He!==void 0?He[Ye]:ee[Ye])}var Ye=arguments.length-2;if(Ye===1)_e.children=I;else if(1<Ye){He=Array(Ye);for(var bt=0;bt<Ye;bt++)He[bt]=arguments[bt+2];_e.children=He}return{$$typeof:e,type:D.type,key:Ue,ref:ye,props:_e,_owner:Re}},Fe.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:a,_context:D},D.Consumer=D},Fe.createElement=ne,Fe.createFactory=function(D){var ee=ne.bind(null,D);return ee.type=D,ee},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(D){return{$$typeof:c,render:D}},Fe.isValidElement=V,Fe.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:xe}},Fe.memo=function(D,ee){return{$$typeof:f,type:D,compare:ee===void 0?null:ee}},Fe.startTransition=function(D){var ee=Q.transition;Q.transition={};try{D()}finally{Q.transition=ee}},Fe.unstable_act=k,Fe.useCallback=function(D,ee){return ae.current.useCallback(D,ee)},Fe.useContext=function(D){return ae.current.useContext(D)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(D){return ae.current.useDeferredValue(D)},Fe.useEffect=function(D,ee){return ae.current.useEffect(D,ee)},Fe.useId=function(){return ae.current.useId()},Fe.useImperativeHandle=function(D,ee,I){return ae.current.useImperativeHandle(D,ee,I)},Fe.useInsertionEffect=function(D,ee){return ae.current.useInsertionEffect(D,ee)},Fe.useLayoutEffect=function(D,ee){return ae.current.useLayoutEffect(D,ee)},Fe.useMemo=function(D,ee){return ae.current.useMemo(D,ee)},Fe.useReducer=function(D,ee,I){return ae.current.useReducer(D,ee,I)},Fe.useRef=function(D){return ae.current.useRef(D)},Fe.useState=function(D){return ae.current.useState(D)},Fe.useSyncExternalStore=function(D,ee,I){return ae.current.useSyncExternalStore(D,ee,I)},Fe.useTransition=function(){return ae.current.useTransition()},Fe.version="18.3.1",Fe}var xn;function fr(){return xn||(xn=1,Et.exports=yt()),Et.exports}var Ki;function Ms(){if(Ki)return Ot;Ki=1;var e=fr(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var p,m={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:y,props:m,_owner:s.current}}return Ot.Fragment=n,Ot.jsx=u,Ot.jsxs=u,Ot}var Fs;function Pn(){return Fs||(Fs=1,ct.exports=Ms()),ct.exports}var x=Pn();const Nr=Object.create(null);Nr.open="0",Nr.close="1",Nr.ping="2",Nr.pong="3",Nr.message="4",Nr.upgrade="5",Nr.noop="6";const Fu=Object.create(null);Object.keys(Nr).forEach(e=>{Fu[Nr[e]]=e});const wd={type:"error",data:"parser error"},a0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",u0=typeof ArrayBuffer=="function",l0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ad=({type:e,data:t},n,r)=>a0&&t instanceof Blob?n?r(t):c0(t,r):u0&&(t instanceof ArrayBuffer||l0(t))?n?r(t):c0(new Blob([t]),r):r(Nr[e]+(t||"")),c0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function d0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Cd;function D2(e,t){if(a0&&e.data instanceof Blob)return e.data.arrayBuffer().then(d0).then(t);if(u0&&(e.data instanceof ArrayBuffer||l0(e.data)))return t(d0(e.data));Ad(e,!1,n=>{Cd||(Cd=new TextEncoder),t(Cd.encode(n))})}const f0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<f0.length;e++)Zo[f0.charCodeAt(e)]=e;const M2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Zo[e.charCodeAt(r)],u=Zo[e.charCodeAt(r+1)],c=Zo[e.charCodeAt(r+2)],d=Zo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|c>>2,p[s++]=(c&3)<<6|d&63;return f},F2=typeof ArrayBuffer=="function",vd=(e,t)=>{if(typeof e!="string")return{type:"message",data:h0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:B2(e.substring(1),t)}:Fu[n]?e.length>1?{type:Fu[n],data:e.substring(1)}:{type:Fu[n]}:wd},B2=(e,t)=>{if(F2){const n=M2(e);return h0(n,t)}else return{base64:!0,data:e}},h0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,p0="",U2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{Ad(a,!1,c=>{r[u]=c,++s===n&&t(r.join(p0))})})},H2=(e,t)=>{const n=e.split(p0),r=[];for(let s=0;s<n.length;s++){const a=vd(n[s],t);if(r.push(a),a.type==="error")break}return r};function z2(){return new TransformStream({transform(e,t){D2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let kd;function Bu(e){return e.reduce((t,n)=>t+n.length,0)}function Uu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function j2(e,t){kd||(kd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(Bu(n)<1)break;const d=Uu(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(Bu(n)<2)break;const d=Uu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Bu(n)<8)break;const d=Uu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(wd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Bu(n)<s)break;const d=Uu(n,s);c.enqueue(vd(a?d:kd.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(wd);break}}}})}const m0=4;function Ft(e){if(e)return $2(e)}function $2(e){for(var t in Ft.prototype)e[t]=Ft.prototype[t];return e}Ft.prototype.on=Ft.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ft.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Ft.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this},Ft.prototype.emitReserved=Ft.prototype.emit,Ft.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ft.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Hu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Jn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),V2="arraybuffer";function k7(){}function g0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const q2=Jn.setTimeout,Y2=Jn.clearTimeout;function zu(e,t){t.useNativeTimers?(e.setTimeoutFn=q2.bind(Jn),e.clearTimeoutFn=Y2.bind(Jn)):(e.setTimeoutFn=Jn.setTimeout.bind(Jn),e.clearTimeoutFn=Jn.clearTimeout.bind(Jn))}const G2=1.33;function W2(e){return typeof e=="string"?X2(e):Math.ceil((e.byteLength||e.size)*G2)}function X2(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function E0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function K2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Q2(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class J2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Nd extends Ft{constructor(t){super(),this.writable=!1,zu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new J2(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=vd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=K2(t);return n.length?"?"+n:""}}class Z2 extends Nd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};H2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,U2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=E0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let y0=!1;try{y0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const ew=y0;function tw(){}class nw extends Z2{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Pr extends Ft{constructor(t,n,r){super(),this.createRequest=t,zu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=g0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=Pr.requestsCount++,Pr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=tw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Pr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Pr.requestsCount=0,Pr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",T0);else if(typeof addEventListener=="function"){const e="onpagehide"in Jn?"pagehide":"unload";addEventListener(e,T0,!1)}}function T0(){for(let e in Pr.requests)Pr.requests.hasOwnProperty(e)&&Pr.requests[e].abort()}const rw=(function(){const e=b0({xdomain:!1});return e&&e.responseType!==null})();class iw extends nw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=rw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Pr(b0,this.uri(),t)}}function b0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||ew))return new XMLHttpRequest}catch(n){}if(!t)try{return new Jn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const _0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class sw extends Nd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=_0?{}:g0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;Ad(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Hu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=E0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Pd=Jn.WebSocket||Jn.MozWebSocket;class ow extends sw{createSocket(t,n,r){return _0?new Pd(t,n,r):n?new Pd(t,n):new Pd(t)}doWrite(t,n){this.ws.send(n)}}class aw extends Nd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=j2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=z2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Hu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const uw={websocket:ow,webtransport:aw,polling:iw},lw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,cw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Od(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=lw.exec(e||""),a={},u=14;for(;u--;)a[cw[u]]=s[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=dw(a,a.path),a.queryKey=fw(a,a.query),a}function dw(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function fw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Id=typeof addEventListener=="function"&&typeof removeEventListener=="function",ju=[];Id&&addEventListener("offline",()=>{ju.forEach(e=>e())},!1);class yi extends Ft{constructor(t,n){if(super(),this.binaryType=V2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Od(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Od(n.host).host);zu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Q2(this.opts.query)),Id&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ju.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=m0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=W2(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Hu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Id&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ju.indexOf(this._offlineEventListener);r!==-1&&ju.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=m0;class hw extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;yi.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const b=new Error("probe error: "+m);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let pw=class extends hw{constructor(t,n={}){const r=typeof t=="object",s=r?F({},t):F({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>uw[a]).filter(a=>!!a)),super(r?s:t,s)}};function mw(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=Od(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const gw=typeof ArrayBuffer=="function",Ew=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,S0=Object.prototype.toString,yw=typeof Blob=="function"||typeof Blob!="undefined"&&S0.call(Blob)==="[object BlobConstructor]",Tw=typeof File=="function"||typeof File!="undefined"&&S0.call(File)==="[object FileConstructor]";function Rd(e){return gw&&(e instanceof ArrayBuffer||Ew(e))||yw&&e instanceof Blob||Tw&&e instanceof File}function $u(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if($u(e[n]))return!0;return!1}if(Rd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return $u(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&$u(e[n]))return!0;return!1}function bw(e){const t=[],n=e.data,r=e;return r.data=Vu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Vu(e,t,n){if(!e)return e;if(Rd(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=Vu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Vu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Vu(e[s],t));return r}return e}function _w(e,t){return e.data=Ld(e.data,t),delete e.attachments,e}function Ld(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Ld(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ld(e[n],t));return e}const Sw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var et;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(et||(et={}));class xw{constructor(t){this.replacer=t}encode(t){return(t.type===et.EVENT||t.type===et.ACK)&&$u(t)?this.encodeAsBinary({type:t.type===et.EVENT?et.BINARY_EVENT:et.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===et.BINARY_EVENT||t.type===et.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=bw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Dd extends Ft{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===et.BINARY_EVENT;r||n.type===et.BINARY_ACK?(n.type=r?et.EVENT:et.ACK,this.reconstructor=new ww(n)):super.emitReserved("decoded",n)}else if(Rd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(et[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===et.BINARY_EVENT||r.type===et.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Aw(c)||c<1)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Dd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case et.CONNECT:return x0(n);case et.DISCONNECT:return n===void 0;case et.CONNECT_ERROR:return typeof n=="string"||x0(n);case et.EVENT:case et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Sw.indexOf(n[0])===-1);case et.ACK:case et.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ww{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=_w(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Aw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function x0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Cw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Dd,Encoder:xw,get PacketType(){return et}},Symbol.toStringTag,{value:"Module"}));function hr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const vw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class w0 extends Ft{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hr(t,"open",this.onopen.bind(this)),hr(t,"packet",this.onpacket.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,a;if(vw.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:et.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},s),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,c)=>u?s(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:et.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case et.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case et.EVENT:case et.BINARY_EVENT:this.onevent(t);break;case et.ACK:case et.BINARY_ACK:this.onack(t);break;case et.DISCONNECT:this.ondisconnect();break;case et.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:et.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:et.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Bs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Bs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},Bs.prototype.reset=function(){this.attempts=0},Bs.prototype.setMin=function(e){this.ms=e},Bs.prototype.setMax=function(e){this.max=e},Bs.prototype.setJitter=function(e){this.jitter=e};class Md extends Ft{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,zu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Bs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||Cw;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new pw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=hr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=hr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hr(t,"ping",this.onping.bind(this)),hr(t,"data",this.ondata.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this)),hr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Hu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new w0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ea={};function qu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=mw(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=ea[s]&&a in ea[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Md(r,t):(ea[s]||(ea[s]=new Md(r,t)),d=ea[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(qu,{Manager:Md,Socket:w0,io:qu,connect:qu});var kw=function(e){return(function(t){return!!t&&typeof t=="object"})(e)&&!(function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||(function(r){return r.$$typeof===Nw})(t)})(e)},Nw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ta(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Us((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Pw(e,t,n){return e.concat(t).map((function(r){return ta(r,n)}))}function A0(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function C0(e,t){try{return t in e}catch(n){return!1}}function Ow(e,t,n){var r={};return n.isMergeableObject(e)&&A0(e).forEach((function(s){r[s]=ta(e[s],n)})),A0(t).forEach((function(s){(function(a,u){return C0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,s)||(C0(e,s)&&n.isMergeableObject(t[s])?r[s]=(function(a,u){if(!u.customMerge)return Us;var c=u.customMerge(a);return typeof c=="function"?c:Us})(s,n)(e[s],t[s],n):r[s]=ta(t[s],n))})),r}function Us(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Pw,n.isMergeableObject=n.isMergeableObject||kw,n.cloneUnlessOtherwiseSpecified=ta;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Ow(e,t,n):ta(t,n)}Us.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Us(n,r,t)}),{})};var Iw=Us;let Rw=class{constructor(t){Object.assign(this,t)}};function wn(e){if(e)return(function(t){for(var n in wn.prototype)t[n]=wn.prototype[n];return t})(e)}wn.prototype.on=wn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},wn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},wn.prototype.off=wn.prototype.removeListener=wn.prototype.removeAllListeners=wn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var s=0;s<r.length;s++)if((n=r[s])===t||n.fn===t){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+e],this},wn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,t)}return this},wn.prototype.emitReserved=wn.prototype.emit,wn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},wn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Lw=typeof ArrayBuffer=="function",v0=Object.prototype.toString,Dw=typeof Blob=="function"||typeof Blob!="undefined"&&v0.call(Blob)==="[object BlobConstructor]",Mw=typeof File=="function"||typeof File!="undefined"&&v0.call(File)==="[object FileConstructor]";function Fd(e){return Lw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Dw&&e instanceof Blob||Mw&&e instanceof File}function Yu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Yu(e[n]))return!0;return!1}if(Fd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Yu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Yu(e[n]))return!0;return!1}function Fw(e){const t=[],n=e.data,r=e;return r.data=Bd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Bd(e,t){if(!e)return e;if(Fd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Bd(e[r],t);return n}if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Bd(e[r],t));return n}return e}function Bw(e,t){return e.data=Ud(e.data,t),delete e.attachments,e}function Ud(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Ud(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ud(e[n],t));return e}const Uw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var vt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(vt||(vt={}));class Hw{constructor(t){this.replacer=t}encode(t){return t.type!==vt.EVENT&&t.type!==vt.ACK||!Yu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===vt.EVENT?vt.BINARY_EVENT:vt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==vt.BINARY_EVENT&&t.type!==vt.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Fw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Hd extends wn{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===vt.BINARY_EVENT;r||n.type===vt.BINARY_ACK?(n.type=r?vt.EVENT:vt.ACK,this.reconstructor=new zw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Fd(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(vt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===vt.BINARY_EVENT||r.type===vt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!jw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!Hd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case vt.CONNECT:return k0(n);case vt.DISCONNECT:return n===void 0;case vt.CONNECT_ERROR:return typeof n=="string"||k0(n);case vt.EVENT:case vt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Uw.indexOf(n[0])===-1);case vt.ACK:case vt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class zw{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Bw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const jw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function k0(e){return Object.prototype.toString.call(e)==="[object Object]"}const N0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],P0=(e,t,n)=>function r(s,a=[]){const u=Object.entries(s).map((([c,d])=>{const f=[...a,t(c)];return[e(c),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(s)?u.map((c=>c[1])):Object.fromEntries(u)},O0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),$w=P0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),N0),I0=P0(O0,O0,N0),Vw={Encoder:class extends Hw{encode(e){var t,n;return super.encode(de(F({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],$w(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends Hd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?I0(r):r)):n instanceof Object?I0(n):n)):t))}}},qw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class Yw{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:s="/copilot",customerId:a,tenantId:u,socketOptions:c={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=m=>{console.log("[Copilot SDK] Connect Ack:",m),this.socket.auth={[this.sessionIdKey]:m.sessionId}},this.handleDisconnect=m=>{console.warn(`[Copilot SDK] Disconnected: ${m}`),m!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${m}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=m=>{console.error(`[Copilot SDK] Connect error: ${m.message}`);const b=m.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=b==null?void 0:b[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const d=`${r}${s}`,f={};t?f["x-cimulate-api-key"]=t:n&&(f.Authorization=`Bearer ${n}`),a&&(f["x-cimulate-customer-id"]=a),u&&(f["Tenant-ID"]=u);const p=[qw,c,{parser:Vw,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=qu(d,Iw.all(p))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*Mu(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout((()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())}),t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return Ke(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return Ke(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return Ke(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return Ke(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return Ke(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(s=>{n&&n(s),r(s)}))}))})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return Ke(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let s="";const a=(function(u){return xd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Qr(u({emit:m=>{c.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Qr(new Promise((m=>{f=m})));for(;c.length>0;)yield c.shift()}finally{yield new Qr(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==s&&u(p)};return this.socket.onAny(d),()=>Ke(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,c)=>this.socket.emit(t,n,(d=>{d.name==="error"?c(new Rw(d)):(s=d==null?void 0:d.id,u(d))})))),events:a}})}}var B=fr();const Qi=Qe(B);var R0=Symbol.for("immer-nothing"),L0=Symbol.for("immer-draftable"),ot=Symbol.for("immer-state");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Hs=Object.getPrototypeOf;function zs(e){return!!e&&!!e[ot]}function Jr(e){var t;return e?D0(e)||Array.isArray(e)||!!e[L0]||!!((t=e.constructor)!=null&&t[L0])||ra(e)||Wu(e):!1}var Gw=Object.prototype.constructor.toString();function D0(e){if(!e||typeof e!="object")return!1;const t=Hs(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Gw}function na(e,t){Gu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Gu(e){const t=e[ot];return t?t.type_:Array.isArray(e)?1:ra(e)?2:Wu(e)?3:0}function zd(e,t){return Gu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function M0(e,t,n){const r=Gu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Ww(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ra(e){return e instanceof Map}function Wu(e){return e instanceof Set}function Gt(e){return e.copy_||e.base_}function jd(e,t){if(ra(e))return new Map(e);if(Wu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=D0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ot];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(Hs(e),r)}else{const r=Hs(e);if(r!==null&&n)return F({},e);const s=Object.create(r);return Object.assign(s,e)}}function $d(e,t=!1){return Ku(e)||zs(e)||!Jr(e)||(Gu(e)>1&&Object.defineProperties(e,{set:{value:Xu},add:{value:Xu},clear:{value:Xu},delete:{value:Xu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>$d(n,!0))),e}function Xu(){Zn(2)}function Ku(e){return Object.isFrozen(e)}var Vd={};function Ji(e){const t=Vd[e];return t||Zn(0,e),t}function Xw(e,t){Vd[e]||(Vd[e]=t)}var ia;function Qu(){return ia}function Kw(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function F0(e,t){t&&(Ji("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qd(e){Yd(e),e.drafts_.forEach(Qw),e.drafts_=null}function Yd(e){e===ia&&(ia=e.parent_)}function B0(e){return ia=Kw(ia,e)}function Qw(e){const t=e[ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function U0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ot].modified_&&(qd(t),Zn(4)),Jr(e)&&(e=Ju(t,e),t.parent_||Zu(t,e)),t.patches_&&Ji("Patches").generateReplacementPatches_(n[ot].base_,e,t.patches_,t.inversePatches_)):e=Ju(t,n,[]),qd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==R0?e:void 0}function Ju(e,t,n){if(Ku(t))return t;const r=t[ot];if(!r)return na(t,(s,a)=>H0(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Zu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),na(a,(c,d)=>H0(e,r,s,c,d,n,u)),Zu(e,s,!1),n&&e.patches_&&Ji("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function H0(e,t,n,r,s,a,u){if(zs(s)){const c=a&&t&&t.type_!==3&&!zd(t.assigned_,r)?a.concat(r):void 0,d=Ju(e,s,c);if(M0(n,r,d),zs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Jr(s)&&!Ku(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ju(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(ra(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Zu(e,s)}}function Zu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$d(t,n)}function Jw(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Qu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Gd;n&&(s=[r],a=sa);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Gd={get(e,t){if(t===ot)return e;const n=Gt(e);if(!zd(n,t))return Zw(e,n,t);const r=n[t];return e.finalized_||!Jr(r)?r:r===Wd(e.base_,t)?(Xd(e),e.copy_[t]=oa(r,e)):r},has(e,t){return t in Gt(e)},ownKeys(e){return Reflect.ownKeys(Gt(e))},set(e,t,n){const r=z0(Gt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Wd(Gt(e),t),a=s==null?void 0:s[ot];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Ww(n,s)&&(n!==void 0||zd(e.base_,t)))return!0;Xd(e),Zr(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Wd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Xd(e),Zr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Gt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return Hs(e.base_)},setPrototypeOf(){Zn(12)}},sa={};na(Gd,(e,t)=>{sa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),sa.deleteProperty=function(e,t){return sa.set.call(this,e,t,void 0)},sa.set=function(e,t,n){return Gd.set.call(this,e[0],t,n,e[0])};function Wd(e,t){const n=e[ot];return(n?Gt(n):e)[t]}function Zw(e,t,n){var s;const r=z0(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function z0(e,t){if(!(t in e))return;let n=Hs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Hs(n)}}function Zr(e){e.modified_||(e.modified_=!0,e.parent_&&Zr(e.parent_))}function Xd(e){e.copy_||(e.copy_=jd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var eA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&Zn(6),r!==void 0&&typeof r!="function"&&Zn(7);let s;if(Jr(t)){const a=B0(this),u=oa(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?qd(a):Yd(a)}return F0(a,r),U0(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===R0&&(s=void 0),this.autoFreeze_&&$d(s,!0),r){const a=[],u=[];Ji("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,s;return[this.produce(t,n,(u,c)=>{r=u,s=c}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jr(e)||Zn(8),zs(e)&&(e=tA(e));const t=B0(this),n=oa(e,void 0);return n[ot].isManual_=!0,Yd(t),n}finishDraft(e,t){const n=e&&e[ot];(!n||!n.isManual_)&&Zn(9);const{scope_:r}=n;return F0(r,t),U0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Ji("Patches").applyPatches_;return zs(e)?r(e,t):this.produce(e,s=>r(s,t))}};function oa(e,t){const n=ra(e)?Ji("MapSet").proxyMap_(e,t):Wu(e)?Ji("MapSet").proxySet_(e,t):Jw(e,t);return(t?t.scope_:Qu()).drafts_.push(n),n}function tA(e){return zs(e)||Zn(10,e),j0(e)}function j0(e){if(!Jr(e)||Ku(e))return e;const t=e[ot];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=jd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=jd(e,!0);return na(n,(r,s)=>{M0(n,r,j0(s))}),t&&(t.finalized_=!1),n}function nA(){class e extends Map{constructor(d,f){super(),this[ot]={type_:2,parent_:f,scope_:f?f.scope_:Qu(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Gt(this[ot]).size}has(d){return Gt(this[ot]).has(d)}set(d,f){const p=this[ot];return u(p),(!Gt(p).has(d)||Gt(p).get(d)!==f)&&(n(p),Zr(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),n(f),Zr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[ot];u(d),Gt(d).size&&(n(d),Zr(d),d.assigned_=new Map,na(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[ot];Gt(p).forEach((m,b,y)=>{d.call(f,this.get(b),b,this)})}get(d){const f=this[ot];u(f);const p=Gt(f).get(d);if(f.finalized_||!Jr(p)||p!==f.base_.get(d))return p;const m=oa(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Gt(this[ot]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[ot]={type_:3,parent_:f,scope_:f?f.scope_:Qu(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Gt(this[ot]).size}has(d){const f=this[ot];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[ot];return u(f),this.has(d)||(a(f),Zr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),a(f),Zr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[ot];u(d),Gt(d).size&&(a(d),Zr(d),d.copy_.clear())}values(){const d=this[ot];return u(d),a(d),d.copy_.values()}entries(){const d=this[ot];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let m=p.next();for(;!m.done;)d.call(f,m.value,m.value,this),m=p.next()}}function s(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(Jr(d)){const f=oa(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Zn(3,JSON.stringify(Gt(c)))}Xw("MapSet",{proxyMap_:t,proxySet_:s})}var rA=new eA,iA=rA.produce;function $0(e,t,n){var r=B.useMemo(function(){return iA(e)},[e]);return B.useReducer(r,t,n)}const V0={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},pt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},Zi={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},q0=["ask_cim","search","browse","pdp"],sA=e=>q0.includes(e),Y0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(Y0));const oA=new Map(Object.entries(Y0).map(([e,t])=>[t,e])),aA=e=>{var t;return(t=oA.get(e))!=null?t:null},js="cimulate",Kd=`${js}:pdp-update`,Qd=`${js}:browse-update`,Jd=`${js}:search-update`,Zd=`${js}:ui-state-update`,ef=`${js}:prompts-state-update`,tf=`${js}:session-state`,Or=F({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},V0),uA={"browse-context":Or.CONTEXT_UPDATED,categoryId:Or.CATEGORY_ID_CHANGED,categoryName:Or.CATEGORY_NAME_CHANGED,page:Or.PAGE_CHANGED,pageSize:Or.PAGE_SIZE_CHANGED,includeFacets:Or.FACET_FILTERS_CHANGED,facetFilters:Or.FACET_FILTERS_CHANGED,rangeFilters:Or.RANGE_FILTERS_CHANGED,catalogSegment:Or.CATALOG_SEGMENT_CHANGED,pricebooks:Or.PRICEBOOKS_CHANGED},ei=F({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},V0),lA={"search-context":ei.SEARCH_CONTEXT_UPDATED,query:ei.QUERY_CHANGED,page:ei.PAGE_CHANGED,pageSize:ei.PAGE_SIZE_CHANGED,includeFacets:ei.FACET_FILTERS_CHANGED,facetFilters:ei.FACET_FILTERS_CHANGED,rangeFilters:ei.RANGE_FILTERS_CHANGED,catalogSegment:ei.CATALOG_SEGMENT_CHANGED,pricebooks:ei.PRICEBOOKS_CHANGED},z="cim-widget",$n=`--${z}`,Ti={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},cA=(e=Ti)=>({[`${$n}-primary-color`]:e.primaryColor||Ti.primaryColor,[`${$n}-secondary-color`]:e.secondaryColor||Ti.secondaryColor,[`${$n}-font-color`]:e.fontColor||Ti.fontColor,[`${$n}-font-family`]:e.fontFamily||Ti.fontFamily,[`${$n}-background-color`]:e.backgroundColor||Ti.backgroundColor,[`${$n}-border-color`]:e.borderColor||Ti.borderColor,[`${$n}-border-radius`]:e.borderRadius||Ti.borderRadius}),bi={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},G0=B.createContext(null),W0=B.createContext(null);function X0(e,t){return function(){return e.apply(t,arguments)}}const{toString:dA}=Object.prototype,{getPrototypeOf:$s}=Object,{iterator:aa,toStringTag:K0}=Symbol,el=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ua=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),el(n,t))return!0;n=$s(n)}return!1},fA=(e,t)=>e!=null&&ua(e,t)?e[t]:void 0,nf=(e=>t=>{const n=dA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pr=e=>(e=e.toLowerCase(),t=>nf(t)===e),tl=e=>t=>typeof t===e,{isArray:es}=Array,Vs=tl("undefined");function qs(e){return e!==null&&!Vs(e)&&e.constructor!==null&&!Vs(e.constructor)&&On(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Q0=pr("ArrayBuffer");function hA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Q0(e.buffer),t}const pA=tl("string"),On=tl("function"),J0=tl("number"),Ys=e=>e!==null&&typeof e=="object",mA=e=>e===!0||e===!1,nl=e=>{if(!Ys(e))return!1;const t=$s(e);return(t===null||t===Object.prototype||$s(t)===null)&&!ua(e,K0)&&!ua(e,aa)},gA=e=>{if(!Ys(e)||qs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},EA=pr("Date"),yA=pr("File"),TA=e=>!!(e&&typeof e.uri!="undefined"),bA=e=>e&&typeof e.getParts!="undefined",_A=pr("Blob"),SA=pr("FileList"),xA=e=>Ys(e)&&On(e.pipe);function wA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const Z0=wA(),eg=typeof Z0.FormData!="undefined"?Z0.FormData:void 0,AA=e=>{if(!e)return!1;if(eg&&e instanceof eg)return!0;const t=$s(e);if(!t||t===Object.prototype||!On(e.append))return!1;const n=nf(e);return n==="formdata"||n==="object"&&On(e.toString)&&e.toString()==="[object FormData]"},CA=pr("URLSearchParams"),[vA,kA,NA,PA]=["ReadableStream","Request","Response","Headers"].map(pr),OA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function la(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),es(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(qs(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function tg(e,t){if(qs(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ts=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,ng=e=>!Vs(e)&&e!==ts;function rf(...e){const{caseless:t,skipUndefined:n}=ng(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&tg(r,u)||u,d=el(r,c)?r[c]:void 0;nl(d)&&nl(a)?r[c]=rf(d,a):nl(a)?r[c]=rf({},a):es(a)?r[c]=a.slice():(!n||!Vs(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||qs(c)||(la(c,s),typeof c!="object"||es(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let f=0;f<d.length;f++){const p=d[f];$A.call(c,p)&&s(c[p],p)}}return r}const IA=(e,t,n,{allOwnKeys:r}={})=>(la(t,(s,a)=>{n&&On(s)?Object.defineProperty(e,a,{__proto__:null,value:X0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),RA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),LA=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},DA=(e,t,n,r)=>{let s,a,u;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&$s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},MA=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},FA=e=>{if(!e)return null;if(es(e))return e;let t=e.length;if(!J0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},BA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&$s(Uint8Array)),UA=(e,t)=>{const r=(e&&e[aa]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},HA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},zA=pr("HTMLFormElement"),jA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:$A}=Object.prototype,VA=pr("RegExp"),rg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};la(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},qA=e=>{rg(e,(t,n)=>{if(On(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(On(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},YA=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return es(e)?r(e):r(String(e).split(t)),n},GA=()=>{},WA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function XA(e){return!!(e&&On(e.append)&&e[K0]==="FormData"&&e[aa])}const KA=e=>{const t=new WeakSet,n=r=>{if(Ys(r)){if(t.has(r))return;if(qs(r))return r;if(!("toJSON"in r)){t.add(r);const s=es(r)?[]:{};return la(r,(a,u)=>{const c=n(a);!Vs(c)&&(s[u]=c)}),t.delete(r),s}}return r};return n(e)},QA=pr("AsyncFunction"),JA=e=>e&&(Ys(e)||On(e))&&On(e.then)&&On(e.catch),ig=((e,t)=>e?setImmediate:t?((n,r)=>(ts.addEventListener("message",({source:s,data:a})=>{s===ts&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ts.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",On(ts.postMessage)),ZA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ts):typeof process!="undefined"&&process.nextTick||ig,sg=e=>e!=null&&On(e[aa]),$={isArray:es,isArrayBuffer:Q0,isBuffer:qs,isFormData:AA,isArrayBufferView:hA,isString:pA,isNumber:J0,isBoolean:mA,isObject:Ys,isPlainObject:nl,isEmptyObject:gA,isReadableStream:vA,isRequest:kA,isResponse:NA,isHeaders:PA,isUndefined:Vs,isDate:EA,isFile:yA,isReactNativeBlob:TA,isReactNative:bA,isBlob:_A,isRegExp:VA,isFunction:On,isStream:xA,isURLSearchParams:CA,isTypedArray:BA,isFileList:SA,forEach:la,merge:rf,extend:IA,trim:OA,stripBOM:RA,inherits:LA,toFlatObject:DA,kindOf:nf,kindOfTest:pr,endsWith:MA,toArray:FA,forEachEntry:UA,matchAll:HA,isHTMLForm:zA,hasOwnProperty:el,hasOwnProp:el,hasOwnInPrototypeChain:ua,getSafeProp:fA,reduceDescriptors:rg,freezeMethods:qA,toObjectSet:YA,toCamelCase:jA,noop:GA,toFiniteNumber:WA,findKey:tg,global:ts,isContextDefined:ng,isSpecCompliantForm:XA,toJSONObject:KA,isAsyncFn:QA,isThenable:JA,setImmediate:ig,asap:ZA,isIterable:sg,isSafeIterable:e=>e!=null&&ua(e,aa)&&sg(e)},eC=$.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),tC=e=>{const t={};let n,r,s;return e&&e.split(`
3
- `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&eC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function nC(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const rC=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),iC=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function sf(e,t){return $.isArray(e)?e.map(n=>sf(n,t)):nC(String(e).replace(t,""))}const sC=e=>sf(e,rC),oC=e=>sf(e,iC);function og(e){const t=Object.create(null);return $.forEach(e.toJSON(),(n,r)=>{t[r]=oC(n)}),t}const ag=Symbol("internals");function ca(e){return e&&String(e).trim().toLowerCase()}function rl(e){return e===!1||e==null?e:$.isArray(e)?e.map(rl):sC(String(e))}function aC(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const uC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function of(e,t,n,r,s){if($.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!$.isString(t)){if($.isString(r))return t.indexOf(r)!==-1;if($.isRegExp(r))return r.test(t)}}function lC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function cC(e,t){const n=$.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,a,u){return this[r].call(this,t,s,a,u)},configurable:!0})})}let fn=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(c,d,f){const p=ca(d);if(!p)return;const m=$.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=rl(c))}const u=(c,d)=>$.forEach(c,(f,p)=>a(f,p,d));if($.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if($.isString(t)&&(t=t.trim())&&!uC(t))u(tC(t),n);else if($.isObject(t)&&$.isSafeIterable(t)){let c=Object.create(null),d,f;for(const p of t){if(!$.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],$.hasOwnProp(c,f)?(d=c[f],c[f]=$.isArray(d)?[...d,p[1]]:[d,p[1]]):c[f]=p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=ca(t),t){const r=$.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return aC(s);if($.isFunction(n))return n.call(this,s,r);if($.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ca(t),t){const r=$.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||of(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=ca(u),u){const c=$.findKey(r,u);c&&(!n||of(r,r[c],c,n))&&(delete r[c],s=!0)}}return $.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||of(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return $.forEach(this,(s,a)=>{const u=$.findKey(r,a);if(u){n[u]=rl(s),delete n[a];return}const c=t?lC(a):String(a).trim();c!==a&&delete n[a],n[c]=rl(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return $.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&$.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
4
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[ag]=this[ag]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=ca(u);r[c]||(cC(s,u),r[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}};fn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(fn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),$.freezeMethods(fn);const dC="[REDACTED ****]";function fC(e){if($.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if($.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function hC(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||$.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof fn&&(a=a.toJSON()),r.push(a);let u;if($.isArray(a))u=[],a.forEach((c,d)=>{const f=s(c);$.isUndefined(f)||(u[d]=f)});else{if(!$.isPlainObject(a)&&fC(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?dC:s(d);$.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}let be=class I2 extends Error{static from(t,n,r,s,a,u){const c=new I2(t.message,n||t.code,r,s,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,s,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&$.hasOwnProp(t,"redact")?t.redact:void 0,r=$.isArray(n)&&n.length>0?hC(t,n):$.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};be.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",be.ERR_BAD_OPTION="ERR_BAD_OPTION",be.ECONNABORTED="ECONNABORTED",be.ETIMEDOUT="ETIMEDOUT",be.ECONNREFUSED="ECONNREFUSED",be.ERR_NETWORK="ERR_NETWORK",be.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",be.ERR_DEPRECATED="ERR_DEPRECATED",be.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",be.ERR_BAD_REQUEST="ERR_BAD_REQUEST",be.ERR_CANCELED="ERR_CANCELED",be.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",be.ERR_INVALID_URL="ERR_INVALID_URL",be.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const pC=null,ug=100;function af(e){return $.isPlainObject(e)||$.isArray(e)}function lg(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function uf(e,t,n){return e?e.concat(t).map(function(s,a){return s=lg(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function mC(e){return $.isArray(e)&&!e.some(af)}const gC=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function il(e,t,n){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,C){return!$.isUndefined(C[N])});const r=n.metaTokens,s=n.visitor||_,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?ug:n.maxDepth,f=c&&$.isSpecCompliantForm(t),p=[];if(!$.isFunction(s))throw new TypeError("visitor must be a function");function m(w){if(w===null)return"";if($.isDate(w))return w.toISOString();if($.isBoolean(w))return w.toString();if(!f&&$.isBlob(w))throw new be("Blob is not supported. Use a Buffer instead.");if($.isArrayBuffer(w)||$.isTypedArray(w)){if(f&&typeof c=="function")return new c([w]);if(typeof Buffer!="undefined")return Buffer.from(w);throw new be("Blob is not supported. Use a Buffer instead.",be.ERR_NOT_SUPPORT)}return w}function b(w){if(w>d)throw new be("Object is too deeply nested ("+w+" levels). Max depth: "+d,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(w,N){if(d===1/0)return JSON.stringify(w);const C=[];return JSON.stringify(w,function(Y,R){if(!$.isObject(R))return R;for(;C.length&&C[C.length-1]!==this;)C.pop();return C.push(R),b(N+C.length-1),R})}function _(w,N,C){let U=w;if($.isReactNative(t)&&$.isReactNativeBlob(w))return t.append(uf(C,N,a),m(w)),!1;if(w&&!C&&typeof w=="object"){if($.endsWith(N,"{}"))N=r?N:N.slice(0,-2),w=y(w,1);else if($.isArray(w)&&mC(w)||($.isFileList(w)||$.endsWith(N,"[]"))&&(U=$.toArray(w)))return N=lg(N),U.forEach(function(R,q){!($.isUndefined(R)||R===null)&&t.append(u===!0?uf([N],q,a):u===null?N:N+"[]",m(R))}),!1}return af(w)?!0:(t.append(uf(C,N,a),m(w)),!1)}const A=Object.assign(gC,{defaultVisitor:_,convertValue:m,isVisitable:af});function v(w,N,C=0){if(!$.isUndefined(w)){if(b(C),p.indexOf(w)!==-1)throw new Error("Circular reference detected in "+N.join("."));p.push(w),$.forEach(w,function(Y,R){(!($.isUndefined(Y)||Y===null)&&s.call(t,Y,$.isString(R)?R.trim():R,N,A))===!0&&v(Y,N?N.concat(R):[R],C+1)}),p.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return v(e),t}function cg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function lf(e,t){this._pairs=[],e&&il(e,this,t)}const dg=lf.prototype;dg.append=function(t,n){this._pairs.push([t,n])},dg.toString=function(t){const n=t?r=>t.call(this,r,cg):cg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function EC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function fg(e,t,n){if(!t)return e;e=e||"";const r=$.isFunction(n)?{serialize:n}:n,s=$.getSafeProp(r,"encode")||EC,a=$.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=$.isURLSearchParams(t)?t.toString():new lf(t,r).toString(s),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class hg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(r){r!==null&&t(r)})}}const cf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},yC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:lf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},df=typeof window!="undefined"&&typeof document!="undefined",ff=typeof navigator=="object"&&navigator||void 0,TC=df&&(!ff||["ReactNative","NativeScript","NS"].indexOf(ff.product)<0),bC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_C=df&&window.location.href||"http://localhost",rn=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:df,hasStandardBrowserEnv:TC,hasStandardBrowserWebWorkerEnv:bC,navigator:ff,origin:_C},Symbol.toStringTag,{value:"Module"}))),yC);function SC(e,t){return il(e,new rn.classes.URLSearchParams,F({visitor:function(n,r,s,a){return rn.isNode&&$.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const pg=ug;function mg(e){if(e>pg)throw new be("FormData field is too deeply nested ("+e+" levels). Max depth: "+pg,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function xC(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)mg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function wC(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function gg(e){function t(n,r,s,a){mg(a);let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&$.isArray(s)?s.length:u,d?($.hasOwnProp(s,u)?s[u]=$.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!$.hasOwnProp(s,u)||!$.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&$.isArray(s[u])&&(s[u]=wC(s[u])),!c)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(r,s)=>{t(xC(r),s,n,0)}),n}return null}const Gs=(e,t)=>e!=null&&$.hasOwnProp(e,t)?e[t]:void 0;function AC(e,t,n){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const da={transitional:cf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=$.isObject(t);if(a&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return s?JSON.stringify(gg(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=Gs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return SC(t,d).toString();if((c=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Gs(this,"env"),p=f&&f.FormData;return il(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),AC(t)):t}],transformResponse:[function(t){const n=Gs(this,"transitional")||da.transitional,r=n&&n.forcedJSONParsing,s=Gs(this,"responseType"),a=s==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Gs(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?be.from(d,be.ERR_BAD_RESPONSE,this,null,Gs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch","query"],e=>{da.headers[e]={}});function hf(e,t){const n=this||da,r=t||n,s=fn.from(r.headers);let a=r.data;return $.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Eg(e){return!!(e&&e.__CANCEL__)}let fa=class extends be{constructor(t,n,r){super(t==null?"canceled":t,be.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function yg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new be("Request failed with status code "+n.status,n.status>=400&&n.status<500?be.ERR_BAD_REQUEST:be.ERR_BAD_RESPONSE,n.config,n.request,n))}function CC(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function vC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,b=0;for(;m!==s;)b+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(b*1e3/y):void 0}}function kC(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const sl=(e,t,n=3)=>{let r=0;const s=vC(50,250);return kC(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},Tg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},bg=e=>(...t)=>$.asap(()=>e(...t)),NC=rn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,PC=rn.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];$.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),$.isString(r)&&c.push(`path=${r}`),$.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),$.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function OC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function IC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const RC=/^https?:(?!\/\/)/i,LC=/[\t\n\r]/g;function DC(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function MC(e){return DC(e).replace(LC,"")}function _g(e,t){if(typeof e=="string"&&RC.test(MC(e)))throw new be('Invalid URL: missing "//" after protocol',be.ERR_INVALID_URL,t)}function Sg(e,t,n,r){_g(t,r);let s=!OC(t);return e&&(s||n===!1)?(_g(e,r),IC(e,t)):t}const xg=e=>e instanceof fn?F({},e):e;function ns(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,b,y){return $.isPlainObject(p)&&$.isPlainObject(m)?$.merge.call({caseless:y},p,m):$.isPlainObject(m)?$.merge({},m):$.isArray(m)?m.slice():m}function s(p,m,b,y){if($.isUndefined(m)){if(!$.isUndefined(p))return r(void 0,p,b,y)}else return r(p,m,b,y)}function a(p,m){if(!$.isUndefined(m))return r(void 0,m)}function u(p,m){if($.isUndefined(m)){if(!$.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p){const m=$.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!$.isUndefined(m))if($.isPlainObject(m)){if($.hasOwnProp(m,p))return m[p]}else return;const b=$.hasOwnProp(e,"transitional")?e.transitional:void 0;if($.isPlainObject(b)&&$.hasOwnProp(b,p))return b[p]}function d(p,m,b){if($.hasOwnProp(t,b))return r(p,m);if($.hasOwnProp(e,b))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,b)=>s(xg(p),xg(m),b,!0)};return $.forEach(Object.keys(F(F({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const b=$.hasOwnProp(f,m)?f[m]:s,y=$.hasOwnProp(e,m)?e[m]:void 0,_=$.hasOwnProp(t,m)?t[m]:void 0,A=b(y,_,m);$.isUndefined(A)&&b!==d||(n[m]=A)}),$.hasOwnProp(t,"validateStatus")&&$.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&($.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const FC=["content-type","content-length"];function BC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{FC.includes(r.toLowerCase())&&e.set(r,s)})}const UC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function wg(e){const t=ns({},e),n=b=>$.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=fn.from(c),t.url=fg(Sg(f,m,p,t),n("params"),n("paramsSerializer")),d){const b=$.getSafeProp(d,"username")||"",y=$.getSafeProp(d,"password")||"";try{c.set("Authorization","Basic "+btoa(b+":"+(y?UC(y):"")))}catch(_){throw be.from(_,be.ERR_BAD_OPTION_VALUE,e)}}if($.isFormData(r)&&(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv||$.isReactNative(r)?c.setContentType(void 0):$.isFunction(r.getHeaders)&&BC(c,r.getHeaders(),n("formDataHeaderPolicy"))),rn.hasStandardBrowserEnv&&($.isFunction(s)&&(s=s(t)),s===!0||s==null&&NC(t.url))){const y=a&&u&&PC.read(u);y&&c.set(a,y)}return t}const HC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=wg(e);let a=s.data;const u=fn.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,m,b,y,_;function A(){y&&y(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function w(){if(!v)return;const C=fn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),Y={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:C,config:e,request:v};yg(function(q){n(q),A()},function(q){r(q),A()},Y),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(w)},v.onabort=function(){v&&(r(new be("Request aborted",be.ECONNABORTED,e,v)),A(),v=null)},v.onerror=function(U){const Y=U&&U.message?U.message:"Network Error",R=new be(Y,be.ERR_NETWORK,e,v);R.event=U||null,r(R),A(),v=null},v.ontimeout=function(){let U=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const Y=s.transitional||cf;s.timeoutErrorMessage&&(U=s.timeoutErrorMessage),r(new be(U,Y.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,v)),A(),v=null},a===void 0&&u.setContentType(null),"setRequestHeader"in v&&$.forEach(og(u),function(U,Y){v.setRequestHeader(Y,U)}),$.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),c&&c!=="json"&&(v.responseType=s.responseType),f&&([b,_]=sl(f,!0),v.addEventListener("progress",b)),d&&v.upload&&([m,y]=sl(d),v.upload.addEventListener("progress",m),v.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=C=>{v&&(r(!C||C.type?new fa(null,e,v):C),v.abort(),A(),v=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const N=CC(s.url);if(N&&!rn.protocols.includes(N)){r(new be("Unsupported protocol "+N+":",be.ERR_BAD_REQUEST,e)),A();return}v.send(a||null)})},zC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof be?f:new fa(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new be(`timeout of ${t}ms exceeded`,be.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>$.asap(u),c},jC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},$C=function(e,t){return xd(this,null,function*(){try{for(var n=O2(VC(e)),r,s,a;r=!(s=yield new Qr(n.next())).done;r=!1){const u=s.value;yield*o0(jC(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Qr(s.call(n)))}finally{if(a)throw a[0]}}})},VC=function(e){return xd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*o0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Qr(t.read());if(n)break;yield r}}finally{yield new Qr(t.cancel())}})},Ag=(e,t,n,r)=>{const s=$C(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Ke(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){c(),f.close();return}let b=m.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}})},cancel(f){return c(f),s.return()}},{highWaterMark:2})},ol=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,qC=(e,t,n)=>t+2<n&&ol(e.charCodeAt(t+1))&&ol(e.charCodeAt(t+2));function YC(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const _=r.charCodeAt(y+1),A=r.charCodeAt(y+2);ol(_)&&ol(A)&&(u-=2,y+=2)}let d=0,f=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d===37&&qC(r,u,c))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const pf="1.18.1",Cg=64*1024,{isFunction:al}=$,GC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),vg=e=>{if(!$.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},kg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},WC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},XC=e=>{const t=$.global!==void 0&&$.global!==null?$.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=$.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,c=s?al(s):typeof fetch=="function",d=al(a),f=al(u);if(!c)return!1;const p=c&&al(n),m=c&&(typeof r=="function"?(w=>N=>w.encode(N))(new r):w=>Ke(null,null,function*(){return new Uint8Array(yield new a(w).arrayBuffer())})),b=d&&p&&kg(()=>{let w=!1;const N=new a(rn.origin,{body:new n,method:"POST",get duplex(){return w=!0,"half"}}),C=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),w&&!C}),y=f&&p&&kg(()=>$.isReadableStream(new u("").body)),_={stream:y&&(w=>w.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!_[w]&&(_[w]=(N,C)=>{let U=N&&N[w];if(U)return U.call(N);throw new be(`Response type '${w}' is not supported`,be.ERR_NOT_SUPPORT,C)})});const A=w=>Ke(null,null,function*(){if(w==null)return 0;if($.isBlob(w))return w.size;if($.isSpecCompliantForm(w))return(yield new a(rn.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if($.isArrayBufferView(w)||$.isArrayBuffer(w))return w.byteLength;if($.isURLSearchParams(w)&&(w=w+""),$.isString(w))return(yield m(w)).byteLength}),v=(w,N)=>Ke(null,null,function*(){const C=$.toFiniteNumber(w.getContentLength());return C==null?A(N):C});return w=>Ke(null,null,function*(){let{url:N,method:C,data:U,signal:Y,cancelToken:R,timeout:q,onDownloadProgress:ne,onUploadProgress:me,responseType:V,headers:se,withCredentials:he="same-origin",fetchOptions:ve,maxContentLength:re,maxBodyLength:oe}=wg(w);const xe=$.isNumber(re)&&re>-1,ae=$.isNumber(oe)&&oe>-1,Q=ye=>$.hasOwnProp(w,ye)?w[ye]:void 0;let ie=s||fetch;V=V?(V+"").toLowerCase():"text";let k=zC([Y,R&&R.toAbortSignal()],q),D=null;const ee=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let I,_e=null;const Ue=()=>new be("Request body larger than maxBodyLength limit",be.ERR_BAD_REQUEST,w,D);try{let ye;const Re=Q("auth");if(Re){const Ve=$.getSafeProp(Re,"username")||"",kt=$.getSafeProp(Re,"password")||"";ye={username:Ve,password:kt}}if(WC(N)){const Ve=new URL(N,rn.origin);if(!ye&&(Ve.username||Ve.password)){const kt=vg(Ve.username),vn=vg(Ve.password);ye={username:kt,password:vn}}(Ve.username||Ve.password)&&(Ve.username="",Ve.password="",N=Ve.href)}if(ye&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa(GC((ye.username||"")+":"+(ye.password||""))))),xe&&typeof N=="string"&&N.startsWith("data:")&&YC(N)>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D);if(ae&&C!=="get"&&C!=="head"){const Ve=yield A(U);if(typeof Ve=="number"&&isFinite(Ve)&&(I=Ve,Ve>oe))throw Ue()}const He=ae&&($.isReadableStream(U)||$.isStream(U)),Ye=(Ve,kt,vn)=>Ag(Ve,Cg,on=>{if(ae&&on>oe)throw _e=Ue();kt&&kt(on)},vn);if(b&&C!=="get"&&C!=="head"&&(me||He)){if(I=I==null?yield v(se,U):I,I!==0||He){let Ve=new a(N,{method:"POST",body:U,duplex:"half"}),kt;if($.isFormData(U)&&(kt=Ve.headers.get("content-type"))&&se.setContentType(kt),Ve.body){const[vn,on]=me&&Tg(I,sl(bg(me)))||[];U=Ye(Ve.body,vn,on)}}}else if(He&&!d&&p&&C!=="get"&&C!=="head")U=Ye(U);else if(He&&d&&!b&&C!=="get"&&C!=="head")throw new be("Stream request bodies are not supported by the current fetch implementation",be.ERR_NOT_SUPPORT,w,D);$.isString(he)||(he=he?"include":"omit");const bt=d&&"credentials"in a.prototype;if($.isFormData(U)){const Ve=se.getContentType();Ve&&/^multipart\/form-data/i.test(Ve)&&!/boundary=/i.test(Ve)&&se.delete("content-type")}se.set("User-Agent","axios/"+pf,!1);const Cn=de(F({},ve),{signal:k,method:C.toUpperCase(),headers:og(se.normalize()),body:U,duplex:"half",credentials:bt?he:void 0});D=d&&new a(N,Cn);let sn=yield d?ie(D,ve):ie(N,Cn);const _r=fn.from(sn.headers);if(xe){const Ve=$.toFiniteNumber(_r.getContentLength());if(Ve!=null&&Ve>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D)}const sr=y&&(V==="stream"||V==="response");if(y&&sn.body&&(ne||xe||sr&&ee)){const Ve={};["status","statusText","headers"].forEach(Pe=>{Ve[Pe]=sn[Pe]});const kt=$.toFiniteNumber(_r.getContentLength()),[vn,on]=ne&&Tg(kt,sl(bg(ne),!0))||[];let Fn=0;const we=Pe=>{if(xe&&(Fn=Pe,Fn>re))throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D);vn&&vn(Pe)};sn=new u(Ag(sn.body,Cg,we,()=>{on&&on(),ee&&ee()}),Ve)}V=V||"text";let Jt=yield _[$.findKey(_,V)||"text"](sn,w);if(xe&&!y&&!sr){let Ve;if(Jt!=null&&(typeof Jt.byteLength=="number"?Ve=Jt.byteLength:typeof Jt.size=="number"?Ve=Jt.size:typeof Jt=="string"&&(Ve=typeof r=="function"?new r().encode(Jt).byteLength:Jt.length)),typeof Ve=="number"&&Ve>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D)}return!sr&&ee&&ee(),yield new Promise((Ve,kt)=>{yg(Ve,kt,{data:Jt,headers:fn.from(sn.headers),status:sn.status,statusText:sn.statusText,config:w,request:D})})}catch(ye){if(ee&&ee(),k&&k.aborted&&k.reason instanceof be){const Re=k.reason;throw Re.config=w,D&&(Re.request=D),ye!==Re&&Object.defineProperty(Re,"cause",{__proto__:null,value:ye,writable:!0,enumerable:!1,configurable:!0}),Re}if(_e)throw D&&!_e.request&&(_e.request=D),_e;if(ye instanceof be)throw D&&!ye.request&&(ye.request=D),ye;if(ye&&ye.name==="TypeError"&&/Load failed|fetch/i.test(ye.message)){const Re=new be("Network Error",be.ERR_NETWORK,w,D,ye&&ye.response);throw Object.defineProperty(Re,"cause",{__proto__:null,value:ye.cause||ye,writable:!0,enumerable:!1,configurable:!0}),Re}throw be.from(ye,ye&&ye.code,w,D,ye&&ye.response)}})},KC=new Map,Ng=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,c=u,d,f,p=KC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:XC(t)),p=f;return f};Ng();const mf={http:pC,xhr:HC,fetch:{get:Ng}};$.forEach(mf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Pg=e=>`- ${e}`,QC=e=>$.isFunction(e)||e===null||e===!1;function JC(e,t){e=$.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(s=r,!QC(r)&&(s=mf[(c=String(r)).toLowerCase()],s===void 0))throw new be(`Unknown adapter '${c}'`);if(s&&($.isFunction(s)||(s=s.get(t))))break;a[c||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
5
- `+u.map(Pg).join(`
6
- `):" "+Pg(u[0]):"as no adapter specified";throw new be("There is no suitable adapter to dispatch the request "+c,be.ERR_NOT_SUPPORT)}return s}const Og={getAdapter:JC,adapters:mf};function gf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new fa(null,e)}function Ig(e){return gf(e),e.headers=fn.from(e.headers),e.data=hf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Og.getAdapter(e.adapter||da.adapter,e)(e).then(function(r){gf(e),e.response=r;try{r.data=hf.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=fn.from(r.headers),r},function(r){if(!Eg(r)&&(gf(e),r&&r.response)){e.response=r.response;try{r.response.data=hf.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=fn.from(r.response.headers)}return Promise.reject(r)})}const ul={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ul[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Rg={};ul.transitional=function(t,n,r){function s(a,u){return"[Axios v"+pf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new be(s(u," has been removed"+(n?" in "+n:"")),be.ERR_DEPRECATED);return n&&!Rg[u]&&(Rg[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},ul.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ZC(e,t,n){if(typeof e!="object"||e===null)throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new be("option "+a+" must be "+d,be.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new be("Unknown option "+a,be.ERR_BAD_OPTION)}}const ll={assertOptions:ZC,validators:ul},hn=ll.validators;let rs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new hg,response:new hg}}request(t,n){return Ke(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
1
+ (function(De,$e){typeof exports=="object"&&typeof module!="undefined"?$e(exports):typeof define=="function"&&define.amd?define(["exports"],$e):(De=typeof globalThis!="undefined"?globalThis:De||self,$e(De.CimulateCopilot={}))})(this,(function(De){"use strict";var v7=Object.defineProperty,N7=Object.defineProperties;var k7=Object.getOwnPropertyDescriptors;var Sd=Object.getOwnPropertySymbols;var P2=Object.prototype.hasOwnProperty,O2=Object.prototype.propertyIsEnumerable;var Jo=(De,$e)=>($e=Symbol[De])?$e:Symbol.for("Symbol."+De),P7=De=>{throw TypeError(De)},Fu=Math.pow,o0=(De,$e,Qe)=>$e in De?v7(De,$e,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):De[$e]=Qe,F=(De,$e)=>{for(var Qe in $e||($e={}))P2.call($e,Qe)&&o0(De,Qe,$e[Qe]);if(Sd)for(var Qe of Sd($e))O2.call($e,Qe)&&o0(De,Qe,$e[Qe]);return De},fe=(De,$e)=>N7(De,k7($e));var dn=(De,$e)=>{var Qe={};for(var ct in De)P2.call(De,ct)&&$e.indexOf(ct)<0&&(Qe[ct]=De[ct]);if(De!=null&&Sd)for(var ct of Sd(De))$e.indexOf(ct)<0&&O2.call(De,ct)&&(Qe[ct]=De[ct]);return Qe};var Se=(De,$e,Qe)=>o0(De,typeof $e!="symbol"?$e+"":$e,Qe);var Ke=(De,$e,Qe)=>new Promise((ct,Ot)=>{var Et=yt=>{try{nn(Qe.next(yt))}catch(xn){Ot(xn)}},Fe=yt=>{try{nn(Qe.throw(yt))}catch(xn){Ot(xn)}},nn=yt=>yt.done?ct(yt.value):Promise.resolve(yt.value).then(Et,Fe);nn((Qe=Qe.apply(De,$e)).next())}),Qr=function(De,$e){this[0]=De,this[1]=$e},xd=(De,$e,Qe)=>{var ct=(nn,yt,xn,fr)=>{try{var Ki=Qe[nn](yt),Ms=(yt=Ki.value)instanceof Qr,Fs=Ki.done;Promise.resolve(Ms?yt[0]:yt).then(Pn=>Ms?ct(nn==="return"?nn:"next",yt[1]?{done:Pn.done,value:Pn.value}:Pn,xn,fr):xn({value:Pn,done:Fs})).catch(Pn=>ct("throw",Pn,xn,fr))}catch(Pn){fr(Pn)}},Ot=(nn,yt,xn,fr)=>Fe[nn]=Ki=>(yt=new Promise((Ms,Fs,Pn)=>(Pn=()=>ct(nn,Ki,Ms,Fs),Et?Et.then(Pn):Pn())),fr=()=>Et===xn&&(Et=0),Et=xn=yt.then(fr,fr),yt),Et,Fe={};return Qe=Qe.apply(De,$e),Fe[Jo("asyncIterator")]=()=>Fe,Ot("next"),Ot("throw"),Ot("return"),Fe},a0=De=>{var $e=De[Jo("asyncIterator")],Qe=!1,ct,Ot={};return $e==null?($e=De[Jo("iterator")](),ct=Et=>Ot[Et]=Fe=>$e[Et](Fe)):($e=$e.call(De),ct=Et=>Ot[Et]=Fe=>{if(Qe){if(Qe=!1,Et==="throw")throw Fe;return Fe}return Qe=!0,{done:!1,value:new Qr(new Promise(nn=>{var yt=$e[Et](Fe);yt instanceof Object||P7("Object expected"),nn(yt)}),1)}}),Ot[Jo("iterator")]=()=>Ot,ct("next"),"throw"in $e?ct("throw"):Ot.throw=Et=>{throw Et},"return"in $e&&ct("return"),Ot},I2=(De,$e,Qe)=>($e=De[Jo("asyncIterator")])?$e.call(De):(De=De[Jo("iterator")](),$e={},Qe=(ct,Ot)=>(Ot=De[ct])&&($e[ct]=Et=>new Promise((Fe,nn,yt)=>(Et=Ot.call(De,Et),yt=Et.done,Promise.resolve(Et.value).then(xn=>Fe({value:xn,done:yt}),nn)))),Qe("next"),Qe("return"),$e);var $e=document.createElement("style");$e.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:#fff;border-radius:var(--cim-widget-border-radius);box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex;flex-direction:column}.cim-widget-user-search.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
2
+ /*$vite$:1*/`,document.head.appendChild($e);function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}},Ot={},Et={exports:{}},Fe={};var nn;function yt(){if(nn)return Fe;nn=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,A={};function v(D,ee,I){this.props=D,this.context=ee,this.refs=A,this.updater=I||y}v.prototype.isReactComponent={},v.prototype.setState=function(D,ee){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,ee,"setState")},v.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function w(){}w.prototype=v.prototype;function k(D,ee,I){this.props=D,this.context=ee,this.refs=A,this.updater=I||y}var C=k.prototype=new w;C.constructor=k,_(C,v.prototype),C.isPureReactComponent=!0;var H=Array.isArray,Y=Object.prototype.hasOwnProperty,L={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function ne(D,ee,I){var _e,Ue={},ye=null,Re=null;if(ee!=null)for(_e in ee.ref!==void 0&&(Re=ee.ref),ee.key!==void 0&&(ye=""+ee.key),ee)Y.call(ee,_e)&&!q.hasOwnProperty(_e)&&(Ue[_e]=ee[_e]);var He=arguments.length-2;if(He===1)Ue.children=I;else if(1<He){for(var Ye=Array(He),bt=0;bt<He;bt++)Ye[bt]=arguments[bt+2];Ue.children=Ye}if(D&&D.defaultProps)for(_e in He=D.defaultProps,He)Ue[_e]===void 0&&(Ue[_e]=He[_e]);return{$$typeof:e,type:D,key:ye,ref:Re,props:Ue,_owner:L.current}}function de(D,ee){return{$$typeof:e,type:D.type,key:ee,ref:D.ref,props:D.props,_owner:D._owner}}function V(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function se(D){var ee={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(I){return ee[I]})}var pe=/\/+/g;function ve(D,ee){return typeof D=="object"&&D!==null&&D.key!=null?se(""+D.key):ee.toString(36)}function re(D,ee,I,_e,Ue){var ye=typeof D;(ye==="undefined"||ye==="boolean")&&(D=null);var Re=!1;if(D===null)Re=!0;else switch(ye){case"string":case"number":Re=!0;break;case"object":switch(D.$$typeof){case e:case t:Re=!0}}if(Re)return Re=D,Ue=Ue(Re),D=_e===""?"."+ve(Re,0):_e,H(Ue)?(I="",D!=null&&(I=D.replace(pe,"$&/")+"/"),re(Ue,ee,I,"",function(bt){return bt})):Ue!=null&&(V(Ue)&&(Ue=de(Ue,I+(!Ue.key||Re&&Re.key===Ue.key?"":(""+Ue.key).replace(pe,"$&/")+"/")+D)),ee.push(Ue)),1;if(Re=0,_e=_e===""?".":_e+":",H(D))for(var He=0;He<D.length;He++){ye=D[He];var Ye=_e+ve(ye,He);Re+=re(ye,ee,I,Ye,Ue)}else if(Ye=b(D),typeof Ye=="function")for(D=Ye.call(D),He=0;!(ye=D.next()).done;)ye=ye.value,Ye=_e+ve(ye,He++),Re+=re(ye,ee,I,Ye,Ue);else if(ye==="object")throw ee=String(D),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return Re}function oe(D,ee,I){if(D==null)return D;var _e=[],Ue=0;return re(D,_e,"","",function(ye){return ee.call(I,ye,Ue++)}),_e}function xe(D){if(D._status===-1){var ee=D._result;ee=ee(),ee.then(function(I){(D._status===0||D._status===-1)&&(D._status=1,D._result=I)},function(I){(D._status===0||D._status===-1)&&(D._status=2,D._result=I)}),D._status===-1&&(D._status=0,D._result=ee)}if(D._status===1)return D._result.default;throw D._result}var ae={current:null},Q={transition:null},ie={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:Q,ReactCurrentOwner:L};function N(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:oe,forEach:function(D,ee,I){oe(D,function(){ee.apply(this,arguments)},I)},count:function(D){var ee=0;return oe(D,function(){ee++}),ee},toArray:function(D){return oe(D,function(ee){return ee})||[]},only:function(D){if(!V(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Fe.Component=v,Fe.Fragment=n,Fe.Profiler=s,Fe.PureComponent=k,Fe.StrictMode=r,Fe.Suspense=d,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Fe.act=N,Fe.cloneElement=function(D,ee,I){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var _e=_({},D.props),Ue=D.key,ye=D.ref,Re=D._owner;if(ee!=null){if(ee.ref!==void 0&&(ye=ee.ref,Re=L.current),ee.key!==void 0&&(Ue=""+ee.key),D.type&&D.type.defaultProps)var He=D.type.defaultProps;for(Ye in ee)Y.call(ee,Ye)&&!q.hasOwnProperty(Ye)&&(_e[Ye]=ee[Ye]===void 0&&He!==void 0?He[Ye]:ee[Ye])}var Ye=arguments.length-2;if(Ye===1)_e.children=I;else if(1<Ye){He=Array(Ye);for(var bt=0;bt<Ye;bt++)He[bt]=arguments[bt+2];_e.children=He}return{$$typeof:e,type:D.type,key:Ue,ref:ye,props:_e,_owner:Re}},Fe.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:a,_context:D},D.Consumer=D},Fe.createElement=ne,Fe.createFactory=function(D){var ee=ne.bind(null,D);return ee.type=D,ee},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(D){return{$$typeof:c,render:D}},Fe.isValidElement=V,Fe.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:xe}},Fe.memo=function(D,ee){return{$$typeof:f,type:D,compare:ee===void 0?null:ee}},Fe.startTransition=function(D){var ee=Q.transition;Q.transition={};try{D()}finally{Q.transition=ee}},Fe.unstable_act=N,Fe.useCallback=function(D,ee){return ae.current.useCallback(D,ee)},Fe.useContext=function(D){return ae.current.useContext(D)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(D){return ae.current.useDeferredValue(D)},Fe.useEffect=function(D,ee){return ae.current.useEffect(D,ee)},Fe.useId=function(){return ae.current.useId()},Fe.useImperativeHandle=function(D,ee,I){return ae.current.useImperativeHandle(D,ee,I)},Fe.useInsertionEffect=function(D,ee){return ae.current.useInsertionEffect(D,ee)},Fe.useLayoutEffect=function(D,ee){return ae.current.useLayoutEffect(D,ee)},Fe.useMemo=function(D,ee){return ae.current.useMemo(D,ee)},Fe.useReducer=function(D,ee,I){return ae.current.useReducer(D,ee,I)},Fe.useRef=function(D){return ae.current.useRef(D)},Fe.useState=function(D){return ae.current.useState(D)},Fe.useSyncExternalStore=function(D,ee,I){return ae.current.useSyncExternalStore(D,ee,I)},Fe.useTransition=function(){return ae.current.useTransition()},Fe.version="18.3.1",Fe}var xn;function fr(){return xn||(xn=1,Et.exports=yt()),Et.exports}var Ki;function Ms(){if(Ki)return Ot;Ki=1;var e=fr(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var p,m={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:y,props:m,_owner:s.current}}return Ot.Fragment=n,Ot.jsx=u,Ot.jsxs=u,Ot}var Fs;function Pn(){return Fs||(Fs=1,ct.exports=Ms()),ct.exports}var x=Pn();const kr=Object.create(null);kr.open="0",kr.close="1",kr.ping="2",kr.pong="3",kr.message="4",kr.upgrade="5",kr.noop="6";const Bu=Object.create(null);Object.keys(kr).forEach(e=>{Bu[kr[e]]=e});const wd={type:"error",data:"parser error"},u0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",l0=typeof ArrayBuffer=="function",c0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ad=({type:e,data:t},n,r)=>u0&&t instanceof Blob?n?r(t):d0(t,r):l0&&(t instanceof ArrayBuffer||c0(t))?n?r(t):d0(new Blob([t]),r):r(kr[e]+(t||"")),d0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function f0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Cd;function M2(e,t){if(u0&&e.data instanceof Blob)return e.data.arrayBuffer().then(f0).then(t);if(l0&&(e.data instanceof ArrayBuffer||c0(e.data)))return t(f0(e.data));Ad(e,!1,n=>{Cd||(Cd=new TextEncoder),t(Cd.encode(n))})}const h0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<h0.length;e++)Zo[h0.charCodeAt(e)]=e;const F2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Zo[e.charCodeAt(r)],u=Zo[e.charCodeAt(r+1)],c=Zo[e.charCodeAt(r+2)],d=Zo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|c>>2,p[s++]=(c&3)<<6|d&63;return f},B2=typeof ArrayBuffer=="function",vd=(e,t)=>{if(typeof e!="string")return{type:"message",data:p0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:U2(e.substring(1),t)}:Bu[n]?e.length>1?{type:Bu[n],data:e.substring(1)}:{type:Bu[n]}:wd},U2=(e,t)=>{if(B2){const n=F2(e);return p0(n,t)}else return{base64:!0,data:e}},p0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,m0="",H2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{Ad(a,!1,c=>{r[u]=c,++s===n&&t(r.join(m0))})})},z2=(e,t)=>{const n=e.split(m0),r=[];for(let s=0;s<n.length;s++){const a=vd(n[s],t);if(r.push(a),a.type==="error")break}return r};function j2(){return new TransformStream({transform(e,t){M2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let Nd;function Uu(e){return e.reduce((t,n)=>t+n.length,0)}function Hu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function $2(e,t){Nd||(Nd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(Uu(n)<1)break;const d=Hu(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(Uu(n)<2)break;const d=Hu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Uu(n)<8)break;const d=Hu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(wd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Uu(n)<s)break;const d=Hu(n,s);c.enqueue(vd(a?d:Nd.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(wd);break}}}})}const g0=4;function Ft(e){if(e)return V2(e)}function V2(e){for(var t in Ft.prototype)e[t]=Ft.prototype[t];return e}Ft.prototype.on=Ft.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ft.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Ft.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this},Ft.prototype.emitReserved=Ft.prototype.emit,Ft.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ft.prototype.hasListeners=function(e){return!!this.listeners(e).length};const zu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Jn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),q2="arraybuffer";function O7(){}function E0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Y2=Jn.setTimeout,G2=Jn.clearTimeout;function ju(e,t){t.useNativeTimers?(e.setTimeoutFn=Y2.bind(Jn),e.clearTimeoutFn=G2.bind(Jn)):(e.setTimeoutFn=Jn.setTimeout.bind(Jn),e.clearTimeoutFn=Jn.clearTimeout.bind(Jn))}const W2=1.33;function X2(e){return typeof e=="string"?K2(e):Math.ceil((e.byteLength||e.size)*W2)}function K2(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function y0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Q2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function J2(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class Z2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class kd extends Ft{constructor(t){super(),this.writable=!1,ju(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Z2(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=vd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Q2(t);return n.length?"?"+n:""}}class ew extends kd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};z2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,H2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=y0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let T0=!1;try{T0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const tw=T0;function nw(){}class rw extends ew{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Pr extends Ft{constructor(t,n,r){super(),this.createRequest=t,ju(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=E0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=Pr.requestsCount++,Pr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=nw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Pr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Pr.requestsCount=0,Pr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",b0);else if(typeof addEventListener=="function"){const e="onpagehide"in Jn?"pagehide":"unload";addEventListener(e,b0,!1)}}function b0(){for(let e in Pr.requests)Pr.requests.hasOwnProperty(e)&&Pr.requests[e].abort()}const iw=(function(){const e=_0({xdomain:!1});return e&&e.responseType!==null})();class sw extends rw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=iw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Pr(_0,this.uri(),t)}}function _0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||tw))return new XMLHttpRequest}catch(n){}if(!t)try{return new Jn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const S0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ow extends kd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=S0?{}:E0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;Ad(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&zu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=y0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Pd=Jn.WebSocket||Jn.MozWebSocket;class aw extends ow{createSocket(t,n,r){return S0?new Pd(t,n,r):n?new Pd(t,n):new Pd(t)}doWrite(t,n){this.ws.send(n)}}class uw extends kd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=$2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=j2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&zu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const lw={websocket:aw,webtransport:uw,polling:sw},cw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,dw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Od(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=cw.exec(e||""),a={},u=14;for(;u--;)a[dw[u]]=s[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=fw(a,a.path),a.queryKey=hw(a,a.query),a}function fw(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function hw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Id=typeof addEventListener=="function"&&typeof removeEventListener=="function",$u=[];Id&&addEventListener("offline",()=>{$u.forEach(e=>e())},!1);class yi extends Ft{constructor(t,n){if(super(),this.binaryType=q2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Od(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Od(n.host).host);ju(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=J2(this.opts.query)),Id&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},$u.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=g0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=X2(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,zu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Id&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=$u.indexOf(this._offlineEventListener);r!==-1&&$u.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=g0;class pw extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;yi.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const b=new Error("probe error: "+m);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let mw=class extends pw{constructor(t,n={}){const r=typeof t=="object",s=r?F({},t):F({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>lw[a]).filter(a=>!!a)),super(r?s:t,s)}};function gw(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=Od(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const Ew=typeof ArrayBuffer=="function",yw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,x0=Object.prototype.toString,Tw=typeof Blob=="function"||typeof Blob!="undefined"&&x0.call(Blob)==="[object BlobConstructor]",bw=typeof File=="function"||typeof File!="undefined"&&x0.call(File)==="[object FileConstructor]";function Rd(e){return Ew&&(e instanceof ArrayBuffer||yw(e))||Tw&&e instanceof Blob||bw&&e instanceof File}function Vu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Vu(e[n]))return!0;return!1}if(Rd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Vu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Vu(e[n]))return!0;return!1}function _w(e){const t=[],n=e.data,r=e;return r.data=qu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function qu(e,t,n){if(!e)return e;if(Rd(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=qu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return qu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=qu(e[s],t));return r}return e}function Sw(e,t){return e.data=Ld(e.data,t),delete e.attachments,e}function Ld(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Ld(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ld(e[n],t));return e}const xw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var et;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(et||(et={}));class ww{constructor(t){this.replacer=t}encode(t){return(t.type===et.EVENT||t.type===et.ACK)&&Vu(t)?this.encodeAsBinary({type:t.type===et.EVENT?et.BINARY_EVENT:et.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===et.BINARY_EVENT||t.type===et.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=_w(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Dd extends Ft{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===et.BINARY_EVENT;r||n.type===et.BINARY_ACK?(n.type=r?et.EVENT:et.ACK,this.reconstructor=new Aw(n)):super.emitReserved("decoded",n)}else if(Rd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(et[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===et.BINARY_EVENT||r.type===et.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Cw(c)||c<1)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Dd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case et.CONNECT:return w0(n);case et.DISCONNECT:return n===void 0;case et.CONNECT_ERROR:return typeof n=="string"||w0(n);case et.EVENT:case et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&xw.indexOf(n[0])===-1);case et.ACK:case et.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Aw{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Sw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Cw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function w0(e){return Object.prototype.toString.call(e)==="[object Object]"}const vw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Dd,Encoder:ww,get PacketType(){return et}},Symbol.toStringTag,{value:"Module"}));function hr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Nw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class A0 extends Ft{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hr(t,"open",this.onopen.bind(this)),hr(t,"packet",this.onpacket.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,a;if(Nw.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:et.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},s),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,c)=>u?s(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:et.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case et.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case et.EVENT:case et.BINARY_EVENT:this.onevent(t);break;case et.ACK:case et.BINARY_ACK:this.onack(t);break;case et.DISCONNECT:this.ondisconnect();break;case et.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:et.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:et.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Bs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Bs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},Bs.prototype.reset=function(){this.attempts=0},Bs.prototype.setMin=function(e){this.ms=e},Bs.prototype.setMax=function(e){this.max=e},Bs.prototype.setJitter=function(e){this.jitter=e};class Md extends Ft{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ju(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Bs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||vw;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new mw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=hr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=hr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hr(t,"ping",this.onping.bind(this)),hr(t,"data",this.ondata.bind(this)),hr(t,"error",this.onerror.bind(this)),hr(t,"close",this.onclose.bind(this)),hr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){zu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new A0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ea={};function Yu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=gw(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=ea[s]&&a in ea[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Md(r,t):(ea[s]||(ea[s]=new Md(r,t)),d=ea[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Yu,{Manager:Md,Socket:A0,io:Yu,connect:Yu});var kw=function(e){return(function(t){return!!t&&typeof t=="object"})(e)&&!(function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||(function(r){return r.$$typeof===Pw})(t)})(e)},Pw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ta(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Us((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Ow(e,t,n){return e.concat(t).map((function(r){return ta(r,n)}))}function C0(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function v0(e,t){try{return t in e}catch(n){return!1}}function Iw(e,t,n){var r={};return n.isMergeableObject(e)&&C0(e).forEach((function(s){r[s]=ta(e[s],n)})),C0(t).forEach((function(s){(function(a,u){return v0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,s)||(v0(e,s)&&n.isMergeableObject(t[s])?r[s]=(function(a,u){if(!u.customMerge)return Us;var c=u.customMerge(a);return typeof c=="function"?c:Us})(s,n)(e[s],t[s],n):r[s]=ta(t[s],n))})),r}function Us(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Ow,n.isMergeableObject=n.isMergeableObject||kw,n.cloneUnlessOtherwiseSpecified=ta;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Iw(e,t,n):ta(t,n)}Us.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Us(n,r,t)}),{})};var Rw=Us;let Lw=class{constructor(t){Object.assign(this,t)}};function wn(e){if(e)return(function(t){for(var n in wn.prototype)t[n]=wn.prototype[n];return t})(e)}wn.prototype.on=wn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},wn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},wn.prototype.off=wn.prototype.removeListener=wn.prototype.removeAllListeners=wn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var s=0;s<r.length;s++)if((n=r[s])===t||n.fn===t){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+e],this},wn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,t)}return this},wn.prototype.emitReserved=wn.prototype.emit,wn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},wn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Dw=typeof ArrayBuffer=="function",N0=Object.prototype.toString,Mw=typeof Blob=="function"||typeof Blob!="undefined"&&N0.call(Blob)==="[object BlobConstructor]",Fw=typeof File=="function"||typeof File!="undefined"&&N0.call(File)==="[object FileConstructor]";function Fd(e){return Dw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Mw&&e instanceof Blob||Fw&&e instanceof File}function Gu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Gu(e[n]))return!0;return!1}if(Fd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Gu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Gu(e[n]))return!0;return!1}function Bw(e){const t=[],n=e.data,r=e;return r.data=Bd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Bd(e,t){if(!e)return e;if(Fd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Bd(e[r],t);return n}if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Bd(e[r],t));return n}return e}function Uw(e,t){return e.data=Ud(e.data,t),delete e.attachments,e}function Ud(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Ud(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ud(e[n],t));return e}const Hw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var vt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(vt||(vt={}));class zw{constructor(t){this.replacer=t}encode(t){return t.type!==vt.EVENT&&t.type!==vt.ACK||!Gu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===vt.EVENT?vt.BINARY_EVENT:vt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==vt.BINARY_EVENT&&t.type!==vt.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Bw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Hd extends wn{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===vt.BINARY_EVENT;r||n.type===vt.BINARY_ACK?(n.type=r?vt.EVENT:vt.ACK,this.reconstructor=new jw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Fd(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(vt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===vt.BINARY_EVENT||r.type===vt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!$w(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!Hd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case vt.CONNECT:return k0(n);case vt.DISCONNECT:return n===void 0;case vt.CONNECT_ERROR:return typeof n=="string"||k0(n);case vt.EVENT:case vt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Hw.indexOf(n[0])===-1);case vt.ACK:case vt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class jw{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Uw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const $w=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function k0(e){return Object.prototype.toString.call(e)==="[object Object]"}const P0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],O0=(e,t,n)=>function r(s,a=[]){const u=Object.entries(s).map((([c,d])=>{const f=[...a,t(c)];return[e(c),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(s)?u.map((c=>c[1])):Object.fromEntries(u)},I0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Vw=O0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),P0),R0=O0(I0,I0,P0),qw={Encoder:class extends zw{encode(e){var t,n;return super.encode(fe(F({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],Vw(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends Hd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?R0(r):r)):n instanceof Object?R0(n):n)):t))}}},Yw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class Gw{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:s="/copilot",customerId:a,tenantId:u,socketOptions:c={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=m=>{console.log("[Copilot SDK] Connect Ack:",m),this.socket.auth={[this.sessionIdKey]:m.sessionId}},this.handleDisconnect=m=>{console.warn(`[Copilot SDK] Disconnected: ${m}`),m!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${m}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=m=>{console.error(`[Copilot SDK] Connect error: ${m.message}`);const b=m.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=b==null?void 0:b[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const d=`${r}${s}`,f={};t?f["x-cimulate-api-key"]=t:n&&(f.Authorization=`Bearer ${n}`),a&&(f["x-cimulate-customer-id"]=a),u&&(f["Tenant-ID"]=u);const p=[Yw,c,{parser:qw,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Yu(d,Rw.all(p))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*Fu(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout((()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())}),t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return Ke(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return Ke(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return Ke(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return Ke(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return Ke(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(s=>{n&&n(s),r(s)}))}))})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return Ke(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let s="";const a=(function(u){return xd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Qr(u({emit:m=>{c.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Qr(new Promise((m=>{f=m})));for(;c.length>0;)yield c.shift()}finally{yield new Qr(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==s&&u(p)};return this.socket.onAny(d),()=>Ke(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,c)=>this.socket.emit(t,n,(d=>{d.name==="error"?c(new Lw(d)):(s=d==null?void 0:d.id,u(d))})))),events:a}})}}var B=fr();const Qi=Qe(B);var L0=Symbol.for("immer-nothing"),D0=Symbol.for("immer-draftable"),ot=Symbol.for("immer-state");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Hs=Object.getPrototypeOf;function zs(e){return!!e&&!!e[ot]}function Jr(e){var t;return e?M0(e)||Array.isArray(e)||!!e[D0]||!!((t=e.constructor)!=null&&t[D0])||ra(e)||Xu(e):!1}var Ww=Object.prototype.constructor.toString();function M0(e){if(!e||typeof e!="object")return!1;const t=Hs(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Ww}function na(e,t){Wu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Wu(e){const t=e[ot];return t?t.type_:Array.isArray(e)?1:ra(e)?2:Xu(e)?3:0}function zd(e,t){return Wu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function F0(e,t,n){const r=Wu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Xw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ra(e){return e instanceof Map}function Xu(e){return e instanceof Set}function Gt(e){return e.copy_||e.base_}function jd(e,t){if(ra(e))return new Map(e);if(Xu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=M0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ot];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(Hs(e),r)}else{const r=Hs(e);if(r!==null&&n)return F({},e);const s=Object.create(r);return Object.assign(s,e)}}function $d(e,t=!1){return Qu(e)||zs(e)||!Jr(e)||(Wu(e)>1&&Object.defineProperties(e,{set:{value:Ku},add:{value:Ku},clear:{value:Ku},delete:{value:Ku}}),Object.freeze(e),t&&Object.values(e).forEach(n=>$d(n,!0))),e}function Ku(){Zn(2)}function Qu(e){return Object.isFrozen(e)}var Vd={};function Ji(e){const t=Vd[e];return t||Zn(0,e),t}function Kw(e,t){Vd[e]||(Vd[e]=t)}var ia;function Ju(){return ia}function Qw(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function B0(e,t){t&&(Ji("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qd(e){Yd(e),e.drafts_.forEach(Jw),e.drafts_=null}function Yd(e){e===ia&&(ia=e.parent_)}function U0(e){return ia=Qw(ia,e)}function Jw(e){const t=e[ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function H0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ot].modified_&&(qd(t),Zn(4)),Jr(e)&&(e=Zu(t,e),t.parent_||el(t,e)),t.patches_&&Ji("Patches").generateReplacementPatches_(n[ot].base_,e,t.patches_,t.inversePatches_)):e=Zu(t,n,[]),qd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==L0?e:void 0}function Zu(e,t,n){if(Qu(t))return t;const r=t[ot];if(!r)return na(t,(s,a)=>z0(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return el(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),na(a,(c,d)=>z0(e,r,s,c,d,n,u)),el(e,s,!1),n&&e.patches_&&Ji("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function z0(e,t,n,r,s,a,u){if(zs(s)){const c=a&&t&&t.type_!==3&&!zd(t.assigned_,r)?a.concat(r):void 0,d=Zu(e,s,c);if(F0(n,r,d),zs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Jr(s)&&!Qu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Zu(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(ra(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&el(e,s)}}function el(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$d(t,n)}function Zw(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Ju(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Gd;n&&(s=[r],a=sa);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Gd={get(e,t){if(t===ot)return e;const n=Gt(e);if(!zd(n,t))return eA(e,n,t);const r=n[t];return e.finalized_||!Jr(r)?r:r===Wd(e.base_,t)?(Xd(e),e.copy_[t]=oa(r,e)):r},has(e,t){return t in Gt(e)},ownKeys(e){return Reflect.ownKeys(Gt(e))},set(e,t,n){const r=j0(Gt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Wd(Gt(e),t),a=s==null?void 0:s[ot];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Xw(n,s)&&(n!==void 0||zd(e.base_,t)))return!0;Xd(e),Zr(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Wd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Xd(e),Zr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Gt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return Hs(e.base_)},setPrototypeOf(){Zn(12)}},sa={};na(Gd,(e,t)=>{sa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),sa.deleteProperty=function(e,t){return sa.set.call(this,e,t,void 0)},sa.set=function(e,t,n){return Gd.set.call(this,e[0],t,n,e[0])};function Wd(e,t){const n=e[ot];return(n?Gt(n):e)[t]}function eA(e,t,n){var s;const r=j0(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function j0(e,t){if(!(t in e))return;let n=Hs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Hs(n)}}function Zr(e){e.modified_||(e.modified_=!0,e.parent_&&Zr(e.parent_))}function Xd(e){e.copy_||(e.copy_=jd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var tA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&Zn(6),r!==void 0&&typeof r!="function"&&Zn(7);let s;if(Jr(t)){const a=U0(this),u=oa(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?qd(a):Yd(a)}return B0(a,r),H0(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===L0&&(s=void 0),this.autoFreeze_&&$d(s,!0),r){const a=[],u=[];Ji("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,s;return[this.produce(t,n,(u,c)=>{r=u,s=c}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jr(e)||Zn(8),zs(e)&&(e=nA(e));const t=U0(this),n=oa(e,void 0);return n[ot].isManual_=!0,Yd(t),n}finishDraft(e,t){const n=e&&e[ot];(!n||!n.isManual_)&&Zn(9);const{scope_:r}=n;return B0(r,t),H0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Ji("Patches").applyPatches_;return zs(e)?r(e,t):this.produce(e,s=>r(s,t))}};function oa(e,t){const n=ra(e)?Ji("MapSet").proxyMap_(e,t):Xu(e)?Ji("MapSet").proxySet_(e,t):Zw(e,t);return(t?t.scope_:Ju()).drafts_.push(n),n}function nA(e){return zs(e)||Zn(10,e),$0(e)}function $0(e){if(!Jr(e)||Qu(e))return e;const t=e[ot];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=jd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=jd(e,!0);return na(n,(r,s)=>{F0(n,r,$0(s))}),t&&(t.finalized_=!1),n}function rA(){class e extends Map{constructor(d,f){super(),this[ot]={type_:2,parent_:f,scope_:f?f.scope_:Ju(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Gt(this[ot]).size}has(d){return Gt(this[ot]).has(d)}set(d,f){const p=this[ot];return u(p),(!Gt(p).has(d)||Gt(p).get(d)!==f)&&(n(p),Zr(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),n(f),Zr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[ot];u(d),Gt(d).size&&(n(d),Zr(d),d.assigned_=new Map,na(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[ot];Gt(p).forEach((m,b,y)=>{d.call(f,this.get(b),b,this)})}get(d){const f=this[ot];u(f);const p=Gt(f).get(d);if(f.finalized_||!Jr(p)||p!==f.base_.get(d))return p;const m=oa(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Gt(this[ot]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[ot]={type_:3,parent_:f,scope_:f?f.scope_:Ju(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Gt(this[ot]).size}has(d){const f=this[ot];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[ot];return u(f),this.has(d)||(a(f),Zr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),a(f),Zr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[ot];u(d),Gt(d).size&&(a(d),Zr(d),d.copy_.clear())}values(){const d=this[ot];return u(d),a(d),d.copy_.values()}entries(){const d=this[ot];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let m=p.next();for(;!m.done;)d.call(f,m.value,m.value,this),m=p.next()}}function s(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(Jr(d)){const f=oa(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Zn(3,JSON.stringify(Gt(c)))}Kw("MapSet",{proxyMap_:t,proxySet_:s})}var iA=new tA,sA=iA.produce;function V0(e,t,n){var r=B.useMemo(function(){return sA(e)},[e]);return B.useReducer(r,t,n)}const q0={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},pt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},Zi={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},Y0=["ask_cim","search","browse","pdp"],oA=e=>Y0.includes(e),G0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(G0));const aA=new Map(Object.entries(G0).map(([e,t])=>[t,e])),uA=e=>{var t;return(t=aA.get(e))!=null?t:null},js="cimulate",Kd=`${js}:pdp-update`,Qd=`${js}:browse-update`,Jd=`${js}:search-update`,Zd=`${js}:ui-state-update`,ef=`${js}:prompts-state-update`,tf=`${js}:session-state`,Or=F({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},q0),lA={"browse-context":Or.CONTEXT_UPDATED,categoryId:Or.CATEGORY_ID_CHANGED,categoryName:Or.CATEGORY_NAME_CHANGED,page:Or.PAGE_CHANGED,pageSize:Or.PAGE_SIZE_CHANGED,includeFacets:Or.FACET_FILTERS_CHANGED,facetFilters:Or.FACET_FILTERS_CHANGED,rangeFilters:Or.RANGE_FILTERS_CHANGED,catalogSegment:Or.CATALOG_SEGMENT_CHANGED,pricebooks:Or.PRICEBOOKS_CHANGED},ei=F({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},q0),cA={"search-context":ei.SEARCH_CONTEXT_UPDATED,query:ei.QUERY_CHANGED,page:ei.PAGE_CHANGED,pageSize:ei.PAGE_SIZE_CHANGED,includeFacets:ei.FACET_FILTERS_CHANGED,facetFilters:ei.FACET_FILTERS_CHANGED,rangeFilters:ei.RANGE_FILTERS_CHANGED,catalogSegment:ei.CATALOG_SEGMENT_CHANGED,pricebooks:ei.PRICEBOOKS_CHANGED},z="cim-widget",$n=`--${z}`,Ti={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},dA=(e=Ti)=>({[`${$n}-primary-color`]:e.primaryColor||Ti.primaryColor,[`${$n}-secondary-color`]:e.secondaryColor||Ti.secondaryColor,[`${$n}-font-color`]:e.fontColor||Ti.fontColor,[`${$n}-font-family`]:e.fontFamily||Ti.fontFamily,[`${$n}-background-color`]:e.backgroundColor||Ti.backgroundColor,[`${$n}-border-color`]:e.borderColor||Ti.borderColor,[`${$n}-border-radius`]:e.borderRadius||Ti.borderRadius}),bi={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},W0=B.createContext(null),X0=B.createContext(null);function K0(e,t){return function(){return e.apply(t,arguments)}}const{toString:fA}=Object.prototype,{getPrototypeOf:$s}=Object,{iterator:aa,toStringTag:Q0}=Symbol,tl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ua=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),tl(n,t))return!0;n=$s(n)}return!1},hA=(e,t)=>e!=null&&ua(e,t)?e[t]:void 0,nf=(e=>t=>{const n=fA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pr=e=>(e=e.toLowerCase(),t=>nf(t)===e),nl=e=>t=>typeof t===e,{isArray:es}=Array,Vs=nl("undefined");function qs(e){return e!==null&&!Vs(e)&&e.constructor!==null&&!Vs(e.constructor)&&On(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const J0=pr("ArrayBuffer");function pA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&J0(e.buffer),t}const mA=nl("string"),On=nl("function"),Z0=nl("number"),Ys=e=>e!==null&&typeof e=="object",gA=e=>e===!0||e===!1,rl=e=>{if(!Ys(e))return!1;const t=$s(e);return(t===null||t===Object.prototype||$s(t)===null)&&!ua(e,Q0)&&!ua(e,aa)},EA=e=>{if(!Ys(e)||qs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},yA=pr("Date"),TA=pr("File"),bA=e=>!!(e&&typeof e.uri!="undefined"),_A=e=>e&&typeof e.getParts!="undefined",SA=pr("Blob"),xA=pr("FileList"),wA=e=>Ys(e)&&On(e.pipe);function AA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const eg=AA(),tg=typeof eg.FormData!="undefined"?eg.FormData:void 0,CA=e=>{if(!e)return!1;if(tg&&e instanceof tg)return!0;const t=$s(e);if(!t||t===Object.prototype||!On(e.append))return!1;const n=nf(e);return n==="formdata"||n==="object"&&On(e.toString)&&e.toString()==="[object FormData]"},vA=pr("URLSearchParams"),[NA,kA,PA,OA]=["ReadableStream","Request","Response","Headers"].map(pr),IA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function la(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),es(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(qs(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function ng(e,t){if(qs(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ts=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,rg=e=>!Vs(e)&&e!==ts;function rf(...e){const{caseless:t,skipUndefined:n}=rg(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&ng(r,u)||u,d=tl(r,c)?r[c]:void 0;rl(d)&&rl(a)?r[c]=rf(d,a):rl(a)?r[c]=rf({},a):es(a)?r[c]=a.slice():(!n||!Vs(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||qs(c)||(la(c,s),typeof c!="object"||es(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let f=0;f<d.length;f++){const p=d[f];VA.call(c,p)&&s(c[p],p)}}return r}const RA=(e,t,n,{allOwnKeys:r}={})=>(la(t,(s,a)=>{n&&On(s)?Object.defineProperty(e,a,{__proto__:null,value:K0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),LA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),DA=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},MA=(e,t,n,r)=>{let s,a,u;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&$s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},FA=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},BA=e=>{if(!e)return null;if(es(e))return e;let t=e.length;if(!Z0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},UA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&$s(Uint8Array)),HA=(e,t)=>{const r=(e&&e[aa]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},zA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},jA=pr("HTMLFormElement"),$A=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:VA}=Object.prototype,qA=pr("RegExp"),ig=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};la(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},YA=e=>{ig(e,(t,n)=>{if(On(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(On(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},GA=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return es(e)?r(e):r(String(e).split(t)),n},WA=()=>{},XA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function KA(e){return!!(e&&On(e.append)&&e[Q0]==="FormData"&&e[aa])}const QA=e=>{const t=new WeakSet,n=r=>{if(Ys(r)){if(t.has(r))return;if(qs(r))return r;if(!("toJSON"in r)){t.add(r);const s=es(r)?[]:{};return la(r,(a,u)=>{const c=n(a);!Vs(c)&&(s[u]=c)}),t.delete(r),s}}return r};return n(e)},JA=pr("AsyncFunction"),ZA=e=>e&&(Ys(e)||On(e))&&On(e.then)&&On(e.catch),sg=((e,t)=>e?setImmediate:t?((n,r)=>(ts.addEventListener("message",({source:s,data:a})=>{s===ts&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ts.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",On(ts.postMessage)),eC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ts):typeof process!="undefined"&&process.nextTick||sg,og=e=>e!=null&&On(e[aa]),$={isArray:es,isArrayBuffer:J0,isBuffer:qs,isFormData:CA,isArrayBufferView:pA,isString:mA,isNumber:Z0,isBoolean:gA,isObject:Ys,isPlainObject:rl,isEmptyObject:EA,isReadableStream:NA,isRequest:kA,isResponse:PA,isHeaders:OA,isUndefined:Vs,isDate:yA,isFile:TA,isReactNativeBlob:bA,isReactNative:_A,isBlob:SA,isRegExp:qA,isFunction:On,isStream:wA,isURLSearchParams:vA,isTypedArray:UA,isFileList:xA,forEach:la,merge:rf,extend:RA,trim:IA,stripBOM:LA,inherits:DA,toFlatObject:MA,kindOf:nf,kindOfTest:pr,endsWith:FA,toArray:BA,forEachEntry:HA,matchAll:zA,isHTMLForm:jA,hasOwnProperty:tl,hasOwnProp:tl,hasOwnInPrototypeChain:ua,getSafeProp:hA,reduceDescriptors:ig,freezeMethods:YA,toObjectSet:GA,toCamelCase:$A,noop:WA,toFiniteNumber:XA,findKey:ng,global:ts,isContextDefined:rg,isSpecCompliantForm:KA,toJSONObject:QA,isAsyncFn:JA,isThenable:ZA,setImmediate:sg,asap:eC,isIterable:og,isSafeIterable:e=>e!=null&&ua(e,aa)&&og(e)},tC=$.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),nC=e=>{const t={};let n,r,s;return e&&e.split(`
3
+ `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&tC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function rC(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const iC=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),sC=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function sf(e,t){return $.isArray(e)?e.map(n=>sf(n,t)):rC(String(e).replace(t,""))}const oC=e=>sf(e,iC),aC=e=>sf(e,sC);function ag(e){const t=Object.create(null);return $.forEach(e.toJSON(),(n,r)=>{t[r]=aC(n)}),t}const ug=Symbol("internals");function ca(e){return e&&String(e).trim().toLowerCase()}function il(e){return e===!1||e==null?e:$.isArray(e)?e.map(il):oC(String(e))}function uC(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const lC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function of(e,t,n,r,s){if($.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!$.isString(t)){if($.isString(r))return t.indexOf(r)!==-1;if($.isRegExp(r))return r.test(t)}}function cC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function dC(e,t){const n=$.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,a,u){return this[r].call(this,t,s,a,u)},configurable:!0})})}let fn=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(c,d,f){const p=ca(d);if(!p)return;const m=$.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=il(c))}const u=(c,d)=>$.forEach(c,(f,p)=>a(f,p,d));if($.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if($.isString(t)&&(t=t.trim())&&!lC(t))u(nC(t),n);else if($.isObject(t)&&$.isSafeIterable(t)){let c=Object.create(null),d,f;for(const p of t){if(!$.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],$.hasOwnProp(c,f)?(d=c[f],c[f]=$.isArray(d)?[...d,p[1]]:[d,p[1]]):c[f]=p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=ca(t),t){const r=$.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return uC(s);if($.isFunction(n))return n.call(this,s,r);if($.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ca(t),t){const r=$.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||of(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=ca(u),u){const c=$.findKey(r,u);c&&(!n||of(r,r[c],c,n))&&(delete r[c],s=!0)}}return $.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||of(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return $.forEach(this,(s,a)=>{const u=$.findKey(r,a);if(u){n[u]=il(s),delete n[a];return}const c=t?cC(a):String(a).trim();c!==a&&delete n[a],n[c]=il(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return $.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&$.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
4
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[ug]=this[ug]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=ca(u);r[c]||(dC(s,u),r[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}};fn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(fn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),$.freezeMethods(fn);const fC="[REDACTED ****]";function hC(e){if($.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if($.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function pC(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||$.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof fn&&(a=a.toJSON()),r.push(a);let u;if($.isArray(a))u=[],a.forEach((c,d)=>{const f=s(c);$.isUndefined(f)||(u[d]=f)});else{if(!$.isPlainObject(a)&&hC(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?fC:s(d);$.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}let be=class R2 extends Error{static from(t,n,r,s,a,u){const c=new R2(t.message,n||t.code,r,s,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,s,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&$.hasOwnProp(t,"redact")?t.redact:void 0,r=$.isArray(n)&&n.length>0?pC(t,n):$.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};be.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",be.ERR_BAD_OPTION="ERR_BAD_OPTION",be.ECONNABORTED="ECONNABORTED",be.ETIMEDOUT="ETIMEDOUT",be.ECONNREFUSED="ECONNREFUSED",be.ERR_NETWORK="ERR_NETWORK",be.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",be.ERR_DEPRECATED="ERR_DEPRECATED",be.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",be.ERR_BAD_REQUEST="ERR_BAD_REQUEST",be.ERR_CANCELED="ERR_CANCELED",be.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",be.ERR_INVALID_URL="ERR_INVALID_URL",be.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const mC=null,lg=100;function af(e){return $.isPlainObject(e)||$.isArray(e)}function cg(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function uf(e,t,n){return e?e.concat(t).map(function(s,a){return s=cg(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function gC(e){return $.isArray(e)&&!e.some(af)}const EC=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function sl(e,t,n){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,C){return!$.isUndefined(C[k])});const r=n.metaTokens,s=n.visitor||_,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?lg:n.maxDepth,f=c&&$.isSpecCompliantForm(t),p=[];if(!$.isFunction(s))throw new TypeError("visitor must be a function");function m(w){if(w===null)return"";if($.isDate(w))return w.toISOString();if($.isBoolean(w))return w.toString();if(!f&&$.isBlob(w))throw new be("Blob is not supported. Use a Buffer instead.");if($.isArrayBuffer(w)||$.isTypedArray(w)){if(f&&typeof c=="function")return new c([w]);if(typeof Buffer!="undefined")return Buffer.from(w);throw new be("Blob is not supported. Use a Buffer instead.",be.ERR_NOT_SUPPORT)}return w}function b(w){if(w>d)throw new be("Object is too deeply nested ("+w+" levels). Max depth: "+d,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(w,k){if(d===1/0)return JSON.stringify(w);const C=[];return JSON.stringify(w,function(Y,L){if(!$.isObject(L))return L;for(;C.length&&C[C.length-1]!==this;)C.pop();return C.push(L),b(k+C.length-1),L})}function _(w,k,C){let H=w;if($.isReactNative(t)&&$.isReactNativeBlob(w))return t.append(uf(C,k,a),m(w)),!1;if(w&&!C&&typeof w=="object"){if($.endsWith(k,"{}"))k=r?k:k.slice(0,-2),w=y(w,1);else if($.isArray(w)&&gC(w)||($.isFileList(w)||$.endsWith(k,"[]"))&&(H=$.toArray(w)))return k=cg(k),H.forEach(function(L,q){!($.isUndefined(L)||L===null)&&t.append(u===!0?uf([k],q,a):u===null?k:k+"[]",m(L))}),!1}return af(w)?!0:(t.append(uf(C,k,a),m(w)),!1)}const A=Object.assign(EC,{defaultVisitor:_,convertValue:m,isVisitable:af});function v(w,k,C=0){if(!$.isUndefined(w)){if(b(C),p.indexOf(w)!==-1)throw new Error("Circular reference detected in "+k.join("."));p.push(w),$.forEach(w,function(Y,L){(!($.isUndefined(Y)||Y===null)&&s.call(t,Y,$.isString(L)?L.trim():L,k,A))===!0&&v(Y,k?k.concat(L):[L],C+1)}),p.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return v(e),t}function dg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function lf(e,t){this._pairs=[],e&&sl(e,this,t)}const fg=lf.prototype;fg.append=function(t,n){this._pairs.push([t,n])},fg.toString=function(t){const n=t?r=>t.call(this,r,dg):dg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function yC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function hg(e,t,n){if(!t)return e;e=e||"";const r=$.isFunction(n)?{serialize:n}:n,s=$.getSafeProp(r,"encode")||yC,a=$.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=$.isURLSearchParams(t)?t.toString():new lf(t,r).toString(s),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class pg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(r){r!==null&&t(r)})}}const cf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},TC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:lf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},df=typeof window!="undefined"&&typeof document!="undefined",ff=typeof navigator=="object"&&navigator||void 0,bC=df&&(!ff||["ReactNative","NativeScript","NS"].indexOf(ff.product)<0),_C=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",SC=df&&window.location.href||"http://localhost",rn=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:df,hasStandardBrowserEnv:bC,hasStandardBrowserWebWorkerEnv:_C,navigator:ff,origin:SC},Symbol.toStringTag,{value:"Module"}))),TC);function xC(e,t){return sl(e,new rn.classes.URLSearchParams,F({visitor:function(n,r,s,a){return rn.isNode&&$.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const mg=lg;function gg(e){if(e>mg)throw new be("FormData field is too deeply nested ("+e+" levels). Max depth: "+mg,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function wC(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)gg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function AC(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function Eg(e){function t(n,r,s,a){gg(a);let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&$.isArray(s)?s.length:u,d?($.hasOwnProp(s,u)?s[u]=$.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!$.hasOwnProp(s,u)||!$.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&$.isArray(s[u])&&(s[u]=AC(s[u])),!c)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(r,s)=>{t(wC(r),s,n,0)}),n}return null}const Gs=(e,t)=>e!=null&&$.hasOwnProp(e,t)?e[t]:void 0;function CC(e,t,n){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const da={transitional:cf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=$.isObject(t);if(a&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return s?JSON.stringify(Eg(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=Gs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return xC(t,d).toString();if((c=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Gs(this,"env"),p=f&&f.FormData;return sl(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),CC(t)):t}],transformResponse:[function(t){const n=Gs(this,"transitional")||da.transitional,r=n&&n.forcedJSONParsing,s=Gs(this,"responseType"),a=s==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Gs(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?be.from(d,be.ERR_BAD_RESPONSE,this,null,Gs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch","query"],e=>{da.headers[e]={}});function hf(e,t){const n=this||da,r=t||n,s=fn.from(r.headers);let a=r.data;return $.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function yg(e){return!!(e&&e.__CANCEL__)}let fa=class extends be{constructor(t,n,r){super(t==null?"canceled":t,be.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Tg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new be("Request failed with status code "+n.status,n.status>=400&&n.status<500?be.ERR_BAD_REQUEST:be.ERR_BAD_RESPONSE,n.config,n.request,n))}function vC(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function NC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,b=0;for(;m!==s;)b+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(b*1e3/y):void 0}}function kC(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const ol=(e,t,n=3)=>{let r=0;const s=NC(50,250);return kC(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},bg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},_g=e=>(...t)=>$.asap(()=>e(...t)),PC=rn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,OC=rn.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];$.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),$.isString(r)&&c.push(`path=${r}`),$.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),$.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function IC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function RC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const LC=/^https?:(?!\/\/)/i,DC=/[\t\n\r]/g;function MC(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function FC(e){return MC(e).replace(DC,"")}function Sg(e,t){if(typeof e=="string"&&LC.test(FC(e)))throw new be('Invalid URL: missing "//" after protocol',be.ERR_INVALID_URL,t)}function xg(e,t,n,r){Sg(t,r);let s=!IC(t);return e&&(s||n===!1)?(Sg(e,r),RC(e,t)):t}const wg=e=>e instanceof fn?F({},e):e;function ns(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,b,y){return $.isPlainObject(p)&&$.isPlainObject(m)?$.merge.call({caseless:y},p,m):$.isPlainObject(m)?$.merge({},m):$.isArray(m)?m.slice():m}function s(p,m,b,y){if($.isUndefined(m)){if(!$.isUndefined(p))return r(void 0,p,b,y)}else return r(p,m,b,y)}function a(p,m){if(!$.isUndefined(m))return r(void 0,m)}function u(p,m){if($.isUndefined(m)){if(!$.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p){const m=$.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!$.isUndefined(m))if($.isPlainObject(m)){if($.hasOwnProp(m,p))return m[p]}else return;const b=$.hasOwnProp(e,"transitional")?e.transitional:void 0;if($.isPlainObject(b)&&$.hasOwnProp(b,p))return b[p]}function d(p,m,b){if($.hasOwnProp(t,b))return r(p,m);if($.hasOwnProp(e,b))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,b)=>s(wg(p),wg(m),b,!0)};return $.forEach(Object.keys(F(F({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const b=$.hasOwnProp(f,m)?f[m]:s,y=$.hasOwnProp(e,m)?e[m]:void 0,_=$.hasOwnProp(t,m)?t[m]:void 0,A=b(y,_,m);$.isUndefined(A)&&b!==d||(n[m]=A)}),$.hasOwnProp(t,"validateStatus")&&$.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&($.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const BC=["content-type","content-length"];function UC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{BC.includes(r.toLowerCase())&&e.set(r,s)})}const HC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Ag(e){const t=ns({},e),n=b=>$.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=fn.from(c),t.url=hg(xg(f,m,p,t),n("params"),n("paramsSerializer")),d){const b=$.getSafeProp(d,"username")||"",y=$.getSafeProp(d,"password")||"";try{c.set("Authorization","Basic "+btoa(b+":"+(y?HC(y):"")))}catch(_){throw be.from(_,be.ERR_BAD_OPTION_VALUE,e)}}if($.isFormData(r)&&(rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv||$.isReactNative(r)?c.setContentType(void 0):$.isFunction(r.getHeaders)&&UC(c,r.getHeaders(),n("formDataHeaderPolicy"))),rn.hasStandardBrowserEnv&&($.isFunction(s)&&(s=s(t)),s===!0||s==null&&PC(t.url))){const y=a&&u&&OC.read(u);y&&c.set(a,y)}return t}const zC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=Ag(e);let a=s.data;const u=fn.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,m,b,y,_;function A(){y&&y(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function w(){if(!v)return;const C=fn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),Y={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:C,config:e,request:v};Tg(function(q){n(q),A()},function(q){r(q),A()},Y),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(w)},v.onabort=function(){v&&(r(new be("Request aborted",be.ECONNABORTED,e,v)),A(),v=null)},v.onerror=function(H){const Y=H&&H.message?H.message:"Network Error",L=new be(Y,be.ERR_NETWORK,e,v);L.event=H||null,r(L),A(),v=null},v.ontimeout=function(){let H=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const Y=s.transitional||cf;s.timeoutErrorMessage&&(H=s.timeoutErrorMessage),r(new be(H,Y.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,v)),A(),v=null},a===void 0&&u.setContentType(null),"setRequestHeader"in v&&$.forEach(ag(u),function(H,Y){v.setRequestHeader(Y,H)}),$.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),c&&c!=="json"&&(v.responseType=s.responseType),f&&([b,_]=ol(f,!0),v.addEventListener("progress",b)),d&&v.upload&&([m,y]=ol(d),v.upload.addEventListener("progress",m),v.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=C=>{v&&(r(!C||C.type?new fa(null,e,v):C),v.abort(),A(),v=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const k=vC(s.url);if(k&&!rn.protocols.includes(k)){r(new be("Unsupported protocol "+k+":",be.ERR_BAD_REQUEST,e)),A();return}v.send(a||null)})},jC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof be?f:new fa(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new be(`timeout of ${t}ms exceeded`,be.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>$.asap(u),c},$C=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},VC=function(e,t){return xd(this,null,function*(){try{for(var n=I2(qC(e)),r,s,a;r=!(s=yield new Qr(n.next())).done;r=!1){const u=s.value;yield*a0($C(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Qr(s.call(n)))}finally{if(a)throw a[0]}}})},qC=function(e){return xd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*a0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Qr(t.read());if(n)break;yield r}}finally{yield new Qr(t.cancel())}})},Cg=(e,t,n,r)=>{const s=VC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Ke(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){c(),f.close();return}let b=m.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}})},cancel(f){return c(f),s.return()}},{highWaterMark:2})},al=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,YC=(e,t,n)=>t+2<n&&al(e.charCodeAt(t+1))&&al(e.charCodeAt(t+2));function GC(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const _=r.charCodeAt(y+1),A=r.charCodeAt(y+2);al(_)&&al(A)&&(u-=2,y+=2)}let d=0,f=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d===37&&YC(r,u,c))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const pf="1.18.1",vg=64*1024,{isFunction:ul}=$,WC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Ng=e=>{if(!$.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},kg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},XC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},KC=e=>{const t=$.global!==void 0&&$.global!==null?$.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=$.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,c=s?ul(s):typeof fetch=="function",d=ul(a),f=ul(u);if(!c)return!1;const p=c&&ul(n),m=c&&(typeof r=="function"?(w=>k=>w.encode(k))(new r):w=>Ke(null,null,function*(){return new Uint8Array(yield new a(w).arrayBuffer())})),b=d&&p&&kg(()=>{let w=!1;const k=new a(rn.origin,{body:new n,method:"POST",get duplex(){return w=!0,"half"}}),C=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),w&&!C}),y=f&&p&&kg(()=>$.isReadableStream(new u("").body)),_={stream:y&&(w=>w.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!_[w]&&(_[w]=(k,C)=>{let H=k&&k[w];if(H)return H.call(k);throw new be(`Response type '${w}' is not supported`,be.ERR_NOT_SUPPORT,C)})});const A=w=>Ke(null,null,function*(){if(w==null)return 0;if($.isBlob(w))return w.size;if($.isSpecCompliantForm(w))return(yield new a(rn.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if($.isArrayBufferView(w)||$.isArrayBuffer(w))return w.byteLength;if($.isURLSearchParams(w)&&(w=w+""),$.isString(w))return(yield m(w)).byteLength}),v=(w,k)=>Ke(null,null,function*(){const C=$.toFiniteNumber(w.getContentLength());return C==null?A(k):C});return w=>Ke(null,null,function*(){let{url:k,method:C,data:H,signal:Y,cancelToken:L,timeout:q,onDownloadProgress:ne,onUploadProgress:de,responseType:V,headers:se,withCredentials:pe="same-origin",fetchOptions:ve,maxContentLength:re,maxBodyLength:oe}=Ag(w);const xe=$.isNumber(re)&&re>-1,ae=$.isNumber(oe)&&oe>-1,Q=ye=>$.hasOwnProp(w,ye)?w[ye]:void 0;let ie=s||fetch;V=V?(V+"").toLowerCase():"text";let N=jC([Y,L&&L.toAbortSignal()],q),D=null;const ee=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let I,_e=null;const Ue=()=>new be("Request body larger than maxBodyLength limit",be.ERR_BAD_REQUEST,w,D);try{let ye;const Re=Q("auth");if(Re){const Ve=$.getSafeProp(Re,"username")||"",Nt=$.getSafeProp(Re,"password")||"";ye={username:Ve,password:Nt}}if(XC(k)){const Ve=new URL(k,rn.origin);if(!ye&&(Ve.username||Ve.password)){const Nt=Ng(Ve.username),vn=Ng(Ve.password);ye={username:Nt,password:vn}}(Ve.username||Ve.password)&&(Ve.username="",Ve.password="",k=Ve.href)}if(ye&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa(WC((ye.username||"")+":"+(ye.password||""))))),xe&&typeof k=="string"&&k.startsWith("data:")&&GC(k)>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D);if(ae&&C!=="get"&&C!=="head"){const Ve=yield A(H);if(typeof Ve=="number"&&isFinite(Ve)&&(I=Ve,Ve>oe))throw Ue()}const He=ae&&($.isReadableStream(H)||$.isStream(H)),Ye=(Ve,Nt,vn)=>Cg(Ve,vg,on=>{if(ae&&on>oe)throw _e=Ue();Nt&&Nt(on)},vn);if(b&&C!=="get"&&C!=="head"&&(de||He)){if(I=I==null?yield v(se,H):I,I!==0||He){let Ve=new a(k,{method:"POST",body:H,duplex:"half"}),Nt;if($.isFormData(H)&&(Nt=Ve.headers.get("content-type"))&&se.setContentType(Nt),Ve.body){const[vn,on]=de&&bg(I,ol(_g(de)))||[];H=Ye(Ve.body,vn,on)}}}else if(He&&!d&&p&&C!=="get"&&C!=="head")H=Ye(H);else if(He&&d&&!b&&C!=="get"&&C!=="head")throw new be("Stream request bodies are not supported by the current fetch implementation",be.ERR_NOT_SUPPORT,w,D);$.isString(pe)||(pe=pe?"include":"omit");const bt=d&&"credentials"in a.prototype;if($.isFormData(H)){const Ve=se.getContentType();Ve&&/^multipart\/form-data/i.test(Ve)&&!/boundary=/i.test(Ve)&&se.delete("content-type")}se.set("User-Agent","axios/"+pf,!1);const Cn=fe(F({},ve),{signal:N,method:C.toUpperCase(),headers:ag(se.normalize()),body:H,duplex:"half",credentials:bt?pe:void 0});D=d&&new a(k,Cn);let sn=yield d?ie(D,ve):ie(k,Cn);const _r=fn.from(sn.headers);if(xe){const Ve=$.toFiniteNumber(_r.getContentLength());if(Ve!=null&&Ve>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D)}const sr=y&&(V==="stream"||V==="response");if(y&&sn.body&&(ne||xe||sr&&ee)){const Ve={};["status","statusText","headers"].forEach(Pe=>{Ve[Pe]=sn[Pe]});const Nt=$.toFiniteNumber(_r.getContentLength()),[vn,on]=ne&&bg(Nt,ol(_g(ne),!0))||[];let Fn=0;const we=Pe=>{if(xe&&(Fn=Pe,Fn>re))throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D);vn&&vn(Pe)};sn=new u(Cg(sn.body,vg,we,()=>{on&&on(),ee&&ee()}),Ve)}V=V||"text";let Jt=yield _[$.findKey(_,V)||"text"](sn,w);if(xe&&!y&&!sr){let Ve;if(Jt!=null&&(typeof Jt.byteLength=="number"?Ve=Jt.byteLength:typeof Jt.size=="number"?Ve=Jt.size:typeof Jt=="string"&&(Ve=typeof r=="function"?new r().encode(Jt).byteLength:Jt.length)),typeof Ve=="number"&&Ve>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D)}return!sr&&ee&&ee(),yield new Promise((Ve,Nt)=>{Tg(Ve,Nt,{data:Jt,headers:fn.from(sn.headers),status:sn.status,statusText:sn.statusText,config:w,request:D})})}catch(ye){if(ee&&ee(),N&&N.aborted&&N.reason instanceof be){const Re=N.reason;throw Re.config=w,D&&(Re.request=D),ye!==Re&&Object.defineProperty(Re,"cause",{__proto__:null,value:ye,writable:!0,enumerable:!1,configurable:!0}),Re}if(_e)throw D&&!_e.request&&(_e.request=D),_e;if(ye instanceof be)throw D&&!ye.request&&(ye.request=D),ye;if(ye&&ye.name==="TypeError"&&/Load failed|fetch/i.test(ye.message)){const Re=new be("Network Error",be.ERR_NETWORK,w,D,ye&&ye.response);throw Object.defineProperty(Re,"cause",{__proto__:null,value:ye.cause||ye,writable:!0,enumerable:!1,configurable:!0}),Re}throw be.from(ye,ye&&ye.code,w,D,ye&&ye.response)}})},QC=new Map,Pg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,c=u,d,f,p=QC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:KC(t)),p=f;return f};Pg();const mf={http:mC,xhr:zC,fetch:{get:Pg}};$.forEach(mf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Og=e=>`- ${e}`,JC=e=>$.isFunction(e)||e===null||e===!1;function ZC(e,t){e=$.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(s=r,!JC(r)&&(s=mf[(c=String(r)).toLowerCase()],s===void 0))throw new be(`Unknown adapter '${c}'`);if(s&&($.isFunction(s)||(s=s.get(t))))break;a[c||"#"+u]=s}if(!s){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
5
+ `+u.map(Og).join(`
6
+ `):" "+Og(u[0]):"as no adapter specified";throw new be("There is no suitable adapter to dispatch the request "+c,be.ERR_NOT_SUPPORT)}return s}const Ig={getAdapter:ZC,adapters:mf};function gf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new fa(null,e)}function Rg(e){return gf(e),e.headers=fn.from(e.headers),e.data=hf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ig.getAdapter(e.adapter||da.adapter,e)(e).then(function(r){gf(e),e.response=r;try{r.data=hf.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=fn.from(r.headers),r},function(r){if(!yg(r)&&(gf(e),r&&r.response)){e.response=r.response;try{r.response.data=hf.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=fn.from(r.response.headers)}return Promise.reject(r)})}const ll={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ll[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Lg={};ll.transitional=function(t,n,r){function s(a,u){return"[Axios v"+pf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new be(s(u," has been removed"+(n?" in "+n:"")),be.ERR_DEPRECATED);return n&&!Lg[u]&&(Lg[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},ll.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ev(e,t,n){if(typeof e!="object"||e===null)throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new be("option "+a+" must be "+d,be.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new be("Unknown option "+a,be.ERR_BAD_OPTION)}}const cl={assertOptions:ev,validators:ll},hn=cl.validators;let rs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new pg,response:new pg}}request(t,n){return Ke(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
7
7
  `);return u===-1?"":s.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
8
8
  `),c=u===-1?-1:a.indexOf(`
9
9
  `,u+1),d=c===-1?"":a.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
10
- `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ns(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&ll.assertOptions(r,{silentJSONParsing:hn.transitional(hn.boolean),forcedJSONParsing:hn.transitional(hn.boolean),clarifyTimeoutError:hn.transitional(hn.boolean),legacyInterceptorReqResOrdering:hn.transitional(hn.boolean),advertiseZstdAcceptEncoding:hn.transitional(hn.boolean),validateStatusUndefinedResolves:hn.transitional(hn.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:ll.assertOptions(s,{encode:hn.function,serialize:hn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ll.assertOptions(n,{baseUrl:hn.spelling("baseURL"),withXsrfToken:hn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&$.merge(a.common,a[n.method]);a&&$.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=fn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;d=d&&A.synchronous;const v=n.transitional||cf;v&&v.legacyInterceptorReqResOrdering?c.unshift(A.fulfilled,A.rejected):c.push(A.fulfilled,A.rejected)});const f=[];this.interceptors.response.forEach(function(A){f.push(A.fulfilled,A.rejected)});let p,m=0,b;if(!d){const _=[Ig.bind(this),void 0];for(_.unshift(...c),_.push(...f),b=_.length,p=Promise.resolve(n);m<b;)p=p.then(_[m++],_[m++]);return p}b=c.length;let y=n;for(;m<b;){const _=c[m++],A=c[m++];try{y=_(y)}catch(v){A.call(this,v);break}}try{p=Ig.call(this,y)}catch(_){return Promise.reject(_)}for(m=0,b=f.length;m<b;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=ns(this.defaults,t);const n=Sg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return fg(n,t.params,t.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(t){rs.prototype[t]=function(n,r){return this.request(ns(r||{},{method:t,url:n,data:r&&$.hasOwnProp(r,"data")?r.data:void 0}))}}),$.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(ns(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}rs.prototype[t]=n(),t!=="query"&&(rs.prototype[t+"Form"]=n(!0))});let ev=class R2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new fa(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new R2(function(s){t=s}),cancel:t}}};function tv(e){return function(n){return e.apply(null,n)}}function nv(e){return $.isObject(e)&&e.isAxiosError===!0}const Ef={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ef).forEach(([e,t])=>{Ef[t]=e});function Lg(e){const t=new rs(e),n=X0(rs.prototype.request,t);return $.extend(n,rs.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Lg(ns(e,s))},n}const Rt=Lg(da);Rt.Axios=rs,Rt.CanceledError=fa,Rt.CancelToken=ev,Rt.isCancel=Eg,Rt.VERSION=pf,Rt.toFormData=il,Rt.AxiosError=be,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=tv,Rt.isAxiosError=nv,Rt.mergeConfig=ns,Rt.AxiosHeaders=fn,Rt.formToJSON=e=>gg($.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=Og.getAdapter,Rt.HttpStatusCode=Ef,Rt.default=Rt;const{Axios:D7,AxiosError:M7,CanceledError:F7,isCancel:B7,CancelToken:U7,VERSION:H7,all:z7,Cancel:j7,isAxiosError:$7,spread:V7,toFormData:q7,AxiosHeaders:Y7,HttpStatusCode:G7,formToJSON:W7,getAdapter:X7,mergeConfig:K7,create:Q7}=Rt;class rv{constructor(t,n,r,s=!1,a,u){Se(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Se(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Se(this,"CIMULATE_SEARCH_API_PATH","api/v1");Se(this,"baseApiUrl");Se(this,"headers",{});Se(this,"fetchConfig",()=>Ke(this,null,function*(){try{const t=yield Rt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Se(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class iv{constructor(t,n,r,s=!1,a,u){Se(this,"apiService");Se(this,"config",null);Se(this,"getConfig",()=>Ke(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Se(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Se(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Se(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Se(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Se(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Se(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Se(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Se(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Se(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Se(this,"getProductField",t=>this.config?this.config[t]:"");Se(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new rv(t,n,r,s,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Ws=(e,t,n,...r)=>{if(!e)return;const s=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",s,n,...r)};class sv{constructor(t=!1){Se(this,"isDevelopment");Se(this,"_log",(t,n,...r)=>{Ws(this.isDevelopment,t,n,...r)});this.isDevelopment=t}log(t,...n){this._log("log",t,...n)}warn(t,...n){this._log("warn",t,...n)}error(t,...n){this._log("error",t,...n)}info(t,...n){this._log("info",t,...n)}debug(t,...n){this._log("debug",t,...n)}}const ov={copilot:"Your Search Assistant",messaging:"Commerce Client"},Dg=B.createContext(null),av=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:b,searchConfig:y,suggestionButtonConfig:_,progressStepsLimit:A=3,messageAlignment:v="start",autoScroll:w=!0,showProductDescription:N=!1,componentConfig:C,conversationHistory:U,resetConversationMessage:Y="",apiKey:R,apiToken:q,baseUrl:ne,customerId:me,tenantId:V,theme:se,isDevelopment:he,__features:ve,routingAttributes:re,enableDownloadTranscript:oe=!0,enableEscalationToAgent:xe=!1,showProductCaptions:ae=!1,children:Q})=>{const ie=e==="messaging",k=B.useMemo(()=>{const Re=re==null?void 0:re.isCartMgmtSupported;return Re===!0||Re==="true"},[re]),D=B.useMemo(()=>ie?{config:null}:new iv(ne,R,q,he,me,V),[ie,ne,R,q,he,me,V]),ee=B.useMemo(()=>new sv(he),[he]);B.useEffect(()=>{ie||!D||D.config||D.getConfig()},[D,ie]);const I=B.useMemo(()=>cA(se),[se]),_e=B.useMemo(()=>{const Re=(y==null?void 0:y.placeholder)||m,He=(y==null?void 0:y.buttonLabel)||b;let Ye="icon";return y!=null&&y.buttonType?Ye=y.buttonType:b&&(Ye="text"),de(F({},y||{}),{placeholder:Re,buttonLabel:He,buttonType:Ye})},[y,m,b]),Ue=B.useMemo(()=>de(F({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||ov[e!=null?e:"copilot"]}),[r,t,n,e]),ye=B.useMemo(()=>({configModule:D,mode:e!=null?e:"copilot",headerConfig:Ue,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:I,logger:ee,searchConfig:_e,suggestionButtonConfig:_,progressStepsLimit:A,messageAlignment:v,autoScroll:w,showProductDescription:!!N,enableMinimize:!!(C!=null&&C.enableMinimize),enableDownloadTranscript:oe,enableEscalationToAgent:xe,showProductCaptions:!!ae,resetConversationMessage:Y,conversationHistory:{sinceHours:typeof(U==null?void 0:U.sinceHours)=="number"?U.sinceHours:1,limit:U==null?void 0:U.limit},features:ve,isCartMgmtSupported:k}),[D,e,Ue,a,s,f,p,c,d,u,_e,_,v,w,N,C,oe,xe,ae,Y,ee,I,U,ve,k]);return x.jsx(Dg.Provider,{value:ye,children:Q})},tt=()=>{const e=B.useContext(Dg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class uv{constructor(){Se(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Se(this,"connectedProxy");Se(this,"modeProxy");Se(this,"entryTypeProxy");Se(this,"statusProxy");Se(this,"dialogProxy");Se(this,"modalProxy",{isFullscreen:!1});Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return dv(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const Je=new uv,is=()=>Je.connected,ha=()=>Je.isOpen,lv=e=>{window.addEventListener(Zd,e)},cv=e=>{window.removeEventListener(Zd,e)},dv=(e,t)=>{const n=new CustomEvent(Zd,{detail:{property:e,value:t}});window.dispatchEvent(n)},fv=e=>{Je.connectedProxy.connected=e},pa=e=>{if(!sA(e)){const t=q0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}Je.entryTypeProxy.entryType=e},ti=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1)},cl=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},yf=e=>{Je.modalProxy.isFullscreen=e},dl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Je.statusProxy.type=e,e==="dialog"||e==="chat"?Je.modeProxy.mode="embedded":Je.modeProxy.mode="standalone"},Tf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);Je.dialogProxy.position=e},hv=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},pv=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=tt(),s=B.useCallback(C=>{n({type:pt.SET_COPILOT,payload:C})},[n]),a=B.useCallback(C=>{fv(C),n({type:pt.SET_CONNECTED,payload:C})},[n]),u=B.useCallback(()=>{n({type:pt.RESET_COPILOT,payload:{}})},[n]),c=B.useCallback(()=>{n({type:pt.RESET_STATE,payload:{}})},[n]),d=B.useCallback(C=>{r==null||r.log(`${C.name} event received`,C),n({type:pt.ADD_MESSAGE,payload:C}),C.bypassHandlers||e==null||e(C)},[e,r,n]),f=B.useCallback(C=>{n({type:pt.ADD_LOADING_MESSAGE,payload:C})},[n]),p=B.useCallback(C=>{n({type:pt.REMOVE_LOADING_MESSAGE,payload:C})},[n]),m=B.useCallback(C=>{d(C),f(C.id)},[d,f]),b=B.useCallback(C=>{n({type:pt.SET_ACTIVE_CONVERSATION_ID,payload:C})},[n]),y=B.useCallback(C=>{n({type:pt.ADD_CONVERSATION_ID,payload:C})},[n]),_=B.useCallback(C=>{n({type:pt.SET_CONVERSATION_IDS,payload:C})},[n]),A=B.useCallback(C=>{n({type:pt.SET_IMAGE_FILE,payload:C})},[n]),v=B.useCallback(C=>{n({type:pt.SET_ASK_CIM_PROMPTS,payload:C})},[n]),w=B.useCallback(C=>{n({type:pt.SET_CONVERSATION_HISTORY_LOADED,payload:C})},[n]),N=B.useMemo(()=>({setCopilot:s,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:b,addConversationId:y,setConversationIds:_,setImageFile:A,setAskCimPrompts:v,setConversationHistoryLoaded:w}),[s,a,u,c,d,f,p,m,b,y,_,A,v,w]);return x.jsx(W0.Provider,{value:N,children:t})};nA();const mv=(e,t)=>{const{type:n,payload:r}=t;if(n===pt.ADD_MESSAGE){const s=r;if(e.messages.push(s),s.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===s.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===s.id);if(c!==-1){u[c]=s;return}u.push(s);return}else{e.groupedMessages.push({type:"group",eventSourceId:s.eventSourceId,messages:[s],createdAt:new Date(s.createdAt)});return}}e.groupedMessages.push({type:"individual",message:s,createdAt:new Date(s.createdAt)});return}switch(n){case pt.RESET_STATE:e.messages=Zi.messages,e.groupedMessages=Zi.groupedMessages,e.loadingMessages=Zi.loadingMessages,e.imageFile=Zi.imageFile,e.askCimPrompts=Zi.askCimPrompts,e.conversationHistoryLoaded=Zi.conversationHistoryLoaded;break;case pt.RESET_COPILOT:e.copilot=null;break;case pt.SET_COPILOT:e.copilot=r;break;case pt.SET_CONNECTED:e.connected=r;break;case pt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case pt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case pt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case pt.ADD_CONVERSATION_ID:{const s=r;e.conversationIds.includes(s)||e.conversationIds.push(s)}break;case pt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case pt.SET_IMAGE_FILE:e.imageFile=r;break;case pt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case pt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},gv=({onCopilotEvent:e,children:t})=>{const[n,r]=$0(mv,Zi);return x.jsx(G0.Provider,{value:n,children:x.jsx(pv,{onCopilotEvent:e,dispatch:r,children:t})})};function Ev(){var e=B.useRef(!0);return e.current?(e.current=!1,!0):e.current}function yv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function Tv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var bf=typeof window!="undefined",ma=function(e){B.useEffect(e,[])},bv=function(e){var t=B.useRef(e);t.current=e,ma(function(){return function(){return t.current()}})},_v=function(e){var t=B.useRef(0),n=B.useState(e),r=n[0],s=n[1],a=B.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return bv(function(){cancelAnimationFrame(t.current)}),[r,a]},Sv=function(e,t){return e===t};function xv(e,t){t===void 0&&(t=Sv);var n=B.useRef(),r=B.useRef(e),s=Ev();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var wv=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,c=_v({width:bf?window.innerWidth:r,height:bf?window.innerHeight:a}),d=c[0],f=c[1];return B.useEffect(function(){if(bf){var p=function(){var m=window.innerWidth,b=window.innerHeight;f({width:m,height:b}),u&&u(m,b)};return yv(window,"resize",p),function(){Tv(window,"resize",p)}}},[]),d};class Av{constructor(){Se(this,"items",[]);Se(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Se(this,"remove",()=>this.items.shift());Se(this,"first",()=>this.items.length>0?this.items[0]:null);Se(this,"clear",()=>{this.items.length=0});Se(this,"processQueue",t=>{new Array(pn.size).fill(1).forEach(()=>{const r=pn.first();r&&(t(r),pn.remove())})})}get size(){return this.items.length}}const pn=new Av,Mg=e=>{window.addEventListener(Jd,e)},Fg=e=>{window.removeEventListener(Jd,e)},Cv=(e,t,n)=>{const r=new CustomEvent(Jd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Bg=e=>{window.addEventListener(Qd,e)},Ug=e=>{window.removeEventListener(Qd,e)},vv=(e,t,n)=>{const r=new CustomEvent(Qd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Hg=e=>{window.addEventListener(Kd,e)},zg=e=>{window.removeEventListener(Kd,e)},jg=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},kv=e=>{window.addEventListener(tf,e)},Nv=e=>{window.removeEventListener(tf,e)},fl=(e,t,n)=>{const r=new CustomEvent(tf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Pv{constructor(){Se(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"categoryIdProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const s=uA[n];return vv(s,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const at=new Pv,$g=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Vg=(e,t,n)=>{var u,c;const r=F({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},qg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Yg=({field:e,value:t},n)=>{const[r,s]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof s=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:s},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:s});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},Gg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Wg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},Ov=e=>{if(!is()||!ha()){is()&&pn.clear(),pn.add({context:"browse",payload:de(F({},at.state),{categoryId:e})});return}at.categoryIdProxy.categoryId=e},Xg=e=>{$g(e,at)},Iv=(e,t)=>{Vg(e,t,at)},Kg=e=>{qg(e,at)},Rv=({field:e,value:t})=>{Yg({field:e,value:t},at)},Lv=e=>{Gg(e,at)},Qg=e=>{Wg(e,at)},Jg=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=is(),n=ha();if(!t||!n){t&&pn.clear(),pn.add({context:"browse",payload:F({},e)});return}"facetFilters"in e&&Xg(e.facetFilters||{}),"rangeFilters"in e&&Kg(e.rangeFilters||[]),"catalogSegment"in e&&(at.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Qg(e.pricebooks||[]),"categoryName"in e&&(at.categoryIdProxy.categoryName=e.categoryName||""),at.categoryIdProxy.categoryId=e.categoryId},Dv=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Jg,updateBrowseCategoryId:Ov,updateCatalogSegment:Lv,updateFacetFilter:Iv,updateFacetFilters:Xg,updatePricebooks:Qg,updateRangeFilter:Rv,updateRangeFilters:Kg},Symbol.toStringTag,{value:"Module"}));class Mv{constructor(){Se(this,"initialParams",{productId:"",productName:"",pdpLink:""});Se(this,"proxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>(jg(n,r),Reflect.set(t,n,r)));Se(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const mr=new Mv,Zg=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=is(),n=ha();if(!t||!n){t&&pn.clear(),pn.add({context:"pdp",payload:F({},e)});return}mr.updateProxy(e),jg("pdp-context",e)},Fv=e=>{mr.proxy.productId=e,is()||pn.add({context:"pdp",payload:F({},mr.state)})},Bv=e=>{mr.proxy.pdpLink=e},mt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},e1={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1};class Uv{constructor(){Se(this,"initialState",e1);Se(this,"promptsStateProxy");Se(this,"promptsParamsProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return ga(n,r),Reflect.set(t,n,r)});Se(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Se(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Se(this,"updatePromptsParamsProxy",t=>new Proxy(F({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const Bt=new Uv,Hv=e=>{window.addEventListener(ef,e)},zv=e=>{window.removeEventListener(ef,e)},ga=(e,t)=>{const n=new CustomEvent(ef,{detail:{property:e,value:t}});window.dispatchEvent(n)},t1=e=>{const t=Bt.isOpen,n=typeof e=="boolean"?e:!t;Bt.promptsStateProxy.isOpen=n},n1=e=>{const t=Bt.isInline,n=typeof e=="boolean"?e:!t;Bt.promptsStateProxy.isInline=n},jv=e=>{Bt.promptsParamsProxy=Bt.updatePromptsParamsProxy(e),ga("params",e),Bt.promptsStateProxy.entryType="ask_cim"},$v=e=>{Bt.promptsParamsProxy=Bt.updatePromptsParamsProxy(e),ga("params",e),Bt.promptsStateProxy.entryType="search"},Vv=e=>{Bt.promptsParamsProxy=Bt.updatePromptsParamsProxy(e),ga("params",e),Bt.promptsStateProxy.entryType="browse"},qv=e=>{Bt.promptsParamsProxy=Bt.updatePromptsParamsProxy(e),ga("params",e),Bt.promptsStateProxy.entryType="pdp"},Yv=({elementId:e,entryType:t,params:n,isInline:r})=>{Bt.promptsStateProxy.elementId=e,t&&(Bt.promptsStateProxy.entryType=t),typeof r=="boolean"&&n1(r),n&&Bt.updatePromptsParamsProxy(n),Bt.isOpen||t1(!0)},Gv=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{fl("getConversationMessages",{payload:e,callback:t},bi.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{fl("getSessionInformation",{callback:e},bi.GET_SESSION_INFORMATION)},loadConversation:e=>{fl("loadConversation",e,bi.LOAD_CONVERSATION)},resetConversation:()=>{fl("resetConversation",!0,bi.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Wv{constructor(){Se(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"queryProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const s=lA[n];return Cv(s,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const Tt=new Wv,Xv=e=>{const t=ha(),n=is();if(!n||!t){n&&pn.clear(),pn.add({context:"search",payload:de(F({},Tt.state),{query:e})});return}Tt.queryProxy.query=e},r1=e=>{$g(e,Tt)},Kv=(e,t)=>{Vg(e,t,Tt)},i1=e=>{qg(e,Tt)},Qv=({field:e,value:t})=>{Yg({field:e,value:t},Tt)},Jv=e=>{Gg(e,Tt)},s1=e=>{Wg(e,Tt)},o1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ha(),n=is();if(!n||!t){n&&pn.clear(),pn.add({context:"search",payload:F({},e)});return}"facetFilters"in e&&r1(e.facetFilters||{}),"rangeFilters"in e&&i1(e.rangeFilters||[]),"catalogSegment"in e&&(Tt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&s1(e.pricebooks||[]),Tt.queryProxy.query=e.query},Zv=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:o1,updateCatalogSegment:Jv,updateFacetFilter:Kv,updateFacetFilters:r1,updatePricebooks:s1,updateRangeFilter:Qv,updateRangeFilters:i1,updateSearchQuery:Xv},Symbol.toStringTag,{value:"Module"})),ek={categoryId:at.categoryId,categoryName:at.categoryIdProxy.categoryName||"",facetFilters:at.facetFilters,rangeFilters:at.rangeFilters,catalogSegment:at.catalogSegment,pricebooks:at.pricebooks},a1=B.createContext(ek),tk=({children:e})=>{const[t,n]=B.useState(at.categoryId),[r,s]=B.useState(at.categoryIdProxy.categoryName||""),[a,u]=B.useState(at.facetFilters||{}),[c,d]=B.useState(at.rangeFilters||[]),[f,p]=B.useState(at.catalogSegment||null),[m,b]=B.useState(at.pricebooks||null);B.useEffect(()=>{const _=({detail:A})=>{(A==null?void 0:A.property)==="categoryId"&&n(A.value),(A==null?void 0:A.property)==="categoryName"&&s(A.value),(A==null?void 0:A.property)==="facetFilters"&&u(A.value),(A==null?void 0:A.property)==="rangeFilters"&&d(A.value),(A==null?void 0:A.property)==="catalogSegment"&&p(A.value),(A==null?void 0:A.property)==="pricebooks"&&b(A.value)};return Bg(_),()=>{Ug(_)}},[]);const y=B.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:m}),[t,r,a,c,f,m]);return x.jsx(a1.Provider,{value:y,children:e})},nk=()=>{const e=B.useContext(a1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},rk={searchQuery:Tt.query,facetFilters:Tt.facetFilters,rangeFilters:Tt.rangeFilters,catalogSegment:Tt.catalogSegment,pricebooks:Tt.pricebooks},u1=B.createContext(rk),ik=({children:e})=>{const[t,n]=B.useState(Tt.query),[r,s]=B.useState(Tt.facetFilters),[a,u]=B.useState(Tt.rangeFilters),[c,d]=B.useState(Tt.catalogSegment),[f,p]=B.useState(Tt.pricebooks);B.useEffect(()=>{const b=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&s(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return Mg(b),()=>{Fg(b)}},[]);const m=B.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return x.jsx(u1.Provider,{value:m,children:e})},sk=()=>{const e=B.useContext(u1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},ok={productId:mr.productId,pdpLink:mr.pdpLink},l1=B.createContext(ok),ak=({children:e})=>{const[t,n]=B.useState(mr.productId),[r,s]=B.useState(mr.pdpLink);B.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),s(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&s(c.value)};return Hg(u),()=>{zg(u)}},[]);const a=B.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return x.jsx(l1.Provider,{value:a,children:e})},uk=()=>{const e=B.useContext(l1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},c1=B.createContext({mode:Je.modeProxy.mode,entryType:Je.entryType,status:Je.statusProxy,dialogPosition:Je.dialogProxy.position,isDialogFullHeight:Je.dialogProxy.isFullHeight,dialogWidth:Je.dialogProxy.width,isModalFullscreen:Je.modalProxy.isFullscreen,previousComponentType:Je.statusProxy.type}),lk=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=B.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,c]=B.useState(Je.modeProxy.mode),[d,f]=B.useState({type:n||Je.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Je.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Je.statusProxy.isMinimized}),[p,m]=B.useState(Je.dialogProxy.position),[b,y]=B.useState(Je.dialogProxy.isFullHeight),[_,A]=B.useState(Je.dialogProxy.width),[v,w]=B.useState(Je.modalProxy.isFullscreen),N=xv(d.type);B.useEffect(()=>{const U=Y=>{const{property:R,value:q}=Y.detail||{};if(!(!R||q===void 0)){if(R==="mode"){c(q);return}if(R==="entryType"){a(q);return}if(R==="isMinimized"){f(ne=>de(F({},ne),{isMinimized:q}));return}if(R==="isOpen"){f(ne=>de(F({},ne),{isOpen:q}));return}if(R==="type"){f(ne=>de(F({},ne),{type:q}));return}if(R==="position"){m(q);return}if(R==="isFullHeight"){y(q);return}if(R==="width"){A(q);return}if(R==="isFullscreen"){w(q);return}}};return lv(U),()=>{cv(U)}},[]),ma(()=>{e&&pa(e)}),ma(()=>{const U=n||(t==null?void 0:t.type);U&&dl(U),t&&"isOpen"in t&&ti(!!t.isOpen),t&&"isMinimized"in t&&cl(!!t.isMinimized)}),ma(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:U}=t.options;U&&Tf(U),"dialogFullHeight"in t.options&&hv(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&A(t.options.dialogWidth),"isModalFullscreen"in t.options&&yf(!!t.options.isModalFullscreen)});const C=B.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:N||"dialog",dialogPosition:p,isDialogFullHeight:b,dialogWidth:_,isModalFullscreen:v}),[u,s,d,N,p,b,_,v]);return x.jsx(c1.Provider,{value:C,children:r})},er=()=>{const e=B.useContext(c1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},d1=B.createContext(null),f1=B.createContext(null),_f=()=>{const e=B.useContext(f1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ni=()=>{const e=B.useContext(d1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Xs=()=>{const e=B.useContext(W0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},tr=()=>{const e=B.useContext(G0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},ck=({copilot:e})=>{const{logger:t,conversationHistory:n}=tt(),{isInline:r}=ni(),{addCopilotEvent:s,setConversationHistoryLoaded:a}=Xs(),{activeConversationId:u}=tr(),c=B.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=B.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,m=>{t==null||t.log("Retrieved conversation messages: ",m),p==null||p(m)})},[e,t]);return B.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),m={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(m.limit=n.limit),d(m,b=>{const y=[];[...b.reverse()||[]].forEach(A=>{var w;const v=b.find(N=>N.id===A.eventSourceId);(w=v==null?void 0:v.name)!=null&&w.endsWith("_suggestions")||(A.bypassHandlers=!0,y.unshift(A))}),y.forEach(A=>{s(A)}),a(!0)})},[t,r,u,d,s,a,n]),{getSessionInformation:c,getConversationMessages:d}},h1=B.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),dk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:b}=tt(),on=sk(),{searchQuery:y}=on,_=dn(on,["searchQuery"]),Fn=nk(),{categoryId:A}=Fn,v=dn(Fn,["categoryId"]),{productId:w,pdpLink:N}=uk(),{setCopilot:C,setConnected:U,resetCopilot:Y,resetCopilotState:R,addCopilotEvent:q,removeLoadingMessage:ne,handleCopilotRequestAck:me,setActiveConversationId:V,setConversationIds:se,setAskCimPrompts:he}=Xs(),{connected:ve,copilot:re,messages:oe,groupedMessages:xe,loadingMessages:ae,askCimPrompts:Q}=tr(),{status:ie,entryType:k}=er(),{isInline:D}=ni(),{getConversationMessages:ee,getSessionInformation:I}=ck({copilot:re}),_e=B.useMemo(()=>ae.size>0,[ae]),Ue=B.useCallback(we=>ae.has(we),[ae]),ye=B.useCallback(({query:we,facetFilters:Pe,rangeFilters:Me,catalogSegment:rt,pricebooks:ht,userPrompt:J,imageFile:ge})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Ce={searchParams:{query:we}};J&&(Ce.userPrompt=J),ge&&(Ce.attachments={image:ge}),Pe&&Object.keys(Pe).length>0&&(Ce.searchParams.facetFilters=Pe),Me&&Me.length>0&&(Ce.searchParams.rangeFilters=Me),rt&&(Ce.searchParams.catalogSegment=rt),ht&&(Ce.searchParams.pricebooks=ht),m&&(Ce.clientContext=m),pa("search"),re.search(Ce,qe=>{const Ie=F({},qe);me(Ie)})},[p,me,re,m]),Re=B.useCallback(({categoryId:we,categoryName:Pe,facetFilters:Me,rangeFilters:rt,catalogSegment:ht,pricebooks:J,userPrompt:ge,imageFile:Ce})=>{if(!re){p==null||p.error("Copilot is not initialized");return}const qe=Me&&Object.keys(Me).length>0;if(we===""&&!qe){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Ie={browseParams:{categoryId:we||""}};ge&&(Ie.userPrompt=ge),Ce&&(Ie.attachments={image:Ce}),qe&&(Ie.browseParams.facetFilters=Me),rt&&rt.length>0&&(Ie.browseParams.rangeFilters=rt),ht&&(Ie.browseParams.catalogSegment=ht),Array.isArray(J)&&J.length>0&&(Ie.browseParams.pricebooks=J),(m||Pe)&&(Ie.clientContext={},m&&(Ie.clientContext=F({},m)),Pe&&(Ie.clientContext.cimLabel=Pe)),pa("browse"),re.browse(Ie,ut=>{var Vr;const Vt=F({},ut),Ht=((Vr=Vt.request)==null?void 0:Vr.clientContext)||{},an=(Ht==null?void 0:Ht.cimLabel)||Pe;an&&Vt.request&&(Vt.request.label=an),me(Vt)})},[p,me,re,m]),He=B.useCallback(({productId:we,productName:Pe,pdpLink:Me,userPrompt:rt,imageFile:ht})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const J={productId:we};rt&&(J.userPrompt=rt),Me&&(J.pdpLink=Me),ht&&(J.attachments={image:ht}),(m||Pe)&&(J.clientContext={},m&&(J.clientContext=F({},m)),Pe&&(J.clientContext.cimLabel=Pe)),b&&(J.baseCatalogParams=b),pa("pdp"),re.productView(J,ge=>{var ut;const Ce=F({},ge),qe=((ut=Ce.request)==null?void 0:ut.clientContext)||{},Ie=(qe==null?void 0:qe.cimLabel)||Pe;Ie&&Ce.request&&(Ce.request.label=Ie),me(Ce)})},[p,re,me,m,b]),Ye=B.useCallback(({userPrompt:we,imageFile:Pe})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Me={userPrompt:we};Pe&&(Me.attachments={image:Pe}),m&&(Me.clientContext=m),b&&(Me.baseCatalogParams=b),re.askCim(Me,rt=>{const ht=F({},rt);me(ht)})},[p,re,me,m,b]),bt=B.useCallback(we=>{q(we),c==null||c(we)},[q,c]),Cn=B.useCallback(we=>{q(we),d==null||d(we)},[q,d]),sn=B.useCallback(we=>{u==null||u(we),U(!0)},[u,U]);B.useEffect(()=>{!re||!ve||!ie.isOpen||pn.size>0&&pn.processQueue(we=>{if(we.context==="search"){const Pe=F({},we.payload);o1(Pe)}if(we.context==="browse"){const Pe=F({},we.payload);Jg(Pe)}if(we.context==="pdp"){const Pe=F({},we.payload);Zg(Pe)}})},[ie.isOpen,re,ve]);const _r=B.useCallback(we=>{const Pe=Me=>{const rt=de(F({},Me),{id:Me.inquiryLinkId||Me.id});q(rt)};we.on("connect_ack",sn),we.on("partial_inquiry",Pe),we.on("display_products",q),we.on("progress",q),we.on("refined_search",bt),we.on("refined_browse",Cn),we.on("done",Me=>{ne(Me.eventSourceId)}),we.on("error",Me=>{q(Me),ne(Me.eventSourceId)}),we.onDisconnect(Me=>{const rt=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Me),!rt.includes(Me)){U(!1);return}p==null||p.log("De-registering event listeners");const ht=new Date().toISOString();q({name:"error",message:"Connection was lost. Please try again.",createdAt:ht,id:`error-${ht}`,sessionId:"session"}),we.off()})},[p,U,ne,bt,Cn,q,sn]);B.useEffect(()=>{if(!re)return;const we=Pe=>{if(!D){if(!Pe.message&&Pe.eventSourceId&&Pe.eventSourceId===Q.requestId){he({requestId:Pe.eventSourceId,message:Pe});return}q(Pe)}};return re.on("follow_up",we),()=>{re.off("follow_up",we)}},[re,oe,Q.requestId,D,q,he]),B.useEffect(()=>{if(!re)return;const we=Pe=>{if(D)return;const Me=de(F({},Pe),{id:Pe.inquiryLinkId||Pe.id});q(Me)};return re.on("inquiry",we),()=>{re.off("inquiry",we)}},[re,D,q]),ma(()=>{let we;n?we=n:we=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Pe={baseUrl:we};e?Pe.apiKey=e:t&&(Pe.apiToken=t),r&&(Pe.customerId=r),s&&(Pe.tenantId=s);const Me=new Yw(Pe);return C(Me),_r(Me),Me.connect(),Me.requestSessionInformation(rt=>{p==null||p.log("Session Information: ",rt);const{activeConversationId:ht,conversationIds:J}=rt.data||{};ht&&V(ht),J!=null&&J.length&&se(J)}),()=>{Me.disconnect(),Me.off(),Y()}});const sr=B.useCallback(we=>{if(!re)return;const Pe={eventId:we,reason:"User cancelled the request"};re.cancelRequest(Pe,Me=>{q(Me),ne(we)})},[q,ne,re]),Jt=B.useCallback(()=>{re&&re.conversationReset({},we=>{R(),q(we),re.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Me,conversationIds:rt}=Pe.data||{};Me&&V(Me),rt!=null&&rt.length&&se(rt)})})},[re,p,q,R,V,se]),Ve=B.useCallback((we,Pe)=>{if(!we)return;const Me={userPrompt:we};switch(Pe&&(Me.imageFile=Pe),k){case"ask_cim":Ye(Me);return;case"search":y?ye(F(F({query:y},_),Me)):Ye(Me);return;case"browse":Re(F(F({categoryId:A},v),Me));return;case"pdp":w?He(F({productId:w,pdpLink:N||""},Me)):Ye(Me);return}},[k,y,_,ye,Ye,A,v,Re,He,w,N]),kt=B.useCallback((we,Pe)=>{var ge,Ce,qe;const rt=we.params.userPrompt||"";if(!rt)return;const ht=oe.find(Ie=>Ie.id===Pe);if(!ht)return;const J=ht.name.replace("_suggestions","");if(J==="ask_cim"){Ye({userPrompt:rt});return}if(J==="copilot_search"){const Ie=((ge=ht.request)==null?void 0:ge.searchParams)||{},Vt=Ie.query===y;ye(de(F({query:Ie.query||y},Vt?_:{}),{userPrompt:rt}));return}if(J==="copilot_browse"){const Ie=ht.request,ut=Ie.browseParams||{},Ht=ut.categoryId===A,an=((Ce=Ie.clientContext)==null?void 0:Ce.cimLabel)||"";Re(de(F({categoryId:ut.categoryId||A||""},Ht?v:{}),{categoryName:an,userPrompt:rt}));return}if(J==="product_view"){const Ie=ht.request||{},ut=Ie.productId,Vt=ut===w,Ht=((qe=Ie.clientContext)==null?void 0:qe.cimLabel)||"";let an="";Vt?an=N||"":an=Ie.pdpLink||"",He({productId:ut||w,pdpLink:an,productName:Ht,userPrompt:rt})}},[oe,y,_,ye,Ye,A,v,Re,He,w,N]),vn=B.useMemo(()=>({copilot:re,messages:oe,groupedMessages:xe,isLoading:_e,isResponseLoading:Ue,handleAskCim:Ye,handleSearch:ye,handleBrowse:Re,handlePdp:He,handleUserInput:Ve,handleSuggestion:kt,handleCancel:sr,resetConversation:Jt,getSessionInformation:I,getConversationMessages:ee}),[re,oe,xe,_e,Ue,Ye,ye,Re,He,Ve,kt,sr,Jt,I,ee]);return x.jsx(h1.Provider,{value:vn,children:f})},p1=()=>{const{copilot:e}=tr(),{addCopilotEvent:t}=Xs();return{getCopilotSuggestions:B.useCallback((r,s,a)=>{if(!e||!s||!r)return;const u=c=>{t(c),a(c)};switch(s){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Ir=()=>{const e=B.useContext(h1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},fk=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=tr(),{entryType:s}=er(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Xs(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:b,getConversationMessages:y}=Ir(),{getCopilotSuggestions:_}=p1();B.useEffect(()=>{!e||!s||!t||!r||n.requestId||s==="ask_cim"&&_({},s,N=>{c({requestId:N.id,message:null})})},[e,t,n.requestId,s,r,_,c]);const A=B.useCallback(({query:N})=>{if(!e||!N)return;const{facetFilters:C}=Tt.facetFiltersProxy,{rangeFilters:U}=Tt.rangeFiltersProxy,{catalogSegment:Y}=Tt.catalogSegmentProxy,{pricebooks:R}=Tt.pricebooksProxy,q={query:N};q.facetFilters=C||{},q.rangeFilters=U||[],q.catalogSegment=Y||"",q.pricebooks=R||[],d(F({},q))},[e,d]),v=B.useCallback(({categoryId:N})=>{if(!e)return;const C=at.categoryIdProxy.categoryName,{facetFilters:U}=at.facetFiltersProxy,{rangeFilters:Y}=at.rangeFiltersProxy,{catalogSegment:R}=at.catalogSegmentProxy,{pricebooks:q}=at.pricebooksProxy,ne={categoryId:N};ne.categoryName=C||"",ne.facetFilters=U||{},ne.rangeFilters=Y||[],ne.catalogSegment=R||"",ne.pricebooks=q||[],f(F({},ne))},[e,f]),w=B.useCallback(({productId:N})=>{if(!e||!N)return;const C={productId:N,pdpLink:mr.pdpLink,productName:mr.proxy.productName||""};p(C)},[e,p]);return B.useEffect(()=>{const N=({detail:C})=>{(C==null?void 0:C.property)==="query"&&A({query:C.value})};return Mg(N),()=>{Fg(N)}},[A]),B.useEffect(()=>{const N=({detail:C})=>{if((C==null?void 0:C.property)==="pdp-context"){const U=C.value;w({productId:U.productId});return}(C==null?void 0:C.property)==="productId"&&w({productId:C.value})};return Hg(N),()=>{zg(N)}},[w]),B.useEffect(()=>{const N=({detail:C})=>{(C==null?void 0:C.property)==="categoryId"&&v({categoryId:C.value})};return Bg(N),()=>{Ug(N)}},[v]),B.useEffect(()=>{const N=({detail:C})=>{if((C==null?void 0:C.event)==bi.RESET_CONVERSATION&&m(),(C==null?void 0:C.event)==bi.GET_SESSION_INFORMATION){const U=C.value.callback;b(U)}if((C==null?void 0:C.event)==bi.GET_CONVERSATION_MESSAGES){const{payload:U,callback:Y}=C.value;if(!U.conversationId||typeof Y!="function")return;y(U,Y)}if((C==null?void 0:C.event)==bi.LOAD_CONVERSATION){const U=C.value;if(!U.conversationId)return;y(U,R=>{a(),R.forEach(q=>{u(q)})})}};return kv(N),()=>{Nv(N)}},[m,b,y,a,u]),null},hk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>x.jsxs(dk,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:[x.jsx(fk,{}),f]}),pk=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),mk=({children:e,dispatch:t})=>{const n=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),b=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=B.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:b}),[n,r,s,a,u,c,d,f,p,m,b]);return x.jsx(f1.Provider,{value:y,children:e})},gk=(e,t)=>{const{type:n,payload:r}=t;switch(n){case mt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case mt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case mt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case mt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case mt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case mt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case mt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case mt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case mt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case mt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case mt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case mt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case mt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case mt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case mt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},Ek=({promptsConfig:e,children:t})=>{const[n,r]=$0(gk,de(F(F({},e1),e||{}),{staticQuestions:pk((e==null?void 0:e.staticQuestions)||[])}));return x.jsx(d1.Provider,{value:n,children:x.jsx(mk,{dispatch:r,children:t})})},m1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,theme:f,openLinksInNewTab:p,globalClassName:m,isDevelopment:b=!1,componentType:y,componentConfig:_,entryType:A,entryMessage:v,disclaimerText:w,disclaimerMarkdown:N,clientContext:C,baseCatalogParams:U,searchPlaceholder:Y,searchButtonLabel:R,searchConfig:q,suggestionButtonConfig:ne,messageAlignment:me,autoScroll:V,promptsConfig:se,resetConversationMessage:he,conversationHistory:ve,onConnect:re,onCopilotEvent:oe,onRefinedSearch:xe,onRefinedBrowse:ae,__features:Q,children:ie})=>x.jsx(av,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,entryMessage:v,theme:f,globalClassName:m,openLinksInNewTab:p,searchPlaceholder:Y,searchButtonLabel:R,searchConfig:q,suggestionButtonConfig:ne,messageAlignment:me,autoScroll:V,componentConfig:_,clientContext:C,baseCatalogParams:U,disclaimerMarkdown:N,disclaimerText:w,resetConversationMessage:he,conversationHistory:ve,isDevelopment:b,__features:Q,children:x.jsx(lk,{entryType:A,componentConfig:_,componentType:y,children:x.jsx(gv,{onCopilotEvent:oe,children:x.jsx(ak,{children:x.jsx(tk,{children:x.jsx(ik,{children:x.jsx(Ek,{promptsConfig:se,children:x.jsx(hk,{apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,isDevelopment:b,entryType:A,onConnect:re,onRefinedSearch:xe,onRefinedBrowse:ae,onCopilotEvent:oe,children:ie})})})})})})})});var Sf={exports:{}},In={},xf={exports:{}},wf={};var g1;function yk(){return g1||(g1=1,(function(e){function t(Q,ie){var k=Q.length;Q.push(ie);e:for(;0<k;){var D=k-1>>>1,ee=Q[D];if(0<s(ee,ie))Q[D]=ie,Q[k]=ee,k=D;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var ie=Q[0],k=Q.pop();if(k!==ie){Q[0]=k;e:for(var D=0,ee=Q.length,I=ee>>>1;D<I;){var _e=2*(D+1)-1,Ue=Q[_e],ye=_e+1,Re=Q[ye];if(0>s(Ue,k))ye<ee&&0>s(Re,Ue)?(Q[D]=Re,Q[ye]=k,D=ye):(Q[D]=Ue,Q[_e]=k,D=_e);else if(ye<ee&&0>s(Re,k))Q[D]=Re,Q[ye]=k,D=ye;else break e}}return ie}function s(Q,ie){var k=Q.sortIndex-ie.sortIndex;return k!==0?k:Q.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],p=1,m=null,b=3,y=!1,_=!1,A=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Q){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=Q)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function U(Q){if(A=!1,C(Q),!_)if(n(d)!==null)_=!0,xe(Y);else{var ie=n(f);ie!==null&&ae(U,ie.startTime-Q)}}function Y(Q,ie){_=!1,A&&(A=!1,w(ne),ne=-1),y=!0;var k=b;try{for(C(ie),m=n(d);m!==null&&(!(m.expirationTime>ie)||Q&&!se());){var D=m.callback;if(typeof D=="function"){m.callback=null,b=m.priorityLevel;var ee=D(m.expirationTime<=ie);ie=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===n(d)&&r(d),C(ie)}else r(d);m=n(d)}if(m!==null)var I=!0;else{var _e=n(f);_e!==null&&ae(U,_e.startTime-ie),I=!1}return I}finally{m=null,b=k,y=!1}}var R=!1,q=null,ne=-1,me=5,V=-1;function se(){return!(e.unstable_now()-V<me)}function he(){if(q!==null){var Q=e.unstable_now();V=Q;var ie=!0;try{ie=q(!0,Q)}finally{ie?ve():(R=!1,q=null)}}else R=!1}var ve;if(typeof N=="function")ve=function(){N(he)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,oe=re.port2;re.port1.onmessage=he,ve=function(){oe.postMessage(null)}}else ve=function(){v(he,0)};function xe(Q){q=Q,R||(R=!0,ve())}function ae(Q,ie){ne=v(function(){Q(e.unstable_now())},ie)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,xe(Y))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):me=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Q){switch(b){case 1:case 2:case 3:var ie=3;break;default:ie=b}var k=b;b=ie;try{return Q()}finally{b=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,ie){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var k=b;b=Q;try{return ie()}finally{b=k}},e.unstable_scheduleCallback=function(Q,ie,k){var D=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?D+k:D):k=D,Q){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=k+ee,Q={id:p++,callback:ie,priorityLevel:Q,startTime:k,expirationTime:ee,sortIndex:-1},k>D?(Q.sortIndex=k,t(f,Q),n(d)===null&&Q===n(f)&&(A?(w(ne),ne=-1):A=!0,ae(U,k-D))):(Q.sortIndex=ee,t(d,Q),_||y||(_=!0,xe(Y))),Q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(Q){var ie=b;return function(){var k=b;b=ie;try{return Q.apply(this,arguments)}finally{b=k}}}})(wf)),wf}var E1;function Tk(){return E1||(E1=1,xf.exports=yk()),xf.exports}var y1;function bk(){if(y1)return In;y1=1;var e=fr(),t=Tk();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function b(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,l,h){if(l!==null&&l.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,o,l,h){if(o===null||typeof o=="undefined"||y(i,o,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function A(i,o,l,h,E,T,S){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=o,this.sanitizeURL=T,this.removeEmptyString=S}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[i]=new A(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];v[o]=new A(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new A(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[i]=new A(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){v[i]=new A(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new A(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new A(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new A(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new A(i,5,!1,i.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function N(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(w,N);v[o]=new A(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(w,N);v[o]=new A(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(w,N);v[o]=new A(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,o,l,h){var E=v.hasOwnProperty(o)?v[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,l,E,h)&&(l=null),h||E===null?b(o)&&(l===null?i.removeAttribute(o):i.setAttribute(o,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(o=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(o):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,o,l):i.setAttribute(o,l))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),R=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),se=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),Q=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,D;function ee(i){if(D===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);D=o&&o[1]||""}return`
10
+ `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ns(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&cl.assertOptions(r,{silentJSONParsing:hn.transitional(hn.boolean),forcedJSONParsing:hn.transitional(hn.boolean),clarifyTimeoutError:hn.transitional(hn.boolean),legacyInterceptorReqResOrdering:hn.transitional(hn.boolean),advertiseZstdAcceptEncoding:hn.transitional(hn.boolean),validateStatusUndefinedResolves:hn.transitional(hn.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:cl.assertOptions(s,{encode:hn.function,serialize:hn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),cl.assertOptions(n,{baseUrl:hn.spelling("baseURL"),withXsrfToken:hn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&$.merge(a.common,a[n.method]);a&&$.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=fn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;d=d&&A.synchronous;const v=n.transitional||cf;v&&v.legacyInterceptorReqResOrdering?c.unshift(A.fulfilled,A.rejected):c.push(A.fulfilled,A.rejected)});const f=[];this.interceptors.response.forEach(function(A){f.push(A.fulfilled,A.rejected)});let p,m=0,b;if(!d){const _=[Rg.bind(this),void 0];for(_.unshift(...c),_.push(...f),b=_.length,p=Promise.resolve(n);m<b;)p=p.then(_[m++],_[m++]);return p}b=c.length;let y=n;for(;m<b;){const _=c[m++],A=c[m++];try{y=_(y)}catch(v){A.call(this,v);break}}try{p=Rg.call(this,y)}catch(_){return Promise.reject(_)}for(m=0,b=f.length;m<b;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=ns(this.defaults,t);const n=xg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return hg(n,t.params,t.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(t){rs.prototype[t]=function(n,r){return this.request(ns(r||{},{method:t,url:n,data:r&&$.hasOwnProp(r,"data")?r.data:void 0}))}}),$.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(ns(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}rs.prototype[t]=n(),t!=="query"&&(rs.prototype[t+"Form"]=n(!0))});let tv=class L2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new fa(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new L2(function(s){t=s}),cancel:t}}};function nv(e){return function(n){return e.apply(null,n)}}function rv(e){return $.isObject(e)&&e.isAxiosError===!0}const Ef={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ef).forEach(([e,t])=>{Ef[t]=e});function Dg(e){const t=new rs(e),n=K0(rs.prototype.request,t);return $.extend(n,rs.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Dg(ns(e,s))},n}const Rt=Dg(da);Rt.Axios=rs,Rt.CanceledError=fa,Rt.CancelToken=tv,Rt.isCancel=yg,Rt.VERSION=pf,Rt.toFormData=sl,Rt.AxiosError=be,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=nv,Rt.isAxiosError=rv,Rt.mergeConfig=ns,Rt.AxiosHeaders=fn,Rt.formToJSON=e=>Eg($.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=Ig.getAdapter,Rt.HttpStatusCode=Ef,Rt.default=Rt;const{Axios:B7,AxiosError:U7,CanceledError:H7,isCancel:z7,CancelToken:j7,VERSION:$7,all:V7,Cancel:q7,isAxiosError:Y7,spread:G7,toFormData:W7,AxiosHeaders:X7,HttpStatusCode:K7,formToJSON:Q7,getAdapter:J7,mergeConfig:Z7,create:eU}=Rt;class iv{constructor(t,n,r,s=!1,a,u){Se(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Se(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Se(this,"CIMULATE_SEARCH_API_PATH","api/v1");Se(this,"baseApiUrl");Se(this,"headers",{});Se(this,"fetchConfig",()=>Ke(this,null,function*(){try{const t=yield Rt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Se(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class sv{constructor(t,n,r,s=!1,a,u){Se(this,"apiService");Se(this,"config",null);Se(this,"getConfig",()=>Ke(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Se(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Se(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Se(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Se(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Se(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Se(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Se(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Se(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Se(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Se(this,"getProductField",t=>this.config?this.config[t]:"");Se(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new iv(t,n,r,s,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Ws=(e,t,n,...r)=>{if(!e)return;const s=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",s,n,...r)};class ov{constructor(t=!1){Se(this,"isDevelopment");Se(this,"_log",(t,n,...r)=>{Ws(this.isDevelopment,t,n,...r)});this.isDevelopment=t}log(t,...n){this._log("log",t,...n)}warn(t,...n){this._log("warn",t,...n)}error(t,...n){this._log("error",t,...n)}info(t,...n){this._log("info",t,...n)}debug(t,...n){this._log("debug",t,...n)}}const av={copilot:"Your Search Assistant",messaging:"Commerce Client"},Mg=B.createContext(null),uv=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:b,searchConfig:y,suggestionButtonConfig:_,progressStepsLimit:A=3,messageAlignment:v="start",autoScroll:w=!0,showProductDescription:k=!1,componentConfig:C,conversationHistory:H,resetConversationMessage:Y="",apiKey:L,apiToken:q,baseUrl:ne,customerId:de,tenantId:V,theme:se,isDevelopment:pe,__features:ve,routingAttributes:re,enableDownloadTranscript:oe=!0,enableEscalationToAgent:xe=!1,showProductCaptions:ae=!1,children:Q})=>{const ie=e==="messaging",N=B.useMemo(()=>{const Re=re==null?void 0:re.isCartMgmtSupported;return Re===!0||Re==="true"},[re]),D=B.useMemo(()=>ie?{config:null}:new sv(ne,L,q,pe,de,V),[ie,ne,L,q,pe,de,V]),ee=B.useMemo(()=>new ov(pe),[pe]);B.useEffect(()=>{ie||!D||D.config||D.getConfig()},[D,ie]);const I=B.useMemo(()=>dA(se),[se]),_e=B.useMemo(()=>{const Re=(y==null?void 0:y.placeholder)||m,He=(y==null?void 0:y.buttonLabel)||b;let Ye="icon";return y!=null&&y.buttonType?Ye=y.buttonType:b&&(Ye="text"),fe(F({},y||{}),{placeholder:Re,buttonLabel:He,buttonType:Ye})},[y,m,b]),Ue=B.useMemo(()=>fe(F({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||av[e!=null?e:"copilot"]}),[r,t,n,e]),ye=B.useMemo(()=>({configModule:D,mode:e!=null?e:"copilot",headerConfig:Ue,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:I,logger:ee,searchConfig:_e,suggestionButtonConfig:_,progressStepsLimit:A,messageAlignment:v,autoScroll:w,showProductDescription:!!k,enableMinimize:!!(C!=null&&C.enableMinimize),enableDownloadTranscript:oe,enableEscalationToAgent:xe,showProductCaptions:!!ae,resetConversationMessage:Y,conversationHistory:{sinceHours:typeof(H==null?void 0:H.sinceHours)=="number"?H.sinceHours:1,limit:H==null?void 0:H.limit},features:ve,isCartMgmtSupported:N}),[D,e,Ue,a,s,f,p,c,d,u,_e,_,v,w,k,C,oe,xe,ae,Y,ee,I,H,ve,N]);return x.jsx(Mg.Provider,{value:ye,children:Q})},tt=()=>{const e=B.useContext(Mg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class lv{constructor(){Se(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Se(this,"connectedProxy");Se(this,"modeProxy");Se(this,"entryTypeProxy");Se(this,"statusProxy");Se(this,"dialogProxy");Se(this,"modalProxy",{isFullscreen:!1});Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return pv(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const Je=new lv,is=()=>Je.connected,ha=()=>Je.isOpen,yf="cimulate.widget.minimizedOnNav";function cv(){try{const e=sessionStorage.getItem(yf)==="1";return sessionStorage.removeItem(yf),e}catch(e){return!1}}function dv(){try{sessionStorage.removeItem(yf)}catch(e){return}}const fv=e=>{window.addEventListener(Zd,e)},hv=e=>{window.removeEventListener(Zd,e)},pv=(e,t)=>{const n=new CustomEvent(Zd,{detail:{property:e,value:t}});window.dispatchEvent(n)},mv=e=>{Je.connectedProxy.connected=e},pa=e=>{if(!oA(e)){const t=Y0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}Je.entryTypeProxy.entryType=e},ti=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1,dv())},ma=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},Tf=e=>{Je.modalProxy.isFullscreen=e},dl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Je.statusProxy.type=e,e==="dialog"||e==="chat"?Je.modeProxy.mode="embedded":Je.modeProxy.mode="standalone"},bf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);Je.dialogProxy.position=e},gv=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},Ev=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=tt(),s=B.useCallback(C=>{n({type:pt.SET_COPILOT,payload:C})},[n]),a=B.useCallback(C=>{mv(C),n({type:pt.SET_CONNECTED,payload:C})},[n]),u=B.useCallback(()=>{n({type:pt.RESET_COPILOT,payload:{}})},[n]),c=B.useCallback(()=>{n({type:pt.RESET_STATE,payload:{}})},[n]),d=B.useCallback(C=>{r==null||r.log(`${C.name} event received`,C),n({type:pt.ADD_MESSAGE,payload:C}),C.bypassHandlers||e==null||e(C)},[e,r,n]),f=B.useCallback(C=>{n({type:pt.ADD_LOADING_MESSAGE,payload:C})},[n]),p=B.useCallback(C=>{n({type:pt.REMOVE_LOADING_MESSAGE,payload:C})},[n]),m=B.useCallback(C=>{d(C),f(C.id)},[d,f]),b=B.useCallback(C=>{n({type:pt.SET_ACTIVE_CONVERSATION_ID,payload:C})},[n]),y=B.useCallback(C=>{n({type:pt.ADD_CONVERSATION_ID,payload:C})},[n]),_=B.useCallback(C=>{n({type:pt.SET_CONVERSATION_IDS,payload:C})},[n]),A=B.useCallback(C=>{n({type:pt.SET_IMAGE_FILE,payload:C})},[n]),v=B.useCallback(C=>{n({type:pt.SET_ASK_CIM_PROMPTS,payload:C})},[n]),w=B.useCallback(C=>{n({type:pt.SET_CONVERSATION_HISTORY_LOADED,payload:C})},[n]),k=B.useMemo(()=>({setCopilot:s,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:b,addConversationId:y,setConversationIds:_,setImageFile:A,setAskCimPrompts:v,setConversationHistoryLoaded:w}),[s,a,u,c,d,f,p,m,b,y,_,A,v,w]);return x.jsx(X0.Provider,{value:k,children:t})};rA();const yv=(e,t)=>{const{type:n,payload:r}=t;if(n===pt.ADD_MESSAGE){const s=r;if(e.messages.push(s),s.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===s.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===s.id);if(c!==-1){u[c]=s;return}u.push(s);return}else{e.groupedMessages.push({type:"group",eventSourceId:s.eventSourceId,messages:[s],createdAt:new Date(s.createdAt)});return}}e.groupedMessages.push({type:"individual",message:s,createdAt:new Date(s.createdAt)});return}switch(n){case pt.RESET_STATE:e.messages=Zi.messages,e.groupedMessages=Zi.groupedMessages,e.loadingMessages=Zi.loadingMessages,e.imageFile=Zi.imageFile,e.askCimPrompts=Zi.askCimPrompts,e.conversationHistoryLoaded=Zi.conversationHistoryLoaded;break;case pt.RESET_COPILOT:e.copilot=null;break;case pt.SET_COPILOT:e.copilot=r;break;case pt.SET_CONNECTED:e.connected=r;break;case pt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case pt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case pt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case pt.ADD_CONVERSATION_ID:{const s=r;e.conversationIds.includes(s)||e.conversationIds.push(s)}break;case pt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case pt.SET_IMAGE_FILE:e.imageFile=r;break;case pt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case pt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},Tv=({onCopilotEvent:e,children:t})=>{const[n,r]=V0(yv,Zi);return x.jsx(W0.Provider,{value:n,children:x.jsx(Ev,{onCopilotEvent:e,dispatch:r,children:t})})};function bv(){var e=B.useRef(!0);return e.current?(e.current=!1,!0):e.current}function _v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function Sv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var _f=typeof window!="undefined",ga=function(e){B.useEffect(e,[])},xv=function(e){var t=B.useRef(e);t.current=e,ga(function(){return function(){return t.current()}})},wv=function(e){var t=B.useRef(0),n=B.useState(e),r=n[0],s=n[1],a=B.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return xv(function(){cancelAnimationFrame(t.current)}),[r,a]},Av=function(e,t){return e===t};function Cv(e,t){t===void 0&&(t=Av);var n=B.useRef(),r=B.useRef(e),s=bv();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var vv=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,c=wv({width:_f?window.innerWidth:r,height:_f?window.innerHeight:a}),d=c[0],f=c[1];return B.useEffect(function(){if(_f){var p=function(){var m=window.innerWidth,b=window.innerHeight;f({width:m,height:b}),u&&u(m,b)};return _v(window,"resize",p),function(){Sv(window,"resize",p)}}},[]),d};class Nv{constructor(){Se(this,"items",[]);Se(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Se(this,"remove",()=>this.items.shift());Se(this,"first",()=>this.items.length>0?this.items[0]:null);Se(this,"clear",()=>{this.items.length=0});Se(this,"processQueue",t=>{new Array(pn.size).fill(1).forEach(()=>{const r=pn.first();r&&(t(r),pn.remove())})})}get size(){return this.items.length}}const pn=new Nv,Fg=e=>{window.addEventListener(Jd,e)},Bg=e=>{window.removeEventListener(Jd,e)},kv=(e,t,n)=>{const r=new CustomEvent(Jd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Ug=e=>{window.addEventListener(Qd,e)},Hg=e=>{window.removeEventListener(Qd,e)},Pv=(e,t,n)=>{const r=new CustomEvent(Qd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},zg=e=>{window.addEventListener(Kd,e)},jg=e=>{window.removeEventListener(Kd,e)},$g=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},Ov=e=>{window.addEventListener(tf,e)},Iv=e=>{window.removeEventListener(tf,e)},fl=(e,t,n)=>{const r=new CustomEvent(tf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Rv{constructor(){Se(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"categoryIdProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const s=lA[n];return Pv(s,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const at=new Rv,Vg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},qg=(e,t,n)=>{var u,c;const r=F({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},Yg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Gg=({field:e,value:t},n)=>{const[r,s]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof s=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:s},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:s});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},Wg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Xg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},Lv=e=>{if(!is()||!ha()){is()&&pn.clear(),pn.add({context:"browse",payload:fe(F({},at.state),{categoryId:e})});return}at.categoryIdProxy.categoryId=e},Kg=e=>{Vg(e,at)},Dv=(e,t)=>{qg(e,t,at)},Qg=e=>{Yg(e,at)},Mv=({field:e,value:t})=>{Gg({field:e,value:t},at)},Fv=e=>{Wg(e,at)},Jg=e=>{Xg(e,at)},Zg=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=is(),n=ha();if(!t||!n){t&&pn.clear(),pn.add({context:"browse",payload:F({},e)});return}"facetFilters"in e&&Kg(e.facetFilters||{}),"rangeFilters"in e&&Qg(e.rangeFilters||[]),"catalogSegment"in e&&(at.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Jg(e.pricebooks||[]),"categoryName"in e&&(at.categoryIdProxy.categoryName=e.categoryName||""),at.categoryIdProxy.categoryId=e.categoryId},Bv=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Zg,updateBrowseCategoryId:Lv,updateCatalogSegment:Fv,updateFacetFilter:Dv,updateFacetFilters:Kg,updatePricebooks:Jg,updateRangeFilter:Mv,updateRangeFilters:Qg},Symbol.toStringTag,{value:"Module"}));class Uv{constructor(){Se(this,"initialParams",{productId:"",productName:"",pdpLink:""});Se(this,"proxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>($g(n,r),Reflect.set(t,n,r)));Se(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const mr=new Uv,e1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=is(),n=ha();if(!t||!n){t&&pn.clear(),pn.add({context:"pdp",payload:F({},e)});return}mr.updateProxy(e),$g("pdp-context",e)},Hv=e=>{mr.proxy.productId=e,is()||pn.add({context:"pdp",payload:F({},mr.state)})},zv=e=>{mr.proxy.pdpLink=e},mt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},t1={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1};class jv{constructor(){Se(this,"initialState",t1);Se(this,"promptsStateProxy");Se(this,"promptsParamsProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return Ea(n,r),Reflect.set(t,n,r)});Se(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Se(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Se(this,"updatePromptsParamsProxy",t=>new Proxy(F({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const Bt=new jv,$v=e=>{window.addEventListener(ef,e)},Vv=e=>{window.removeEventListener(ef,e)},Ea=(e,t)=>{const n=new CustomEvent(ef,{detail:{property:e,value:t}});window.dispatchEvent(n)},n1=e=>{const t=Bt.isOpen,n=typeof e=="boolean"?e:!t;Bt.promptsStateProxy.isOpen=n},r1=e=>{const t=Bt.isInline,n=typeof e=="boolean"?e:!t;Bt.promptsStateProxy.isInline=n},qv=e=>{Bt.promptsParamsProxy=Bt.updatePromptsParamsProxy(e),Ea("params",e),Bt.promptsStateProxy.entryType="ask_cim"},Yv=e=>{Bt.promptsParamsProxy=Bt.updatePromptsParamsProxy(e),Ea("params",e),Bt.promptsStateProxy.entryType="search"},Gv=e=>{Bt.promptsParamsProxy=Bt.updatePromptsParamsProxy(e),Ea("params",e),Bt.promptsStateProxy.entryType="browse"},Wv=e=>{Bt.promptsParamsProxy=Bt.updatePromptsParamsProxy(e),Ea("params",e),Bt.promptsStateProxy.entryType="pdp"},Xv=({elementId:e,entryType:t,params:n,isInline:r})=>{Bt.promptsStateProxy.elementId=e,t&&(Bt.promptsStateProxy.entryType=t),typeof r=="boolean"&&r1(r),n&&Bt.updatePromptsParamsProxy(n),Bt.isOpen||n1(!0)},Kv=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{fl("getConversationMessages",{payload:e,callback:t},bi.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{fl("getSessionInformation",{callback:e},bi.GET_SESSION_INFORMATION)},loadConversation:e=>{fl("loadConversation",e,bi.LOAD_CONVERSATION)},resetConversation:()=>{fl("resetConversation",!0,bi.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Qv{constructor(){Se(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"queryProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const s=cA[n];return kv(s,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const Tt=new Qv,Jv=e=>{const t=ha(),n=is();if(!n||!t){n&&pn.clear(),pn.add({context:"search",payload:fe(F({},Tt.state),{query:e})});return}Tt.queryProxy.query=e},i1=e=>{Vg(e,Tt)},Zv=(e,t)=>{qg(e,t,Tt)},s1=e=>{Yg(e,Tt)},eN=({field:e,value:t})=>{Gg({field:e,value:t},Tt)},tN=e=>{Wg(e,Tt)},o1=e=>{Xg(e,Tt)},a1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ha(),n=is();if(!n||!t){n&&pn.clear(),pn.add({context:"search",payload:F({},e)});return}"facetFilters"in e&&i1(e.facetFilters||{}),"rangeFilters"in e&&s1(e.rangeFilters||[]),"catalogSegment"in e&&(Tt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&o1(e.pricebooks||[]),Tt.queryProxy.query=e.query},nN=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:a1,updateCatalogSegment:tN,updateFacetFilter:Zv,updateFacetFilters:i1,updatePricebooks:o1,updateRangeFilter:eN,updateRangeFilters:s1,updateSearchQuery:Jv},Symbol.toStringTag,{value:"Module"})),rN={categoryId:at.categoryId,categoryName:at.categoryIdProxy.categoryName||"",facetFilters:at.facetFilters,rangeFilters:at.rangeFilters,catalogSegment:at.catalogSegment,pricebooks:at.pricebooks},u1=B.createContext(rN),iN=({children:e})=>{const[t,n]=B.useState(at.categoryId),[r,s]=B.useState(at.categoryIdProxy.categoryName||""),[a,u]=B.useState(at.facetFilters||{}),[c,d]=B.useState(at.rangeFilters||[]),[f,p]=B.useState(at.catalogSegment||null),[m,b]=B.useState(at.pricebooks||null);B.useEffect(()=>{const _=({detail:A})=>{(A==null?void 0:A.property)==="categoryId"&&n(A.value),(A==null?void 0:A.property)==="categoryName"&&s(A.value),(A==null?void 0:A.property)==="facetFilters"&&u(A.value),(A==null?void 0:A.property)==="rangeFilters"&&d(A.value),(A==null?void 0:A.property)==="catalogSegment"&&p(A.value),(A==null?void 0:A.property)==="pricebooks"&&b(A.value)};return Ug(_),()=>{Hg(_)}},[]);const y=B.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:m}),[t,r,a,c,f,m]);return x.jsx(u1.Provider,{value:y,children:e})},sN=()=>{const e=B.useContext(u1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},oN={searchQuery:Tt.query,facetFilters:Tt.facetFilters,rangeFilters:Tt.rangeFilters,catalogSegment:Tt.catalogSegment,pricebooks:Tt.pricebooks},l1=B.createContext(oN),aN=({children:e})=>{const[t,n]=B.useState(Tt.query),[r,s]=B.useState(Tt.facetFilters),[a,u]=B.useState(Tt.rangeFilters),[c,d]=B.useState(Tt.catalogSegment),[f,p]=B.useState(Tt.pricebooks);B.useEffect(()=>{const b=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&s(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return Fg(b),()=>{Bg(b)}},[]);const m=B.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return x.jsx(l1.Provider,{value:m,children:e})},uN=()=>{const e=B.useContext(l1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},lN={productId:mr.productId,pdpLink:mr.pdpLink},c1=B.createContext(lN),cN=({children:e})=>{const[t,n]=B.useState(mr.productId),[r,s]=B.useState(mr.pdpLink);B.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),s(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&s(c.value)};return zg(u),()=>{jg(u)}},[]);const a=B.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return x.jsx(c1.Provider,{value:a,children:e})},dN=()=>{const e=B.useContext(c1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},d1=B.createContext({mode:Je.modeProxy.mode,entryType:Je.entryType,status:Je.statusProxy,dialogPosition:Je.dialogProxy.position,isDialogFullHeight:Je.dialogProxy.isFullHeight,dialogWidth:Je.dialogProxy.width,isModalFullscreen:Je.modalProxy.isFullscreen,previousComponentType:Je.statusProxy.type}),fN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=B.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,c]=B.useState(Je.modeProxy.mode),[d,f]=B.useState({type:n||Je.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Je.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Je.statusProxy.isMinimized}),[p,m]=B.useState(Je.dialogProxy.position),[b,y]=B.useState(Je.dialogProxy.isFullHeight),[_,A]=B.useState(Je.dialogProxy.width),[v,w]=B.useState(Je.modalProxy.isFullscreen),k=B.useRef(!1),C=Cv(d.type);B.useEffect(()=>{const Y=L=>{const{property:q,value:ne}=L.detail||{};if(!(!q||ne===void 0)){if(q==="mode"){c(ne);return}if(q==="entryType"){a(ne);return}if(q==="isMinimized"){f(de=>fe(F({},de),{isMinimized:ne}));return}if(q==="isOpen"){f(de=>fe(F({},de),{isOpen:ne}));return}if(q==="type"){f(de=>fe(F({},de),{type:ne}));return}if(q==="position"){m(ne);return}if(q==="isFullHeight"){y(ne);return}if(q==="width"){A(ne);return}if(q==="isFullscreen"){w(ne);return}}};return fv(Y),()=>{hv(Y)}},[]),ga(()=>{e&&pa(e)}),ga(()=>{if(k.current)return;k.current=!0;const Y=n||(t==null?void 0:t.type);Y&&dl(Y);const L=cv();t&&"isOpen"in t&&ti(!!t.isOpen),t&&"isMinimized"in t&&ma(!!t.isMinimized),L&&ma(!0)}),ga(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:Y}=t.options;Y&&bf(Y),"dialogFullHeight"in t.options&&gv(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&A(t.options.dialogWidth),"isModalFullscreen"in t.options&&Tf(!!t.options.isModalFullscreen)});const H=B.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:C||"dialog",dialogPosition:p,isDialogFullHeight:b,dialogWidth:_,isModalFullscreen:v}),[u,s,d,C,p,b,_,v]);return x.jsx(d1.Provider,{value:H,children:r})},er=()=>{const e=B.useContext(d1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},f1=B.createContext(null),h1=B.createContext(null),Sf=()=>{const e=B.useContext(h1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ni=()=>{const e=B.useContext(f1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Xs=()=>{const e=B.useContext(X0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},tr=()=>{const e=B.useContext(W0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},hN=({copilot:e})=>{const{logger:t,conversationHistory:n}=tt(),{isInline:r}=ni(),{addCopilotEvent:s,setConversationHistoryLoaded:a}=Xs(),{activeConversationId:u}=tr(),c=B.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=B.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,m=>{t==null||t.log("Retrieved conversation messages: ",m),p==null||p(m)})},[e,t]);return B.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),m={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(m.limit=n.limit),d(m,b=>{const y=[];[...b.reverse()||[]].forEach(A=>{var w;const v=b.find(k=>k.id===A.eventSourceId);(w=v==null?void 0:v.name)!=null&&w.endsWith("_suggestions")||(A.bypassHandlers=!0,y.unshift(A))}),y.forEach(A=>{s(A)}),a(!0)})},[t,r,u,d,s,a,n]),{getSessionInformation:c,getConversationMessages:d}},p1=B.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),pN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:b}=tt(),on=uN(),{searchQuery:y}=on,_=dn(on,["searchQuery"]),Fn=sN(),{categoryId:A}=Fn,v=dn(Fn,["categoryId"]),{productId:w,pdpLink:k}=dN(),{setCopilot:C,setConnected:H,resetCopilot:Y,resetCopilotState:L,addCopilotEvent:q,removeLoadingMessage:ne,handleCopilotRequestAck:de,setActiveConversationId:V,setConversationIds:se,setAskCimPrompts:pe}=Xs(),{connected:ve,copilot:re,messages:oe,groupedMessages:xe,loadingMessages:ae,askCimPrompts:Q}=tr(),{status:ie,entryType:N}=er(),{isInline:D}=ni(),{getConversationMessages:ee,getSessionInformation:I}=hN({copilot:re}),_e=B.useMemo(()=>ae.size>0,[ae]),Ue=B.useCallback(we=>ae.has(we),[ae]),ye=B.useCallback(({query:we,facetFilters:Pe,rangeFilters:Me,catalogSegment:rt,pricebooks:ht,userPrompt:J,imageFile:ge})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Ce={searchParams:{query:we}};J&&(Ce.userPrompt=J),ge&&(Ce.attachments={image:ge}),Pe&&Object.keys(Pe).length>0&&(Ce.searchParams.facetFilters=Pe),Me&&Me.length>0&&(Ce.searchParams.rangeFilters=Me),rt&&(Ce.searchParams.catalogSegment=rt),ht&&(Ce.searchParams.pricebooks=ht),m&&(Ce.clientContext=m),pa("search"),re.search(Ce,qe=>{const Ie=F({},qe);de(Ie)})},[p,de,re,m]),Re=B.useCallback(({categoryId:we,categoryName:Pe,facetFilters:Me,rangeFilters:rt,catalogSegment:ht,pricebooks:J,userPrompt:ge,imageFile:Ce})=>{if(!re){p==null||p.error("Copilot is not initialized");return}const qe=Me&&Object.keys(Me).length>0;if(we===""&&!qe){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Ie={browseParams:{categoryId:we||""}};ge&&(Ie.userPrompt=ge),Ce&&(Ie.attachments={image:Ce}),qe&&(Ie.browseParams.facetFilters=Me),rt&&rt.length>0&&(Ie.browseParams.rangeFilters=rt),ht&&(Ie.browseParams.catalogSegment=ht),Array.isArray(J)&&J.length>0&&(Ie.browseParams.pricebooks=J),(m||Pe)&&(Ie.clientContext={},m&&(Ie.clientContext=F({},m)),Pe&&(Ie.clientContext.cimLabel=Pe)),pa("browse"),re.browse(Ie,ut=>{var Vr;const Vt=F({},ut),Ht=((Vr=Vt.request)==null?void 0:Vr.clientContext)||{},an=(Ht==null?void 0:Ht.cimLabel)||Pe;an&&Vt.request&&(Vt.request.label=an),de(Vt)})},[p,de,re,m]),He=B.useCallback(({productId:we,productName:Pe,pdpLink:Me,userPrompt:rt,imageFile:ht})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const J={productId:we};rt&&(J.userPrompt=rt),Me&&(J.pdpLink=Me),ht&&(J.attachments={image:ht}),(m||Pe)&&(J.clientContext={},m&&(J.clientContext=F({},m)),Pe&&(J.clientContext.cimLabel=Pe)),b&&(J.baseCatalogParams=b),pa("pdp"),re.productView(J,ge=>{var ut;const Ce=F({},ge),qe=((ut=Ce.request)==null?void 0:ut.clientContext)||{},Ie=(qe==null?void 0:qe.cimLabel)||Pe;Ie&&Ce.request&&(Ce.request.label=Ie),de(Ce)})},[p,re,de,m,b]),Ye=B.useCallback(({userPrompt:we,imageFile:Pe})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Me={userPrompt:we};Pe&&(Me.attachments={image:Pe}),m&&(Me.clientContext=m),b&&(Me.baseCatalogParams=b),re.askCim(Me,rt=>{const ht=F({},rt);de(ht)})},[p,re,de,m,b]),bt=B.useCallback(we=>{q(we),c==null||c(we)},[q,c]),Cn=B.useCallback(we=>{q(we),d==null||d(we)},[q,d]),sn=B.useCallback(we=>{u==null||u(we),H(!0)},[u,H]);B.useEffect(()=>{!re||!ve||!ie.isOpen||pn.size>0&&pn.processQueue(we=>{if(we.context==="search"){const Pe=F({},we.payload);a1(Pe)}if(we.context==="browse"){const Pe=F({},we.payload);Zg(Pe)}if(we.context==="pdp"){const Pe=F({},we.payload);e1(Pe)}})},[ie.isOpen,re,ve]);const _r=B.useCallback(we=>{const Pe=Me=>{const rt=fe(F({},Me),{id:Me.inquiryLinkId||Me.id});q(rt)};we.on("connect_ack",sn),we.on("partial_inquiry",Pe),we.on("display_products",q),we.on("progress",q),we.on("refined_search",bt),we.on("refined_browse",Cn),we.on("done",Me=>{ne(Me.eventSourceId)}),we.on("error",Me=>{q(Me),ne(Me.eventSourceId)}),we.onDisconnect(Me=>{const rt=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Me),!rt.includes(Me)){H(!1);return}p==null||p.log("De-registering event listeners");const ht=new Date().toISOString();q({name:"error",message:"Connection was lost. Please try again.",createdAt:ht,id:`error-${ht}`,sessionId:"session"}),we.off()})},[p,H,ne,bt,Cn,q,sn]);B.useEffect(()=>{if(!re)return;const we=Pe=>{if(!D){if(!Pe.message&&Pe.eventSourceId&&Pe.eventSourceId===Q.requestId){pe({requestId:Pe.eventSourceId,message:Pe});return}q(Pe)}};return re.on("follow_up",we),()=>{re.off("follow_up",we)}},[re,oe,Q.requestId,D,q,pe]),B.useEffect(()=>{if(!re)return;const we=Pe=>{if(D)return;const Me=fe(F({},Pe),{id:Pe.inquiryLinkId||Pe.id});q(Me)};return re.on("inquiry",we),()=>{re.off("inquiry",we)}},[re,D,q]),ga(()=>{let we;n?we=n:we=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Pe={baseUrl:we};e?Pe.apiKey=e:t&&(Pe.apiToken=t),r&&(Pe.customerId=r),s&&(Pe.tenantId=s);const Me=new Gw(Pe);return C(Me),_r(Me),Me.connect(),Me.requestSessionInformation(rt=>{p==null||p.log("Session Information: ",rt);const{activeConversationId:ht,conversationIds:J}=rt.data||{};ht&&V(ht),J!=null&&J.length&&se(J)}),()=>{Me.disconnect(),Me.off(),Y()}});const sr=B.useCallback(we=>{if(!re)return;const Pe={eventId:we,reason:"User cancelled the request"};re.cancelRequest(Pe,Me=>{q(Me),ne(we)})},[q,ne,re]),Jt=B.useCallback(()=>{re&&re.conversationReset({},we=>{L(),q(we),re.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Me,conversationIds:rt}=Pe.data||{};Me&&V(Me),rt!=null&&rt.length&&se(rt)})})},[re,p,q,L,V,se]),Ve=B.useCallback((we,Pe)=>{if(!we)return;const Me={userPrompt:we};switch(Pe&&(Me.imageFile=Pe),N){case"ask_cim":Ye(Me);return;case"search":y?ye(F(F({query:y},_),Me)):Ye(Me);return;case"browse":Re(F(F({categoryId:A},v),Me));return;case"pdp":w?He(F({productId:w,pdpLink:k||""},Me)):Ye(Me);return}},[N,y,_,ye,Ye,A,v,Re,He,w,k]),Nt=B.useCallback((we,Pe)=>{var ge,Ce,qe;const rt=we.params.userPrompt||"";if(!rt)return;const ht=oe.find(Ie=>Ie.id===Pe);if(!ht)return;const J=ht.name.replace("_suggestions","");if(J==="ask_cim"){Ye({userPrompt:rt});return}if(J==="copilot_search"){const Ie=((ge=ht.request)==null?void 0:ge.searchParams)||{},Vt=Ie.query===y;ye(fe(F({query:Ie.query||y},Vt?_:{}),{userPrompt:rt}));return}if(J==="copilot_browse"){const Ie=ht.request,ut=Ie.browseParams||{},Ht=ut.categoryId===A,an=((Ce=Ie.clientContext)==null?void 0:Ce.cimLabel)||"";Re(fe(F({categoryId:ut.categoryId||A||""},Ht?v:{}),{categoryName:an,userPrompt:rt}));return}if(J==="product_view"){const Ie=ht.request||{},ut=Ie.productId,Vt=ut===w,Ht=((qe=Ie.clientContext)==null?void 0:qe.cimLabel)||"";let an="";Vt?an=k||"":an=Ie.pdpLink||"",He({productId:ut||w,pdpLink:an,productName:Ht,userPrompt:rt})}},[oe,y,_,ye,Ye,A,v,Re,He,w,k]),vn=B.useMemo(()=>({copilot:re,messages:oe,groupedMessages:xe,isLoading:_e,isResponseLoading:Ue,handleAskCim:Ye,handleSearch:ye,handleBrowse:Re,handlePdp:He,handleUserInput:Ve,handleSuggestion:Nt,handleCancel:sr,resetConversation:Jt,getSessionInformation:I,getConversationMessages:ee}),[re,oe,xe,_e,Ue,Ye,ye,Re,He,Ve,Nt,sr,Jt,I,ee]);return x.jsx(p1.Provider,{value:vn,children:f})},m1=()=>{const{copilot:e}=tr(),{addCopilotEvent:t}=Xs();return{getCopilotSuggestions:B.useCallback((r,s,a)=>{if(!e||!s||!r)return;const u=c=>{t(c),a(c)};switch(s){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Ir=()=>{const e=B.useContext(p1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},mN=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=tr(),{entryType:s}=er(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Xs(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:b,getConversationMessages:y}=Ir(),{getCopilotSuggestions:_}=m1();B.useEffect(()=>{!e||!s||!t||!r||n.requestId||s==="ask_cim"&&_({},s,k=>{c({requestId:k.id,message:null})})},[e,t,n.requestId,s,r,_,c]);const A=B.useCallback(({query:k})=>{if(!e||!k)return;const{facetFilters:C}=Tt.facetFiltersProxy,{rangeFilters:H}=Tt.rangeFiltersProxy,{catalogSegment:Y}=Tt.catalogSegmentProxy,{pricebooks:L}=Tt.pricebooksProxy,q={query:k};q.facetFilters=C||{},q.rangeFilters=H||[],q.catalogSegment=Y||"",q.pricebooks=L||[],d(F({},q))},[e,d]),v=B.useCallback(({categoryId:k})=>{if(!e)return;const C=at.categoryIdProxy.categoryName,{facetFilters:H}=at.facetFiltersProxy,{rangeFilters:Y}=at.rangeFiltersProxy,{catalogSegment:L}=at.catalogSegmentProxy,{pricebooks:q}=at.pricebooksProxy,ne={categoryId:k};ne.categoryName=C||"",ne.facetFilters=H||{},ne.rangeFilters=Y||[],ne.catalogSegment=L||"",ne.pricebooks=q||[],f(F({},ne))},[e,f]),w=B.useCallback(({productId:k})=>{if(!e||!k)return;const C={productId:k,pdpLink:mr.pdpLink,productName:mr.proxy.productName||""};p(C)},[e,p]);return B.useEffect(()=>{const k=({detail:C})=>{(C==null?void 0:C.property)==="query"&&A({query:C.value})};return Fg(k),()=>{Bg(k)}},[A]),B.useEffect(()=>{const k=({detail:C})=>{if((C==null?void 0:C.property)==="pdp-context"){const H=C.value;w({productId:H.productId});return}(C==null?void 0:C.property)==="productId"&&w({productId:C.value})};return zg(k),()=>{jg(k)}},[w]),B.useEffect(()=>{const k=({detail:C})=>{(C==null?void 0:C.property)==="categoryId"&&v({categoryId:C.value})};return Ug(k),()=>{Hg(k)}},[v]),B.useEffect(()=>{const k=({detail:C})=>{if((C==null?void 0:C.event)==bi.RESET_CONVERSATION&&m(),(C==null?void 0:C.event)==bi.GET_SESSION_INFORMATION){const H=C.value.callback;b(H)}if((C==null?void 0:C.event)==bi.GET_CONVERSATION_MESSAGES){const{payload:H,callback:Y}=C.value;if(!H.conversationId||typeof Y!="function")return;y(H,Y)}if((C==null?void 0:C.event)==bi.LOAD_CONVERSATION){const H=C.value;if(!H.conversationId)return;y(H,L=>{a(),L.forEach(q=>{u(q)})})}};return Ov(k),()=>{Iv(k)}},[m,b,y,a,u]),null},gN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>x.jsxs(pN,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:[x.jsx(mN,{}),f]}),EN=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),yN=({children:e,dispatch:t})=>{const n=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),b=B.useCallback(_=>{t({type:mt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=B.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:b}),[n,r,s,a,u,c,d,f,p,m,b]);return x.jsx(h1.Provider,{value:y,children:e})},TN=(e,t)=>{const{type:n,payload:r}=t;switch(n){case mt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case mt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case mt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case mt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case mt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case mt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case mt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case mt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case mt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case mt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case mt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case mt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case mt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case mt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case mt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},bN=({promptsConfig:e,children:t})=>{const[n,r]=V0(TN,fe(F(F({},t1),e||{}),{staticQuestions:EN((e==null?void 0:e.staticQuestions)||[])}));return x.jsx(f1.Provider,{value:n,children:x.jsx(yN,{dispatch:r,children:t})})},g1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,theme:f,openLinksInNewTab:p,globalClassName:m,isDevelopment:b=!1,componentType:y,componentConfig:_,entryType:A,entryMessage:v,disclaimerText:w,disclaimerMarkdown:k,clientContext:C,baseCatalogParams:H,searchPlaceholder:Y,searchButtonLabel:L,searchConfig:q,suggestionButtonConfig:ne,messageAlignment:de,autoScroll:V,promptsConfig:se,resetConversationMessage:pe,conversationHistory:ve,onConnect:re,onCopilotEvent:oe,onRefinedSearch:xe,onRefinedBrowse:ae,__features:Q,children:ie})=>x.jsx(uv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,entryMessage:v,theme:f,globalClassName:m,openLinksInNewTab:p,searchPlaceholder:Y,searchButtonLabel:L,searchConfig:q,suggestionButtonConfig:ne,messageAlignment:de,autoScroll:V,componentConfig:_,clientContext:C,baseCatalogParams:H,disclaimerMarkdown:k,disclaimerText:w,resetConversationMessage:pe,conversationHistory:ve,isDevelopment:b,__features:Q,children:x.jsx(fN,{entryType:A,componentConfig:_,componentType:y,children:x.jsx(Tv,{onCopilotEvent:oe,children:x.jsx(cN,{children:x.jsx(iN,{children:x.jsx(aN,{children:x.jsx(bN,{promptsConfig:se,children:x.jsx(gN,{apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,isDevelopment:b,entryType:A,onConnect:re,onRefinedSearch:xe,onRefinedBrowse:ae,onCopilotEvent:oe,children:ie})})})})})})})});var xf={exports:{}},In={},wf={exports:{}},Af={};var E1;function _N(){return E1||(E1=1,(function(e){function t(Q,ie){var N=Q.length;Q.push(ie);e:for(;0<N;){var D=N-1>>>1,ee=Q[D];if(0<s(ee,ie))Q[D]=ie,Q[N]=ee,N=D;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var ie=Q[0],N=Q.pop();if(N!==ie){Q[0]=N;e:for(var D=0,ee=Q.length,I=ee>>>1;D<I;){var _e=2*(D+1)-1,Ue=Q[_e],ye=_e+1,Re=Q[ye];if(0>s(Ue,N))ye<ee&&0>s(Re,Ue)?(Q[D]=Re,Q[ye]=N,D=ye):(Q[D]=Ue,Q[_e]=N,D=_e);else if(ye<ee&&0>s(Re,N))Q[D]=Re,Q[ye]=N,D=ye;else break e}}return ie}function s(Q,ie){var N=Q.sortIndex-ie.sortIndex;return N!==0?N:Q.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],p=1,m=null,b=3,y=!1,_=!1,A=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Q){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=Q)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function H(Q){if(A=!1,C(Q),!_)if(n(d)!==null)_=!0,xe(Y);else{var ie=n(f);ie!==null&&ae(H,ie.startTime-Q)}}function Y(Q,ie){_=!1,A&&(A=!1,w(ne),ne=-1),y=!0;var N=b;try{for(C(ie),m=n(d);m!==null&&(!(m.expirationTime>ie)||Q&&!se());){var D=m.callback;if(typeof D=="function"){m.callback=null,b=m.priorityLevel;var ee=D(m.expirationTime<=ie);ie=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===n(d)&&r(d),C(ie)}else r(d);m=n(d)}if(m!==null)var I=!0;else{var _e=n(f);_e!==null&&ae(H,_e.startTime-ie),I=!1}return I}finally{m=null,b=N,y=!1}}var L=!1,q=null,ne=-1,de=5,V=-1;function se(){return!(e.unstable_now()-V<de)}function pe(){if(q!==null){var Q=e.unstable_now();V=Q;var ie=!0;try{ie=q(!0,Q)}finally{ie?ve():(L=!1,q=null)}}else L=!1}var ve;if(typeof k=="function")ve=function(){k(pe)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,oe=re.port2;re.port1.onmessage=pe,ve=function(){oe.postMessage(null)}}else ve=function(){v(pe,0)};function xe(Q){q=Q,L||(L=!0,ve())}function ae(Q,ie){ne=v(function(){Q(e.unstable_now())},ie)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,xe(Y))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Q){switch(b){case 1:case 2:case 3:var ie=3;break;default:ie=b}var N=b;b=ie;try{return Q()}finally{b=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,ie){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var N=b;b=Q;try{return ie()}finally{b=N}},e.unstable_scheduleCallback=function(Q,ie,N){var D=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?D+N:D):N=D,Q){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=N+ee,Q={id:p++,callback:ie,priorityLevel:Q,startTime:N,expirationTime:ee,sortIndex:-1},N>D?(Q.sortIndex=N,t(f,Q),n(d)===null&&Q===n(f)&&(A?(w(ne),ne=-1):A=!0,ae(H,N-D))):(Q.sortIndex=ee,t(d,Q),_||y||(_=!0,xe(Y))),Q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(Q){var ie=b;return function(){var N=b;b=ie;try{return Q.apply(this,arguments)}finally{b=N}}}})(Af)),Af}var y1;function SN(){return y1||(y1=1,wf.exports=_N()),wf.exports}var T1;function xN(){if(T1)return In;T1=1;var e=fr(),t=SN();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function b(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,l,h){if(l!==null&&l.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,o,l,h){if(o===null||typeof o=="undefined"||y(i,o,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function A(i,o,l,h,E,T,S){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=o,this.sanitizeURL=T,this.removeEmptyString=S}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[i]=new A(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];v[o]=new A(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new A(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[i]=new A(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){v[i]=new A(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new A(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new A(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new A(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new A(i,5,!1,i.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function k(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(w,k);v[o]=new A(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(w,k);v[o]=new A(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(w,k);v[o]=new A(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,o,l,h){var E=v.hasOwnProperty(o)?v[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,l,E,h)&&(l=null),h||E===null?b(o)&&(l===null?i.removeAttribute(o):i.setAttribute(o,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(o=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(o):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,o,l):i.setAttribute(o,l))))}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),L=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),se=Symbol.for("react.context"),pe=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),Q=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var N=Object.assign,D;function ee(i){if(D===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);D=o&&o[1]||""}return`
11
11
  `+D+i}var I=!1;function _e(i,o){if(!i||I)return"";I=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Z){var h=Z}Reflect.construct(i,[],o)}else{try{o.call()}catch(Z){h=Z}i.call(o.prototype)}else{try{throw Error()}catch(Z){h=Z}i()}}catch(Z){if(Z&&h&&typeof Z.stack=="string"){for(var E=Z.stack.split(`
12
12
  `),T=h.stack.split(`
13
- `),S=E.length-1,L=T.length-1;1<=S&&0<=L&&E[S]!==T[L];)L--;for(;1<=S&&0<=L;S--,L--)if(E[S]!==T[L]){if(S!==1||L!==1)do if(S--,L--,0>L||E[S]!==T[L]){var H=`
14
- `+E[S].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=S&&0<=L);break}}}finally{I=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?ee(i):""}function Ue(i){switch(i.tag){case 5:return ee(i.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function ye(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case q:return"Fragment";case R:return"Portal";case me:return"Profiler";case ne:return"StrictMode";case ve:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case V:return(i._context.displayName||"Context")+".Provider";case he:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case oe:return o=i.displayName||null,o!==null?o:ye(i.type)||"Memo";case xe:o=i._payload,i=i._init;try{return ye(i(o))}catch(l){}}return null}function Re(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(o);case 8:return o===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function He(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ye(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function bt(i){var o=Ye(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,T=l.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,T.call(this,S)}}),Object.defineProperty(i,o,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Cn(i){i._valueTracker||(i._valueTracker=bt(i))}function sn(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return i&&(h=Ye(i)?i.checked?"true":"false":i.value),i=h,i!==l?(o.setValue(i),!0):!1}function _r(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function sr(i,o){var l=o.checked;return k({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Jt(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=He(o.value!=null?o.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ve(i,o){o=o.checked,o!=null&&C(i,"checked",o,!1)}function kt(i,o){Ve(i,o);var l=He(o.value),h=o.type;if(l!=null)h==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?on(i,o.type,l):o.hasOwnProperty("defaultValue")&&on(i,o.type,He(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function vn(i,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,l||o===i.value||(i.value=o),i.defaultValue=o}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function on(i,o,l){(o!=="number"||_r(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Fn=Array.isArray;function we(i,o,l,h){if(i=i.options,o){o={};for(var E=0;E<l.length;E++)o["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=o.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+He(l),o=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function Pe(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Me(i,o){var l=o.value;if(l==null){if(l=o.children,o=o.defaultValue,l!=null){if(o!=null)throw Error(n(92));if(Fn(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:He(l)}}function rt(i,o){var l=He(o.value),h=He(o.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),o.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function ht(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function J(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ge(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?J(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,qe=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,l,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function Ie(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var ut={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Vt=["Webkit","ms","Moz","O"];Object.keys(ut).forEach(function(i){Vt.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),ut[o]=ut[i]})});function Ht(i,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||ut.hasOwnProperty(i)&&ut[i]?(""+o).trim():o+"px"}function an(i,o){i=i.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=Ht(l,o[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var Vr=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function un(i,o){if(o){if(Vr[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function qr(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gn=null;function bp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var _p=null,ko=null,No=null;function Y_(i){if(i=_u(i)){if(typeof _p!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Fc(o),_p(i.stateNode,i.type,o))}}function G_(i){ko?No?No.push(i):No=[i]:ko=i}function W_(){if(ko){var i=ko,o=No;if(No=ko=null,Y_(i),o)for(i=0;i<o.length;i++)Y_(o[i])}}function X_(i,o){return i(o)}function K_(){}var Sp=!1;function Q_(i,o,l){if(Sp)return i(o,l);Sp=!0;try{return X_(i,o,l)}finally{Sp=!1,(ko!==null||No!==null)&&(K_(),W_())}}function eu(i,o){var l=i.stateNode;if(l===null)return null;var h=Fc(l);if(h===null)return null;l=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,o,typeof l));return l}var xp=!1;if(c)try{var tu={};Object.defineProperty(tu,"passive",{get:function(){xp=!0}}),window.addEventListener("test",tu,tu),window.removeEventListener("test",tu,tu)}catch(i){xp=!1}function P9(i,o,l,h,E,T,S,L,H){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(l,Z)}catch(ce){this.onError(ce)}}var nu=!1,mc=null,gc=!1,wp=null,O9={onError:function(i){nu=!0,mc=i}};function I9(i,o,l,h,E,T,S,L,H){nu=!1,mc=null,P9.apply(O9,arguments)}function R9(i,o,l,h,E,T,S,L,H){if(I9.apply(this,arguments),nu){if(nu){var Z=mc;nu=!1,mc=null}else throw Error(n(198));gc||(gc=!0,wp=Z)}}function xs(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function J_(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function Z_(i){if(xs(i)!==i)throw Error(n(188))}function L9(i){var o=i.alternate;if(!o){if(o=xs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var l=i,h=o;;){var E=l.return;if(E===null)break;var T=E.alternate;if(T===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===l)return Z_(E),i;if(T===h)return Z_(E),o;T=T.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=T;else{for(var S=!1,L=E.child;L;){if(L===l){S=!0,l=E,h=T;break}if(L===h){S=!0,h=E,l=T;break}L=L.sibling}if(!S){for(L=T.child;L;){if(L===l){S=!0,l=T,h=E;break}if(L===h){S=!0,h=T,l=E;break}L=L.sibling}if(!S)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:o}function eS(i){return i=L9(i),i!==null?tS(i):null}function tS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=tS(i);if(o!==null)return o;i=i.sibling}return null}var nS=t.unstable_scheduleCallback,rS=t.unstable_cancelCallback,D9=t.unstable_shouldYield,M9=t.unstable_requestPaint,Dt=t.unstable_now,F9=t.unstable_getCurrentPriorityLevel,Ap=t.unstable_ImmediatePriority,iS=t.unstable_UserBlockingPriority,Ec=t.unstable_NormalPriority,B9=t.unstable_LowPriority,sS=t.unstable_IdlePriority,yc=null,Yr=null;function U9(i){if(Yr&&typeof Yr.onCommitFiberRoot=="function")try{Yr.onCommitFiberRoot(yc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var Sr=Math.clz32?Math.clz32:j9,H9=Math.log,z9=Math.LN2;function j9(i){return i>>>=0,i===0?32:31-(H9(i)/z9|0)|0}var Tc=64,bc=4194304;function ru(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function _c(i,o){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,S=l&268435455;if(S!==0){var L=S&~E;L!==0?h=ru(L):(T&=S,T!==0&&(h=ru(T)))}else S=l&~E,S!==0?h=ru(S):T!==0&&(h=ru(T));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((h&4)!==0&&(h|=l&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)l=31-Sr(o),E=1<<l,h|=i[l],o&=~E;return h}function $9(i,o){switch(i){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function V9(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var S=31-Sr(T),L=1<<S,H=E[S];H===-1?((L&l)===0||(L&h)!==0)&&(E[S]=$9(L,o)):H<=o&&(i.expiredLanes|=L),T&=~L}}function Cp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function oS(){var i=Tc;return Tc<<=1,(Tc&4194240)===0&&(Tc=64),i}function vp(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function iu(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-Sr(o),i[o]=l}function q9(i,o){var l=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-Sr(l),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~T}}function kp(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-Sr(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var lt=0;function aS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var uS,Np,lS,cS,dS,Pp=!1,Sc=[],Oi=null,Ii=null,Ri=null,su=new Map,ou=new Map,Li=[],Y9="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function fS(i,o){switch(i){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Ii=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":su.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ou.delete(o.pointerId)}}function au(i,o,l,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:l,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},o!==null&&(o=_u(o),o!==null&&Np(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function G9(i,o,l,h,E){switch(o){case"focusin":return Oi=au(Oi,i,o,l,h,E),!0;case"dragenter":return Ii=au(Ii,i,o,l,h,E),!0;case"mouseover":return Ri=au(Ri,i,o,l,h,E),!0;case"pointerover":var T=E.pointerId;return su.set(T,au(su.get(T)||null,i,o,l,h,E)),!0;case"gotpointercapture":return T=E.pointerId,ou.set(T,au(ou.get(T)||null,i,o,l,h,E)),!0}return!1}function hS(i){var o=ws(i.target);if(o!==null){var l=xs(o);if(l!==null){if(o=l.tag,o===13){if(o=J_(l),o!==null){i.blockedOn=o,dS(i.priority,function(){lS(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function xc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=Ip(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Gn=h,l.target.dispatchEvent(h),Gn=null}else return o=_u(l),o!==null&&Np(o),i.blockedOn=l,!1;o.shift()}return!0}function pS(i,o,l){xc(i)&&l.delete(o)}function W9(){Pp=!1,Oi!==null&&xc(Oi)&&(Oi=null),Ii!==null&&xc(Ii)&&(Ii=null),Ri!==null&&xc(Ri)&&(Ri=null),su.forEach(pS),ou.forEach(pS)}function uu(i,o){i.blockedOn===o&&(i.blockedOn=null,Pp||(Pp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,W9)))}function lu(i){function o(E){return uu(E,i)}if(0<Sc.length){uu(Sc[0],i);for(var l=1;l<Sc.length;l++){var h=Sc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Oi!==null&&uu(Oi,i),Ii!==null&&uu(Ii,i),Ri!==null&&uu(Ri,i),su.forEach(o),ou.forEach(o),l=0;l<Li.length;l++)h=Li[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Li.length&&(l=Li[0],l.blockedOn===null);)hS(l),l.blockedOn===null&&Li.shift()}var Po=U.ReactCurrentBatchConfig,wc=!0;function X9(i,o,l,h){var E=lt,T=Po.transition;Po.transition=null;try{lt=1,Op(i,o,l,h)}finally{lt=E,Po.transition=T}}function K9(i,o,l,h){var E=lt,T=Po.transition;Po.transition=null;try{lt=4,Op(i,o,l,h)}finally{lt=E,Po.transition=T}}function Op(i,o,l,h){if(wc){var E=Ip(i,o,l,h);if(E===null)Xp(i,o,h,Ac,l),fS(i,h);else if(G9(E,i,o,l,h))h.stopPropagation();else if(fS(i,h),o&4&&-1<Y9.indexOf(i)){for(;E!==null;){var T=_u(E);if(T!==null&&uS(T),T=Ip(i,o,l,h),T===null&&Xp(i,o,h,Ac,l),T===E)break;E=T}E!==null&&h.stopPropagation()}else Xp(i,o,h,null,l)}}var Ac=null;function Ip(i,o,l,h){if(Ac=null,i=bp(h),i=ws(i),i!==null)if(o=xs(i),o===null)i=null;else if(l=o.tag,l===13){if(i=J_(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return Ac=i,null}function mS(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(F9()){case Ap:return 1;case iS:return 4;case Ec:case B9:return 16;case sS:return 536870912;default:return 16}default:return 16}}var Di=null,Rp=null,Cc=null;function gS(){if(Cc)return Cc;var i,o=Rp,l=o.length,h,E="value"in Di?Di.value:Di.textContent,T=E.length;for(i=0;i<l&&o[i]===E[i];i++);var S=l-i;for(h=1;h<=S&&o[l-h]===E[T-h];h++);return Cc=E.slice(i,1<h?1-h:void 0)}function vc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function kc(){return!0}function ES(){return!1}function Wn(i){function o(l,h,E,T,S){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=S,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(l=i[L],this[L]=l?l(T):T[L]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?kc:ES,this.isPropagationStopped=ES,this}return k(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=kc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=kc)},persist:function(){},isPersistent:kc}),o}var Oo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lp=Wn(Oo),cu=k({},Oo,{view:0,detail:0}),Q9=Wn(cu),Dp,Mp,du,Nc=k({},cu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==du&&(du&&i.type==="mousemove"?(Dp=i.screenX-du.screenX,Mp=i.screenY-du.screenY):Mp=Dp=0,du=i),Dp)},movementY:function(i){return"movementY"in i?i.movementY:Mp}}),yS=Wn(Nc),J9=k({},Nc,{dataTransfer:0}),Z9=Wn(J9),eB=k({},cu,{relatedTarget:0}),Fp=Wn(eB),tB=k({},Oo,{animationName:0,elapsedTime:0,pseudoElement:0}),nB=Wn(tB),rB=k({},Oo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),iB=Wn(rB),sB=k({},Oo,{data:0}),TS=Wn(sB),oB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},uB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=uB[i])?!!o[i]:!1}function Bp(){return lB}var cB=k({},cu,{key:function(i){if(i.key){var o=oB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=vc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?aB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bp,charCode:function(i){return i.type==="keypress"?vc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?vc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),dB=Wn(cB),fB=k({},Nc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bS=Wn(fB),hB=k({},cu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bp}),pB=Wn(hB),mB=k({},Oo,{propertyName:0,elapsedTime:0,pseudoElement:0}),gB=Wn(mB),EB=k({},Nc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),yB=Wn(EB),TB=[9,13,27,32],Up=c&&"CompositionEvent"in window,fu=null;c&&"documentMode"in document&&(fu=document.documentMode);var bB=c&&"TextEvent"in window&&!fu,_S=c&&(!Up||fu&&8<fu&&11>=fu),SS=" ",xS=!1;function wS(i,o){switch(i){case"keyup":return TB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function AS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Io=!1;function _B(i,o){switch(i){case"compositionend":return AS(o);case"keypress":return o.which!==32?null:(xS=!0,SS);case"textInput":return i=o.data,i===SS&&xS?null:i;default:return null}}function SB(i,o){if(Io)return i==="compositionend"||!Up&&wS(i,o)?(i=gS(),Cc=Rp=Di=null,Io=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return _S&&o.locale!=="ko"?null:o.data;default:return null}}var xB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function CS(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!xB[i.type]:o==="textarea"}function vS(i,o,l,h){G_(h),o=Lc(o,"onChange"),0<o.length&&(l=new Lp("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var hu=null,pu=null;function wB(i){qS(i,0)}function Pc(i){var o=Fo(i);if(sn(o))return i}function AB(i,o){if(i==="change")return o}var kS=!1;if(c){var Hp;if(c){var zp="oninput"in document;if(!zp){var NS=document.createElement("div");NS.setAttribute("oninput","return;"),zp=typeof NS.oninput=="function"}Hp=zp}else Hp=!1;kS=Hp&&(!document.documentMode||9<document.documentMode)}function PS(){hu&&(hu.detachEvent("onpropertychange",OS),pu=hu=null)}function OS(i){if(i.propertyName==="value"&&Pc(pu)){var o=[];vS(o,pu,i,bp(i)),Q_(wB,o)}}function CB(i,o,l){i==="focusin"?(PS(),hu=o,pu=l,hu.attachEvent("onpropertychange",OS)):i==="focusout"&&PS()}function vB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Pc(pu)}function kB(i,o){if(i==="click")return Pc(o)}function NB(i,o){if(i==="input"||i==="change")return Pc(o)}function PB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var xr=typeof Object.is=="function"?Object.is:PB;function mu(i,o){if(xr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),h=Object.keys(o);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(o,E)||!xr(i[E],o[E]))return!1}return!0}function IS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function RS(i,o){var l=IS(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=o&&h>=o)return{node:l,offset:o-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=IS(l)}}function LS(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?LS(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function DS(){for(var i=window,o=_r();o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=o.contentWindow;else break;o=_r(i.document)}return o}function jp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function OB(i){var o=DS(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&LS(l.ownerDocument.documentElement,l)){if(h!==null&&jp(l)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(i,l.value.length);else if(i=(o=l.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=RS(l,T);var S=RS(l,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),T>h?(i.addRange(o),i.extend(S.node,S.offset)):(o.setEnd(S.node,S.offset),i.addRange(o)))}}for(o=[],i=l;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<o.length;l++)i=o[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var IB=c&&"documentMode"in document&&11>=document.documentMode,Ro=null,$p=null,gu=null,Vp=!1;function MS(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Vp||Ro==null||Ro!==_r(h)||(h=Ro,"selectionStart"in h&&jp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),gu&&mu(gu,h)||(gu=h,h=Lc($p,"onSelect"),0<h.length&&(o=new Lp("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=Ro)))}function Oc(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var Lo={animationend:Oc("Animation","AnimationEnd"),animationiteration:Oc("Animation","AnimationIteration"),animationstart:Oc("Animation","AnimationStart"),transitionend:Oc("Transition","TransitionEnd")},qp={},FS={};c&&(FS=document.createElement("div").style,"AnimationEvent"in window||(delete Lo.animationend.animation,delete Lo.animationiteration.animation,delete Lo.animationstart.animation),"TransitionEvent"in window||delete Lo.transitionend.transition);function Ic(i){if(qp[i])return qp[i];if(!Lo[i])return i;var o=Lo[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in FS)return qp[i]=o[l];return i}var BS=Ic("animationend"),US=Ic("animationiteration"),HS=Ic("animationstart"),zS=Ic("transitionend"),jS=new Map,$S="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Mi(i,o){jS.set(i,o),a(o,[i])}for(var Yp=0;Yp<$S.length;Yp++){var Gp=$S[Yp],RB=Gp.toLowerCase(),LB=Gp[0].toUpperCase()+Gp.slice(1);Mi(RB,"on"+LB)}Mi(BS,"onAnimationEnd"),Mi(US,"onAnimationIteration"),Mi(HS,"onAnimationStart"),Mi("dblclick","onDoubleClick"),Mi("focusin","onFocus"),Mi("focusout","onBlur"),Mi(zS,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Eu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),DB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Eu));function VS(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,R9(h,o,void 0,i),i.currentTarget=null}function qS(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],E=h.event;h=h.listeners;e:{var T=void 0;if(o)for(var S=h.length-1;0<=S;S--){var L=h[S],H=L.instance,Z=L.currentTarget;if(L=L.listener,H!==T&&E.isPropagationStopped())break e;VS(E,L,Z),T=H}else for(S=0;S<h.length;S++){if(L=h[S],H=L.instance,Z=L.currentTarget,L=L.listener,H!==T&&E.isPropagationStopped())break e;VS(E,L,Z),T=H}}}if(gc)throw i=wp,gc=!1,wp=null,i}function _t(i,o){var l=o[tm];l===void 0&&(l=o[tm]=new Set);var h=i+"__bubble";l.has(h)||(YS(o,i,2,!1),l.add(h))}function Wp(i,o,l){var h=0;o&&(h|=4),YS(l,i,h,o)}var Rc="_reactListening"+Math.random().toString(36).slice(2);function yu(i){if(!i[Rc]){i[Rc]=!0,r.forEach(function(l){l!=="selectionchange"&&(DB.has(l)||Wp(l,!1,i),Wp(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Rc]||(o[Rc]=!0,Wp("selectionchange",!1,o))}}function YS(i,o,l,h){switch(mS(o)){case 1:var E=X9;break;case 4:E=K9;break;default:E=Op}l=E.bind(null,o,l,i),E=void 0,!xp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,l,{capture:!0,passive:E}):i.addEventListener(o,l,!0):E!==void 0?i.addEventListener(o,l,{passive:E}):i.addEventListener(o,l,!1)}function Xp(i,o,l,h,E){var T=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var L=h.stateNode.containerInfo;if(L===E||L.nodeType===8&&L.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var H=S.tag;if((H===3||H===4)&&(H=S.stateNode.containerInfo,H===E||H.nodeType===8&&H.parentNode===E))return;S=S.return}for(;L!==null;){if(S=ws(L),S===null)return;if(H=S.tag,H===5||H===6){h=T=S;continue e}L=L.parentNode}}h=h.return}Q_(function(){var Z=T,ce=bp(l),pe=[];e:{var ue=jS.get(i);if(ue!==void 0){var Ae=Lp,Ne=i;switch(i){case"keypress":if(vc(l)===0)break e;case"keydown":case"keyup":Ae=dB;break;case"focusin":Ne="focus",Ae=Fp;break;case"focusout":Ne="blur",Ae=Fp;break;case"beforeblur":case"afterblur":Ae=Fp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ae=yS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ae=Z9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ae=pB;break;case BS:case US:case HS:Ae=nB;break;case zS:Ae=gB;break;case"scroll":Ae=Q9;break;case"wheel":Ae=yB;break;case"copy":case"cut":case"paste":Ae=iB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ae=bS}var Oe=(o&4)!==0,Mt=!Oe&&i==="scroll",W=Oe?ue!==null?ue+"Capture":null:ue;Oe=[];for(var j=Z,K;j!==null;){K=j;var Te=K.stateNode;if(K.tag===5&&Te!==null&&(K=Te,W!==null&&(Te=eu(j,W),Te!=null&&Oe.push(Tu(j,Te,K)))),Mt)break;j=j.return}0<Oe.length&&(ue=new Ae(ue,Ne,null,l,ce),pe.push({event:ue,listeners:Oe}))}}if((o&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",Ae=i==="mouseout"||i==="pointerout",ue&&l!==Gn&&(Ne=l.relatedTarget||l.fromElement)&&(ws(Ne)||Ne[ci]))break e;if((Ae||ue)&&(ue=ce.window===ce?ce:(ue=ce.ownerDocument)?ue.defaultView||ue.parentWindow:window,Ae?(Ne=l.relatedTarget||l.toElement,Ae=Z,Ne=Ne?ws(Ne):null,Ne!==null&&(Mt=xs(Ne),Ne!==Mt||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(Ae=null,Ne=Z),Ae!==Ne)){if(Oe=yS,Te="onMouseLeave",W="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(Oe=bS,Te="onPointerLeave",W="onPointerEnter",j="pointer"),Mt=Ae==null?ue:Fo(Ae),K=Ne==null?ue:Fo(Ne),ue=new Oe(Te,j+"leave",Ae,l,ce),ue.target=Mt,ue.relatedTarget=K,Te=null,ws(ce)===Z&&(Oe=new Oe(W,j+"enter",Ne,l,ce),Oe.target=K,Oe.relatedTarget=Mt,Te=Oe),Mt=Te,Ae&&Ne)t:{for(Oe=Ae,W=Ne,j=0,K=Oe;K;K=Do(K))j++;for(K=0,Te=W;Te;Te=Do(Te))K++;for(;0<j-K;)Oe=Do(Oe),j--;for(;0<K-j;)W=Do(W),K--;for(;j--;){if(Oe===W||W!==null&&Oe===W.alternate)break t;Oe=Do(Oe),W=Do(W)}Oe=null}else Oe=null;Ae!==null&&GS(pe,ue,Ae,Oe,!1),Ne!==null&&Mt!==null&&GS(pe,Mt,Ne,Oe,!0)}}e:{if(ue=Z?Fo(Z):window,Ae=ue.nodeName&&ue.nodeName.toLowerCase(),Ae==="select"||Ae==="input"&&ue.type==="file")var Le=AB;else if(CS(ue))if(kS)Le=NB;else{Le=vB;var ze=CB}else(Ae=ue.nodeName)&&Ae.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Le=kB);if(Le&&(Le=Le(i,Z))){vS(pe,Le,l,ce);break e}ze&&ze(i,ue,Z),i==="focusout"&&(ze=ue._wrapperState)&&ze.controlled&&ue.type==="number"&&on(ue,"number",ue.value)}switch(ze=Z?Fo(Z):window,i){case"focusin":(CS(ze)||ze.contentEditable==="true")&&(Ro=ze,$p=Z,gu=null);break;case"focusout":gu=$p=Ro=null;break;case"mousedown":Vp=!0;break;case"contextmenu":case"mouseup":case"dragend":Vp=!1,MS(pe,l,ce);break;case"selectionchange":if(IB)break;case"keydown":case"keyup":MS(pe,l,ce)}var je;if(Up)e:{switch(i){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else Io?wS(i,l)&&(Ge="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ge="onCompositionStart");Ge&&(_S&&l.locale!=="ko"&&(Io||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&Io&&(je=gS()):(Di=ce,Rp="value"in Di?Di.value:Di.textContent,Io=!0)),ze=Lc(Z,Ge),0<ze.length&&(Ge=new TS(Ge,i,null,l,ce),pe.push({event:Ge,listeners:ze}),je?Ge.data=je:(je=AS(l),je!==null&&(Ge.data=je)))),(je=bB?_B(i,l):SB(i,l))&&(Z=Lc(Z,"onBeforeInput"),0<Z.length&&(ce=new TS("onBeforeInput","beforeinput",null,l,ce),pe.push({event:ce,listeners:Z}),ce.data=je))}qS(pe,o)})}function Tu(i,o,l){return{instance:i,listener:o,currentTarget:l}}function Lc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=eu(i,l),T!=null&&h.unshift(Tu(i,T,E)),T=eu(i,o),T!=null&&h.push(Tu(i,T,E))),i=i.return}return h}function Do(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function GS(i,o,l,h,E){for(var T=o._reactName,S=[];l!==null&&l!==h;){var L=l,H=L.alternate,Z=L.stateNode;if(H!==null&&H===h)break;L.tag===5&&Z!==null&&(L=Z,E?(H=eu(l,T),H!=null&&S.unshift(Tu(l,H,L))):E||(H=eu(l,T),H!=null&&S.push(Tu(l,H,L)))),l=l.return}S.length!==0&&i.push({event:o,listeners:S})}var MB=/\r\n?/g,FB=/\u0000|\uFFFD/g;function WS(i){return(typeof i=="string"?i:""+i).replace(MB,`
15
- `).replace(FB,"")}function Dc(i,o,l){if(o=WS(o),WS(i)!==o&&l)throw Error(n(425))}function Mc(){}var Kp=null,Qp=null;function Jp(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Zp=typeof setTimeout=="function"?setTimeout:void 0,BB=typeof clearTimeout=="function"?clearTimeout:void 0,XS=typeof Promise=="function"?Promise:void 0,UB=typeof queueMicrotask=="function"?queueMicrotask:typeof XS!="undefined"?function(i){return XS.resolve(null).then(i).catch(HB)}:Zp;function HB(i){setTimeout(function(){throw i})}function em(i,o){var l=o,h=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(h===0){i.removeChild(E),lu(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);lu(o)}function Fi(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function KS(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return i;o--}else l==="/$"&&o++}i=i.previousSibling}return null}var Mo=Math.random().toString(36).slice(2),Gr="__reactFiber$"+Mo,bu="__reactProps$"+Mo,ci="__reactContainer$"+Mo,tm="__reactEvents$"+Mo,zB="__reactListeners$"+Mo,jB="__reactHandles$"+Mo;function ws(i){var o=i[Gr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[ci]||l[Gr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=KS(i);i!==null;){if(l=i[Gr])return l;i=KS(i)}return o}i=l,l=i.parentNode}return null}function _u(i){return i=i[Gr]||i[ci],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Fo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Fc(i){return i[bu]||null}var nm=[],Bo=-1;function Bi(i){return{current:i}}function St(i){0>Bo||(i.current=nm[Bo],nm[Bo]=null,Bo--)}function gt(i,o){Bo++,nm[Bo]=i.current,i.current=o}var Ui={},Tn=Bi(Ui),Bn=Bi(!1),As=Ui;function Uo(i,o){var l=i.type.contextTypes;if(!l)return Ui;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in l)E[T]=o[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Un(i){return i=i.childContextTypes,i!=null}function Bc(){St(Bn),St(Tn)}function QS(i,o,l){if(Tn.current!==Ui)throw Error(n(168));gt(Tn,o),gt(Bn,l)}function JS(i,o,l){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Re(i)||"Unknown",E));return k({},l,h)}function Uc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ui,As=Tn.current,gt(Tn,i),gt(Bn,Bn.current),!0}function ZS(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=JS(i,o,As),h.__reactInternalMemoizedMergedChildContext=i,St(Bn),St(Tn),gt(Tn,i)):St(Bn),gt(Bn,l)}var di=null,Hc=!1,rm=!1;function ex(i){di===null?di=[i]:di.push(i)}function $B(i){Hc=!0,ex(i)}function Hi(){if(!rm&&di!==null){rm=!0;var i=0,o=lt;try{var l=di;for(lt=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}di=null,Hc=!1}catch(E){throw di!==null&&(di=di.slice(i+1)),nS(Ap,Hi),E}finally{lt=o,rm=!1}}return null}var Ho=[],zo=0,zc=null,jc=0,or=[],ar=0,Cs=null,fi=1,hi="";function vs(i,o){Ho[zo++]=jc,Ho[zo++]=zc,zc=i,jc=o}function tx(i,o,l){or[ar++]=fi,or[ar++]=hi,or[ar++]=Cs,Cs=i;var h=fi;i=hi;var E=32-Sr(h)-1;h&=~(1<<E),l+=1;var T=32-Sr(o)+E;if(30<T){var S=E-E%5;T=(h&(1<<S)-1).toString(32),h>>=S,E-=S,fi=1<<32-Sr(o)+E|l<<E|h,hi=T+i}else fi=1<<T|l<<E|h,hi=i}function im(i){i.return!==null&&(vs(i,1),tx(i,1,0))}function sm(i){for(;i===zc;)zc=Ho[--zo],Ho[zo]=null,jc=Ho[--zo],Ho[zo]=null;for(;i===Cs;)Cs=or[--ar],or[ar]=null,hi=or[--ar],or[ar]=null,fi=or[--ar],or[ar]=null}var Xn=null,Kn=null,Ct=!1,wr=null;function nx(i,o){var l=dr(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=i,o=i.deletions,o===null?(i.deletions=[l],i.flags|=16):o.push(l)}function rx(i,o){switch(i.tag){case 5:var l=i.type;return o=o.nodeType!==1||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Xn=i,Kn=Fi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Xn=i,Kn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=Cs!==null?{id:fi,overflow:hi}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=dr(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,Xn=i,Kn=null,!0):!1;default:return!1}}function om(i){return(i.mode&1)!==0&&(i.flags&128)===0}function am(i){if(Ct){var o=Kn;if(o){var l=o;if(!rx(i,o)){if(om(i))throw Error(n(418));o=Fi(l.nextSibling);var h=Xn;o&&rx(i,o)?nx(h,l):(i.flags=i.flags&-4097|2,Ct=!1,Xn=i)}}else{if(om(i))throw Error(n(418));i.flags=i.flags&-4097|2,Ct=!1,Xn=i}}}function ix(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Xn=i}function $c(i){if(i!==Xn)return!1;if(!Ct)return ix(i),Ct=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Jp(i.type,i.memoizedProps)),o&&(o=Kn)){if(om(i))throw sx(),Error(n(418));for(;o;)nx(i,o),o=Fi(o.nextSibling)}if(ix(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(o===0){Kn=Fi(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}Kn=null}}else Kn=Xn?Fi(i.stateNode.nextSibling):null;return!0}function sx(){for(var i=Kn;i;)i=Fi(i.nextSibling)}function jo(){Kn=Xn=null,Ct=!1}function um(i){wr===null?wr=[i]:wr.push(i)}var VB=U.ReactCurrentBatchConfig;function Su(i,o,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,T=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===T?o.ref:(o=function(S){var L=E.refs;S===null?delete L[T]:L[T]=S},o._stringRef=T,o)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Vc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function ox(i){var o=i._init;return o(i._payload)}function ax(i){function o(W,j){if(i){var K=W.deletions;K===null?(W.deletions=[j],W.flags|=16):K.push(j)}}function l(W,j){if(!i)return null;for(;j!==null;)o(W,j),j=j.sibling;return null}function h(W,j){for(W=new Map;j!==null;)j.key!==null?W.set(j.key,j):W.set(j.index,j),j=j.sibling;return W}function E(W,j){return W=Wi(W,j),W.index=0,W.sibling=null,W}function T(W,j,K){return W.index=K,i?(K=W.alternate,K!==null?(K=K.index,K<j?(W.flags|=2,j):K):(W.flags|=2,j)):(W.flags|=1048576,j)}function S(W){return i&&W.alternate===null&&(W.flags|=2),W}function L(W,j,K,Te){return j===null||j.tag!==6?(j=Zm(K,W.mode,Te),j.return=W,j):(j=E(j,K),j.return=W,j)}function H(W,j,K,Te){var Le=K.type;return Le===q?ce(W,j,K.props.children,Te,K.key):j!==null&&(j.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===xe&&ox(Le)===j.type)?(Te=E(j,K.props),Te.ref=Su(W,j,K),Te.return=W,Te):(Te=pd(K.type,K.key,K.props,null,W.mode,Te),Te.ref=Su(W,j,K),Te.return=W,Te)}function Z(W,j,K,Te){return j===null||j.tag!==4||j.stateNode.containerInfo!==K.containerInfo||j.stateNode.implementation!==K.implementation?(j=e0(K,W.mode,Te),j.return=W,j):(j=E(j,K.children||[]),j.return=W,j)}function ce(W,j,K,Te,Le){return j===null||j.tag!==7?(j=Ds(K,W.mode,Te,Le),j.return=W,j):(j=E(j,K),j.return=W,j)}function pe(W,j,K){if(typeof j=="string"&&j!==""||typeof j=="number")return j=Zm(""+j,W.mode,K),j.return=W,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Y:return K=pd(j.type,j.key,j.props,null,W.mode,K),K.ref=Su(W,null,j),K.return=W,K;case R:return j=e0(j,W.mode,K),j.return=W,j;case xe:var Te=j._init;return pe(W,Te(j._payload),K)}if(Fn(j)||ie(j))return j=Ds(j,W.mode,K,null),j.return=W,j;Vc(W,j)}return null}function ue(W,j,K,Te){var Le=j!==null?j.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Le!==null?null:L(W,j,""+K,Te);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:return K.key===Le?H(W,j,K,Te):null;case R:return K.key===Le?Z(W,j,K,Te):null;case xe:return Le=K._init,ue(W,j,Le(K._payload),Te)}if(Fn(K)||ie(K))return Le!==null?null:ce(W,j,K,Te,null);Vc(W,K)}return null}function Ae(W,j,K,Te,Le){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return W=W.get(K)||null,L(j,W,""+Te,Le);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case Y:return W=W.get(Te.key===null?K:Te.key)||null,H(j,W,Te,Le);case R:return W=W.get(Te.key===null?K:Te.key)||null,Z(j,W,Te,Le);case xe:var ze=Te._init;return Ae(W,j,K,ze(Te._payload),Le)}if(Fn(Te)||ie(Te))return W=W.get(K)||null,ce(j,W,Te,Le,null);Vc(j,Te)}return null}function Ne(W,j,K,Te){for(var Le=null,ze=null,je=j,Ge=j=0,tn=null;je!==null&&Ge<K.length;Ge++){je.index>Ge?(tn=je,je=null):tn=je.sibling;var st=ue(W,je,K[Ge],Te);if(st===null){je===null&&(je=tn);break}i&&je&&st.alternate===null&&o(W,je),j=T(st,j,Ge),ze===null?Le=st:ze.sibling=st,ze=st,je=tn}if(Ge===K.length)return l(W,je),Ct&&vs(W,Ge),Le;if(je===null){for(;Ge<K.length;Ge++)je=pe(W,K[Ge],Te),je!==null&&(j=T(je,j,Ge),ze===null?Le=je:ze.sibling=je,ze=je);return Ct&&vs(W,Ge),Le}for(je=h(W,je);Ge<K.length;Ge++)tn=Ae(je,W,Ge,K[Ge],Te),tn!==null&&(i&&tn.alternate!==null&&je.delete(tn.key===null?Ge:tn.key),j=T(tn,j,Ge),ze===null?Le=tn:ze.sibling=tn,ze=tn);return i&&je.forEach(function(Xi){return o(W,Xi)}),Ct&&vs(W,Ge),Le}function Oe(W,j,K,Te){var Le=ie(K);if(typeof Le!="function")throw Error(n(150));if(K=Le.call(K),K==null)throw Error(n(151));for(var ze=Le=null,je=j,Ge=j=0,tn=null,st=K.next();je!==null&&!st.done;Ge++,st=K.next()){je.index>Ge?(tn=je,je=null):tn=je.sibling;var Xi=ue(W,je,st.value,Te);if(Xi===null){je===null&&(je=tn);break}i&&je&&Xi.alternate===null&&o(W,je),j=T(Xi,j,Ge),ze===null?Le=Xi:ze.sibling=Xi,ze=Xi,je=tn}if(st.done)return l(W,je),Ct&&vs(W,Ge),Le;if(je===null){for(;!st.done;Ge++,st=K.next())st=pe(W,st.value,Te),st!==null&&(j=T(st,j,Ge),ze===null?Le=st:ze.sibling=st,ze=st);return Ct&&vs(W,Ge),Le}for(je=h(W,je);!st.done;Ge++,st=K.next())st=Ae(je,W,Ge,st.value,Te),st!==null&&(i&&st.alternate!==null&&je.delete(st.key===null?Ge:st.key),j=T(st,j,Ge),ze===null?Le=st:ze.sibling=st,ze=st);return i&&je.forEach(function(x7){return o(W,x7)}),Ct&&vs(W,Ge),Le}function Mt(W,j,K,Te){if(typeof K=="object"&&K!==null&&K.type===q&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:e:{for(var Le=K.key,ze=j;ze!==null;){if(ze.key===Le){if(Le=K.type,Le===q){if(ze.tag===7){l(W,ze.sibling),j=E(ze,K.props.children),j.return=W,W=j;break e}}else if(ze.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===xe&&ox(Le)===ze.type){l(W,ze.sibling),j=E(ze,K.props),j.ref=Su(W,ze,K),j.return=W,W=j;break e}l(W,ze);break}else o(W,ze);ze=ze.sibling}K.type===q?(j=Ds(K.props.children,W.mode,Te,K.key),j.return=W,W=j):(Te=pd(K.type,K.key,K.props,null,W.mode,Te),Te.ref=Su(W,j,K),Te.return=W,W=Te)}return S(W);case R:e:{for(ze=K.key;j!==null;){if(j.key===ze)if(j.tag===4&&j.stateNode.containerInfo===K.containerInfo&&j.stateNode.implementation===K.implementation){l(W,j.sibling),j=E(j,K.children||[]),j.return=W,W=j;break e}else{l(W,j);break}else o(W,j);j=j.sibling}j=e0(K,W.mode,Te),j.return=W,W=j}return S(W);case xe:return ze=K._init,Mt(W,j,ze(K._payload),Te)}if(Fn(K))return Ne(W,j,K,Te);if(ie(K))return Oe(W,j,K,Te);Vc(W,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,j!==null&&j.tag===6?(l(W,j.sibling),j=E(j,K),j.return=W,W=j):(l(W,j),j=Zm(K,W.mode,Te),j.return=W,W=j),S(W)):l(W,j)}return Mt}var $o=ax(!0),ux=ax(!1),qc=Bi(null),Yc=null,Vo=null,lm=null;function cm(){lm=Vo=Yc=null}function dm(i){var o=qc.current;St(qc),i._currentValue=o}function fm(i,o,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===l)break;i=i.return}}function qo(i,o){Yc=i,lm=Vo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Hn=!0),i.firstContext=null)}function ur(i){var o=i._currentValue;if(lm!==i)if(i={context:i,memoizedValue:o,next:null},Vo===null){if(Yc===null)throw Error(n(308));Vo=i,Yc.dependencies={lanes:0,firstContext:i}}else Vo=Vo.next=i;return o}var ks=null;function hm(i){ks===null?ks=[i]:ks.push(i)}function lx(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,hm(o)):(l.next=E.next,E.next=l),o.interleaved=l,pi(i,h)}function pi(i,o){i.lanes|=o;var l=i.alternate;for(l!==null&&(l.lanes|=o),l=i,i=i.return;i!==null;)i.childLanes|=o,l=i.alternate,l!==null&&(l.childLanes|=o),l=i,i=i.return;return l.tag===3?l.stateNode:null}var zi=!1;function pm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cx(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function mi(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function ji(i,o,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,pi(i,l)}return E=h.interleaved,E===null?(o.next=o,hm(h)):(o.next=E.next,E.next=o),h.interleaved=o,pi(i,l)}function Gc(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,kp(i,l)}}function dx(i,o){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,T=null;if(l=l.firstBaseUpdate,l!==null){do{var S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};T===null?E=T=S:T=T.next=S,l=l.next}while(l!==null);T===null?E=T=o:T=T.next=o}else E=T=o;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}function Wc(i,o,l,h){var E=i.updateQueue;zi=!1;var T=E.firstBaseUpdate,S=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var H=L,Z=H.next;H.next=null,S===null?T=Z:S.next=Z,S=H;var ce=i.alternate;ce!==null&&(ce=ce.updateQueue,L=ce.lastBaseUpdate,L!==S&&(L===null?ce.firstBaseUpdate=Z:L.next=Z,ce.lastBaseUpdate=H))}if(T!==null){var pe=E.baseState;S=0,ce=Z=H=null,L=T;do{var ue=L.lane,Ae=L.eventTime;if((h&ue)===ue){ce!==null&&(ce=ce.next={eventTime:Ae,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Ne=i,Oe=L;switch(ue=o,Ae=l,Oe.tag){case 1:if(Ne=Oe.payload,typeof Ne=="function"){pe=Ne.call(Ae,pe,ue);break e}pe=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Oe.payload,ue=typeof Ne=="function"?Ne.call(Ae,pe,ue):Ne,ue==null)break e;pe=k({},pe,ue);break e;case 2:zi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[L]:ue.push(L))}else Ae={eventTime:Ae,lane:ue,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ce===null?(Z=ce=Ae,H=pe):ce=ce.next=Ae,S|=ue;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;ue=L,L=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(ce===null&&(H=pe),E.baseState=H,E.firstBaseUpdate=Z,E.lastBaseUpdate=ce,o=E.shared.interleaved,o!==null){E=o;do S|=E.lane,E=E.next;while(E!==o)}else T===null&&(E.shared.lanes=0);Os|=S,i.lanes=S,i.memoizedState=pe}}function fx(i,o,l){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var xu={},Wr=Bi(xu),wu=Bi(xu),Au=Bi(xu);function Ns(i){if(i===xu)throw Error(n(174));return i}function mm(i,o){switch(gt(Au,o),gt(wu,i),gt(Wr,xu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ge(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=ge(o,i)}St(Wr),gt(Wr,o)}function Yo(){St(Wr),St(wu),St(Au)}function hx(i){Ns(Au.current);var o=Ns(Wr.current),l=ge(o,i.type);o!==l&&(gt(wu,i),gt(Wr,l))}function gm(i){wu.current===i&&(St(Wr),St(wu))}var Nt=Bi(0);function Xc(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Em=[];function ym(){for(var i=0;i<Em.length;i++)Em[i]._workInProgressVersionPrimary=null;Em.length=0}var Kc=U.ReactCurrentDispatcher,Tm=U.ReactCurrentBatchConfig,Ps=0,Pt=null,qt=null,Zt=null,Qc=!1,Cu=!1,vu=0,qB=0;function bn(){throw Error(n(321))}function bm(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!xr(i[l],o[l]))return!1;return!0}function _m(i,o,l,h,E,T){if(Ps=T,Pt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Kc.current=i===null||i.memoizedState===null?XB:KB,i=l(h,E),Cu){T=0;do{if(Cu=!1,vu=0,25<=T)throw Error(n(301));T+=1,Zt=qt=null,o.updateQueue=null,Kc.current=QB,i=l(h,E)}while(Cu)}if(Kc.current=ed,o=qt!==null&&qt.next!==null,Ps=0,Zt=qt=Pt=null,Qc=!1,o)throw Error(n(300));return i}function Sm(){var i=vu!==0;return vu=0,i}function Xr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?Pt.memoizedState=Zt=i:Zt=Zt.next=i,Zt}function lr(){if(qt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=qt.next;var o=Zt===null?Pt.memoizedState:Zt.next;if(o!==null)Zt=o,qt=i;else{if(i===null)throw Error(n(310));qt=i,i={memoizedState:qt.memoizedState,baseState:qt.baseState,baseQueue:qt.baseQueue,queue:qt.queue,next:null},Zt===null?Pt.memoizedState=Zt=i:Zt=Zt.next=i}return Zt}function ku(i,o){return typeof o=="function"?o(i):o}function xm(i){var o=lr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=qt,E=h.baseQueue,T=l.pending;if(T!==null){if(E!==null){var S=E.next;E.next=T.next,T.next=S}h.baseQueue=E=T,l.pending=null}if(E!==null){T=E.next,h=h.baseState;var L=S=null,H=null,Z=T;do{var ce=Z.lane;if((Ps&ce)===ce)H!==null&&(H=H.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),h=Z.hasEagerState?Z.eagerState:i(h,Z.action);else{var pe={lane:ce,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};H===null?(L=H=pe,S=h):H=H.next=pe,Pt.lanes|=ce,Os|=ce}Z=Z.next}while(Z!==null&&Z!==T);H===null?S=h:H.next=L,xr(h,o.memoizedState)||(Hn=!0),o.memoizedState=h,o.baseState=S,o.baseQueue=H,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do T=E.lane,Pt.lanes|=T,Os|=T,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function wm(i){var o=lr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,T=o.memoizedState;if(E!==null){l.pending=null;var S=E=E.next;do T=i(T,S.action),S=S.next;while(S!==E);xr(T,o.memoizedState)||(Hn=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),l.lastRenderedState=T}return[T,h]}function px(){}function mx(i,o){var l=Pt,h=lr(),E=o(),T=!xr(h.memoizedState,E);if(T&&(h.memoizedState=E,Hn=!0),h=h.queue,Am(yx.bind(null,l,h,i),[i]),h.getSnapshot!==o||T||Zt!==null&&Zt.memoizedState.tag&1){if(l.flags|=2048,Nu(9,Ex.bind(null,l,h,E,o),void 0,null),en===null)throw Error(n(349));(Ps&30)!==0||gx(l,o,E)}return E}function gx(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function Ex(i,o,l,h){o.value=l,o.getSnapshot=h,Tx(o)&&bx(i)}function yx(i,o,l){return l(function(){Tx(o)&&bx(i)})}function Tx(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!xr(i,l)}catch(h){return!0}}function bx(i){var o=pi(i,1);o!==null&&kr(o,i,1,-1)}function _x(i){var o=Xr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ku,lastRenderedState:i},o.queue=i,i=i.dispatch=WB.bind(null,Pt,i),[o.memoizedState,i]}function Nu(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.lastEffect=i.next=i):(l=o.lastEffect,l===null?o.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,o.lastEffect=i)),i}function Sx(){return lr().memoizedState}function Jc(i,o,l,h){var E=Xr();Pt.flags|=i,E.memoizedState=Nu(1|o,l,void 0,h===void 0?null:h)}function Zc(i,o,l,h){var E=lr();h=h===void 0?null:h;var T=void 0;if(qt!==null){var S=qt.memoizedState;if(T=S.destroy,h!==null&&bm(h,S.deps)){E.memoizedState=Nu(o,l,T,h);return}}Pt.flags|=i,E.memoizedState=Nu(1|o,l,T,h)}function xx(i,o){return Jc(8390656,8,i,o)}function Am(i,o){return Zc(2048,8,i,o)}function wx(i,o){return Zc(4,2,i,o)}function Ax(i,o){return Zc(4,4,i,o)}function Cx(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function vx(i,o,l){return l=l!=null?l.concat([i]):null,Zc(4,4,Cx.bind(null,o,i),l)}function Cm(){}function kx(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&bm(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function Nx(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&bm(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function Px(i,o,l){return(Ps&21)===0?(i.baseState&&(i.baseState=!1,Hn=!0),i.memoizedState=l):(xr(l,o)||(l=oS(),Pt.lanes|=l,Os|=l,i.baseState=!0),o)}function YB(i,o){var l=lt;lt=l!==0&&4>l?l:4,i(!0);var h=Tm.transition;Tm.transition={};try{i(!1),o()}finally{lt=l,Tm.transition=h}}function Ox(){return lr().memoizedState}function GB(i,o,l){var h=Yi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Ix(i))Rx(o,l);else if(l=lx(i,o,l,h),l!==null){var E=Nn();kr(l,i,h,E),Lx(l,o,h)}}function WB(i,o,l){var h=Yi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ix(i))Rx(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var S=o.lastRenderedState,L=T(S,l);if(E.hasEagerState=!0,E.eagerState=L,xr(L,S)){var H=o.interleaved;H===null?(E.next=E,hm(o)):(E.next=H.next,H.next=E),o.interleaved=E;return}}catch(Z){}l=lx(i,o,E,h),l!==null&&(E=Nn(),kr(l,i,h,E),Lx(l,o,h))}}function Ix(i){var o=i.alternate;return i===Pt||o!==null&&o===Pt}function Rx(i,o){Cu=Qc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function Lx(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,kp(i,l)}}var ed={readContext:ur,useCallback:bn,useContext:bn,useEffect:bn,useImperativeHandle:bn,useInsertionEffect:bn,useLayoutEffect:bn,useMemo:bn,useReducer:bn,useRef:bn,useState:bn,useDebugValue:bn,useDeferredValue:bn,useTransition:bn,useMutableSource:bn,useSyncExternalStore:bn,useId:bn,unstable_isNewReconciler:!1},XB={readContext:ur,useCallback:function(i,o){return Xr().memoizedState=[i,o===void 0?null:o],i},useContext:ur,useEffect:xx,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,Jc(4194308,4,Cx.bind(null,o,i),l)},useLayoutEffect:function(i,o){return Jc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Jc(4,2,i,o)},useMemo:function(i,o){var l=Xr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Xr();return o=l!==void 0?l(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=GB.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var o=Xr();return i={current:i},o.memoizedState=i},useState:_x,useDebugValue:Cm,useDeferredValue:function(i){return Xr().memoizedState=i},useTransition:function(){var i=_x(!1),o=i[0];return i=YB.bind(null,i[1]),Xr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=Pt,E=Xr();if(Ct){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),en===null)throw Error(n(349));(Ps&30)!==0||gx(h,o,l)}E.memoizedState=l;var T={value:l,getSnapshot:o};return E.queue=T,xx(yx.bind(null,h,T,i),[i]),h.flags|=2048,Nu(9,Ex.bind(null,h,T,l,o),void 0,null),l},useId:function(){var i=Xr(),o=en.identifierPrefix;if(Ct){var l=hi,h=fi;l=(h&~(1<<32-Sr(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=vu++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=qB++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},KB={readContext:ur,useCallback:kx,useContext:ur,useEffect:Am,useImperativeHandle:vx,useInsertionEffect:wx,useLayoutEffect:Ax,useMemo:Nx,useReducer:xm,useRef:Sx,useState:function(){return xm(ku)},useDebugValue:Cm,useDeferredValue:function(i){var o=lr();return Px(o,qt.memoizedState,i)},useTransition:function(){var i=xm(ku)[0],o=lr().memoizedState;return[i,o]},useMutableSource:px,useSyncExternalStore:mx,useId:Ox,unstable_isNewReconciler:!1},QB={readContext:ur,useCallback:kx,useContext:ur,useEffect:Am,useImperativeHandle:vx,useInsertionEffect:wx,useLayoutEffect:Ax,useMemo:Nx,useReducer:wm,useRef:Sx,useState:function(){return wm(ku)},useDebugValue:Cm,useDeferredValue:function(i){var o=lr();return qt===null?o.memoizedState=i:Px(o,qt.memoizedState,i)},useTransition:function(){var i=wm(ku)[0],o=lr().memoizedState;return[i,o]},useMutableSource:px,useSyncExternalStore:mx,useId:Ox,unstable_isNewReconciler:!1};function Ar(i,o){if(i&&i.defaultProps){o=k({},o),i=i.defaultProps;for(var l in i)o[l]===void 0&&(o[l]=i[l]);return o}return o}function vm(i,o,l,h){o=i.memoizedState,l=l(h,o),l=l==null?o:k({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var td={isMounted:function(i){return(i=i._reactInternals)?xs(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=Nn(),E=Yi(i),T=mi(h,E);T.payload=o,l!=null&&(T.callback=l),o=ji(i,T,E),o!==null&&(kr(o,i,E,h),Gc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=Nn(),E=Yi(i),T=mi(h,E);T.tag=1,T.payload=o,l!=null&&(T.callback=l),o=ji(i,T,E),o!==null&&(kr(o,i,E,h),Gc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=Nn(),h=Yi(i),E=mi(l,h);E.tag=2,o!=null&&(E.callback=o),o=ji(i,E,h),o!==null&&(kr(o,i,h,l),Gc(o,i,h))}};function Dx(i,o,l,h,E,T,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,S):o.prototype&&o.prototype.isPureReactComponent?!mu(l,h)||!mu(E,T):!0}function Mx(i,o,l){var h=!1,E=Ui,T=o.contextType;return typeof T=="object"&&T!==null?T=ur(T):(E=Un(o)?As:Tn.current,h=o.contextTypes,T=(h=h!=null)?Uo(i,E):Ui),o=new o(l,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=td,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function Fx(i,o,l,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,h),o.state!==i&&td.enqueueReplaceState(o,o.state,null)}function km(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},pm(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=ur(T):(T=Un(o)?As:Tn.current,E.context=Uo(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(vm(i,o,T,l),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&td.enqueueReplaceState(E,E.state,null),Wc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Go(i,o){try{var l="",h=o;do l+=Ue(h),h=h.return;while(h);var E=l}catch(T){E=`
13
+ `),S=E.length-1,R=T.length-1;1<=S&&0<=R&&E[S]!==T[R];)R--;for(;1<=S&&0<=R;S--,R--)if(E[S]!==T[R]){if(S!==1||R!==1)do if(S--,R--,0>R||E[S]!==T[R]){var U=`
14
+ `+E[S].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=S&&0<=R);break}}}finally{I=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?ee(i):""}function Ue(i){switch(i.tag){case 5:return ee(i.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function ye(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case q:return"Fragment";case L:return"Portal";case de:return"Profiler";case ne:return"StrictMode";case ve:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case V:return(i._context.displayName||"Context")+".Provider";case pe:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case oe:return o=i.displayName||null,o!==null?o:ye(i.type)||"Memo";case xe:o=i._payload,i=i._init;try{return ye(i(o))}catch(l){}}return null}function Re(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(o);case 8:return o===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function He(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ye(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function bt(i){var o=Ye(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,T=l.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,T.call(this,S)}}),Object.defineProperty(i,o,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Cn(i){i._valueTracker||(i._valueTracker=bt(i))}function sn(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return i&&(h=Ye(i)?i.checked?"true":"false":i.value),i=h,i!==l?(o.setValue(i),!0):!1}function _r(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function sr(i,o){var l=o.checked;return N({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Jt(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=He(o.value!=null?o.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ve(i,o){o=o.checked,o!=null&&C(i,"checked",o,!1)}function Nt(i,o){Ve(i,o);var l=He(o.value),h=o.type;if(l!=null)h==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?on(i,o.type,l):o.hasOwnProperty("defaultValue")&&on(i,o.type,He(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function vn(i,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,l||o===i.value||(i.value=o),i.defaultValue=o}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function on(i,o,l){(o!=="number"||_r(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Fn=Array.isArray;function we(i,o,l,h){if(i=i.options,o){o={};for(var E=0;E<l.length;E++)o["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=o.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+He(l),o=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function Pe(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Me(i,o){var l=o.value;if(l==null){if(l=o.children,o=o.defaultValue,l!=null){if(o!=null)throw Error(n(92));if(Fn(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:He(l)}}function rt(i,o){var l=He(o.value),h=He(o.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),o.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function ht(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function J(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ge(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?J(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,qe=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,l,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function Ie(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var ut={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Vt=["Webkit","ms","Moz","O"];Object.keys(ut).forEach(function(i){Vt.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),ut[o]=ut[i]})});function Ht(i,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||ut.hasOwnProperty(i)&&ut[i]?(""+o).trim():o+"px"}function an(i,o){i=i.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=Ht(l,o[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var Vr=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function un(i,o){if(o){if(Vr[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function qr(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gn=null;function _p(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Sp=null,No=null,ko=null;function G_(i){if(i=Su(i)){if(typeof Sp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Fc(o),Sp(i.stateNode,i.type,o))}}function W_(i){No?ko?ko.push(i):ko=[i]:No=i}function X_(){if(No){var i=No,o=ko;if(ko=No=null,G_(i),o)for(i=0;i<o.length;i++)G_(o[i])}}function K_(i,o){return i(o)}function Q_(){}var xp=!1;function J_(i,o,l){if(xp)return i(o,l);xp=!0;try{return K_(i,o,l)}finally{xp=!1,(No!==null||ko!==null)&&(Q_(),X_())}}function tu(i,o){var l=i.stateNode;if(l===null)return null;var h=Fc(l);if(h===null)return null;l=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,o,typeof l));return l}var wp=!1;if(c)try{var nu={};Object.defineProperty(nu,"passive",{get:function(){wp=!0}}),window.addEventListener("test",nu,nu),window.removeEventListener("test",nu,nu)}catch(i){wp=!1}function R9(i,o,l,h,E,T,S,R,U){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(l,Z)}catch(ce){this.onError(ce)}}var ru=!1,mc=null,gc=!1,Ap=null,L9={onError:function(i){ru=!0,mc=i}};function D9(i,o,l,h,E,T,S,R,U){ru=!1,mc=null,R9.apply(L9,arguments)}function M9(i,o,l,h,E,T,S,R,U){if(D9.apply(this,arguments),ru){if(ru){var Z=mc;ru=!1,mc=null}else throw Error(n(198));gc||(gc=!0,Ap=Z)}}function xs(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function Z_(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function eS(i){if(xs(i)!==i)throw Error(n(188))}function F9(i){var o=i.alternate;if(!o){if(o=xs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var l=i,h=o;;){var E=l.return;if(E===null)break;var T=E.alternate;if(T===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===l)return eS(E),i;if(T===h)return eS(E),o;T=T.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=T;else{for(var S=!1,R=E.child;R;){if(R===l){S=!0,l=E,h=T;break}if(R===h){S=!0,h=E,l=T;break}R=R.sibling}if(!S){for(R=T.child;R;){if(R===l){S=!0,l=T,h=E;break}if(R===h){S=!0,h=T,l=E;break}R=R.sibling}if(!S)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:o}function tS(i){return i=F9(i),i!==null?nS(i):null}function nS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=nS(i);if(o!==null)return o;i=i.sibling}return null}var rS=t.unstable_scheduleCallback,iS=t.unstable_cancelCallback,B9=t.unstable_shouldYield,U9=t.unstable_requestPaint,Dt=t.unstable_now,H9=t.unstable_getCurrentPriorityLevel,Cp=t.unstable_ImmediatePriority,sS=t.unstable_UserBlockingPriority,Ec=t.unstable_NormalPriority,z9=t.unstable_LowPriority,oS=t.unstable_IdlePriority,yc=null,Yr=null;function j9(i){if(Yr&&typeof Yr.onCommitFiberRoot=="function")try{Yr.onCommitFiberRoot(yc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var Sr=Math.clz32?Math.clz32:q9,$9=Math.log,V9=Math.LN2;function q9(i){return i>>>=0,i===0?32:31-($9(i)/V9|0)|0}var Tc=64,bc=4194304;function iu(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function _c(i,o){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,S=l&268435455;if(S!==0){var R=S&~E;R!==0?h=iu(R):(T&=S,T!==0&&(h=iu(T)))}else S=l&~E,S!==0?h=iu(S):T!==0&&(h=iu(T));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((h&4)!==0&&(h|=l&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)l=31-Sr(o),E=1<<l,h|=i[l],o&=~E;return h}function Y9(i,o){switch(i){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function G9(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var S=31-Sr(T),R=1<<S,U=E[S];U===-1?((R&l)===0||(R&h)!==0)&&(E[S]=Y9(R,o)):U<=o&&(i.expiredLanes|=R),T&=~R}}function vp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function aS(){var i=Tc;return Tc<<=1,(Tc&4194240)===0&&(Tc=64),i}function Np(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function su(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-Sr(o),i[o]=l}function W9(i,o){var l=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-Sr(l),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~T}}function kp(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-Sr(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var lt=0;function uS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var lS,Pp,cS,dS,fS,Op=!1,Sc=[],Oi=null,Ii=null,Ri=null,ou=new Map,au=new Map,Li=[],X9="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function hS(i,o){switch(i){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Ii=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":ou.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":au.delete(o.pointerId)}}function uu(i,o,l,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:l,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},o!==null&&(o=Su(o),o!==null&&Pp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function K9(i,o,l,h,E){switch(o){case"focusin":return Oi=uu(Oi,i,o,l,h,E),!0;case"dragenter":return Ii=uu(Ii,i,o,l,h,E),!0;case"mouseover":return Ri=uu(Ri,i,o,l,h,E),!0;case"pointerover":var T=E.pointerId;return ou.set(T,uu(ou.get(T)||null,i,o,l,h,E)),!0;case"gotpointercapture":return T=E.pointerId,au.set(T,uu(au.get(T)||null,i,o,l,h,E)),!0}return!1}function pS(i){var o=ws(i.target);if(o!==null){var l=xs(o);if(l!==null){if(o=l.tag,o===13){if(o=Z_(l),o!==null){i.blockedOn=o,fS(i.priority,function(){cS(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function xc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=Rp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Gn=h,l.target.dispatchEvent(h),Gn=null}else return o=Su(l),o!==null&&Pp(o),i.blockedOn=l,!1;o.shift()}return!0}function mS(i,o,l){xc(i)&&l.delete(o)}function Q9(){Op=!1,Oi!==null&&xc(Oi)&&(Oi=null),Ii!==null&&xc(Ii)&&(Ii=null),Ri!==null&&xc(Ri)&&(Ri=null),ou.forEach(mS),au.forEach(mS)}function lu(i,o){i.blockedOn===o&&(i.blockedOn=null,Op||(Op=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Q9)))}function cu(i){function o(E){return lu(E,i)}if(0<Sc.length){lu(Sc[0],i);for(var l=1;l<Sc.length;l++){var h=Sc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Oi!==null&&lu(Oi,i),Ii!==null&&lu(Ii,i),Ri!==null&&lu(Ri,i),ou.forEach(o),au.forEach(o),l=0;l<Li.length;l++)h=Li[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Li.length&&(l=Li[0],l.blockedOn===null);)pS(l),l.blockedOn===null&&Li.shift()}var Po=H.ReactCurrentBatchConfig,wc=!0;function J9(i,o,l,h){var E=lt,T=Po.transition;Po.transition=null;try{lt=1,Ip(i,o,l,h)}finally{lt=E,Po.transition=T}}function Z9(i,o,l,h){var E=lt,T=Po.transition;Po.transition=null;try{lt=4,Ip(i,o,l,h)}finally{lt=E,Po.transition=T}}function Ip(i,o,l,h){if(wc){var E=Rp(i,o,l,h);if(E===null)Kp(i,o,h,Ac,l),hS(i,h);else if(K9(E,i,o,l,h))h.stopPropagation();else if(hS(i,h),o&4&&-1<X9.indexOf(i)){for(;E!==null;){var T=Su(E);if(T!==null&&lS(T),T=Rp(i,o,l,h),T===null&&Kp(i,o,h,Ac,l),T===E)break;E=T}E!==null&&h.stopPropagation()}else Kp(i,o,h,null,l)}}var Ac=null;function Rp(i,o,l,h){if(Ac=null,i=_p(h),i=ws(i),i!==null)if(o=xs(i),o===null)i=null;else if(l=o.tag,l===13){if(i=Z_(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return Ac=i,null}function gS(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(H9()){case Cp:return 1;case sS:return 4;case Ec:case z9:return 16;case oS:return 536870912;default:return 16}default:return 16}}var Di=null,Lp=null,Cc=null;function ES(){if(Cc)return Cc;var i,o=Lp,l=o.length,h,E="value"in Di?Di.value:Di.textContent,T=E.length;for(i=0;i<l&&o[i]===E[i];i++);var S=l-i;for(h=1;h<=S&&o[l-h]===E[T-h];h++);return Cc=E.slice(i,1<h?1-h:void 0)}function vc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function Nc(){return!0}function yS(){return!1}function Wn(i){function o(l,h,E,T,S){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=S,this.currentTarget=null;for(var R in i)i.hasOwnProperty(R)&&(l=i[R],this[R]=l?l(T):T[R]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Nc:yS,this.isPropagationStopped=yS,this}return N(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Nc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Nc)},persist:function(){},isPersistent:Nc}),o}var Oo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dp=Wn(Oo),du=N({},Oo,{view:0,detail:0}),eB=Wn(du),Mp,Fp,fu,kc=N({},du,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Up,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==fu&&(fu&&i.type==="mousemove"?(Mp=i.screenX-fu.screenX,Fp=i.screenY-fu.screenY):Fp=Mp=0,fu=i),Mp)},movementY:function(i){return"movementY"in i?i.movementY:Fp}}),TS=Wn(kc),tB=N({},kc,{dataTransfer:0}),nB=Wn(tB),rB=N({},du,{relatedTarget:0}),Bp=Wn(rB),iB=N({},Oo,{animationName:0,elapsedTime:0,pseudoElement:0}),sB=Wn(iB),oB=N({},Oo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),aB=Wn(oB),uB=N({},Oo,{data:0}),bS=Wn(uB),lB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},dB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=dB[i])?!!o[i]:!1}function Up(){return fB}var hB=N({},du,{key:function(i){if(i.key){var o=lB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=vc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?cB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Up,charCode:function(i){return i.type==="keypress"?vc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?vc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),pB=Wn(hB),mB=N({},kc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_S=Wn(mB),gB=N({},du,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Up}),EB=Wn(gB),yB=N({},Oo,{propertyName:0,elapsedTime:0,pseudoElement:0}),TB=Wn(yB),bB=N({},kc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),_B=Wn(bB),SB=[9,13,27,32],Hp=c&&"CompositionEvent"in window,hu=null;c&&"documentMode"in document&&(hu=document.documentMode);var xB=c&&"TextEvent"in window&&!hu,SS=c&&(!Hp||hu&&8<hu&&11>=hu),xS=" ",wS=!1;function AS(i,o){switch(i){case"keyup":return SB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Io=!1;function wB(i,o){switch(i){case"compositionend":return CS(o);case"keypress":return o.which!==32?null:(wS=!0,xS);case"textInput":return i=o.data,i===xS&&wS?null:i;default:return null}}function AB(i,o){if(Io)return i==="compositionend"||!Hp&&AS(i,o)?(i=ES(),Cc=Lp=Di=null,Io=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return SS&&o.locale!=="ko"?null:o.data;default:return null}}var CB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function vS(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!CB[i.type]:o==="textarea"}function NS(i,o,l,h){W_(h),o=Lc(o,"onChange"),0<o.length&&(l=new Dp("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var pu=null,mu=null;function vB(i){YS(i,0)}function Pc(i){var o=Fo(i);if(sn(o))return i}function NB(i,o){if(i==="change")return o}var kS=!1;if(c){var zp;if(c){var jp="oninput"in document;if(!jp){var PS=document.createElement("div");PS.setAttribute("oninput","return;"),jp=typeof PS.oninput=="function"}zp=jp}else zp=!1;kS=zp&&(!document.documentMode||9<document.documentMode)}function OS(){pu&&(pu.detachEvent("onpropertychange",IS),mu=pu=null)}function IS(i){if(i.propertyName==="value"&&Pc(mu)){var o=[];NS(o,mu,i,_p(i)),J_(vB,o)}}function kB(i,o,l){i==="focusin"?(OS(),pu=o,mu=l,pu.attachEvent("onpropertychange",IS)):i==="focusout"&&OS()}function PB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Pc(mu)}function OB(i,o){if(i==="click")return Pc(o)}function IB(i,o){if(i==="input"||i==="change")return Pc(o)}function RB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var xr=typeof Object.is=="function"?Object.is:RB;function gu(i,o){if(xr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),h=Object.keys(o);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(o,E)||!xr(i[E],o[E]))return!1}return!0}function RS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function LS(i,o){var l=RS(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=o&&h>=o)return{node:l,offset:o-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=RS(l)}}function DS(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?DS(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function MS(){for(var i=window,o=_r();o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=o.contentWindow;else break;o=_r(i.document)}return o}function $p(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function LB(i){var o=MS(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&DS(l.ownerDocument.documentElement,l)){if(h!==null&&$p(l)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(i,l.value.length);else if(i=(o=l.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=LS(l,T);var S=LS(l,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),T>h?(i.addRange(o),i.extend(S.node,S.offset)):(o.setEnd(S.node,S.offset),i.addRange(o)))}}for(o=[],i=l;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<o.length;l++)i=o[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var DB=c&&"documentMode"in document&&11>=document.documentMode,Ro=null,Vp=null,Eu=null,qp=!1;function FS(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;qp||Ro==null||Ro!==_r(h)||(h=Ro,"selectionStart"in h&&$p(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Eu&&gu(Eu,h)||(Eu=h,h=Lc(Vp,"onSelect"),0<h.length&&(o=new Dp("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=Ro)))}function Oc(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var Lo={animationend:Oc("Animation","AnimationEnd"),animationiteration:Oc("Animation","AnimationIteration"),animationstart:Oc("Animation","AnimationStart"),transitionend:Oc("Transition","TransitionEnd")},Yp={},BS={};c&&(BS=document.createElement("div").style,"AnimationEvent"in window||(delete Lo.animationend.animation,delete Lo.animationiteration.animation,delete Lo.animationstart.animation),"TransitionEvent"in window||delete Lo.transitionend.transition);function Ic(i){if(Yp[i])return Yp[i];if(!Lo[i])return i;var o=Lo[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in BS)return Yp[i]=o[l];return i}var US=Ic("animationend"),HS=Ic("animationiteration"),zS=Ic("animationstart"),jS=Ic("transitionend"),$S=new Map,VS="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Mi(i,o){$S.set(i,o),a(o,[i])}for(var Gp=0;Gp<VS.length;Gp++){var Wp=VS[Gp],MB=Wp.toLowerCase(),FB=Wp[0].toUpperCase()+Wp.slice(1);Mi(MB,"on"+FB)}Mi(US,"onAnimationEnd"),Mi(HS,"onAnimationIteration"),Mi(zS,"onAnimationStart"),Mi("dblclick","onDoubleClick"),Mi("focusin","onFocus"),Mi("focusout","onBlur"),Mi(jS,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),BB=new Set("cancel close invalid load scroll toggle".split(" ").concat(yu));function qS(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,M9(h,o,void 0,i),i.currentTarget=null}function YS(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],E=h.event;h=h.listeners;e:{var T=void 0;if(o)for(var S=h.length-1;0<=S;S--){var R=h[S],U=R.instance,Z=R.currentTarget;if(R=R.listener,U!==T&&E.isPropagationStopped())break e;qS(E,R,Z),T=U}else for(S=0;S<h.length;S++){if(R=h[S],U=R.instance,Z=R.currentTarget,R=R.listener,U!==T&&E.isPropagationStopped())break e;qS(E,R,Z),T=U}}}if(gc)throw i=Ap,gc=!1,Ap=null,i}function _t(i,o){var l=o[nm];l===void 0&&(l=o[nm]=new Set);var h=i+"__bubble";l.has(h)||(GS(o,i,2,!1),l.add(h))}function Xp(i,o,l){var h=0;o&&(h|=4),GS(l,i,h,o)}var Rc="_reactListening"+Math.random().toString(36).slice(2);function Tu(i){if(!i[Rc]){i[Rc]=!0,r.forEach(function(l){l!=="selectionchange"&&(BB.has(l)||Xp(l,!1,i),Xp(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Rc]||(o[Rc]=!0,Xp("selectionchange",!1,o))}}function GS(i,o,l,h){switch(gS(o)){case 1:var E=J9;break;case 4:E=Z9;break;default:E=Ip}l=E.bind(null,o,l,i),E=void 0,!wp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,l,{capture:!0,passive:E}):i.addEventListener(o,l,!0):E!==void 0?i.addEventListener(o,l,{passive:E}):i.addEventListener(o,l,!1)}function Kp(i,o,l,h,E){var T=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var R=h.stateNode.containerInfo;if(R===E||R.nodeType===8&&R.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var U=S.tag;if((U===3||U===4)&&(U=S.stateNode.containerInfo,U===E||U.nodeType===8&&U.parentNode===E))return;S=S.return}for(;R!==null;){if(S=ws(R),S===null)return;if(U=S.tag,U===5||U===6){h=T=S;continue e}R=R.parentNode}}h=h.return}J_(function(){var Z=T,ce=_p(l),me=[];e:{var ue=$S.get(i);if(ue!==void 0){var Ae=Dp,ke=i;switch(i){case"keypress":if(vc(l)===0)break e;case"keydown":case"keyup":Ae=pB;break;case"focusin":ke="focus",Ae=Bp;break;case"focusout":ke="blur",Ae=Bp;break;case"beforeblur":case"afterblur":Ae=Bp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ae=TS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ae=nB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ae=EB;break;case US:case HS:case zS:Ae=sB;break;case jS:Ae=TB;break;case"scroll":Ae=eB;break;case"wheel":Ae=_B;break;case"copy":case"cut":case"paste":Ae=aB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ae=_S}var Oe=(o&4)!==0,Mt=!Oe&&i==="scroll",W=Oe?ue!==null?ue+"Capture":null:ue;Oe=[];for(var j=Z,K;j!==null;){K=j;var Te=K.stateNode;if(K.tag===5&&Te!==null&&(K=Te,W!==null&&(Te=tu(j,W),Te!=null&&Oe.push(bu(j,Te,K)))),Mt)break;j=j.return}0<Oe.length&&(ue=new Ae(ue,ke,null,l,ce),me.push({event:ue,listeners:Oe}))}}if((o&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",Ae=i==="mouseout"||i==="pointerout",ue&&l!==Gn&&(ke=l.relatedTarget||l.fromElement)&&(ws(ke)||ke[ci]))break e;if((Ae||ue)&&(ue=ce.window===ce?ce:(ue=ce.ownerDocument)?ue.defaultView||ue.parentWindow:window,Ae?(ke=l.relatedTarget||l.toElement,Ae=Z,ke=ke?ws(ke):null,ke!==null&&(Mt=xs(ke),ke!==Mt||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(Ae=null,ke=Z),Ae!==ke)){if(Oe=TS,Te="onMouseLeave",W="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(Oe=_S,Te="onPointerLeave",W="onPointerEnter",j="pointer"),Mt=Ae==null?ue:Fo(Ae),K=ke==null?ue:Fo(ke),ue=new Oe(Te,j+"leave",Ae,l,ce),ue.target=Mt,ue.relatedTarget=K,Te=null,ws(ce)===Z&&(Oe=new Oe(W,j+"enter",ke,l,ce),Oe.target=K,Oe.relatedTarget=Mt,Te=Oe),Mt=Te,Ae&&ke)t:{for(Oe=Ae,W=ke,j=0,K=Oe;K;K=Do(K))j++;for(K=0,Te=W;Te;Te=Do(Te))K++;for(;0<j-K;)Oe=Do(Oe),j--;for(;0<K-j;)W=Do(W),K--;for(;j--;){if(Oe===W||W!==null&&Oe===W.alternate)break t;Oe=Do(Oe),W=Do(W)}Oe=null}else Oe=null;Ae!==null&&WS(me,ue,Ae,Oe,!1),ke!==null&&Mt!==null&&WS(me,Mt,ke,Oe,!0)}}e:{if(ue=Z?Fo(Z):window,Ae=ue.nodeName&&ue.nodeName.toLowerCase(),Ae==="select"||Ae==="input"&&ue.type==="file")var Le=NB;else if(vS(ue))if(kS)Le=IB;else{Le=PB;var ze=kB}else(Ae=ue.nodeName)&&Ae.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Le=OB);if(Le&&(Le=Le(i,Z))){NS(me,Le,l,ce);break e}ze&&ze(i,ue,Z),i==="focusout"&&(ze=ue._wrapperState)&&ze.controlled&&ue.type==="number"&&on(ue,"number",ue.value)}switch(ze=Z?Fo(Z):window,i){case"focusin":(vS(ze)||ze.contentEditable==="true")&&(Ro=ze,Vp=Z,Eu=null);break;case"focusout":Eu=Vp=Ro=null;break;case"mousedown":qp=!0;break;case"contextmenu":case"mouseup":case"dragend":qp=!1,FS(me,l,ce);break;case"selectionchange":if(DB)break;case"keydown":case"keyup":FS(me,l,ce)}var je;if(Hp)e:{switch(i){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else Io?AS(i,l)&&(Ge="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ge="onCompositionStart");Ge&&(SS&&l.locale!=="ko"&&(Io||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&Io&&(je=ES()):(Di=ce,Lp="value"in Di?Di.value:Di.textContent,Io=!0)),ze=Lc(Z,Ge),0<ze.length&&(Ge=new bS(Ge,i,null,l,ce),me.push({event:Ge,listeners:ze}),je?Ge.data=je:(je=CS(l),je!==null&&(Ge.data=je)))),(je=xB?wB(i,l):AB(i,l))&&(Z=Lc(Z,"onBeforeInput"),0<Z.length&&(ce=new bS("onBeforeInput","beforeinput",null,l,ce),me.push({event:ce,listeners:Z}),ce.data=je))}YS(me,o)})}function bu(i,o,l){return{instance:i,listener:o,currentTarget:l}}function Lc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=tu(i,l),T!=null&&h.unshift(bu(i,T,E)),T=tu(i,o),T!=null&&h.push(bu(i,T,E))),i=i.return}return h}function Do(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function WS(i,o,l,h,E){for(var T=o._reactName,S=[];l!==null&&l!==h;){var R=l,U=R.alternate,Z=R.stateNode;if(U!==null&&U===h)break;R.tag===5&&Z!==null&&(R=Z,E?(U=tu(l,T),U!=null&&S.unshift(bu(l,U,R))):E||(U=tu(l,T),U!=null&&S.push(bu(l,U,R)))),l=l.return}S.length!==0&&i.push({event:o,listeners:S})}var UB=/\r\n?/g,HB=/\u0000|\uFFFD/g;function XS(i){return(typeof i=="string"?i:""+i).replace(UB,`
15
+ `).replace(HB,"")}function Dc(i,o,l){if(o=XS(o),XS(i)!==o&&l)throw Error(n(425))}function Mc(){}var Qp=null,Jp=null;function Zp(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var em=typeof setTimeout=="function"?setTimeout:void 0,zB=typeof clearTimeout=="function"?clearTimeout:void 0,KS=typeof Promise=="function"?Promise:void 0,jB=typeof queueMicrotask=="function"?queueMicrotask:typeof KS!="undefined"?function(i){return KS.resolve(null).then(i).catch($B)}:em;function $B(i){setTimeout(function(){throw i})}function tm(i,o){var l=o,h=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(h===0){i.removeChild(E),cu(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);cu(o)}function Fi(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function QS(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return i;o--}else l==="/$"&&o++}i=i.previousSibling}return null}var Mo=Math.random().toString(36).slice(2),Gr="__reactFiber$"+Mo,_u="__reactProps$"+Mo,ci="__reactContainer$"+Mo,nm="__reactEvents$"+Mo,VB="__reactListeners$"+Mo,qB="__reactHandles$"+Mo;function ws(i){var o=i[Gr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[ci]||l[Gr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=QS(i);i!==null;){if(l=i[Gr])return l;i=QS(i)}return o}i=l,l=i.parentNode}return null}function Su(i){return i=i[Gr]||i[ci],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Fo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Fc(i){return i[_u]||null}var rm=[],Bo=-1;function Bi(i){return{current:i}}function St(i){0>Bo||(i.current=rm[Bo],rm[Bo]=null,Bo--)}function gt(i,o){Bo++,rm[Bo]=i.current,i.current=o}var Ui={},Tn=Bi(Ui),Bn=Bi(!1),As=Ui;function Uo(i,o){var l=i.type.contextTypes;if(!l)return Ui;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in l)E[T]=o[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Un(i){return i=i.childContextTypes,i!=null}function Bc(){St(Bn),St(Tn)}function JS(i,o,l){if(Tn.current!==Ui)throw Error(n(168));gt(Tn,o),gt(Bn,l)}function ZS(i,o,l){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Re(i)||"Unknown",E));return N({},l,h)}function Uc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ui,As=Tn.current,gt(Tn,i),gt(Bn,Bn.current),!0}function ex(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=ZS(i,o,As),h.__reactInternalMemoizedMergedChildContext=i,St(Bn),St(Tn),gt(Tn,i)):St(Bn),gt(Bn,l)}var di=null,Hc=!1,im=!1;function tx(i){di===null?di=[i]:di.push(i)}function YB(i){Hc=!0,tx(i)}function Hi(){if(!im&&di!==null){im=!0;var i=0,o=lt;try{var l=di;for(lt=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}di=null,Hc=!1}catch(E){throw di!==null&&(di=di.slice(i+1)),rS(Cp,Hi),E}finally{lt=o,im=!1}}return null}var Ho=[],zo=0,zc=null,jc=0,or=[],ar=0,Cs=null,fi=1,hi="";function vs(i,o){Ho[zo++]=jc,Ho[zo++]=zc,zc=i,jc=o}function nx(i,o,l){or[ar++]=fi,or[ar++]=hi,or[ar++]=Cs,Cs=i;var h=fi;i=hi;var E=32-Sr(h)-1;h&=~(1<<E),l+=1;var T=32-Sr(o)+E;if(30<T){var S=E-E%5;T=(h&(1<<S)-1).toString(32),h>>=S,E-=S,fi=1<<32-Sr(o)+E|l<<E|h,hi=T+i}else fi=1<<T|l<<E|h,hi=i}function sm(i){i.return!==null&&(vs(i,1),nx(i,1,0))}function om(i){for(;i===zc;)zc=Ho[--zo],Ho[zo]=null,jc=Ho[--zo],Ho[zo]=null;for(;i===Cs;)Cs=or[--ar],or[ar]=null,hi=or[--ar],or[ar]=null,fi=or[--ar],or[ar]=null}var Xn=null,Kn=null,Ct=!1,wr=null;function rx(i,o){var l=dr(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=i,o=i.deletions,o===null?(i.deletions=[l],i.flags|=16):o.push(l)}function ix(i,o){switch(i.tag){case 5:var l=i.type;return o=o.nodeType!==1||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Xn=i,Kn=Fi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Xn=i,Kn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=Cs!==null?{id:fi,overflow:hi}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=dr(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,Xn=i,Kn=null,!0):!1;default:return!1}}function am(i){return(i.mode&1)!==0&&(i.flags&128)===0}function um(i){if(Ct){var o=Kn;if(o){var l=o;if(!ix(i,o)){if(am(i))throw Error(n(418));o=Fi(l.nextSibling);var h=Xn;o&&ix(i,o)?rx(h,l):(i.flags=i.flags&-4097|2,Ct=!1,Xn=i)}}else{if(am(i))throw Error(n(418));i.flags=i.flags&-4097|2,Ct=!1,Xn=i}}}function sx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Xn=i}function $c(i){if(i!==Xn)return!1;if(!Ct)return sx(i),Ct=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Zp(i.type,i.memoizedProps)),o&&(o=Kn)){if(am(i))throw ox(),Error(n(418));for(;o;)rx(i,o),o=Fi(o.nextSibling)}if(sx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(o===0){Kn=Fi(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}Kn=null}}else Kn=Xn?Fi(i.stateNode.nextSibling):null;return!0}function ox(){for(var i=Kn;i;)i=Fi(i.nextSibling)}function jo(){Kn=Xn=null,Ct=!1}function lm(i){wr===null?wr=[i]:wr.push(i)}var GB=H.ReactCurrentBatchConfig;function xu(i,o,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,T=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===T?o.ref:(o=function(S){var R=E.refs;S===null?delete R[T]:R[T]=S},o._stringRef=T,o)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Vc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function ax(i){var o=i._init;return o(i._payload)}function ux(i){function o(W,j){if(i){var K=W.deletions;K===null?(W.deletions=[j],W.flags|=16):K.push(j)}}function l(W,j){if(!i)return null;for(;j!==null;)o(W,j),j=j.sibling;return null}function h(W,j){for(W=new Map;j!==null;)j.key!==null?W.set(j.key,j):W.set(j.index,j),j=j.sibling;return W}function E(W,j){return W=Wi(W,j),W.index=0,W.sibling=null,W}function T(W,j,K){return W.index=K,i?(K=W.alternate,K!==null?(K=K.index,K<j?(W.flags|=2,j):K):(W.flags|=2,j)):(W.flags|=1048576,j)}function S(W){return i&&W.alternate===null&&(W.flags|=2),W}function R(W,j,K,Te){return j===null||j.tag!==6?(j=e0(K,W.mode,Te),j.return=W,j):(j=E(j,K),j.return=W,j)}function U(W,j,K,Te){var Le=K.type;return Le===q?ce(W,j,K.props.children,Te,K.key):j!==null&&(j.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===xe&&ax(Le)===j.type)?(Te=E(j,K.props),Te.ref=xu(W,j,K),Te.return=W,Te):(Te=pd(K.type,K.key,K.props,null,W.mode,Te),Te.ref=xu(W,j,K),Te.return=W,Te)}function Z(W,j,K,Te){return j===null||j.tag!==4||j.stateNode.containerInfo!==K.containerInfo||j.stateNode.implementation!==K.implementation?(j=t0(K,W.mode,Te),j.return=W,j):(j=E(j,K.children||[]),j.return=W,j)}function ce(W,j,K,Te,Le){return j===null||j.tag!==7?(j=Ds(K,W.mode,Te,Le),j.return=W,j):(j=E(j,K),j.return=W,j)}function me(W,j,K){if(typeof j=="string"&&j!==""||typeof j=="number")return j=e0(""+j,W.mode,K),j.return=W,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Y:return K=pd(j.type,j.key,j.props,null,W.mode,K),K.ref=xu(W,null,j),K.return=W,K;case L:return j=t0(j,W.mode,K),j.return=W,j;case xe:var Te=j._init;return me(W,Te(j._payload),K)}if(Fn(j)||ie(j))return j=Ds(j,W.mode,K,null),j.return=W,j;Vc(W,j)}return null}function ue(W,j,K,Te){var Le=j!==null?j.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Le!==null?null:R(W,j,""+K,Te);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:return K.key===Le?U(W,j,K,Te):null;case L:return K.key===Le?Z(W,j,K,Te):null;case xe:return Le=K._init,ue(W,j,Le(K._payload),Te)}if(Fn(K)||ie(K))return Le!==null?null:ce(W,j,K,Te,null);Vc(W,K)}return null}function Ae(W,j,K,Te,Le){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return W=W.get(K)||null,R(j,W,""+Te,Le);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case Y:return W=W.get(Te.key===null?K:Te.key)||null,U(j,W,Te,Le);case L:return W=W.get(Te.key===null?K:Te.key)||null,Z(j,W,Te,Le);case xe:var ze=Te._init;return Ae(W,j,K,ze(Te._payload),Le)}if(Fn(Te)||ie(Te))return W=W.get(K)||null,ce(j,W,Te,Le,null);Vc(j,Te)}return null}function ke(W,j,K,Te){for(var Le=null,ze=null,je=j,Ge=j=0,tn=null;je!==null&&Ge<K.length;Ge++){je.index>Ge?(tn=je,je=null):tn=je.sibling;var st=ue(W,je,K[Ge],Te);if(st===null){je===null&&(je=tn);break}i&&je&&st.alternate===null&&o(W,je),j=T(st,j,Ge),ze===null?Le=st:ze.sibling=st,ze=st,je=tn}if(Ge===K.length)return l(W,je),Ct&&vs(W,Ge),Le;if(je===null){for(;Ge<K.length;Ge++)je=me(W,K[Ge],Te),je!==null&&(j=T(je,j,Ge),ze===null?Le=je:ze.sibling=je,ze=je);return Ct&&vs(W,Ge),Le}for(je=h(W,je);Ge<K.length;Ge++)tn=Ae(je,W,Ge,K[Ge],Te),tn!==null&&(i&&tn.alternate!==null&&je.delete(tn.key===null?Ge:tn.key),j=T(tn,j,Ge),ze===null?Le=tn:ze.sibling=tn,ze=tn);return i&&je.forEach(function(Xi){return o(W,Xi)}),Ct&&vs(W,Ge),Le}function Oe(W,j,K,Te){var Le=ie(K);if(typeof Le!="function")throw Error(n(150));if(K=Le.call(K),K==null)throw Error(n(151));for(var ze=Le=null,je=j,Ge=j=0,tn=null,st=K.next();je!==null&&!st.done;Ge++,st=K.next()){je.index>Ge?(tn=je,je=null):tn=je.sibling;var Xi=ue(W,je,st.value,Te);if(Xi===null){je===null&&(je=tn);break}i&&je&&Xi.alternate===null&&o(W,je),j=T(Xi,j,Ge),ze===null?Le=Xi:ze.sibling=Xi,ze=Xi,je=tn}if(st.done)return l(W,je),Ct&&vs(W,Ge),Le;if(je===null){for(;!st.done;Ge++,st=K.next())st=me(W,st.value,Te),st!==null&&(j=T(st,j,Ge),ze===null?Le=st:ze.sibling=st,ze=st);return Ct&&vs(W,Ge),Le}for(je=h(W,je);!st.done;Ge++,st=K.next())st=Ae(je,W,Ge,st.value,Te),st!==null&&(i&&st.alternate!==null&&je.delete(st.key===null?Ge:st.key),j=T(st,j,Ge),ze===null?Le=st:ze.sibling=st,ze=st);return i&&je.forEach(function(C7){return o(W,C7)}),Ct&&vs(W,Ge),Le}function Mt(W,j,K,Te){if(typeof K=="object"&&K!==null&&K.type===q&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:e:{for(var Le=K.key,ze=j;ze!==null;){if(ze.key===Le){if(Le=K.type,Le===q){if(ze.tag===7){l(W,ze.sibling),j=E(ze,K.props.children),j.return=W,W=j;break e}}else if(ze.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===xe&&ax(Le)===ze.type){l(W,ze.sibling),j=E(ze,K.props),j.ref=xu(W,ze,K),j.return=W,W=j;break e}l(W,ze);break}else o(W,ze);ze=ze.sibling}K.type===q?(j=Ds(K.props.children,W.mode,Te,K.key),j.return=W,W=j):(Te=pd(K.type,K.key,K.props,null,W.mode,Te),Te.ref=xu(W,j,K),Te.return=W,W=Te)}return S(W);case L:e:{for(ze=K.key;j!==null;){if(j.key===ze)if(j.tag===4&&j.stateNode.containerInfo===K.containerInfo&&j.stateNode.implementation===K.implementation){l(W,j.sibling),j=E(j,K.children||[]),j.return=W,W=j;break e}else{l(W,j);break}else o(W,j);j=j.sibling}j=t0(K,W.mode,Te),j.return=W,W=j}return S(W);case xe:return ze=K._init,Mt(W,j,ze(K._payload),Te)}if(Fn(K))return ke(W,j,K,Te);if(ie(K))return Oe(W,j,K,Te);Vc(W,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,j!==null&&j.tag===6?(l(W,j.sibling),j=E(j,K),j.return=W,W=j):(l(W,j),j=e0(K,W.mode,Te),j.return=W,W=j),S(W)):l(W,j)}return Mt}var $o=ux(!0),lx=ux(!1),qc=Bi(null),Yc=null,Vo=null,cm=null;function dm(){cm=Vo=Yc=null}function fm(i){var o=qc.current;St(qc),i._currentValue=o}function hm(i,o,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===l)break;i=i.return}}function qo(i,o){Yc=i,cm=Vo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Hn=!0),i.firstContext=null)}function ur(i){var o=i._currentValue;if(cm!==i)if(i={context:i,memoizedValue:o,next:null},Vo===null){if(Yc===null)throw Error(n(308));Vo=i,Yc.dependencies={lanes:0,firstContext:i}}else Vo=Vo.next=i;return o}var Ns=null;function pm(i){Ns===null?Ns=[i]:Ns.push(i)}function cx(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,pm(o)):(l.next=E.next,E.next=l),o.interleaved=l,pi(i,h)}function pi(i,o){i.lanes|=o;var l=i.alternate;for(l!==null&&(l.lanes|=o),l=i,i=i.return;i!==null;)i.childLanes|=o,l=i.alternate,l!==null&&(l.childLanes|=o),l=i,i=i.return;return l.tag===3?l.stateNode:null}var zi=!1;function mm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dx(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function mi(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function ji(i,o,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,pi(i,l)}return E=h.interleaved,E===null?(o.next=o,pm(h)):(o.next=E.next,E.next=o),h.interleaved=o,pi(i,l)}function Gc(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,kp(i,l)}}function fx(i,o){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,T=null;if(l=l.firstBaseUpdate,l!==null){do{var S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};T===null?E=T=S:T=T.next=S,l=l.next}while(l!==null);T===null?E=T=o:T=T.next=o}else E=T=o;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}function Wc(i,o,l,h){var E=i.updateQueue;zi=!1;var T=E.firstBaseUpdate,S=E.lastBaseUpdate,R=E.shared.pending;if(R!==null){E.shared.pending=null;var U=R,Z=U.next;U.next=null,S===null?T=Z:S.next=Z,S=U;var ce=i.alternate;ce!==null&&(ce=ce.updateQueue,R=ce.lastBaseUpdate,R!==S&&(R===null?ce.firstBaseUpdate=Z:R.next=Z,ce.lastBaseUpdate=U))}if(T!==null){var me=E.baseState;S=0,ce=Z=U=null,R=T;do{var ue=R.lane,Ae=R.eventTime;if((h&ue)===ue){ce!==null&&(ce=ce.next={eventTime:Ae,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var ke=i,Oe=R;switch(ue=o,Ae=l,Oe.tag){case 1:if(ke=Oe.payload,typeof ke=="function"){me=ke.call(Ae,me,ue);break e}me=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Oe.payload,ue=typeof ke=="function"?ke.call(Ae,me,ue):ke,ue==null)break e;me=N({},me,ue);break e;case 2:zi=!0}}R.callback!==null&&R.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[R]:ue.push(R))}else Ae={eventTime:Ae,lane:ue,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ce===null?(Z=ce=Ae,U=me):ce=ce.next=Ae,S|=ue;if(R=R.next,R===null){if(R=E.shared.pending,R===null)break;ue=R,R=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(ce===null&&(U=me),E.baseState=U,E.firstBaseUpdate=Z,E.lastBaseUpdate=ce,o=E.shared.interleaved,o!==null){E=o;do S|=E.lane,E=E.next;while(E!==o)}else T===null&&(E.shared.lanes=0);Os|=S,i.lanes=S,i.memoizedState=me}}function hx(i,o,l){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var wu={},Wr=Bi(wu),Au=Bi(wu),Cu=Bi(wu);function ks(i){if(i===wu)throw Error(n(174));return i}function gm(i,o){switch(gt(Cu,o),gt(Au,i),gt(Wr,wu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ge(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=ge(o,i)}St(Wr),gt(Wr,o)}function Yo(){St(Wr),St(Au),St(Cu)}function px(i){ks(Cu.current);var o=ks(Wr.current),l=ge(o,i.type);o!==l&&(gt(Au,i),gt(Wr,l))}function Em(i){Au.current===i&&(St(Wr),St(Au))}var kt=Bi(0);function Xc(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var ym=[];function Tm(){for(var i=0;i<ym.length;i++)ym[i]._workInProgressVersionPrimary=null;ym.length=0}var Kc=H.ReactCurrentDispatcher,bm=H.ReactCurrentBatchConfig,Ps=0,Pt=null,qt=null,Zt=null,Qc=!1,vu=!1,Nu=0,WB=0;function bn(){throw Error(n(321))}function _m(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!xr(i[l],o[l]))return!1;return!0}function Sm(i,o,l,h,E,T){if(Ps=T,Pt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Kc.current=i===null||i.memoizedState===null?JB:ZB,i=l(h,E),vu){T=0;do{if(vu=!1,Nu=0,25<=T)throw Error(n(301));T+=1,Zt=qt=null,o.updateQueue=null,Kc.current=e7,i=l(h,E)}while(vu)}if(Kc.current=ed,o=qt!==null&&qt.next!==null,Ps=0,Zt=qt=Pt=null,Qc=!1,o)throw Error(n(300));return i}function xm(){var i=Nu!==0;return Nu=0,i}function Xr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?Pt.memoizedState=Zt=i:Zt=Zt.next=i,Zt}function lr(){if(qt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=qt.next;var o=Zt===null?Pt.memoizedState:Zt.next;if(o!==null)Zt=o,qt=i;else{if(i===null)throw Error(n(310));qt=i,i={memoizedState:qt.memoizedState,baseState:qt.baseState,baseQueue:qt.baseQueue,queue:qt.queue,next:null},Zt===null?Pt.memoizedState=Zt=i:Zt=Zt.next=i}return Zt}function ku(i,o){return typeof o=="function"?o(i):o}function wm(i){var o=lr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=qt,E=h.baseQueue,T=l.pending;if(T!==null){if(E!==null){var S=E.next;E.next=T.next,T.next=S}h.baseQueue=E=T,l.pending=null}if(E!==null){T=E.next,h=h.baseState;var R=S=null,U=null,Z=T;do{var ce=Z.lane;if((Ps&ce)===ce)U!==null&&(U=U.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),h=Z.hasEagerState?Z.eagerState:i(h,Z.action);else{var me={lane:ce,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};U===null?(R=U=me,S=h):U=U.next=me,Pt.lanes|=ce,Os|=ce}Z=Z.next}while(Z!==null&&Z!==T);U===null?S=h:U.next=R,xr(h,o.memoizedState)||(Hn=!0),o.memoizedState=h,o.baseState=S,o.baseQueue=U,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do T=E.lane,Pt.lanes|=T,Os|=T,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function Am(i){var o=lr(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,T=o.memoizedState;if(E!==null){l.pending=null;var S=E=E.next;do T=i(T,S.action),S=S.next;while(S!==E);xr(T,o.memoizedState)||(Hn=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),l.lastRenderedState=T}return[T,h]}function mx(){}function gx(i,o){var l=Pt,h=lr(),E=o(),T=!xr(h.memoizedState,E);if(T&&(h.memoizedState=E,Hn=!0),h=h.queue,Cm(Tx.bind(null,l,h,i),[i]),h.getSnapshot!==o||T||Zt!==null&&Zt.memoizedState.tag&1){if(l.flags|=2048,Pu(9,yx.bind(null,l,h,E,o),void 0,null),en===null)throw Error(n(349));(Ps&30)!==0||Ex(l,o,E)}return E}function Ex(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function yx(i,o,l,h){o.value=l,o.getSnapshot=h,bx(o)&&_x(i)}function Tx(i,o,l){return l(function(){bx(o)&&_x(i)})}function bx(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!xr(i,l)}catch(h){return!0}}function _x(i){var o=pi(i,1);o!==null&&Nr(o,i,1,-1)}function Sx(i){var o=Xr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ku,lastRenderedState:i},o.queue=i,i=i.dispatch=QB.bind(null,Pt,i),[o.memoizedState,i]}function Pu(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.lastEffect=i.next=i):(l=o.lastEffect,l===null?o.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,o.lastEffect=i)),i}function xx(){return lr().memoizedState}function Jc(i,o,l,h){var E=Xr();Pt.flags|=i,E.memoizedState=Pu(1|o,l,void 0,h===void 0?null:h)}function Zc(i,o,l,h){var E=lr();h=h===void 0?null:h;var T=void 0;if(qt!==null){var S=qt.memoizedState;if(T=S.destroy,h!==null&&_m(h,S.deps)){E.memoizedState=Pu(o,l,T,h);return}}Pt.flags|=i,E.memoizedState=Pu(1|o,l,T,h)}function wx(i,o){return Jc(8390656,8,i,o)}function Cm(i,o){return Zc(2048,8,i,o)}function Ax(i,o){return Zc(4,2,i,o)}function Cx(i,o){return Zc(4,4,i,o)}function vx(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function Nx(i,o,l){return l=l!=null?l.concat([i]):null,Zc(4,4,vx.bind(null,o,i),l)}function vm(){}function kx(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&_m(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function Px(i,o){var l=lr();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&_m(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function Ox(i,o,l){return(Ps&21)===0?(i.baseState&&(i.baseState=!1,Hn=!0),i.memoizedState=l):(xr(l,o)||(l=aS(),Pt.lanes|=l,Os|=l,i.baseState=!0),o)}function XB(i,o){var l=lt;lt=l!==0&&4>l?l:4,i(!0);var h=bm.transition;bm.transition={};try{i(!1),o()}finally{lt=l,bm.transition=h}}function Ix(){return lr().memoizedState}function KB(i,o,l){var h=Yi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Rx(i))Lx(o,l);else if(l=cx(i,o,l,h),l!==null){var E=kn();Nr(l,i,h,E),Dx(l,o,h)}}function QB(i,o,l){var h=Yi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Rx(i))Lx(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var S=o.lastRenderedState,R=T(S,l);if(E.hasEagerState=!0,E.eagerState=R,xr(R,S)){var U=o.interleaved;U===null?(E.next=E,pm(o)):(E.next=U.next,U.next=E),o.interleaved=E;return}}catch(Z){}l=cx(i,o,E,h),l!==null&&(E=kn(),Nr(l,i,h,E),Dx(l,o,h))}}function Rx(i){var o=i.alternate;return i===Pt||o!==null&&o===Pt}function Lx(i,o){vu=Qc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function Dx(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,kp(i,l)}}var ed={readContext:ur,useCallback:bn,useContext:bn,useEffect:bn,useImperativeHandle:bn,useInsertionEffect:bn,useLayoutEffect:bn,useMemo:bn,useReducer:bn,useRef:bn,useState:bn,useDebugValue:bn,useDeferredValue:bn,useTransition:bn,useMutableSource:bn,useSyncExternalStore:bn,useId:bn,unstable_isNewReconciler:!1},JB={readContext:ur,useCallback:function(i,o){return Xr().memoizedState=[i,o===void 0?null:o],i},useContext:ur,useEffect:wx,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,Jc(4194308,4,vx.bind(null,o,i),l)},useLayoutEffect:function(i,o){return Jc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Jc(4,2,i,o)},useMemo:function(i,o){var l=Xr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Xr();return o=l!==void 0?l(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=KB.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var o=Xr();return i={current:i},o.memoizedState=i},useState:Sx,useDebugValue:vm,useDeferredValue:function(i){return Xr().memoizedState=i},useTransition:function(){var i=Sx(!1),o=i[0];return i=XB.bind(null,i[1]),Xr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=Pt,E=Xr();if(Ct){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),en===null)throw Error(n(349));(Ps&30)!==0||Ex(h,o,l)}E.memoizedState=l;var T={value:l,getSnapshot:o};return E.queue=T,wx(Tx.bind(null,h,T,i),[i]),h.flags|=2048,Pu(9,yx.bind(null,h,T,l,o),void 0,null),l},useId:function(){var i=Xr(),o=en.identifierPrefix;if(Ct){var l=hi,h=fi;l=(h&~(1<<32-Sr(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=Nu++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=WB++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},ZB={readContext:ur,useCallback:kx,useContext:ur,useEffect:Cm,useImperativeHandle:Nx,useInsertionEffect:Ax,useLayoutEffect:Cx,useMemo:Px,useReducer:wm,useRef:xx,useState:function(){return wm(ku)},useDebugValue:vm,useDeferredValue:function(i){var o=lr();return Ox(o,qt.memoizedState,i)},useTransition:function(){var i=wm(ku)[0],o=lr().memoizedState;return[i,o]},useMutableSource:mx,useSyncExternalStore:gx,useId:Ix,unstable_isNewReconciler:!1},e7={readContext:ur,useCallback:kx,useContext:ur,useEffect:Cm,useImperativeHandle:Nx,useInsertionEffect:Ax,useLayoutEffect:Cx,useMemo:Px,useReducer:Am,useRef:xx,useState:function(){return Am(ku)},useDebugValue:vm,useDeferredValue:function(i){var o=lr();return qt===null?o.memoizedState=i:Ox(o,qt.memoizedState,i)},useTransition:function(){var i=Am(ku)[0],o=lr().memoizedState;return[i,o]},useMutableSource:mx,useSyncExternalStore:gx,useId:Ix,unstable_isNewReconciler:!1};function Ar(i,o){if(i&&i.defaultProps){o=N({},o),i=i.defaultProps;for(var l in i)o[l]===void 0&&(o[l]=i[l]);return o}return o}function Nm(i,o,l,h){o=i.memoizedState,l=l(h,o),l=l==null?o:N({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var td={isMounted:function(i){return(i=i._reactInternals)?xs(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=kn(),E=Yi(i),T=mi(h,E);T.payload=o,l!=null&&(T.callback=l),o=ji(i,T,E),o!==null&&(Nr(o,i,E,h),Gc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=kn(),E=Yi(i),T=mi(h,E);T.tag=1,T.payload=o,l!=null&&(T.callback=l),o=ji(i,T,E),o!==null&&(Nr(o,i,E,h),Gc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=kn(),h=Yi(i),E=mi(l,h);E.tag=2,o!=null&&(E.callback=o),o=ji(i,E,h),o!==null&&(Nr(o,i,h,l),Gc(o,i,h))}};function Mx(i,o,l,h,E,T,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,S):o.prototype&&o.prototype.isPureReactComponent?!gu(l,h)||!gu(E,T):!0}function Fx(i,o,l){var h=!1,E=Ui,T=o.contextType;return typeof T=="object"&&T!==null?T=ur(T):(E=Un(o)?As:Tn.current,h=o.contextTypes,T=(h=h!=null)?Uo(i,E):Ui),o=new o(l,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=td,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function Bx(i,o,l,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,h),o.state!==i&&td.enqueueReplaceState(o,o.state,null)}function km(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},mm(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=ur(T):(T=Un(o)?As:Tn.current,E.context=Uo(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(Nm(i,o,T,l),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&td.enqueueReplaceState(E,E.state,null),Wc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Go(i,o){try{var l="",h=o;do l+=Ue(h),h=h.return;while(h);var E=l}catch(T){E=`
16
16
  Error generating stack: `+T.message+`
17
- `+T.stack}return{value:i,source:o,stack:E,digest:null}}function Nm(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function Pm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var JB=typeof WeakMap=="function"?WeakMap:Map;function Bx(i,o,l){l=mi(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){ud||(ud=!0,qm=h),Pm(i,o)},l}function Ux(i,o,l){l=mi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;l.payload=function(){return h(E)},l.callback=function(){Pm(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(l.callback=function(){Pm(i,o),typeof h!="function"&&(Vi===null?Vi=new Set([this]):Vi.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})}),l}function Hx(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new JB;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(l)||(E.add(l),i=f7.bind(null,i,o,l),o.then(i,i))}function zx(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function jx(i,o,l,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=mi(-1,1),o.tag=2,ji(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var ZB=U.ReactCurrentOwner,Hn=!1;function kn(i,o,l,h){o.child=i===null?ux(o,null,l,h):$o(o,i.child,l,h)}function $x(i,o,l,h,E){l=l.render;var T=o.ref;return qo(o,E),h=_m(i,o,l,h,T,E),l=Sm(),i!==null&&!Hn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(Ct&&l&&im(o),o.flags|=1,kn(i,o,h,E),o.child)}function Vx(i,o,l,h,E){if(i===null){var T=l.type;return typeof T=="function"&&!Jm(T)&&T.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=T,qx(i,o,T,h,E)):(i=pd(l.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,(i.lanes&E)===0){var S=T.memoizedProps;if(l=l.compare,l=l!==null?l:mu,l(S,h)&&i.ref===o.ref)return gi(i,o,E)}return o.flags|=1,i=Wi(T,h),i.ref=o.ref,i.return=o,o.child=i}function qx(i,o,l,h,E){if(i!==null){var T=i.memoizedProps;if(mu(T,h)&&i.ref===o.ref)if(Hn=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Hn=!0);else return o.lanes=i.lanes,gi(i,o,E)}return Om(i,o,l,h,E)}function Yx(i,o,l){var h=o.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},gt(Xo,Qn),Qn|=l;else{if((l&1073741824)===0)return i=T!==null?T.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,gt(Xo,Qn),Qn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:l,gt(Xo,Qn),Qn|=h}else T!==null?(h=T.baseLanes|l,o.memoizedState=null):h=l,gt(Xo,Qn),Qn|=h;return kn(i,o,E,l),o.child}function Gx(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Om(i,o,l,h,E){var T=Un(l)?As:Tn.current;return T=Uo(o,T),qo(o,E),l=_m(i,o,l,h,T,E),h=Sm(),i!==null&&!Hn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(Ct&&h&&im(o),o.flags|=1,kn(i,o,l,E),o.child)}function Wx(i,o,l,h,E){if(Un(l)){var T=!0;Uc(o)}else T=!1;if(qo(o,E),o.stateNode===null)rd(i,o),Mx(o,l,h),km(o,l,h,E),h=!0;else if(i===null){var S=o.stateNode,L=o.memoizedProps;S.props=L;var H=S.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=ur(Z):(Z=Un(l)?As:Tn.current,Z=Uo(o,Z));var ce=l.getDerivedStateFromProps,pe=typeof ce=="function"||typeof S.getSnapshotBeforeUpdate=="function";pe||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(L!==h||H!==Z)&&Fx(o,S,h,Z),zi=!1;var ue=o.memoizedState;S.state=ue,Wc(o,h,S,E),H=o.memoizedState,L!==h||ue!==H||Bn.current||zi?(typeof ce=="function"&&(vm(o,l,ce,h),H=o.memoizedState),(L=zi||Dx(o,l,L,h,ue,H,Z))?(pe||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=H),S.props=h,S.state=H,S.context=Z,h=L):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{S=o.stateNode,cx(i,o),L=o.memoizedProps,Z=o.type===o.elementType?L:Ar(o.type,L),S.props=Z,pe=o.pendingProps,ue=S.context,H=l.contextType,typeof H=="object"&&H!==null?H=ur(H):(H=Un(l)?As:Tn.current,H=Uo(o,H));var Ae=l.getDerivedStateFromProps;(ce=typeof Ae=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(L!==pe||ue!==H)&&Fx(o,S,h,H),zi=!1,ue=o.memoizedState,S.state=ue,Wc(o,h,S,E);var Ne=o.memoizedState;L!==pe||ue!==Ne||Bn.current||zi?(typeof Ae=="function"&&(vm(o,l,Ae,h),Ne=o.memoizedState),(Z=zi||Dx(o,l,Z,h,ue,Ne,H)||!1)?(ce||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Ne,H),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Ne,H)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Ne),S.props=h,S.state=Ne,S.context=H,h=Z):(typeof S.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(o.flags|=1024),h=!1)}return Im(i,o,l,h,T,E)}function Im(i,o,l,h,E,T){Gx(i,o);var S=(o.flags&128)!==0;if(!h&&!S)return E&&ZS(o,l,!1),gi(i,o,T);h=o.stateNode,ZB.current=o;var L=S&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&S?(o.child=$o(o,i.child,null,T),o.child=$o(o,null,L,T)):kn(i,o,L,T),o.memoizedState=h.state,E&&ZS(o,l,!0),o.child}function Xx(i){var o=i.stateNode;o.pendingContext?QS(i,o.pendingContext,o.pendingContext!==o.context):o.context&&QS(i,o.context,!1),mm(i,o.containerInfo)}function Kx(i,o,l,h,E){return jo(),um(E),o.flags|=256,kn(i,o,l,h),o.child}var Rm={dehydrated:null,treeContext:null,retryLane:0};function Lm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Qx(i,o,l){var h=o.pendingProps,E=Nt.current,T=!1,S=(o.flags&128)!==0,L;if((L=S)||(L=i!==null&&i.memoizedState===null?!1:(E&2)!==0),L?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),gt(Nt,E&1),i===null)return am(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(S=h.children,i=h.fallback,T?(h=o.mode,T=o.child,S={mode:"hidden",children:S},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=S):T=md(S,h,0,null),i=Ds(i,h,l,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Lm(l),o.memoizedState=Rm,i):Dm(o,S));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return e7(i,o,S,h,L,E,l);if(T){T=h.fallback,S=o.mode,E=i.child,L=E.sibling;var H={mode:"hidden",children:h.children};return(S&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=H,o.deletions=null):(h=Wi(E,H),h.subtreeFlags=E.subtreeFlags&14680064),L!==null?T=Wi(L,T):(T=Ds(T,S,l,null),T.flags|=2),T.return=o,h.return=o,h.sibling=T,o.child=h,h=T,T=o.child,S=i.child.memoizedState,S=S===null?Lm(l):{baseLanes:S.baseLanes|l,cachePool:null,transitions:S.transitions},T.memoizedState=S,T.childLanes=i.childLanes&~l,o.memoizedState=Rm,h}return T=i.child,i=T.sibling,h=Wi(T,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=l),h.return=o,h.sibling=null,i!==null&&(l=o.deletions,l===null?(o.deletions=[i],o.flags|=16):l.push(i)),o.child=h,o.memoizedState=null,h}function Dm(i,o){return o=md({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function nd(i,o,l,h){return h!==null&&um(h),$o(o,i.child,null,l),i=Dm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function e7(i,o,l,h,E,T,S){if(l)return o.flags&256?(o.flags&=-257,h=Nm(Error(n(422))),nd(i,o,S,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=md({mode:"visible",children:h.children},E,0,null),T=Ds(T,E,S,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&$o(o,i.child,null,S),o.child.memoizedState=Lm(S),o.memoizedState=Rm,T);if((o.mode&1)===0)return nd(i,o,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var L=h.dgst;return h=L,T=Error(n(419)),h=Nm(T,h,void 0),nd(i,o,S,h)}if(L=(S&i.childLanes)!==0,Hn||L){if(h=en,h!==null){switch(S&-S){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|S))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,pi(i,E),kr(h,i,E,-1))}return Qm(),h=Nm(Error(n(421))),nd(i,o,S,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=h7.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,Kn=Fi(E.nextSibling),Xn=o,Ct=!0,wr=null,i!==null&&(or[ar++]=fi,or[ar++]=hi,or[ar++]=Cs,fi=i.id,hi=i.overflow,Cs=o),o=Dm(o,h.children),o.flags|=4096,o)}function Jx(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),fm(i.return,o,l)}function Mm(i,o,l,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=l,T.tailMode=E)}function Zx(i,o,l){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(kn(i,o,h.children,l),h=Nt.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Jx(i,l,o);else if(i.tag===19)Jx(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(gt(Nt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(l=o.child,E=null;l!==null;)i=l.alternate,i!==null&&Xc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),Mm(o,!1,E,l,T);break;case"backwards":for(l=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Xc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Mm(o,!0,l,null,T);break;case"together":Mm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function rd(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function gi(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),Os|=o.lanes,(l&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,l=Wi(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=Wi(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function t7(i,o,l){switch(o.tag){case 3:Xx(o),jo();break;case 5:hx(o);break;case 1:Un(o.type)&&Uc(o);break;case 4:mm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;gt(qc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(gt(Nt,Nt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?Qx(i,o,l):(gt(Nt,Nt.current&1),i=gi(i,o,l),i!==null?i.sibling:null);gt(Nt,Nt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return Zx(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),gt(Nt,Nt.current),h)break;return null;case 22:case 23:return o.lanes=0,Yx(i,o,l)}return gi(i,o,l)}var e2,Fm,t2,n2;e2=function(i,o){for(var l=o.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Fm=function(){},t2=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,Ns(Wr.current);var T=null;switch(l){case"input":E=sr(i,E),h=sr(i,h),T=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),T=[];break;case"textarea":E=Pe(i,E),h=Pe(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Mc)}un(l,h);var S;l=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var L=E[Z];for(S in L)L.hasOwnProperty(S)&&(l||(l={}),l[S]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(s.hasOwnProperty(Z)?T||(T=[]):(T=T||[]).push(Z,null));for(Z in h){var H=h[Z];if(L=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&H!==L&&(H!=null||L!=null))if(Z==="style")if(L){for(S in L)!L.hasOwnProperty(S)||H&&H.hasOwnProperty(S)||(l||(l={}),l[S]="");for(S in H)H.hasOwnProperty(S)&&L[S]!==H[S]&&(l||(l={}),l[S]=H[S])}else l||(T||(T=[]),T.push(Z,l)),l=H;else Z==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,L=L?L.__html:void 0,H!=null&&L!==H&&(T=T||[]).push(Z,H)):Z==="children"?typeof H!="string"&&typeof H!="number"||(T=T||[]).push(Z,""+H):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?(H!=null&&Z==="onScroll"&&_t("scroll",i),T||L===H||(T=[])):(T=T||[]).push(Z,H))}l&&(T=T||[]).push("style",l);var Z=T;(o.updateQueue=Z)&&(o.flags|=4)}},n2=function(i,o,l,h){l!==h&&(o.flags|=4)};function Pu(i,o){if(!Ct)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function _n(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(o)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=l,o}function n7(i,o,l){var h=o.pendingProps;switch(sm(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _n(o),null;case 1:return Un(o.type)&&Bc(),_n(o),null;case 3:return h=o.stateNode,Yo(),St(Bn),St(Tn),ym(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&($c(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,wr!==null&&(Wm(wr),wr=null))),Fm(i,o),_n(o),null;case 5:gm(o);var E=Ns(Au.current);if(l=o.type,i!==null&&o.stateNode!=null)t2(i,o,l,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return _n(o),null}if(i=Ns(Wr.current),$c(o)){h=o.stateNode,l=o.type;var T=o.memoizedProps;switch(h[Gr]=o,h[bu]=T,i=(o.mode&1)!==0,l){case"dialog":_t("cancel",h),_t("close",h);break;case"iframe":case"object":case"embed":_t("load",h);break;case"video":case"audio":for(E=0;E<Eu.length;E++)_t(Eu[E],h);break;case"source":_t("error",h);break;case"img":case"image":case"link":_t("error",h),_t("load",h);break;case"details":_t("toggle",h);break;case"input":Jt(h,T),_t("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},_t("invalid",h);break;case"textarea":Me(h,T),_t("invalid",h)}un(l,T),E=null;for(var S in T)if(T.hasOwnProperty(S)){var L=T[S];S==="children"?typeof L=="string"?h.textContent!==L&&(T.suppressHydrationWarning!==!0&&Dc(h.textContent,L,i),E=["children",L]):typeof L=="number"&&h.textContent!==""+L&&(T.suppressHydrationWarning!==!0&&Dc(h.textContent,L,i),E=["children",""+L]):s.hasOwnProperty(S)&&L!=null&&S==="onScroll"&&_t("scroll",h)}switch(l){case"input":Cn(h),vn(h,T,!0);break;case"textarea":Cn(h),ht(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=Mc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(l,{is:h.is}):(i=S.createElement(l),l==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,l),i[Gr]=o,i[bu]=h,e2(i,o,!1,!1),o.stateNode=i;e:{switch(S=qr(l,h),l){case"dialog":_t("cancel",i),_t("close",i),E=h;break;case"iframe":case"object":case"embed":_t("load",i),E=h;break;case"video":case"audio":for(E=0;E<Eu.length;E++)_t(Eu[E],i);E=h;break;case"source":_t("error",i),E=h;break;case"img":case"image":case"link":_t("error",i),_t("load",i),E=h;break;case"details":_t("toggle",i),E=h;break;case"input":Jt(i,h),E=sr(i,h),_t("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),_t("invalid",i);break;case"textarea":Me(i,h),E=Pe(i,h),_t("invalid",i);break;default:E=h}un(l,E),L=E;for(T in L)if(L.hasOwnProperty(T)){var H=L[T];T==="style"?an(i,H):T==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&qe(i,H)):T==="children"?typeof H=="string"?(l!=="textarea"||H!=="")&&Ie(i,H):typeof H=="number"&&Ie(i,""+H):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?H!=null&&T==="onScroll"&&_t("scroll",i):H!=null&&C(i,T,H,S))}switch(l){case"input":Cn(i),vn(i,h,!1);break;case"textarea":Cn(i),ht(i);break;case"option":h.value!=null&&i.setAttribute("value",""+He(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?we(i,!!h.multiple,T,!1):h.defaultValue!=null&&we(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Mc)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return _n(o),null;case 6:if(i&&o.stateNode!=null)n2(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=Ns(Au.current),Ns(Wr.current),$c(o)){if(h=o.stateNode,l=o.memoizedProps,h[Gr]=o,(T=h.nodeValue!==l)&&(i=Xn,i!==null))switch(i.tag){case 3:Dc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Dc(h.nodeValue,l,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Gr]=o,o.stateNode=h}return _n(o),null;case 13:if(St(Nt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Ct&&Kn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)sx(),jo(),o.flags|=98560,T=!1;else if(T=$c(o),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=o.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Gr]=o}else jo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;_n(o),T=!1}else wr!==null&&(Wm(wr),wr=null),T=!0;if(!T)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=l,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(Nt.current&1)!==0?Yt===0&&(Yt=3):Qm())),o.updateQueue!==null&&(o.flags|=4),_n(o),null);case 4:return Yo(),Fm(i,o),i===null&&yu(o.stateNode.containerInfo),_n(o),null;case 10:return dm(o.type._context),_n(o),null;case 17:return Un(o.type)&&Bc(),_n(o),null;case 19:if(St(Nt),T=o.memoizedState,T===null)return _n(o),null;if(h=(o.flags&128)!==0,S=T.rendering,S===null)if(h)Pu(T,!1);else{if(Yt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(S=Xc(i),S!==null){for(o.flags|=128,Pu(T,!1),h=S.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=l,l=o.child;l!==null;)T=l,i=h,T.flags&=14680066,S=T.alternate,S===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=S.childLanes,T.lanes=S.lanes,T.child=S.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=S.memoizedProps,T.memoizedState=S.memoizedState,T.updateQueue=S.updateQueue,T.type=S.type,i=S.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return gt(Nt,Nt.current&1|2),o.child}i=i.sibling}T.tail!==null&&Dt()>Ko&&(o.flags|=128,h=!0,Pu(T,!1),o.lanes=4194304)}else{if(!h)if(i=Xc(S),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),Pu(T,!0),T.tail===null&&T.tailMode==="hidden"&&!S.alternate&&!Ct)return _n(o),null}else 2*Dt()-T.renderingStartTime>Ko&&l!==1073741824&&(o.flags|=128,h=!0,Pu(T,!1),o.lanes=4194304);T.isBackwards?(S.sibling=o.child,o.child=S):(l=T.last,l!==null?l.sibling=S:o.child=S,T.last=S)}return T.tail!==null?(o=T.tail,T.rendering=o,T.tail=o.sibling,T.renderingStartTime=Dt(),o.sibling=null,l=Nt.current,gt(Nt,h?l&1|2:l&1),o):(_n(o),null);case 22:case 23:return Km(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Qn&1073741824)!==0&&(_n(o),o.subtreeFlags&6&&(o.flags|=8192)):_n(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function r7(i,o){switch(sm(o),o.tag){case 1:return Un(o.type)&&Bc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Yo(),St(Bn),St(Tn),ym(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return gm(o),null;case 13:if(St(Nt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));jo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return St(Nt),null;case 4:return Yo(),null;case 10:return dm(o.type._context),null;case 22:case 23:return Km(),null;case 24:return null;default:return null}}var id=!1,Sn=!1,i7=typeof WeakSet=="function"?WeakSet:Set,ke=null;function Wo(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){It(i,o,h)}else l.current=null}function Bm(i,o,l){try{l()}catch(h){It(i,o,h)}}var r2=!1;function s7(i,o){if(Kp=wc,i=DS(),jp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var E=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{l.nodeType,T.nodeType}catch(Te){l=null;break e}var S=0,L=-1,H=-1,Z=0,ce=0,pe=i,ue=null;t:for(;;){for(var Ae;pe!==l||E!==0&&pe.nodeType!==3||(L=S+E),pe!==T||h!==0&&pe.nodeType!==3||(H=S+h),pe.nodeType===3&&(S+=pe.nodeValue.length),(Ae=pe.firstChild)!==null;)ue=pe,pe=Ae;for(;;){if(pe===i)break t;if(ue===l&&++Z===E&&(L=S),ue===T&&++ce===h&&(H=S),(Ae=pe.nextSibling)!==null)break;pe=ue,ue=pe.parentNode}pe=Ae}l=L===-1||H===-1?null:{start:L,end:H}}else l=null}l=l||{start:0,end:0}}else l=null;for(Qp={focusedElem:i,selectionRange:l},wc=!1,ke=o;ke!==null;)if(o=ke,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,ke=i;else for(;ke!==null;){o=ke;try{var Ne=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Oe=Ne.memoizedProps,Mt=Ne.memoizedState,W=o.stateNode,j=W.getSnapshotBeforeUpdate(o.elementType===o.type?Oe:Ar(o.type,Oe),Mt);W.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var K=o.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Te){It(o,o.return,Te)}if(i=o.sibling,i!==null){i.return=o.return,ke=i;break}ke=o.return}return Ne=r2,r2=!1,Ne}function Ou(i,o,l){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Bm(o,l,T)}E=E.next}while(E!==h)}}function sd(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==o)}}function Um(i){var o=i.ref;if(o!==null){var l=i.stateNode;i.tag,i=l,typeof o=="function"?o(i):o.current=i}}function i2(i){var o=i.alternate;o!==null&&(i.alternate=null,i2(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Gr],delete o[bu],delete o[tm],delete o[zB],delete o[jB])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function s2(i){return i.tag===5||i.tag===3||i.tag===4}function o2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||s2(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Hm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.nodeType===8?l.parentNode.insertBefore(i,o):l.insertBefore(i,o):(l.nodeType===8?(o=l.parentNode,o.insertBefore(i,l)):(o=l,o.appendChild(i)),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=Mc));else if(h!==4&&(i=i.child,i!==null))for(Hm(i,o,l),i=i.sibling;i!==null;)Hm(i,o,l),i=i.sibling}function zm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(zm(i,o,l),i=i.sibling;i!==null;)zm(i,o,l),i=i.sibling}var ln=null,Cr=!1;function $i(i,o,l){for(l=l.child;l!==null;)a2(i,o,l),l=l.sibling}function a2(i,o,l){if(Yr&&typeof Yr.onCommitFiberUnmount=="function")try{Yr.onCommitFiberUnmount(yc,l)}catch(L){}switch(l.tag){case 5:Sn||Wo(l,o);case 6:var h=ln,E=Cr;ln=null,$i(i,o,l),ln=h,Cr=E,ln!==null&&(Cr?(i=ln,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):ln.removeChild(l.stateNode));break;case 18:ln!==null&&(Cr?(i=ln,l=l.stateNode,i.nodeType===8?em(i.parentNode,l):i.nodeType===1&&em(i,l),lu(i)):em(ln,l.stateNode));break;case 4:h=ln,E=Cr,ln=l.stateNode.containerInfo,Cr=!0,$i(i,o,l),ln=h,Cr=E;break;case 0:case 11:case 14:case 15:if(!Sn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,S=T.destroy;T=T.tag,S!==void 0&&((T&2)!==0||(T&4)!==0)&&Bm(l,o,S),E=E.next}while(E!==h)}$i(i,o,l);break;case 1:if(!Sn&&(Wo(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(L){It(l,o,L)}$i(i,o,l);break;case 21:$i(i,o,l);break;case 22:l.mode&1?(Sn=(h=Sn)||l.memoizedState!==null,$i(i,o,l),Sn=h):$i(i,o,l);break;default:$i(i,o,l)}}function u2(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new i7),o.forEach(function(h){var E=p7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function vr(i,o){var l=o.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var T=i,S=o,L=S;e:for(;L!==null;){switch(L.tag){case 5:ln=L.stateNode,Cr=!1;break e;case 3:ln=L.stateNode.containerInfo,Cr=!0;break e;case 4:ln=L.stateNode.containerInfo,Cr=!0;break e}L=L.return}if(ln===null)throw Error(n(160));a2(T,S,E),ln=null,Cr=!1;var H=E.alternate;H!==null&&(H.return=null),E.return=null}catch(Z){It(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)l2(o,i),o=o.sibling}function l2(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(vr(o,i),Kr(i),h&4){try{Ou(3,i,i.return),sd(3,i)}catch(Oe){It(i,i.return,Oe)}try{Ou(5,i,i.return)}catch(Oe){It(i,i.return,Oe)}}break;case 1:vr(o,i),Kr(i),h&512&&l!==null&&Wo(l,l.return);break;case 5:if(vr(o,i),Kr(i),h&512&&l!==null&&Wo(l,l.return),i.flags&32){var E=i.stateNode;try{Ie(E,"")}catch(Oe){It(i,i.return,Oe)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,S=l!==null?l.memoizedProps:T,L=i.type,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{L==="input"&&T.type==="radio"&&T.name!=null&&Ve(E,T),qr(L,S);var Z=qr(L,T);for(S=0;S<H.length;S+=2){var ce=H[S],pe=H[S+1];ce==="style"?an(E,pe):ce==="dangerouslySetInnerHTML"?qe(E,pe):ce==="children"?Ie(E,pe):C(E,ce,pe,Z)}switch(L){case"input":kt(E,T);break;case"textarea":rt(E,T);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Ae=T.value;Ae!=null?we(E,!!T.multiple,Ae,!1):ue!==!!T.multiple&&(T.defaultValue!=null?we(E,!!T.multiple,T.defaultValue,!0):we(E,!!T.multiple,T.multiple?[]:"",!1))}E[bu]=T}catch(Oe){It(i,i.return,Oe)}}break;case 6:if(vr(o,i),Kr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Oe){It(i,i.return,Oe)}}break;case 3:if(vr(o,i),Kr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{lu(o.containerInfo)}catch(Oe){It(i,i.return,Oe)}break;case 4:vr(o,i),Kr(i);break;case 13:vr(o,i),Kr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(Vm=Dt())),h&4&&u2(i);break;case 22:if(ce=l!==null&&l.memoizedState!==null,i.mode&1?(Sn=(Z=Sn)||ce,vr(o,i),Sn=Z):vr(o,i),Kr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!ce&&(i.mode&1)!==0)for(ke=i,ce=i.child;ce!==null;){for(pe=ke=ce;ke!==null;){switch(ue=ke,Ae=ue.child,ue.tag){case 0:case 11:case 14:case 15:Ou(4,ue,ue.return);break;case 1:Wo(ue,ue.return);var Ne=ue.stateNode;if(typeof Ne.componentWillUnmount=="function"){h=ue,l=ue.return;try{o=h,Ne.props=o.memoizedProps,Ne.state=o.memoizedState,Ne.componentWillUnmount()}catch(Oe){It(h,l,Oe)}}break;case 5:Wo(ue,ue.return);break;case 22:if(ue.memoizedState!==null){f2(pe);continue}}Ae!==null?(Ae.return=ue,ke=Ae):f2(pe)}ce=ce.sibling}e:for(ce=null,pe=i;;){if(pe.tag===5){if(ce===null){ce=pe;try{E=pe.stateNode,Z?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(L=pe.stateNode,H=pe.memoizedProps.style,S=H!=null&&H.hasOwnProperty("display")?H.display:null,L.style.display=Ht("display",S))}catch(Oe){It(i,i.return,Oe)}}}else if(pe.tag===6){if(ce===null)try{pe.stateNode.nodeValue=Z?"":pe.memoizedProps}catch(Oe){It(i,i.return,Oe)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;ce===pe&&(ce=null),pe=pe.return}ce===pe&&(ce=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:vr(o,i),Kr(i),h&4&&u2(i);break;case 21:break;default:vr(o,i),Kr(i)}}function Kr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(s2(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Ie(E,""),h.flags&=-33);var T=o2(i);zm(i,T,E);break;case 3:case 4:var S=h.stateNode.containerInfo,L=o2(i);Hm(i,L,S);break;default:throw Error(n(161))}}catch(H){It(i,i.return,H)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function o7(i,o,l){ke=i,c2(i)}function c2(i,o,l){for(var h=(i.mode&1)!==0;ke!==null;){var E=ke,T=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||id;if(!S){var L=E.alternate,H=L!==null&&L.memoizedState!==null||Sn;L=id;var Z=Sn;if(id=S,(Sn=H)&&!Z)for(ke=E;ke!==null;)S=ke,H=S.child,S.tag===22&&S.memoizedState!==null?h2(E):H!==null?(H.return=S,ke=H):h2(E);for(;T!==null;)ke=T,c2(T),T=T.sibling;ke=E,id=L,Sn=Z}d2(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,ke=T):d2(i)}}function d2(i){for(;ke!==null;){var o=ke;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Sn||sd(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!Sn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:Ar(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&fx(o,T,h);break;case 3:var S=o.updateQueue;if(S!==null){if(l=null,o.child!==null)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}fx(o,S,l)}break;case 5:var L=o.stateNode;if(l===null&&o.flags&4){l=L;var H=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&l.focus();break;case"img":H.src&&(l.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Z=o.alternate;if(Z!==null){var ce=Z.memoizedState;if(ce!==null){var pe=ce.dehydrated;pe!==null&&lu(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Sn||o.flags&512&&Um(o)}catch(ue){It(o,o.return,ue)}}if(o===i){ke=null;break}if(l=o.sibling,l!==null){l.return=o.return,ke=l;break}ke=o.return}}function f2(i){for(;ke!==null;){var o=ke;if(o===i){ke=null;break}var l=o.sibling;if(l!==null){l.return=o.return,ke=l;break}ke=o.return}}function h2(i){for(;ke!==null;){var o=ke;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{sd(4,o)}catch(H){It(o,l,H)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(H){It(o,E,H)}}var T=o.return;try{Um(o)}catch(H){It(o,T,H)}break;case 5:var S=o.return;try{Um(o)}catch(H){It(o,S,H)}}}catch(H){It(o,o.return,H)}if(o===i){ke=null;break}var L=o.sibling;if(L!==null){L.return=o.return,ke=L;break}ke=o.return}}var a7=Math.ceil,od=U.ReactCurrentDispatcher,jm=U.ReactCurrentOwner,cr=U.ReactCurrentBatchConfig,it=0,en=null,zt=null,cn=0,Qn=0,Xo=Bi(0),Yt=0,Iu=null,Os=0,ad=0,$m=0,Ru=null,zn=null,Vm=0,Ko=1/0,Ei=null,ud=!1,qm=null,Vi=null,ld=!1,qi=null,cd=0,Lu=0,Ym=null,dd=-1,fd=0;function Nn(){return(it&6)!==0?Dt():dd!==-1?dd:dd=Dt()}function Yi(i){return(i.mode&1)===0?1:(it&2)!==0&&cn!==0?cn&-cn:VB.transition!==null?(fd===0&&(fd=oS()),fd):(i=lt,i!==0||(i=window.event,i=i===void 0?16:mS(i.type)),i)}function kr(i,o,l,h){if(50<Lu)throw Lu=0,Ym=null,Error(n(185));iu(i,l,h),((it&2)===0||i!==en)&&(i===en&&((it&2)===0&&(ad|=l),Yt===4&&Gi(i,cn)),jn(i,h),l===1&&it===0&&(o.mode&1)===0&&(Ko=Dt()+500,Hc&&Hi()))}function jn(i,o){var l=i.callbackNode;V9(i,o);var h=_c(i,i===en?cn:0);if(h===0)l!==null&&rS(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&rS(l),o===1)i.tag===0?$B(m2.bind(null,i)):ex(m2.bind(null,i)),UB(function(){(it&6)===0&&Hi()}),l=null;else{switch(aS(h)){case 1:l=Ap;break;case 4:l=iS;break;case 16:l=Ec;break;case 536870912:l=sS;break;default:l=Ec}l=x2(l,p2.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function p2(i,o){if(dd=-1,fd=0,(it&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Qo()&&i.callbackNode!==l)return null;var h=_c(i,i===en?cn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=hd(i,h);else{o=h;var E=it;it|=2;var T=E2();(en!==i||cn!==o)&&(Ei=null,Ko=Dt()+500,Rs(i,o));do try{c7();break}catch(L){g2(i,L)}while(!0);cm(),od.current=T,it=E,zt!==null?o=0:(en=null,cn=0,o=Yt)}if(o!==0){if(o===2&&(E=Cp(i),E!==0&&(h=E,o=Gm(i,E))),o===1)throw l=Iu,Rs(i,0),Gi(i,h),jn(i,Dt()),l;if(o===6)Gi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!u7(E)&&(o=hd(i,h),o===2&&(T=Cp(i),T!==0&&(h=T,o=Gm(i,T))),o===1))throw l=Iu,Rs(i,0),Gi(i,h),jn(i,Dt()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Ls(i,zn,Ei);break;case 3:if(Gi(i,h),(h&130023424)===h&&(o=Vm+500-Dt(),10<o)){if(_c(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){Nn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Zp(Ls.bind(null,i,zn,Ei),o);break}Ls(i,zn,Ei);break;case 4:if(Gi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var S=31-Sr(h);T=1<<S,S=o[S],S>E&&(E=S),h&=~T}if(h=E,h=Dt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*a7(h/1960))-h,10<h){i.timeoutHandle=Zp(Ls.bind(null,i,zn,Ei),h);break}Ls(i,zn,Ei);break;case 5:Ls(i,zn,Ei);break;default:throw Error(n(329))}}}return jn(i,Dt()),i.callbackNode===l?p2.bind(null,i):null}function Gm(i,o){var l=Ru;return i.current.memoizedState.isDehydrated&&(Rs(i,o).flags|=256),i=hd(i,o),i!==2&&(o=zn,zn=l,o!==null&&Wm(o)),i}function Wm(i){zn===null?zn=i:zn.push.apply(zn,i)}function u7(i){for(var o=i;;){if(o.flags&16384){var l=o.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var E=l[h],T=E.getSnapshot;E=E.value;try{if(!xr(T(),E))return!1}catch(S){return!1}}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Gi(i,o){for(o&=~$m,o&=~ad,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-Sr(o),h=1<<l;i[l]=-1,o&=~h}}function m2(i){if((it&6)!==0)throw Error(n(327));Qo();var o=_c(i,0);if((o&1)===0)return jn(i,Dt()),null;var l=hd(i,o);if(i.tag!==0&&l===2){var h=Cp(i);h!==0&&(o=h,l=Gm(i,h))}if(l===1)throw l=Iu,Rs(i,0),Gi(i,o),jn(i,Dt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Ls(i,zn,Ei),jn(i,Dt()),null}function Xm(i,o){var l=it;it|=1;try{return i(o)}finally{it=l,it===0&&(Ko=Dt()+500,Hc&&Hi())}}function Is(i){qi!==null&&qi.tag===0&&(it&6)===0&&Qo();var o=it;it|=1;var l=cr.transition,h=lt;try{if(cr.transition=null,lt=1,i)return i()}finally{lt=h,cr.transition=l,it=o,(it&6)===0&&Hi()}}function Km(){Qn=Xo.current,St(Xo)}function Rs(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,BB(l)),zt!==null)for(l=zt.return;l!==null;){var h=l;switch(sm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Bc();break;case 3:Yo(),St(Bn),St(Tn),ym();break;case 5:gm(h);break;case 4:Yo();break;case 13:St(Nt);break;case 19:St(Nt);break;case 10:dm(h.type._context);break;case 22:case 23:Km()}l=l.return}if(en=i,zt=i=Wi(i.current,null),cn=Qn=o,Yt=0,Iu=null,$m=ad=Os=0,zn=Ru=null,ks!==null){for(o=0;o<ks.length;o++)if(l=ks[o],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,T=l.pending;if(T!==null){var S=T.next;T.next=E,h.next=S}l.pending=h}ks=null}return i}function g2(i,o){do{var l=zt;try{if(cm(),Kc.current=ed,Qc){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Qc=!1}if(Ps=0,Zt=qt=Pt=null,Cu=!1,vu=0,jm.current=null,l===null||l.return===null){Yt=1,Iu=o,zt=null;break}e:{var T=i,S=l.return,L=l,H=o;if(o=cn,L.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var Z=H,ce=L,pe=ce.tag;if((ce.mode&1)===0&&(pe===0||pe===11||pe===15)){var ue=ce.alternate;ue?(ce.updateQueue=ue.updateQueue,ce.memoizedState=ue.memoizedState,ce.lanes=ue.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var Ae=zx(S);if(Ae!==null){Ae.flags&=-257,jx(Ae,S,L,T,o),Ae.mode&1&&Hx(T,Z,o),o=Ae,H=Z;var Ne=o.updateQueue;if(Ne===null){var Oe=new Set;Oe.add(H),o.updateQueue=Oe}else Ne.add(H);break e}else{if((o&1)===0){Hx(T,Z,o),Qm();break e}H=Error(n(426))}}else if(Ct&&L.mode&1){var Mt=zx(S);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),jx(Mt,S,L,T,o),um(Go(H,L));break e}}T=H=Go(H,L),Yt!==4&&(Yt=2),Ru===null?Ru=[T]:Ru.push(T),T=S;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var W=Bx(T,H,o);dx(T,W);break e;case 1:L=H;var j=T.type,K=T.stateNode;if((T.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Vi===null||!Vi.has(K)))){T.flags|=65536,o&=-o,T.lanes|=o;var Te=Ux(T,L,o);dx(T,Te);break e}}T=T.return}while(T!==null)}T2(l)}catch(Le){o=Le,zt===l&&l!==null&&(zt=l=l.return);continue}break}while(!0)}function E2(){var i=od.current;return od.current=ed,i===null?ed:i}function Qm(){(Yt===0||Yt===3||Yt===2)&&(Yt=4),en===null||(Os&268435455)===0&&(ad&268435455)===0||Gi(en,cn)}function hd(i,o){var l=it;it|=2;var h=E2();(en!==i||cn!==o)&&(Ei=null,Rs(i,o));do try{l7();break}catch(E){g2(i,E)}while(!0);if(cm(),it=l,od.current=h,zt!==null)throw Error(n(261));return en=null,cn=0,Yt}function l7(){for(;zt!==null;)y2(zt)}function c7(){for(;zt!==null&&!D9();)y2(zt)}function y2(i){var o=S2(i.alternate,i,Qn);i.memoizedProps=i.pendingProps,o===null?T2(i):zt=o,jm.current=null}function T2(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=n7(l,o,Qn),l!==null){zt=l;return}}else{if(l=r7(l,o),l!==null){l.flags&=32767,zt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Yt=6,zt=null;return}}if(o=o.sibling,o!==null){zt=o;return}zt=o=i}while(o!==null);Yt===0&&(Yt=5)}function Ls(i,o,l){var h=lt,E=cr.transition;try{cr.transition=null,lt=1,d7(i,o,l,h)}finally{cr.transition=E,lt=h}return null}function d7(i,o,l,h){do Qo();while(qi!==null);if((it&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var T=l.lanes|l.childLanes;if(q9(i,T),i===en&&(zt=en=null,cn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||ld||(ld=!0,x2(Ec,function(){return Qo(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=cr.transition,cr.transition=null;var S=lt;lt=1;var L=it;it|=4,jm.current=null,s7(i,l),l2(l,i),OB(Qp),wc=!!Kp,Qp=Kp=null,i.current=l,o7(l),M9(),it=L,lt=S,cr.transition=T}else i.current=l;if(ld&&(ld=!1,qi=i,cd=E),T=i.pendingLanes,T===0&&(Vi=null),U9(l.stateNode),jn(i,Dt()),o!==null)for(h=i.onRecoverableError,l=0;l<o.length;l++)E=o[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(ud)throw ud=!1,i=qm,qm=null,i;return(cd&1)!==0&&i.tag!==0&&Qo(),T=i.pendingLanes,(T&1)!==0?i===Ym?Lu++:(Lu=0,Ym=i):Lu=0,Hi(),null}function Qo(){if(qi!==null){var i=aS(cd),o=cr.transition,l=lt;try{if(cr.transition=null,lt=16>i?16:i,qi===null)var h=!1;else{if(i=qi,qi=null,cd=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,ke=i.current;ke!==null;){var T=ke,S=T.child;if((ke.flags&16)!==0){var L=T.deletions;if(L!==null){for(var H=0;H<L.length;H++){var Z=L[H];for(ke=Z;ke!==null;){var ce=ke;switch(ce.tag){case 0:case 11:case 15:Ou(8,ce,T)}var pe=ce.child;if(pe!==null)pe.return=ce,ke=pe;else for(;ke!==null;){ce=ke;var ue=ce.sibling,Ae=ce.return;if(i2(ce),ce===Z){ke=null;break}if(ue!==null){ue.return=Ae,ke=ue;break}ke=Ae}}}var Ne=T.alternate;if(Ne!==null){var Oe=Ne.child;if(Oe!==null){Ne.child=null;do{var Mt=Oe.sibling;Oe.sibling=null,Oe=Mt}while(Oe!==null)}}ke=T}}if((T.subtreeFlags&2064)!==0&&S!==null)S.return=T,ke=S;else e:for(;ke!==null;){if(T=ke,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:Ou(9,T,T.return)}var W=T.sibling;if(W!==null){W.return=T.return,ke=W;break e}ke=T.return}}var j=i.current;for(ke=j;ke!==null;){S=ke;var K=S.child;if((S.subtreeFlags&2064)!==0&&K!==null)K.return=S,ke=K;else e:for(S=j;ke!==null;){if(L=ke,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:sd(9,L)}}catch(Le){It(L,L.return,Le)}if(L===S){ke=null;break e}var Te=L.sibling;if(Te!==null){Te.return=L.return,ke=Te;break e}ke=L.return}}if(it=E,Hi(),Yr&&typeof Yr.onPostCommitFiberRoot=="function")try{Yr.onPostCommitFiberRoot(yc,i)}catch(Le){}h=!0}return h}finally{lt=l,cr.transition=o}}return!1}function b2(i,o,l){o=Go(l,o),o=Bx(i,o,1),i=ji(i,o,1),o=Nn(),i!==null&&(iu(i,1,o),jn(i,o))}function It(i,o,l){if(i.tag===3)b2(i,i,l);else for(;o!==null;){if(o.tag===3){b2(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Vi===null||!Vi.has(h))){i=Go(l,i),i=Ux(o,i,1),o=ji(o,i,1),i=Nn(),o!==null&&(iu(o,1,i),jn(o,i));break}}o=o.return}}function f7(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=Nn(),i.pingedLanes|=i.suspendedLanes&l,en===i&&(cn&l)===l&&(Yt===4||Yt===3&&(cn&130023424)===cn&&500>Dt()-Vm?Rs(i,0):$m|=l),jn(i,o)}function _2(i,o){o===0&&((i.mode&1)===0?o=1:(o=bc,bc<<=1,(bc&130023424)===0&&(bc=4194304)));var l=Nn();i=pi(i,o),i!==null&&(iu(i,o,l),jn(i,l))}function h7(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),_2(i,l)}function p7(i,o){var l=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),_2(i,l)}var S2;S2=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||Bn.current)Hn=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return Hn=!1,t7(i,o,l);Hn=(i.flags&131072)!==0}else Hn=!1,Ct&&(o.flags&1048576)!==0&&tx(o,jc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;rd(i,o),i=o.pendingProps;var E=Uo(o,Tn.current);qo(o,l),E=_m(null,o,h,i,E,l);var T=Sm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Un(h)?(T=!0,Uc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,pm(o),E.updater=td,o.stateNode=E,E._reactInternals=o,km(o,h,i,l),o=Im(null,o,h,!0,T,l)):(o.tag=0,Ct&&T&&im(o),kn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(rd(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=g7(h),i=Ar(h,i),E){case 0:o=Om(null,o,h,i,l);break e;case 1:o=Wx(null,o,h,i,l);break e;case 11:o=$x(null,o,h,i,l);break e;case 14:o=Vx(null,o,h,Ar(h.type,i),l);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),Om(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),Wx(i,o,h,E,l);case 3:e:{if(Xx(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,cx(i,o),Wc(o,h,null,l);var S=o.memoizedState;if(h=S.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){E=Go(Error(n(423)),o),o=Kx(i,o,h,l,E);break e}else if(h!==E){E=Go(Error(n(424)),o),o=Kx(i,o,h,l,E);break e}else for(Kn=Fi(o.stateNode.containerInfo.firstChild),Xn=o,Ct=!0,wr=null,l=ux(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(jo(),h===E){o=gi(i,o,l);break e}kn(i,o,h,l)}o=o.child}return o;case 5:return hx(o),i===null&&am(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,S=E.children,Jp(h,E)?S=null:T!==null&&Jp(h,T)&&(o.flags|=32),Gx(i,o),kn(i,o,S,l),o.child;case 6:return i===null&&am(o),null;case 13:return Qx(i,o,l);case 4:return mm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=$o(o,null,h,l):kn(i,o,h,l),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),$x(i,o,h,E,l);case 7:return kn(i,o,o.pendingProps,l),o.child;case 8:return kn(i,o,o.pendingProps.children,l),o.child;case 12:return kn(i,o,o.pendingProps.children,l),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,T=o.memoizedProps,S=E.value,gt(qc,h._currentValue),h._currentValue=S,T!==null)if(xr(T.value,S)){if(T.children===E.children&&!Bn.current){o=gi(i,o,l);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var L=T.dependencies;if(L!==null){S=T.child;for(var H=L.firstContext;H!==null;){if(H.context===h){if(T.tag===1){H=mi(-1,l&-l),H.tag=2;var Z=T.updateQueue;if(Z!==null){Z=Z.shared;var ce=Z.pending;ce===null?H.next=H:(H.next=ce.next,ce.next=H),Z.pending=H}}T.lanes|=l,H=T.alternate,H!==null&&(H.lanes|=l),fm(T.return,l,o),L.lanes|=l;break}H=H.next}}else if(T.tag===10)S=T.type===o.type?null:T.child;else if(T.tag===18){if(S=T.return,S===null)throw Error(n(341));S.lanes|=l,L=S.alternate,L!==null&&(L.lanes|=l),fm(S,l,o),S=T.sibling}else S=T.child;if(S!==null)S.return=T;else for(S=T;S!==null;){if(S===o){S=null;break}if(T=S.sibling,T!==null){T.return=S.return,S=T;break}S=S.return}T=S}kn(i,o,E.children,l),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,qo(o,l),E=ur(E),h=h(E),o.flags|=1,kn(i,o,h,l),o.child;case 14:return h=o.type,E=Ar(h,o.pendingProps),E=Ar(h.type,E),Vx(i,o,h,E,l);case 15:return qx(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),rd(i,o),o.tag=1,Un(h)?(i=!0,Uc(o)):i=!1,qo(o,l),Mx(o,h,E),km(o,h,E,l),Im(null,o,h,!0,i,l);case 19:return Zx(i,o,l);case 22:return Yx(i,o,l)}throw Error(n(156,o.tag))};function x2(i,o){return nS(i,o)}function m7(i,o,l,h){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dr(i,o,l,h){return new m7(i,o,l,h)}function Jm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function g7(i){if(typeof i=="function")return Jm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)return 11;if(i===oe)return 14}return 2}function Wi(i,o){var l=i.alternate;return l===null?(l=dr(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function pd(i,o,l,h,E,T){var S=2;if(h=i,typeof i=="function")Jm(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case q:return Ds(l.children,E,T,o);case ne:S=8,E|=8;break;case me:return i=dr(12,l,o,E|2),i.elementType=me,i.lanes=T,i;case ve:return i=dr(13,l,o,E),i.elementType=ve,i.lanes=T,i;case re:return i=dr(19,l,o,E),i.elementType=re,i.lanes=T,i;case ae:return md(l,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case V:S=10;break e;case se:S=9;break e;case he:S=11;break e;case oe:S=14;break e;case xe:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=dr(S,l,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function Ds(i,o,l,h){return i=dr(7,i,h,o),i.lanes=l,i}function md(i,o,l,h){return i=dr(22,i,h,o),i.elementType=ae,i.lanes=l,i.stateNode={isHidden:!1},i}function Zm(i,o,l){return i=dr(6,i,null,o),i.lanes=l,i}function e0(i,o,l){return o=dr(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function E7(i,o,l,h,E){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vp(0),this.expirationTimes=vp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function t0(i,o,l,h,E,T,S,L,H){return i=new E7(i,o,l,L,H),o===1?(o=1,T===!0&&(o|=8)):o=0,T=dr(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},pm(T),i}function y7(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:h==null?null:""+h,children:i,containerInfo:o,implementation:l}}function w2(i){if(!i)return Ui;i=i._reactInternals;e:{if(xs(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Un(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(Un(l))return JS(i,l,o)}return o}function A2(i,o,l,h,E,T,S,L,H){return i=t0(l,h,!0,i,E,T,S,L,H),i.context=w2(null),l=i.current,h=Nn(),E=Yi(l),T=mi(h,E),T.callback=o!=null?o:null,ji(l,T,E),i.current.lanes=E,iu(i,E,h),jn(i,h),i}function gd(i,o,l,h){var E=o.current,T=Nn(),S=Yi(E);return l=w2(l),o.context===null?o.context=l:o.pendingContext=l,o=mi(T,S),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=ji(E,o,S),i!==null&&(kr(i,E,S,T),Gc(i,E,S)),S}function Ed(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function C2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function n0(i,o){C2(i,o),(i=i.alternate)&&C2(i,o)}function T7(){return null}var v2=typeof reportError=="function"?reportError:function(i){console.error(i)};function r0(i){this._internalRoot=i}yd.prototype.render=r0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));gd(i,o,null,null)},yd.prototype.unmount=r0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Is(function(){gd(null,i,null,null)}),o[ci]=null}};function yd(i){this._internalRoot=i}yd.prototype.unstable_scheduleHydration=function(i){if(i){var o=cS();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Li.length&&o!==0&&o<Li[l].priority;l++);Li.splice(l,0,i),l===0&&hS(i)}};function i0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Td(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function k2(){}function b7(i,o,l,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var Z=Ed(S);T.call(Z)}}var S=A2(o,h,i,0,null,!1,!1,"",k2);return i._reactRootContainer=S,i[ci]=S.current,yu(i.nodeType===8?i.parentNode:i),Is(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var L=h;h=function(){var Z=Ed(H);L.call(Z)}}var H=t0(i,0,!1,null,null,!1,!1,"",k2);return i._reactRootContainer=H,i[ci]=H.current,yu(i.nodeType===8?i.parentNode:i),Is(function(){gd(o,H,l,h)}),H}function bd(i,o,l,h,E){var T=l._reactRootContainer;if(T){var S=T;if(typeof E=="function"){var L=E;E=function(){var H=Ed(S);L.call(H)}}gd(o,S,i,E)}else S=b7(l,o,i,E,h);return Ed(S)}uS=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=ru(o.pendingLanes);l!==0&&(kp(o,l|1),jn(o,Dt()),(it&6)===0&&(Ko=Dt()+500,Hi()))}break;case 13:Is(function(){var h=pi(i,1);if(h!==null){var E=Nn();kr(h,i,1,E)}}),n0(i,1)}},Np=function(i){if(i.tag===13){var o=pi(i,134217728);if(o!==null){var l=Nn();kr(o,i,134217728,l)}n0(i,134217728)}},lS=function(i){if(i.tag===13){var o=Yi(i),l=pi(i,o);if(l!==null){var h=Nn();kr(l,i,o,h)}n0(i,o)}},cS=function(){return lt},dS=function(i,o){var l=lt;try{return lt=i,o()}finally{lt=l}},_p=function(i,o,l){switch(o){case"input":if(kt(i,l),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var h=l[o];if(h!==i&&h.form===i.form){var E=Fc(h);if(!E)throw Error(n(90));sn(h),kt(h,E)}}}break;case"textarea":rt(i,l);break;case"select":o=l.value,o!=null&&we(i,!!l.multiple,o,!1)}},X_=Xm,K_=Is;var _7={usingClientEntryPoint:!1,Events:[_u,Fo,Fc,G_,W_,Xm]},Du={findFiberByHostInstance:ws,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},S7={bundleType:Du.bundleType,version:Du.version,rendererPackageName:Du.rendererPackageName,rendererConfig:Du.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=eS(i),i===null?null:i.stateNode},findFiberByHostInstance:Du.findFiberByHostInstance||T7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var _d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_d.isDisabled&&_d.supportsFiber)try{yc=_d.inject(S7),Yr=_d}catch(i){}}return In.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_7,In.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!i0(o))throw Error(n(200));return y7(i,o,null,l)},In.createRoot=function(i,o){if(!i0(i))throw Error(n(299));var l=!1,h="",E=v2;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=t0(i,1,!1,null,null,l,!1,h,E),i[ci]=o.current,yu(i.nodeType===8?i.parentNode:i),new r0(o)},In.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=eS(o),i=i===null?null:i.stateNode,i},In.flushSync=function(i){return Is(i)},In.hydrate=function(i,o,l){if(!Td(o))throw Error(n(200));return bd(null,i,o,!0,l)},In.hydrateRoot=function(i,o,l){if(!i0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,T="",S=v2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),o=A2(o,null,i,1,l!=null?l:null,E,!1,T,S),i[ci]=o.current,yu(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,E]:o.mutableSourceEagerHydrationData.push(l,E);return new yd(o)},In.render=function(i,o,l){if(!Td(o))throw Error(n(200));return bd(null,i,o,!1,l)},In.unmountComponentAtNode=function(i){if(!Td(i))throw Error(n(40));return i._reactRootContainer?(Is(function(){bd(null,null,i,!1,function(){i._reactRootContainer=null,i[ci]=null})}),!0):!1},In.unstable_batchedUpdates=Xm,In.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!Td(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return bd(i,o,l,!1,h)},In.version="18.3.1-next-f1338f8080-20240426",In}var T1;function b1(){if(T1)return Sf.exports;T1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Sf.exports=bk(),Sf.exports}var Ks=b1();function _1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=_1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function G(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=_1(e))&&(r&&(r+=" "),r+=t);return r}var S1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},x1=Qi.createContext&&Qi.createContext(S1),_k=["attr","size","title"];function Sk(e,t){if(e==null)return{};var n=xk(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xk(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hl.apply(this,arguments)}function w1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w1(Object(n),!0).forEach(function(r){wk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wk(e,t,n){return t=Ak(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ak(e){var t=Ck(e,"string");return typeof t=="symbol"?t:t+""}function Ck(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A1(e){return e&&e.map((t,n)=>Qi.createElement(t.tag,pl({key:n},t.attr),A1(t.child)))}function xt(e){return t=>Qi.createElement(vk,hl({attr:pl({},e.attr)},t),A1(e.child))}function vk(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=Sk(e,_k),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Qi.createElement("svg",hl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:pl(pl({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Qi.createElement("title",null,a),e.children)};return x1!==void 0?Qi.createElement(x1.Consumer,null,n=>t(n)):t(S1)}function kk(e){return xt({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const ri=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:x.jsx("button",{className:G(e,`${z}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?x.jsx("img",{className:G(`${z}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),Nk="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",Pk=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=tt(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?x.jsx(kk,{className:G(t,`${z}-minimized-icon`)}):x.jsx("img",{src:(n==null?void 0:n.logoUrl)||Nk,alt:"Copilot",className:G(t,`${z}-minimized-icon-img`)});return x.jsx(ri,{className:G(t,`${z}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},Ok=()=>{const{globalClassName:e,themeVariables:t}=tt(),n=()=>{cl(!1),ti(!0)};return Ks.createPortal(x.jsx("div",{className:G(e,`${z}-minimized-container`),style:t,children:x.jsx(Pk,{onClick:n})}),document.body)};function C1(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function v1(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function Qs(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function Ik(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function k1(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function Rk(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function Lk(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function Dk(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function Mk(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function Fk(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}const Bk=e=>({[`${$n}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${$n}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${$n}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${$n}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${$n}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${$n}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),N1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>x.jsx("button",{"aria-label":t,title:t,className:G(e,`${z}-close-button`),disabled:r,onClick:n,children:x.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:x.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),ml=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>x.jsx("button",{className:G(`${z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),Uk=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?x.jsx("img",{className:G(`${z}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):x.jsx(Qs,{size:"16px"})},Hk=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return x.jsx(ri,{className:G(e,n,`cim-${r}-component`,`${z}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:x.jsx(Qs,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return x.jsxs(ml,{className:G(e,n,`cim-${r}-component`,`${z}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&x.jsx(Uk,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function zk(e){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const jk=()=>{const{messages:e}=tr(),{handleCancel:t}=Ir();return{cancelRequest:B.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],s=r.eventSourceId||r.id;t(s)},[t,e])}},$k=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=tt(),{cancelRequest:r}=jk();return n!=null&&n.enableCancelSearch?x.jsx(ri,{className:G(t,`${z}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:x.jsx(zk,{}),disabled:!e,onClick:r}):null};function nU(){}function rU(){}function P1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function O1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Vk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yk={};function I1(e,t){return(Yk.jsx?qk:Vk).test(e)}const Gk=/[ \t\n\f\r]/g;function Wk(e){return typeof e=="object"?e.type==="text"?R1(e.value):!1:R1(e)}function R1(e){return e.replace(Gk,"")===""}class Ea{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ea.prototype.normal={},Ea.prototype.property={},Ea.prototype.space=void 0;function L1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Ea(n,r,t)}function ya(e){return e.toLowerCase()}class Rn{constructor(t,n){this.attribute=n,this.property=t}}Rn.prototype.attribute="",Rn.prototype.booleanish=!1,Rn.prototype.boolean=!1,Rn.prototype.commaOrSpaceSeparated=!1,Rn.prototype.commaSeparated=!1,Rn.prototype.defined=!1,Rn.prototype.mustUseProperty=!1,Rn.prototype.number=!1,Rn.prototype.overloadedBoolean=!1,Rn.prototype.property="",Rn.prototype.spaceSeparated=!1,Rn.prototype.space=void 0;let Xk=0;const We=os(),Ut=os(),Af=os(),Ee=os(),dt=os(),ss=os(),Vn=os();function os(){return Mu(2,++Xk)}const Cf=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Ut,commaOrSpaceSeparated:Vn,commaSeparated:ss,number:Ee,overloadedBoolean:Af,spaceSeparated:dt},Symbol.toStringTag,{value:"Module"})),vf=Object.keys(Cf);class kf extends Rn{constructor(t,n,r,s){let a=-1;if(super(t,n),D1(this,"space",s),typeof r=="number")for(;++a<vf.length;){const u=vf[a];D1(this,vf[a],(r&Cf[u])===Cf[u])}}}kf.prototype.defined=!0;function D1(e,t,n){n&&(e[t]=n)}function Js(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new kf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ya(r)]=r,n[ya(a.attribute)]=r}return new Ea(t,n,e.space)}const M1=Js({properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:dt,ariaCurrent:null,ariaDescribedBy:dt,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:dt,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:dt,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dt,ariaLevel:Ee,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:dt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:dt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Ut,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function F1(e,t){return t in e?e[t]:t}function B1(e,t){return F1(e,t.toLowerCase())}const Kk=Js({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ss,acceptCharset:dt,accessKey:dt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alpha:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:dt,autoFocus:We,autoPlay:We,blocking:dt,capture:null,charSet:null,checked:We,cite:null,className:dt,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:Ut,controls:We,controlsList:dt,coords:Ee|ss,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:Af,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:dt,height:Ee,hidden:Af,high:Ee,href:null,hrefLang:null,htmlFor:dt,httpEquiv:dt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:dt,itemRef:dt,itemScope:We,itemType:dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:Ee,pattern:null,ping:dt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:dt,required:We,reversed:We,rows:Ee,rowSpan:Ee,sandbox:dt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootCustomElementRegistry:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shadowRootSerializable:We,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Ut,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:We,disablePictureInPicture:We,disableRemotePlayback:We,exportParts:ss,part:dt,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:B1}),Qk=Js({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",maskType:"mask-type",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:Vn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:dt,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:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,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:ss,g2:ss,glyphName:ss,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:Vn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,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:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Vn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Vn,rev:Vn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Vn,requiredFeatures:Vn,requiredFonts:Vn,requiredFormats:Vn,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:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:Vn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Vn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Vn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:F1}),U1=Js({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),H1=Js({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:B1}),z1=Js({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Jk={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"},Zk=/[A-Z]/g,j1=/-[a-z]/g,eN=/^data[-\w.:]+$/i;function gl(e,t){const n=ya(t);let r=t,s=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&eN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(j1,nN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!j1.test(a)){let u=a.replace(Zk,tN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=kf}return new s(r,t)}function tN(e){return"-"+e.toLowerCase()}function nN(e){return e.charAt(1).toUpperCase()}const Ta=L1([M1,Kk,U1,H1,z1],"html"),_i=L1([M1,Qk,U1,H1,z1],"svg");function $1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function V1(e){return e.join(" ").trim()}var Zs={},Nf,q1;function rN(){if(q1)return Nf;q1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
18
- `,f="/",p="*",m="",b="comment",y="declaration";function _(v,w){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];w=w||{};var N=1,C=1;function U(re){var oe=re.match(t);oe&&(N+=oe.length);var xe=re.lastIndexOf(d);C=~xe?re.length-xe:C+re.length}function Y(){var re={line:N,column:C};return function(oe){return oe.position=new R(re),me(),oe}}function R(re){this.start=re,this.end={line:N,column:C},this.source=w.source}R.prototype.content=v;function q(re){var oe=new Error(w.source+":"+N+":"+C+": "+re);if(oe.reason=re,oe.filename=w.source,oe.line=N,oe.column=C,oe.source=v,!w.silent)throw oe}function ne(re){var oe=re.exec(v);if(oe){var xe=oe[0];return U(xe),v=v.slice(xe.length),oe}}function me(){ne(n)}function V(re){var oe;for(re=re||[];oe=se();)oe!==!1&&re.push(oe);return re}function se(){var re=Y();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var oe=2;m!=v.charAt(oe)&&(p!=v.charAt(oe)||f!=v.charAt(oe+1));)++oe;if(oe+=2,m===v.charAt(oe-1))return q("End of comment missing");var xe=v.slice(2,oe-2);return C+=2,U(xe),v=v.slice(oe),C+=2,re({type:b,comment:xe})}}function he(){var re=Y(),oe=ne(r);if(oe){if(se(),!ne(s))return q("property missing ':'");var xe=ne(a),ae=re({type:y,property:A(oe[0].replace(e,m)),value:xe?A(xe[0].replace(e,m)):m});return ne(u),ae}}function ve(){var re=[];V(re);for(var oe;oe=he();)oe!==!1&&(re.push(oe),V(re));return re}return me(),ve()}function A(v){return v?v.replace(c,m):m}return Nf=_,Nf}var Y1;function iN(){if(Y1)return Zs;Y1=1;var e=Zs&&Zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.default=n;const t=e(rN());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),c=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Zs}var ba={},G1;function sN(){if(G1)return ba;G1=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,c):f=f.replace(r,c),f.replace(t,u))};return ba.camelCase=d,ba}var _a,W1;function oN(){if(W1)return _a;W1=1;var e=_a&&_a.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(iN()),n=sN();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,_a=r,_a}var aN=oN();const uN=Qe(aN),El=X1("end"),Rr=X1("start");function X1(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function K1(e){const t=Rr(e),n=El(e);if(t&&n)return{start:t,end:n}}function Sa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Q1(e.position):"start"in e||"end"in e?Q1(e):"line"in e||"column"in e?Pf(e):""}function Pf(e){return J1(e&&e.line)+":"+J1(e&&e.column)}function Q1(e){return Pf(e&&e.start)+"-"+Pf(e&&e.end)}function J1(e){return e&&typeof e=="number"?e:1}class mn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=F({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=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=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=Sa(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=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}mn.prototype.file="",mn.prototype.name="",mn.prototype.reason="",mn.prototype.message="",mn.prototype.stack="",mn.prototype.column=void 0,mn.prototype.line=void 0,mn.prototype.ancestors=void 0,mn.prototype.cause=void 0,mn.prototype.fatal=void 0,mn.prototype.place=void 0,mn.prototype.ruleId=void 0,mn.prototype.source=void 0;const Of={}.hasOwnProperty,lN=new Map,cN=/[A-Z]/g,dN=new Set(["table","tbody","thead","tfoot","tr"]),fN=new Set(["td","th"]),Z1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hN(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=_N(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=bN(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?_i:Ta,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=eE(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function eE(e,t,n){if(t.type==="element")return pN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return mN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return EN(e,t,n);if(t.type==="mdxjsEsm")return gN(e,t);if(t.type==="root")return yN(e,t,n);if(t.type==="text")return TN(e,t)}function pN(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=_i,e.schema=s),e.ancestors.push(t);const a=nE(e,t.tagName,!1),u=SN(e,t);let c=Rf(e,t);return dN.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Wk(d):!0})),tE(e,u,a,t),If(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function mN(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}xa(e,t.position)}function gN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xa(e,t.position)}function EN(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=_i,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:nE(e,t.name,!0),u=xN(e,t),c=Rf(e,t);return tE(e,u,a,t),If(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function yN(e,t,n){const r={};return If(r,Rf(e,t)),e.create(t,e.Fragment,r,n)}function TN(e,t){return t.value}function tE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function If(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function bN(e,t,n){return r;function r(s,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function _N(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=Rr(r);return t(s,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function SN(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Of.call(t.properties,s)){const a=wN(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&fN.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function xN(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else xa(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else xa(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Rf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:lN;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const c=eE(e,a,u);c!==void 0&&n.push(c)}return n}function wN(e,t,n){const r=gl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?O1(n):V1(n)),r.property==="style"){let s=typeof n=="object"?n:AN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=CN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?Jk[r.property]||r.property:r.attribute,n]}}function AN(e,t){try{return uN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new mn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Z1+"#cannot-parse-style-attribute",s}}function nE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const c=I1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=I1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Of.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);xa(e)}function xa(e,t){const n=new mn("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=Z1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function CN(e){const t={};let n;for(n in e)Of.call(e,n)&&(t[vN(n)]=e[n]);return t}function vN(e){let t=e.replace(cN,kN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kN(e){return"-"+e.toLowerCase()}const Lf={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"]},NN={};function Df(e,t){const n=NN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return rE(e,r,s)}function rE(e,t,n){if(PN(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return iE(e.children,t,n)}return Array.isArray(e)?iE(e,t,n):""}function iE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=rE(e[s],t,n);return r.join("")}function PN(e){return!!(e&&typeof e=="object")}const sE=document.createElement("i");function Mf(e){const t="&"+e+";";sE.innerHTML=t;const n=sE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function qn(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function nr(e,t){return e.length>0?(qn(e,e.length,0,t),e):t}const oE={}.hasOwnProperty;function aE(e){const t={};let n=-1;for(;++n<e.length;)ON(t,e[n]);return t}function ON(e,t){let n;for(n in t){const s=(oE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){oE.call(s,u)||(s[u]=[]);const c=a[u];IN(s[u],Array.isArray(c)?c:c?[c]:[])}}}function IN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);qn(e,0,0,r)}function uE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const An=Si(/[A-Za-z]/),gn=Si(/[\dA-Za-z]/),RN=Si(/[#-'*+\--9=?A-Z^-~]/);function yl(e){return e!==null&&(e<32||e===127)}const Ff=Si(/\d/),LN=Si(/[\dA-Fa-f]/),DN=Si(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const Tl=Si(new RegExp("\\p{P}|\\p{S}","u")),as=Si(/\s/);function Si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function eo(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&gn(e.charCodeAt(n+1))&&gn(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function nt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ze(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const MN={tokenize:FN};function FN(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),nt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Be(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const BN={tokenize:UN},lE={tokenize:HN};function UN(e){const t=this,n=[];let r=0,s,a,u;return c;function c(C){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&N();const U=t.events.length;let Y=U,R;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){R=t.events[Y][1].end;break}w(r);let q=U;for(;q<t.events.length;)t.events[q][1].end=F({},R),q++;return qn(t.events,Y+1,0,t.events.slice(U)),t.events.length=q,f(C)}return c(C)}function f(C){if(r===n.length){if(!s)return b(C);if(s.currentConstruct&&s.currentConstruct.concrete)return _(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(lE,p,m)(C)}function p(C){return s&&N(),w(r),b(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(C)}function b(C){return t.containerState={},e.attempt(lE,y,_)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),b(C)}function _(C){if(C===null){s&&N(),w(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),A(C)}function A(C){if(C===null){v(e.exit("chunkFlow"),!0),w(0),e.consume(C);return}return Be(C)?(e.consume(C),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(C),A)}function v(C,U){const Y=t.sliceStream(C);if(U&&Y.push(null),C.previous=a,a&&(a.next=C),a=C,s.defineSkip(C.start),s.write(Y),t.parser.lazy[C.start.line]){let R=s.events.length;for(;R--;)if(s.events[R][1].start.offset<u&&(!s.events[R][1].end||s.events[R][1].end.offset>u))return;const q=t.events.length;let ne=q,me,V;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(me){V=t.events[ne][1].end;break}me=!0}for(w(r),R=q;R<t.events.length;)t.events[R][1].end=F({},V),R++;qn(t.events,ne+1,0,t.events.slice(q)),t.events.length=R}}function w(C){let U=n.length;for(;U-- >C;){const Y=n[U];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=C}function N(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function HN(e,t,n){return nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function to(e){if(e===null||ft(e)||as(e))return 1;if(Tl(e))return 2}function bl(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Bf={name:"attention",resolveAll:zN,tokenize:jN};function zN(e,t){let n=-1,r,s,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=F({},e[r][1].end),b=F({},e[n][1].start);cE(m,-d),cE(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:F({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},c.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=nr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=nr(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=nr(f,bl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=nr(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=nr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,qn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function jN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=to(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),p=to(d),m=!p||p===2&&s||n.includes(d),b=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!b)),f._close=!!(a===42?b:b&&(p||!m)),t(d)}}function cE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const $N={name:"autolink",tokenize:VN};function VN(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return An(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||gn(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||gn(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||yl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):RN(y)?(e.consume(y),f):n(y)}function p(y){return gn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||gn(y))&&r++<63){const _=y===45?b:m;return e.consume(y),_}return n(y)}}const wa={partial:!0,tokenize:qN};function qN(e,t,n){return r;function r(a){return Ze(a)?nt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Be(a)?t(a):n(a)}}const dE={continuation:{tokenize:GN},exit:WN,name:"blockQuote",tokenize:YN};function YN(e,t,n){const r=this;return s;function s(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function GN(e,t,n){const r=this;return s;function s(u){return Ze(u)?nt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(dE,t,n)(u)}}function WN(e){e.exit("blockQuote")}const fE={name:"characterEscape",tokenize:XN};function XN(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return DN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const hE={name:"characterReference",tokenize:KN};function KN(e,t,n){const r=this;let s=0,a,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=gn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=LN,p):(e.enter("characterReferenceValue"),a=7,u=Ff,p(m))}function p(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return u===gn&&!Mf(r.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const pE={partial:!0,tokenize:JN},mE={concrete:!0,name:"codeFenced",tokenize:QN};function QN(e,t,n){const r=this,s={partial:!0,tokenize:Y};let a=0,u=0,c;return d;function d(R){return f(R)}function f(R){const q=r.events[r.events.length-1];return a=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,c=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===c?(u++,e.consume(R),p):u<3?n(R):(e.exit("codeFencedFenceSequence"),Ze(R)?nt(e,m,"whitespace")(R):m(R))}function m(R){return R===null||Be(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(pE,A,U)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(R))}function b(R){return R===null||Be(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):Ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,y,"whitespace")(R)):R===96&&R===c?n(R):(e.consume(R),b)}function y(R){return R===null||Be(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(R))}function _(R){return R===null||Be(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===c?n(R):(e.consume(R),_)}function A(R){return e.attempt(s,U,v)(R)}function v(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),w}function w(R){return a>0&&Ze(R)?nt(e,N,"linePrefix",a+1)(R):N(R)}function N(R){return R===null||Be(R)?e.check(pE,A,U)(R):(e.enter("codeFlowValue"),C(R))}function C(R){return R===null||Be(R)?(e.exit("codeFlowValue"),N(R)):(e.consume(R),C)}function U(R){return e.exit("codeFenced"),t(R)}function Y(R,q,ne){let me=0;return V;function V(oe){return R.enter("lineEnding"),R.consume(oe),R.exit("lineEnding"),se}function se(oe){return R.enter("codeFencedFence"),Ze(oe)?nt(R,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):he(oe)}function he(oe){return oe===c?(R.enter("codeFencedFenceSequence"),ve(oe)):ne(oe)}function ve(oe){return oe===c?(me++,R.consume(oe),ve):me>=u?(R.exit("codeFencedFenceSequence"),Ze(oe)?nt(R,re,"whitespace")(oe):re(oe)):ne(oe)}function re(oe){return oe===null||Be(oe)?(R.exit("codeFencedFence"),q(oe)):ne(oe)}}}function JN(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Uf={name:"codeIndented",tokenize:eP},ZN={partial:!0,tokenize:tP};function eP(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),nt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Be(f)?e.attempt(ZN,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Be(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function tP(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Be(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):nt(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Be(u)?s(u):n(u)}}const nP={name:"codeText",previous:iP,resolve:rP,tokenize:sP};function rP(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function iP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sP(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):Be(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Be(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class oP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Aa(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Aa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Aa(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Aa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Aa(this.left,n.reverse())}}}function Aa(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 gE(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new oP(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,aP(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=F({},p.get(s)[1].start),c=p.slice(s,n),c.unshift(r),p.splice(s,n-s+1,c))}}return qn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function aP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,m,b=-1,y=n,_=0,A=0;const v=[A];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(A=b+1,v.push(A),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):v.pop(),b=v.length;b--;){const w=c.slice(v[b],v[b+1]),N=a.pop();d.push([N,N+w.length-1]),e.splice(N,2,w)}for(d.reverse(),b=-1;++b<d.length;)f[_+d[b][0]]=_+d[b][1],_+=d[b][1]-d[b][0]-1;return f}const uP={resolve:cP,tokenize:dP},lP={partial:!0,tokenize:fP};function cP(e){return gE(e),e}function dP(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):Be(c)?e.check(lP,u,a)(c):(e.consume(c),s)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function fP(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),nt(e,a,"linePrefix")}function a(u){if(u===null||Be(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function EE(e,t,n,r,s,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(w){return w===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(w),e.exit(a),b):w===null||w===32||w===41||yl(w)?n(w):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),A(w))}function b(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===62?(e.exit("chunkString"),e.exit(c),b(w)):w===null||w===60||Be(w)?n(w):(e.consume(w),w===92?_:y)}function _(w){return w===60||w===62||w===92?(e.consume(w),y):y(w)}function A(w){return!p&&(w===null||w===41||ft(w))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(w)):p<f&&w===40?(e.consume(w),p++,A):w===41?(e.consume(w),p--,A):w===null||w===32||w===40||yl(w)?n(w):(e.consume(w),w===92?v:A)}function v(w){return w===40||w===41||w===92?(e.consume(w),A):A(w)}}function yE(e,t,n,r,s,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):Be(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Be(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function TE(e,t,n,r,s,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):Be(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),nt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Be(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:p)}function m(b){return b===u||b===92?(e.consume(b),p):p(b)}}function Ca(e,t){let n;return r;function r(s){return Be(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ze(s)?nt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const hP={name:"definition",tokenize:mP},pP={partial:!0,tokenize:gP};function mP(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return yE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return ft(y)?Ca(e,f)(y):f(y)}function f(y){return EE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(pP,m,m)(y)}function m(y){return Ze(y)?nt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||Be(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function gP(e,t,n){return r;function r(c){return ft(c)?Ca(e,s)(c):n(c)}function s(c){return TE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ze(c)?nt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Be(c)?t(c):n(c)}}const EP={name:"hardBreakEscape",tokenize:yP};function yP(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Be(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const TP={name:"headingAtx",resolve:bP,tokenize:_P};function bP(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},qn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function _P(e,t,n){let r=0;return s;function s(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||ft(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Be(p)?(e.exit("atxHeading"),t(p)):Ze(p)?nt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ft(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const SP=["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"],bE=["pre","script","style","textarea"],xP={concrete:!0,name:"htmlFlow",resolveTo:CP,tokenize:vP},wP={partial:!0,tokenize:NP},AP={partial:!0,tokenize:kP};function CP(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function vP(e,t,n){const r=this;let s,a,u,c,d;return f;function f(I){return p(I)}function p(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),m}function m(I){return I===33?(e.consume(I),b):I===47?(e.consume(I),a=!0,A):I===63?(e.consume(I),s=3,r.interrupt?t:k):An(I)?(e.consume(I),u=String.fromCharCode(I),v):n(I)}function b(I){return I===45?(e.consume(I),s=2,y):I===91?(e.consume(I),s=5,c=0,_):An(I)?(e.consume(I),s=4,r.interrupt?t:k):n(I)}function y(I){return I===45?(e.consume(I),r.interrupt?t:k):n(I)}function _(I){const _e="CDATA[";return I===_e.charCodeAt(c++)?(e.consume(I),c===_e.length?r.interrupt?t:he:_):n(I)}function A(I){return An(I)?(e.consume(I),u=String.fromCharCode(I),v):n(I)}function v(I){if(I===null||I===47||I===62||ft(I)){const _e=I===47,Ue=u.toLowerCase();return!_e&&!a&&bE.includes(Ue)?(s=1,r.interrupt?t(I):he(I)):SP.includes(u.toLowerCase())?(s=6,_e?(e.consume(I),w):r.interrupt?t(I):he(I)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?N(I):C(I))}return I===45||gn(I)?(e.consume(I),u+=String.fromCharCode(I),v):n(I)}function w(I){return I===62?(e.consume(I),r.interrupt?t:he):n(I)}function N(I){return Ze(I)?(e.consume(I),N):V(I)}function C(I){return I===47?(e.consume(I),V):I===58||I===95||An(I)?(e.consume(I),U):Ze(I)?(e.consume(I),C):V(I)}function U(I){return I===45||I===46||I===58||I===95||gn(I)?(e.consume(I),U):Y(I)}function Y(I){return I===61?(e.consume(I),R):Ze(I)?(e.consume(I),Y):C(I)}function R(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,q):Ze(I)?(e.consume(I),R):ne(I)}function q(I){return I===d?(e.consume(I),d=null,me):I===null||Be(I)?n(I):(e.consume(I),q)}function ne(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ft(I)?Y(I):(e.consume(I),ne)}function me(I){return I===47||I===62||Ze(I)?C(I):n(I)}function V(I){return I===62?(e.consume(I),se):n(I)}function se(I){return I===null||Be(I)?he(I):Ze(I)?(e.consume(I),se):n(I)}function he(I){return I===45&&s===2?(e.consume(I),xe):I===60&&s===1?(e.consume(I),ae):I===62&&s===4?(e.consume(I),D):I===63&&s===3?(e.consume(I),k):I===93&&s===5?(e.consume(I),ie):Be(I)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(wP,ee,ve)(I)):I===null||Be(I)?(e.exit("htmlFlowData"),ve(I)):(e.consume(I),he)}function ve(I){return e.check(AP,re,ee)(I)}function re(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),oe}function oe(I){return I===null||Be(I)?ve(I):(e.enter("htmlFlowData"),he(I))}function xe(I){return I===45?(e.consume(I),k):he(I)}function ae(I){return I===47?(e.consume(I),u="",Q):he(I)}function Q(I){if(I===62){const _e=u.toLowerCase();return bE.includes(_e)?(e.consume(I),D):he(I)}return An(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),Q):he(I)}function ie(I){return I===93?(e.consume(I),k):he(I)}function k(I){return I===62?(e.consume(I),D):I===45&&s===2?(e.consume(I),k):he(I)}function D(I){return I===null||Be(I)?(e.exit("htmlFlowData"),ee(I)):(e.consume(I),D)}function ee(I){return e.exit("htmlFlow"),t(I)}}function kP(e,t,n){const r=this;return s;function s(u){return Be(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function NP(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(wa,t,n)}}const PP={name:"htmlText",tokenize:OP};function OP(e,t,n){const r=this;let s,a,u;return c;function c(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),Y):k===63?(e.consume(k),C):An(k)?(e.consume(k),ne):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,_):An(k)?(e.consume(k),N):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function m(k){return k===null?n(k):k===45?(e.consume(k),b):Be(k)?(u=m,ae(k)):(e.consume(k),m)}function b(k){return k===45?(e.consume(k),y):m(k)}function y(k){return k===62?xe(k):k===45?b(k):m(k)}function _(k){const D="CDATA[";return k===D.charCodeAt(a++)?(e.consume(k),a===D.length?A:_):n(k)}function A(k){return k===null?n(k):k===93?(e.consume(k),v):Be(k)?(u=A,ae(k)):(e.consume(k),A)}function v(k){return k===93?(e.consume(k),w):A(k)}function w(k){return k===62?xe(k):k===93?(e.consume(k),w):A(k)}function N(k){return k===null||k===62?xe(k):Be(k)?(u=N,ae(k)):(e.consume(k),N)}function C(k){return k===null?n(k):k===63?(e.consume(k),U):Be(k)?(u=C,ae(k)):(e.consume(k),C)}function U(k){return k===62?xe(k):C(k)}function Y(k){return An(k)?(e.consume(k),R):n(k)}function R(k){return k===45||gn(k)?(e.consume(k),R):q(k)}function q(k){return Be(k)?(u=q,ae(k)):Ze(k)?(e.consume(k),q):xe(k)}function ne(k){return k===45||gn(k)?(e.consume(k),ne):k===47||k===62||ft(k)?me(k):n(k)}function me(k){return k===47?(e.consume(k),xe):k===58||k===95||An(k)?(e.consume(k),V):Be(k)?(u=me,ae(k)):Ze(k)?(e.consume(k),me):xe(k)}function V(k){return k===45||k===46||k===58||k===95||gn(k)?(e.consume(k),V):se(k)}function se(k){return k===61?(e.consume(k),he):Be(k)?(u=se,ae(k)):Ze(k)?(e.consume(k),se):me(k)}function he(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),s=k,ve):Be(k)?(u=he,ae(k)):Ze(k)?(e.consume(k),he):(e.consume(k),re)}function ve(k){return k===s?(e.consume(k),s=void 0,oe):k===null?n(k):Be(k)?(u=ve,ae(k)):(e.consume(k),ve)}function re(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ft(k)?me(k):(e.consume(k),re)}function oe(k){return k===47||k===62||ft(k)?me(k):n(k)}function xe(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function ae(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Q}function Q(k){return Ze(k)?nt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):ie(k)}function ie(k){return e.enter("htmlTextData"),u(k)}}const Hf={name:"labelEnd",resolveAll:DP,resolveTo:MP,tokenize:FP},IP={tokenize:BP},RP={tokenize:UP},LP={tokenize:HP};function DP(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&qn(e,0,e.length,n),e}function MP(e,t){let n=e.length,r=0,s,a,u,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},f={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=nr(c,e.slice(a+1,a+r+3)),c=nr(c,[["enter",p,t]]),c=nr(c,bl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=nr(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=nr(c,e.slice(u+1)),c=nr(c,[["exit",d,t]]),qn(e,a,e.length,c),e}function FP(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(b){return a?a._inactive?m(b):(u=r.parser.defined.includes(gr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(IP,p,u?p:m)(b):b===91?e.attempt(RP,p,u?f:m)(b):u?p(b):m(b)}function f(b){return e.attempt(LP,p,m)(b)}function p(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function BP(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return ft(m)?Ca(e,a)(m):a(m)}function a(m){return m===41?p(m):EE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ft(m)?Ca(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?TE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ft(m)?Ca(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function UP(e,t,n){const r=this;return s;function s(c){return yE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function HP(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const zP={name:"labelStartImage",resolveAll:Hf.resolveAll,tokenize:jP};function jP(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const $P={name:"labelStartLink",resolveAll:Hf.resolveAll,tokenize:VP};function VP(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const zf={name:"lineEnding",tokenize:qP};function qP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const _l={name:"thematicBreak",tokenize:YP};function YP(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Be(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?nt(e,c,"whitespace")(f):c(f))}}const Ln={continuation:{tokenize:KP},exit:JP,name:"list",tokenize:XP},GP={partial:!0,tokenize:ZP},WP={partial:!0,tokenize:QP};function XP(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Ff(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(_l,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Ff(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(wa,r.interrupt?n:p,e.attempt(GP,b,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return Ze(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function KP(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(wa,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ze(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(WP,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,nt(e,e.attempt(Ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function QP(e,t,n){const r=this;return nt(e,s,"listItemIndent",r.containerState.size+1);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function JP(e){e.exit(this.containerState.type)}function ZP(e,t,n){const r=this;return nt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const _E={name:"setextUnderline",resolveTo:eO,tokenize:tO};function eO(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:F({},e[r][1].start),end:F({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function tO(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ze(f)?nt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Be(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const nO={tokenize:rO};function rO(e){const t=this,n=e.attempt(wa,r,e.attempt(this.parser.constructs.flowInitial,s,nt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(uP,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const iO={resolveAll:xE()},sO=SE("string"),oO=SE("text");function SE(e){return{resolveAll:xE(e==="text"?aO:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,c);return u;function u(p){return f(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function xE(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function aO(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,u=-1,c=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:F({},r.end)};r.end=F({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const uO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:hP},disable:{null:[]},document:{42:Ln,43:Ln,45:Ln,48:Ln,49:Ln,50:Ln,51:Ln,52:Ln,53:Ln,54:Ln,55:Ln,56:Ln,57:Ln,62:dE},flow:{35:TP,42:_l,45:[_E,_l],60:xP,61:_E,95:_l,96:mE,126:mE},flowInitial:{[-2]:Uf,[-1]:Uf,32:Uf},insideSpan:{null:[Bf,iO]},string:{38:hE,92:fE},text:{[-5]:zf,[-4]:zf,[-3]:zf,33:zP,38:hE,42:Bf,60:[$N,PP],91:$P,92:[EP,fE],93:Hf,95:Bf,96:nP}},Symbol.toStringTag,{value:"Module"}));function lO(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 s={},a=[];let u=[],c=[];const d={attempt:q(Y),check:q(R),consume:N,enter:C,exit:U,interrupt:q(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:A,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(se){return u=nr(u,se),v(),u[u.length-1]!==null?[]:(ne(t,0),f.events=bl(a,f.events,f),f.events)}function b(se,he){return dO(y(se),he)}function y(se){return cO(u,se)}function _(){const{_bufferIndex:se,_index:he,line:ve,column:re,offset:oe}=r;return{_bufferIndex:se,_index:he,line:ve,column:re,offset:oe}}function A(se){s[se.line]=se.column,V()}function v(){let se;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<he.length;)w(he.charCodeAt(r._bufferIndex));else w(he)}}function w(se){p=p(se)}function N(se){Be(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,V()):se!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=se}function C(se,he){const ve=he||{};return ve.type=se,ve.start=_(),f.events.push(["enter",ve,f]),c.push(ve),ve}function U(se){const he=c.pop();return he.end=_(),f.events.push(["exit",he,f]),he}function Y(se,he){ne(se,he.from)}function R(se,he){he.restore()}function q(se,he){return ve;function ve(re,oe,xe){let ae,Q,ie,k;return Array.isArray(re)?ee(re):"tokenize"in re?ee([re]):D(re);function D(ye){return Re;function Re(He){const Ye=He!==null&&ye[He],bt=He!==null&&ye.null,Cn=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(bt)?bt:bt?[bt]:[]];return ee(Cn)(He)}}function ee(ye){return ae=ye,Q=0,ye.length===0?xe:I(ye[Q])}function I(ye){return Re;function Re(He){return k=me(),ie=ye,ye.partial||(f.currentConstruct=ye),ye.name&&f.parser.constructs.disable.null.includes(ye.name)?Ue():ye.tokenize.call(he?Object.assign(Object.create(f),he):f,d,_e,Ue)(He)}}function _e(ye){return se(ie,k),oe}function Ue(ye){return k.restore(),++Q<ae.length?I(ae[Q]):xe}}}function ne(se,he){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&qn(f.events,he,f.events.length-he,se.resolve(f.events.slice(he),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function me(){const se=_(),he=f.previous,ve=f.currentConstruct,re=f.events.length,oe=Array.from(c);return{from:re,restore:xe};function xe(){r=se,f.previous=he,f.currentConstruct=ve,f.events.length=re,c=oe,V()}}function V(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function cO(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function dO(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
17
+ `+T.stack}return{value:i,source:o,stack:E,digest:null}}function Pm(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function Om(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var t7=typeof WeakMap=="function"?WeakMap:Map;function Ux(i,o,l){l=mi(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){ud||(ud=!0,Ym=h),Om(i,o)},l}function Hx(i,o,l){l=mi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;l.payload=function(){return h(E)},l.callback=function(){Om(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(l.callback=function(){Om(i,o),typeof h!="function"&&(Vi===null?Vi=new Set([this]):Vi.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})}),l}function zx(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new t7;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(l)||(E.add(l),i=m7.bind(null,i,o,l),o.then(i,i))}function jx(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function $x(i,o,l,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=mi(-1,1),o.tag=2,ji(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var n7=H.ReactCurrentOwner,Hn=!1;function Nn(i,o,l,h){o.child=i===null?lx(o,null,l,h):$o(o,i.child,l,h)}function Vx(i,o,l,h,E){l=l.render;var T=o.ref;return qo(o,E),h=Sm(i,o,l,h,T,E),l=xm(),i!==null&&!Hn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(Ct&&l&&sm(o),o.flags|=1,Nn(i,o,h,E),o.child)}function qx(i,o,l,h,E){if(i===null){var T=l.type;return typeof T=="function"&&!Zm(T)&&T.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=T,Yx(i,o,T,h,E)):(i=pd(l.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,(i.lanes&E)===0){var S=T.memoizedProps;if(l=l.compare,l=l!==null?l:gu,l(S,h)&&i.ref===o.ref)return gi(i,o,E)}return o.flags|=1,i=Wi(T,h),i.ref=o.ref,i.return=o,o.child=i}function Yx(i,o,l,h,E){if(i!==null){var T=i.memoizedProps;if(gu(T,h)&&i.ref===o.ref)if(Hn=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Hn=!0);else return o.lanes=i.lanes,gi(i,o,E)}return Im(i,o,l,h,E)}function Gx(i,o,l){var h=o.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},gt(Xo,Qn),Qn|=l;else{if((l&1073741824)===0)return i=T!==null?T.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,gt(Xo,Qn),Qn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:l,gt(Xo,Qn),Qn|=h}else T!==null?(h=T.baseLanes|l,o.memoizedState=null):h=l,gt(Xo,Qn),Qn|=h;return Nn(i,o,E,l),o.child}function Wx(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Im(i,o,l,h,E){var T=Un(l)?As:Tn.current;return T=Uo(o,T),qo(o,E),l=Sm(i,o,l,h,T,E),h=xm(),i!==null&&!Hn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,gi(i,o,E)):(Ct&&h&&sm(o),o.flags|=1,Nn(i,o,l,E),o.child)}function Xx(i,o,l,h,E){if(Un(l)){var T=!0;Uc(o)}else T=!1;if(qo(o,E),o.stateNode===null)rd(i,o),Fx(o,l,h),km(o,l,h,E),h=!0;else if(i===null){var S=o.stateNode,R=o.memoizedProps;S.props=R;var U=S.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=ur(Z):(Z=Un(l)?As:Tn.current,Z=Uo(o,Z));var ce=l.getDerivedStateFromProps,me=typeof ce=="function"||typeof S.getSnapshotBeforeUpdate=="function";me||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(R!==h||U!==Z)&&Bx(o,S,h,Z),zi=!1;var ue=o.memoizedState;S.state=ue,Wc(o,h,S,E),U=o.memoizedState,R!==h||ue!==U||Bn.current||zi?(typeof ce=="function"&&(Nm(o,l,ce,h),U=o.memoizedState),(R=zi||Mx(o,l,R,h,ue,U,Z))?(me||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=U),S.props=h,S.state=U,S.context=Z,h=R):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{S=o.stateNode,dx(i,o),R=o.memoizedProps,Z=o.type===o.elementType?R:Ar(o.type,R),S.props=Z,me=o.pendingProps,ue=S.context,U=l.contextType,typeof U=="object"&&U!==null?U=ur(U):(U=Un(l)?As:Tn.current,U=Uo(o,U));var Ae=l.getDerivedStateFromProps;(ce=typeof Ae=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(R!==me||ue!==U)&&Bx(o,S,h,U),zi=!1,ue=o.memoizedState,S.state=ue,Wc(o,h,S,E);var ke=o.memoizedState;R!==me||ue!==ke||Bn.current||zi?(typeof Ae=="function"&&(Nm(o,l,Ae,h),ke=o.memoizedState),(Z=zi||Mx(o,l,Z,h,ue,ke,U)||!1)?(ce||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,ke,U),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,ke,U)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||R===i.memoizedProps&&ue===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ue===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=ke),S.props=h,S.state=ke,S.context=U,h=Z):(typeof S.componentDidUpdate!="function"||R===i.memoizedProps&&ue===i.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ue===i.memoizedState||(o.flags|=1024),h=!1)}return Rm(i,o,l,h,T,E)}function Rm(i,o,l,h,E,T){Wx(i,o);var S=(o.flags&128)!==0;if(!h&&!S)return E&&ex(o,l,!1),gi(i,o,T);h=o.stateNode,n7.current=o;var R=S&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&S?(o.child=$o(o,i.child,null,T),o.child=$o(o,null,R,T)):Nn(i,o,R,T),o.memoizedState=h.state,E&&ex(o,l,!0),o.child}function Kx(i){var o=i.stateNode;o.pendingContext?JS(i,o.pendingContext,o.pendingContext!==o.context):o.context&&JS(i,o.context,!1),gm(i,o.containerInfo)}function Qx(i,o,l,h,E){return jo(),lm(E),o.flags|=256,Nn(i,o,l,h),o.child}var Lm={dehydrated:null,treeContext:null,retryLane:0};function Dm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Jx(i,o,l){var h=o.pendingProps,E=kt.current,T=!1,S=(o.flags&128)!==0,R;if((R=S)||(R=i!==null&&i.memoizedState===null?!1:(E&2)!==0),R?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),gt(kt,E&1),i===null)return um(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(S=h.children,i=h.fallback,T?(h=o.mode,T=o.child,S={mode:"hidden",children:S},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=S):T=md(S,h,0,null),i=Ds(i,h,l,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Dm(l),o.memoizedState=Lm,i):Mm(o,S));if(E=i.memoizedState,E!==null&&(R=E.dehydrated,R!==null))return r7(i,o,S,h,R,E,l);if(T){T=h.fallback,S=o.mode,E=i.child,R=E.sibling;var U={mode:"hidden",children:h.children};return(S&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=U,o.deletions=null):(h=Wi(E,U),h.subtreeFlags=E.subtreeFlags&14680064),R!==null?T=Wi(R,T):(T=Ds(T,S,l,null),T.flags|=2),T.return=o,h.return=o,h.sibling=T,o.child=h,h=T,T=o.child,S=i.child.memoizedState,S=S===null?Dm(l):{baseLanes:S.baseLanes|l,cachePool:null,transitions:S.transitions},T.memoizedState=S,T.childLanes=i.childLanes&~l,o.memoizedState=Lm,h}return T=i.child,i=T.sibling,h=Wi(T,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=l),h.return=o,h.sibling=null,i!==null&&(l=o.deletions,l===null?(o.deletions=[i],o.flags|=16):l.push(i)),o.child=h,o.memoizedState=null,h}function Mm(i,o){return o=md({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function nd(i,o,l,h){return h!==null&&lm(h),$o(o,i.child,null,l),i=Mm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function r7(i,o,l,h,E,T,S){if(l)return o.flags&256?(o.flags&=-257,h=Pm(Error(n(422))),nd(i,o,S,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=md({mode:"visible",children:h.children},E,0,null),T=Ds(T,E,S,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&$o(o,i.child,null,S),o.child.memoizedState=Dm(S),o.memoizedState=Lm,T);if((o.mode&1)===0)return nd(i,o,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var R=h.dgst;return h=R,T=Error(n(419)),h=Pm(T,h,void 0),nd(i,o,S,h)}if(R=(S&i.childLanes)!==0,Hn||R){if(h=en,h!==null){switch(S&-S){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|S))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,pi(i,E),Nr(h,i,E,-1))}return Jm(),h=Pm(Error(n(421))),nd(i,o,S,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=g7.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,Kn=Fi(E.nextSibling),Xn=o,Ct=!0,wr=null,i!==null&&(or[ar++]=fi,or[ar++]=hi,or[ar++]=Cs,fi=i.id,hi=i.overflow,Cs=o),o=Mm(o,h.children),o.flags|=4096,o)}function Zx(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),hm(i.return,o,l)}function Fm(i,o,l,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=l,T.tailMode=E)}function e2(i,o,l){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(Nn(i,o,h.children,l),h=kt.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Zx(i,l,o);else if(i.tag===19)Zx(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(gt(kt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(l=o.child,E=null;l!==null;)i=l.alternate,i!==null&&Xc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),Fm(o,!1,E,l,T);break;case"backwards":for(l=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Xc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Fm(o,!0,l,null,T);break;case"together":Fm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function rd(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function gi(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),Os|=o.lanes,(l&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,l=Wi(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=Wi(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function i7(i,o,l){switch(o.tag){case 3:Kx(o),jo();break;case 5:px(o);break;case 1:Un(o.type)&&Uc(o);break;case 4:gm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;gt(qc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(gt(kt,kt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?Jx(i,o,l):(gt(kt,kt.current&1),i=gi(i,o,l),i!==null?i.sibling:null);gt(kt,kt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return e2(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),gt(kt,kt.current),h)break;return null;case 22:case 23:return o.lanes=0,Gx(i,o,l)}return gi(i,o,l)}var t2,Bm,n2,r2;t2=function(i,o){for(var l=o.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Bm=function(){},n2=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,ks(Wr.current);var T=null;switch(l){case"input":E=sr(i,E),h=sr(i,h),T=[];break;case"select":E=N({},E,{value:void 0}),h=N({},h,{value:void 0}),T=[];break;case"textarea":E=Pe(i,E),h=Pe(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Mc)}un(l,h);var S;l=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var R=E[Z];for(S in R)R.hasOwnProperty(S)&&(l||(l={}),l[S]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(s.hasOwnProperty(Z)?T||(T=[]):(T=T||[]).push(Z,null));for(Z in h){var U=h[Z];if(R=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&U!==R&&(U!=null||R!=null))if(Z==="style")if(R){for(S in R)!R.hasOwnProperty(S)||U&&U.hasOwnProperty(S)||(l||(l={}),l[S]="");for(S in U)U.hasOwnProperty(S)&&R[S]!==U[S]&&(l||(l={}),l[S]=U[S])}else l||(T||(T=[]),T.push(Z,l)),l=U;else Z==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,R=R?R.__html:void 0,U!=null&&R!==U&&(T=T||[]).push(Z,U)):Z==="children"?typeof U!="string"&&typeof U!="number"||(T=T||[]).push(Z,""+U):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?(U!=null&&Z==="onScroll"&&_t("scroll",i),T||R===U||(T=[])):(T=T||[]).push(Z,U))}l&&(T=T||[]).push("style",l);var Z=T;(o.updateQueue=Z)&&(o.flags|=4)}},r2=function(i,o,l,h){l!==h&&(o.flags|=4)};function Ou(i,o){if(!Ct)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function _n(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(o)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=l,o}function s7(i,o,l){var h=o.pendingProps;switch(om(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _n(o),null;case 1:return Un(o.type)&&Bc(),_n(o),null;case 3:return h=o.stateNode,Yo(),St(Bn),St(Tn),Tm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&($c(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,wr!==null&&(Xm(wr),wr=null))),Bm(i,o),_n(o),null;case 5:Em(o);var E=ks(Cu.current);if(l=o.type,i!==null&&o.stateNode!=null)n2(i,o,l,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return _n(o),null}if(i=ks(Wr.current),$c(o)){h=o.stateNode,l=o.type;var T=o.memoizedProps;switch(h[Gr]=o,h[_u]=T,i=(o.mode&1)!==0,l){case"dialog":_t("cancel",h),_t("close",h);break;case"iframe":case"object":case"embed":_t("load",h);break;case"video":case"audio":for(E=0;E<yu.length;E++)_t(yu[E],h);break;case"source":_t("error",h);break;case"img":case"image":case"link":_t("error",h),_t("load",h);break;case"details":_t("toggle",h);break;case"input":Jt(h,T),_t("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},_t("invalid",h);break;case"textarea":Me(h,T),_t("invalid",h)}un(l,T),E=null;for(var S in T)if(T.hasOwnProperty(S)){var R=T[S];S==="children"?typeof R=="string"?h.textContent!==R&&(T.suppressHydrationWarning!==!0&&Dc(h.textContent,R,i),E=["children",R]):typeof R=="number"&&h.textContent!==""+R&&(T.suppressHydrationWarning!==!0&&Dc(h.textContent,R,i),E=["children",""+R]):s.hasOwnProperty(S)&&R!=null&&S==="onScroll"&&_t("scroll",h)}switch(l){case"input":Cn(h),vn(h,T,!0);break;case"textarea":Cn(h),ht(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=Mc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(l,{is:h.is}):(i=S.createElement(l),l==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,l),i[Gr]=o,i[_u]=h,t2(i,o,!1,!1),o.stateNode=i;e:{switch(S=qr(l,h),l){case"dialog":_t("cancel",i),_t("close",i),E=h;break;case"iframe":case"object":case"embed":_t("load",i),E=h;break;case"video":case"audio":for(E=0;E<yu.length;E++)_t(yu[E],i);E=h;break;case"source":_t("error",i),E=h;break;case"img":case"image":case"link":_t("error",i),_t("load",i),E=h;break;case"details":_t("toggle",i),E=h;break;case"input":Jt(i,h),E=sr(i,h),_t("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=N({},h,{value:void 0}),_t("invalid",i);break;case"textarea":Me(i,h),E=Pe(i,h),_t("invalid",i);break;default:E=h}un(l,E),R=E;for(T in R)if(R.hasOwnProperty(T)){var U=R[T];T==="style"?an(i,U):T==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&qe(i,U)):T==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Ie(i,U):typeof U=="number"&&Ie(i,""+U):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?U!=null&&T==="onScroll"&&_t("scroll",i):U!=null&&C(i,T,U,S))}switch(l){case"input":Cn(i),vn(i,h,!1);break;case"textarea":Cn(i),ht(i);break;case"option":h.value!=null&&i.setAttribute("value",""+He(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?we(i,!!h.multiple,T,!1):h.defaultValue!=null&&we(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Mc)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return _n(o),null;case 6:if(i&&o.stateNode!=null)r2(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=ks(Cu.current),ks(Wr.current),$c(o)){if(h=o.stateNode,l=o.memoizedProps,h[Gr]=o,(T=h.nodeValue!==l)&&(i=Xn,i!==null))switch(i.tag){case 3:Dc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Dc(h.nodeValue,l,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Gr]=o,o.stateNode=h}return _n(o),null;case 13:if(St(kt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Ct&&Kn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)ox(),jo(),o.flags|=98560,T=!1;else if(T=$c(o),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=o.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Gr]=o}else jo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;_n(o),T=!1}else wr!==null&&(Xm(wr),wr=null),T=!0;if(!T)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=l,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(kt.current&1)!==0?Yt===0&&(Yt=3):Jm())),o.updateQueue!==null&&(o.flags|=4),_n(o),null);case 4:return Yo(),Bm(i,o),i===null&&Tu(o.stateNode.containerInfo),_n(o),null;case 10:return fm(o.type._context),_n(o),null;case 17:return Un(o.type)&&Bc(),_n(o),null;case 19:if(St(kt),T=o.memoizedState,T===null)return _n(o),null;if(h=(o.flags&128)!==0,S=T.rendering,S===null)if(h)Ou(T,!1);else{if(Yt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(S=Xc(i),S!==null){for(o.flags|=128,Ou(T,!1),h=S.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=l,l=o.child;l!==null;)T=l,i=h,T.flags&=14680066,S=T.alternate,S===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=S.childLanes,T.lanes=S.lanes,T.child=S.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=S.memoizedProps,T.memoizedState=S.memoizedState,T.updateQueue=S.updateQueue,T.type=S.type,i=S.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return gt(kt,kt.current&1|2),o.child}i=i.sibling}T.tail!==null&&Dt()>Ko&&(o.flags|=128,h=!0,Ou(T,!1),o.lanes=4194304)}else{if(!h)if(i=Xc(S),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),Ou(T,!0),T.tail===null&&T.tailMode==="hidden"&&!S.alternate&&!Ct)return _n(o),null}else 2*Dt()-T.renderingStartTime>Ko&&l!==1073741824&&(o.flags|=128,h=!0,Ou(T,!1),o.lanes=4194304);T.isBackwards?(S.sibling=o.child,o.child=S):(l=T.last,l!==null?l.sibling=S:o.child=S,T.last=S)}return T.tail!==null?(o=T.tail,T.rendering=o,T.tail=o.sibling,T.renderingStartTime=Dt(),o.sibling=null,l=kt.current,gt(kt,h?l&1|2:l&1),o):(_n(o),null);case 22:case 23:return Qm(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Qn&1073741824)!==0&&(_n(o),o.subtreeFlags&6&&(o.flags|=8192)):_n(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function o7(i,o){switch(om(o),o.tag){case 1:return Un(o.type)&&Bc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Yo(),St(Bn),St(Tn),Tm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Em(o),null;case 13:if(St(kt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));jo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return St(kt),null;case 4:return Yo(),null;case 10:return fm(o.type._context),null;case 22:case 23:return Qm(),null;case 24:return null;default:return null}}var id=!1,Sn=!1,a7=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Wo(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){It(i,o,h)}else l.current=null}function Um(i,o,l){try{l()}catch(h){It(i,o,h)}}var i2=!1;function u7(i,o){if(Qp=wc,i=MS(),$p(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var E=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{l.nodeType,T.nodeType}catch(Te){l=null;break e}var S=0,R=-1,U=-1,Z=0,ce=0,me=i,ue=null;t:for(;;){for(var Ae;me!==l||E!==0&&me.nodeType!==3||(R=S+E),me!==T||h!==0&&me.nodeType!==3||(U=S+h),me.nodeType===3&&(S+=me.nodeValue.length),(Ae=me.firstChild)!==null;)ue=me,me=Ae;for(;;){if(me===i)break t;if(ue===l&&++Z===E&&(R=S),ue===T&&++ce===h&&(U=S),(Ae=me.nextSibling)!==null)break;me=ue,ue=me.parentNode}me=Ae}l=R===-1||U===-1?null:{start:R,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(Jp={focusedElem:i,selectionRange:l},wc=!1,Ne=o;Ne!==null;)if(o=Ne,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Ne=i;else for(;Ne!==null;){o=Ne;try{var ke=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Oe=ke.memoizedProps,Mt=ke.memoizedState,W=o.stateNode,j=W.getSnapshotBeforeUpdate(o.elementType===o.type?Oe:Ar(o.type,Oe),Mt);W.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var K=o.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Te){It(o,o.return,Te)}if(i=o.sibling,i!==null){i.return=o.return,Ne=i;break}Ne=o.return}return ke=i2,i2=!1,ke}function Iu(i,o,l){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Um(o,l,T)}E=E.next}while(E!==h)}}function sd(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==o)}}function Hm(i){var o=i.ref;if(o!==null){var l=i.stateNode;i.tag,i=l,typeof o=="function"?o(i):o.current=i}}function s2(i){var o=i.alternate;o!==null&&(i.alternate=null,s2(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Gr],delete o[_u],delete o[nm],delete o[VB],delete o[qB])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function o2(i){return i.tag===5||i.tag===3||i.tag===4}function a2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||o2(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function zm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.nodeType===8?l.parentNode.insertBefore(i,o):l.insertBefore(i,o):(l.nodeType===8?(o=l.parentNode,o.insertBefore(i,l)):(o=l,o.appendChild(i)),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=Mc));else if(h!==4&&(i=i.child,i!==null))for(zm(i,o,l),i=i.sibling;i!==null;)zm(i,o,l),i=i.sibling}function jm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(jm(i,o,l),i=i.sibling;i!==null;)jm(i,o,l),i=i.sibling}var ln=null,Cr=!1;function $i(i,o,l){for(l=l.child;l!==null;)u2(i,o,l),l=l.sibling}function u2(i,o,l){if(Yr&&typeof Yr.onCommitFiberUnmount=="function")try{Yr.onCommitFiberUnmount(yc,l)}catch(R){}switch(l.tag){case 5:Sn||Wo(l,o);case 6:var h=ln,E=Cr;ln=null,$i(i,o,l),ln=h,Cr=E,ln!==null&&(Cr?(i=ln,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):ln.removeChild(l.stateNode));break;case 18:ln!==null&&(Cr?(i=ln,l=l.stateNode,i.nodeType===8?tm(i.parentNode,l):i.nodeType===1&&tm(i,l),cu(i)):tm(ln,l.stateNode));break;case 4:h=ln,E=Cr,ln=l.stateNode.containerInfo,Cr=!0,$i(i,o,l),ln=h,Cr=E;break;case 0:case 11:case 14:case 15:if(!Sn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,S=T.destroy;T=T.tag,S!==void 0&&((T&2)!==0||(T&4)!==0)&&Um(l,o,S),E=E.next}while(E!==h)}$i(i,o,l);break;case 1:if(!Sn&&(Wo(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(R){It(l,o,R)}$i(i,o,l);break;case 21:$i(i,o,l);break;case 22:l.mode&1?(Sn=(h=Sn)||l.memoizedState!==null,$i(i,o,l),Sn=h):$i(i,o,l);break;default:$i(i,o,l)}}function l2(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new a7),o.forEach(function(h){var E=E7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function vr(i,o){var l=o.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var T=i,S=o,R=S;e:for(;R!==null;){switch(R.tag){case 5:ln=R.stateNode,Cr=!1;break e;case 3:ln=R.stateNode.containerInfo,Cr=!0;break e;case 4:ln=R.stateNode.containerInfo,Cr=!0;break e}R=R.return}if(ln===null)throw Error(n(160));u2(T,S,E),ln=null,Cr=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(Z){It(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)c2(o,i),o=o.sibling}function c2(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(vr(o,i),Kr(i),h&4){try{Iu(3,i,i.return),sd(3,i)}catch(Oe){It(i,i.return,Oe)}try{Iu(5,i,i.return)}catch(Oe){It(i,i.return,Oe)}}break;case 1:vr(o,i),Kr(i),h&512&&l!==null&&Wo(l,l.return);break;case 5:if(vr(o,i),Kr(i),h&512&&l!==null&&Wo(l,l.return),i.flags&32){var E=i.stateNode;try{Ie(E,"")}catch(Oe){It(i,i.return,Oe)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,S=l!==null?l.memoizedProps:T,R=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{R==="input"&&T.type==="radio"&&T.name!=null&&Ve(E,T),qr(R,S);var Z=qr(R,T);for(S=0;S<U.length;S+=2){var ce=U[S],me=U[S+1];ce==="style"?an(E,me):ce==="dangerouslySetInnerHTML"?qe(E,me):ce==="children"?Ie(E,me):C(E,ce,me,Z)}switch(R){case"input":Nt(E,T);break;case"textarea":rt(E,T);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Ae=T.value;Ae!=null?we(E,!!T.multiple,Ae,!1):ue!==!!T.multiple&&(T.defaultValue!=null?we(E,!!T.multiple,T.defaultValue,!0):we(E,!!T.multiple,T.multiple?[]:"",!1))}E[_u]=T}catch(Oe){It(i,i.return,Oe)}}break;case 6:if(vr(o,i),Kr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Oe){It(i,i.return,Oe)}}break;case 3:if(vr(o,i),Kr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{cu(o.containerInfo)}catch(Oe){It(i,i.return,Oe)}break;case 4:vr(o,i),Kr(i);break;case 13:vr(o,i),Kr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(qm=Dt())),h&4&&l2(i);break;case 22:if(ce=l!==null&&l.memoizedState!==null,i.mode&1?(Sn=(Z=Sn)||ce,vr(o,i),Sn=Z):vr(o,i),Kr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!ce&&(i.mode&1)!==0)for(Ne=i,ce=i.child;ce!==null;){for(me=Ne=ce;Ne!==null;){switch(ue=Ne,Ae=ue.child,ue.tag){case 0:case 11:case 14:case 15:Iu(4,ue,ue.return);break;case 1:Wo(ue,ue.return);var ke=ue.stateNode;if(typeof ke.componentWillUnmount=="function"){h=ue,l=ue.return;try{o=h,ke.props=o.memoizedProps,ke.state=o.memoizedState,ke.componentWillUnmount()}catch(Oe){It(h,l,Oe)}}break;case 5:Wo(ue,ue.return);break;case 22:if(ue.memoizedState!==null){h2(me);continue}}Ae!==null?(Ae.return=ue,Ne=Ae):h2(me)}ce=ce.sibling}e:for(ce=null,me=i;;){if(me.tag===5){if(ce===null){ce=me;try{E=me.stateNode,Z?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(R=me.stateNode,U=me.memoizedProps.style,S=U!=null&&U.hasOwnProperty("display")?U.display:null,R.style.display=Ht("display",S))}catch(Oe){It(i,i.return,Oe)}}}else if(me.tag===6){if(ce===null)try{me.stateNode.nodeValue=Z?"":me.memoizedProps}catch(Oe){It(i,i.return,Oe)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===i)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===i)break e;for(;me.sibling===null;){if(me.return===null||me.return===i)break e;ce===me&&(ce=null),me=me.return}ce===me&&(ce=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:vr(o,i),Kr(i),h&4&&l2(i);break;case 21:break;default:vr(o,i),Kr(i)}}function Kr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(o2(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Ie(E,""),h.flags&=-33);var T=a2(i);jm(i,T,E);break;case 3:case 4:var S=h.stateNode.containerInfo,R=a2(i);zm(i,R,S);break;default:throw Error(n(161))}}catch(U){It(i,i.return,U)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function l7(i,o,l){Ne=i,d2(i)}function d2(i,o,l){for(var h=(i.mode&1)!==0;Ne!==null;){var E=Ne,T=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||id;if(!S){var R=E.alternate,U=R!==null&&R.memoizedState!==null||Sn;R=id;var Z=Sn;if(id=S,(Sn=U)&&!Z)for(Ne=E;Ne!==null;)S=Ne,U=S.child,S.tag===22&&S.memoizedState!==null?p2(E):U!==null?(U.return=S,Ne=U):p2(E);for(;T!==null;)Ne=T,d2(T),T=T.sibling;Ne=E,id=R,Sn=Z}f2(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Ne=T):f2(i)}}function f2(i){for(;Ne!==null;){var o=Ne;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Sn||sd(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!Sn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:Ar(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&hx(o,T,h);break;case 3:var S=o.updateQueue;if(S!==null){if(l=null,o.child!==null)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}hx(o,S,l)}break;case 5:var R=o.stateNode;if(l===null&&o.flags&4){l=R;var U=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&l.focus();break;case"img":U.src&&(l.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Z=o.alternate;if(Z!==null){var ce=Z.memoizedState;if(ce!==null){var me=ce.dehydrated;me!==null&&cu(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Sn||o.flags&512&&Hm(o)}catch(ue){It(o,o.return,ue)}}if(o===i){Ne=null;break}if(l=o.sibling,l!==null){l.return=o.return,Ne=l;break}Ne=o.return}}function h2(i){for(;Ne!==null;){var o=Ne;if(o===i){Ne=null;break}var l=o.sibling;if(l!==null){l.return=o.return,Ne=l;break}Ne=o.return}}function p2(i){for(;Ne!==null;){var o=Ne;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{sd(4,o)}catch(U){It(o,l,U)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(U){It(o,E,U)}}var T=o.return;try{Hm(o)}catch(U){It(o,T,U)}break;case 5:var S=o.return;try{Hm(o)}catch(U){It(o,S,U)}}}catch(U){It(o,o.return,U)}if(o===i){Ne=null;break}var R=o.sibling;if(R!==null){R.return=o.return,Ne=R;break}Ne=o.return}}var c7=Math.ceil,od=H.ReactCurrentDispatcher,$m=H.ReactCurrentOwner,cr=H.ReactCurrentBatchConfig,it=0,en=null,zt=null,cn=0,Qn=0,Xo=Bi(0),Yt=0,Ru=null,Os=0,ad=0,Vm=0,Lu=null,zn=null,qm=0,Ko=1/0,Ei=null,ud=!1,Ym=null,Vi=null,ld=!1,qi=null,cd=0,Du=0,Gm=null,dd=-1,fd=0;function kn(){return(it&6)!==0?Dt():dd!==-1?dd:dd=Dt()}function Yi(i){return(i.mode&1)===0?1:(it&2)!==0&&cn!==0?cn&-cn:GB.transition!==null?(fd===0&&(fd=aS()),fd):(i=lt,i!==0||(i=window.event,i=i===void 0?16:gS(i.type)),i)}function Nr(i,o,l,h){if(50<Du)throw Du=0,Gm=null,Error(n(185));su(i,l,h),((it&2)===0||i!==en)&&(i===en&&((it&2)===0&&(ad|=l),Yt===4&&Gi(i,cn)),jn(i,h),l===1&&it===0&&(o.mode&1)===0&&(Ko=Dt()+500,Hc&&Hi()))}function jn(i,o){var l=i.callbackNode;G9(i,o);var h=_c(i,i===en?cn:0);if(h===0)l!==null&&iS(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&iS(l),o===1)i.tag===0?YB(g2.bind(null,i)):tx(g2.bind(null,i)),jB(function(){(it&6)===0&&Hi()}),l=null;else{switch(uS(h)){case 1:l=Cp;break;case 4:l=sS;break;case 16:l=Ec;break;case 536870912:l=oS;break;default:l=Ec}l=w2(l,m2.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function m2(i,o){if(dd=-1,fd=0,(it&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Qo()&&i.callbackNode!==l)return null;var h=_c(i,i===en?cn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=hd(i,h);else{o=h;var E=it;it|=2;var T=y2();(en!==i||cn!==o)&&(Ei=null,Ko=Dt()+500,Rs(i,o));do try{h7();break}catch(R){E2(i,R)}while(!0);dm(),od.current=T,it=E,zt!==null?o=0:(en=null,cn=0,o=Yt)}if(o!==0){if(o===2&&(E=vp(i),E!==0&&(h=E,o=Wm(i,E))),o===1)throw l=Ru,Rs(i,0),Gi(i,h),jn(i,Dt()),l;if(o===6)Gi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!d7(E)&&(o=hd(i,h),o===2&&(T=vp(i),T!==0&&(h=T,o=Wm(i,T))),o===1))throw l=Ru,Rs(i,0),Gi(i,h),jn(i,Dt()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Ls(i,zn,Ei);break;case 3:if(Gi(i,h),(h&130023424)===h&&(o=qm+500-Dt(),10<o)){if(_c(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){kn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=em(Ls.bind(null,i,zn,Ei),o);break}Ls(i,zn,Ei);break;case 4:if(Gi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var S=31-Sr(h);T=1<<S,S=o[S],S>E&&(E=S),h&=~T}if(h=E,h=Dt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*c7(h/1960))-h,10<h){i.timeoutHandle=em(Ls.bind(null,i,zn,Ei),h);break}Ls(i,zn,Ei);break;case 5:Ls(i,zn,Ei);break;default:throw Error(n(329))}}}return jn(i,Dt()),i.callbackNode===l?m2.bind(null,i):null}function Wm(i,o){var l=Lu;return i.current.memoizedState.isDehydrated&&(Rs(i,o).flags|=256),i=hd(i,o),i!==2&&(o=zn,zn=l,o!==null&&Xm(o)),i}function Xm(i){zn===null?zn=i:zn.push.apply(zn,i)}function d7(i){for(var o=i;;){if(o.flags&16384){var l=o.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var E=l[h],T=E.getSnapshot;E=E.value;try{if(!xr(T(),E))return!1}catch(S){return!1}}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Gi(i,o){for(o&=~Vm,o&=~ad,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-Sr(o),h=1<<l;i[l]=-1,o&=~h}}function g2(i){if((it&6)!==0)throw Error(n(327));Qo();var o=_c(i,0);if((o&1)===0)return jn(i,Dt()),null;var l=hd(i,o);if(i.tag!==0&&l===2){var h=vp(i);h!==0&&(o=h,l=Wm(i,h))}if(l===1)throw l=Ru,Rs(i,0),Gi(i,o),jn(i,Dt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Ls(i,zn,Ei),jn(i,Dt()),null}function Km(i,o){var l=it;it|=1;try{return i(o)}finally{it=l,it===0&&(Ko=Dt()+500,Hc&&Hi())}}function Is(i){qi!==null&&qi.tag===0&&(it&6)===0&&Qo();var o=it;it|=1;var l=cr.transition,h=lt;try{if(cr.transition=null,lt=1,i)return i()}finally{lt=h,cr.transition=l,it=o,(it&6)===0&&Hi()}}function Qm(){Qn=Xo.current,St(Xo)}function Rs(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,zB(l)),zt!==null)for(l=zt.return;l!==null;){var h=l;switch(om(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Bc();break;case 3:Yo(),St(Bn),St(Tn),Tm();break;case 5:Em(h);break;case 4:Yo();break;case 13:St(kt);break;case 19:St(kt);break;case 10:fm(h.type._context);break;case 22:case 23:Qm()}l=l.return}if(en=i,zt=i=Wi(i.current,null),cn=Qn=o,Yt=0,Ru=null,Vm=ad=Os=0,zn=Lu=null,Ns!==null){for(o=0;o<Ns.length;o++)if(l=Ns[o],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,T=l.pending;if(T!==null){var S=T.next;T.next=E,h.next=S}l.pending=h}Ns=null}return i}function E2(i,o){do{var l=zt;try{if(dm(),Kc.current=ed,Qc){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Qc=!1}if(Ps=0,Zt=qt=Pt=null,vu=!1,Nu=0,$m.current=null,l===null||l.return===null){Yt=1,Ru=o,zt=null;break}e:{var T=i,S=l.return,R=l,U=o;if(o=cn,R.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var Z=U,ce=R,me=ce.tag;if((ce.mode&1)===0&&(me===0||me===11||me===15)){var ue=ce.alternate;ue?(ce.updateQueue=ue.updateQueue,ce.memoizedState=ue.memoizedState,ce.lanes=ue.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var Ae=jx(S);if(Ae!==null){Ae.flags&=-257,$x(Ae,S,R,T,o),Ae.mode&1&&zx(T,Z,o),o=Ae,U=Z;var ke=o.updateQueue;if(ke===null){var Oe=new Set;Oe.add(U),o.updateQueue=Oe}else ke.add(U);break e}else{if((o&1)===0){zx(T,Z,o),Jm();break e}U=Error(n(426))}}else if(Ct&&R.mode&1){var Mt=jx(S);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),$x(Mt,S,R,T,o),lm(Go(U,R));break e}}T=U=Go(U,R),Yt!==4&&(Yt=2),Lu===null?Lu=[T]:Lu.push(T),T=S;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var W=Ux(T,U,o);fx(T,W);break e;case 1:R=U;var j=T.type,K=T.stateNode;if((T.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Vi===null||!Vi.has(K)))){T.flags|=65536,o&=-o,T.lanes|=o;var Te=Hx(T,R,o);fx(T,Te);break e}}T=T.return}while(T!==null)}b2(l)}catch(Le){o=Le,zt===l&&l!==null&&(zt=l=l.return);continue}break}while(!0)}function y2(){var i=od.current;return od.current=ed,i===null?ed:i}function Jm(){(Yt===0||Yt===3||Yt===2)&&(Yt=4),en===null||(Os&268435455)===0&&(ad&268435455)===0||Gi(en,cn)}function hd(i,o){var l=it;it|=2;var h=y2();(en!==i||cn!==o)&&(Ei=null,Rs(i,o));do try{f7();break}catch(E){E2(i,E)}while(!0);if(dm(),it=l,od.current=h,zt!==null)throw Error(n(261));return en=null,cn=0,Yt}function f7(){for(;zt!==null;)T2(zt)}function h7(){for(;zt!==null&&!B9();)T2(zt)}function T2(i){var o=x2(i.alternate,i,Qn);i.memoizedProps=i.pendingProps,o===null?b2(i):zt=o,$m.current=null}function b2(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=s7(l,o,Qn),l!==null){zt=l;return}}else{if(l=o7(l,o),l!==null){l.flags&=32767,zt=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Yt=6,zt=null;return}}if(o=o.sibling,o!==null){zt=o;return}zt=o=i}while(o!==null);Yt===0&&(Yt=5)}function Ls(i,o,l){var h=lt,E=cr.transition;try{cr.transition=null,lt=1,p7(i,o,l,h)}finally{cr.transition=E,lt=h}return null}function p7(i,o,l,h){do Qo();while(qi!==null);if((it&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var T=l.lanes|l.childLanes;if(W9(i,T),i===en&&(zt=en=null,cn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||ld||(ld=!0,w2(Ec,function(){return Qo(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=cr.transition,cr.transition=null;var S=lt;lt=1;var R=it;it|=4,$m.current=null,u7(i,l),c2(l,i),LB(Jp),wc=!!Qp,Jp=Qp=null,i.current=l,l7(l),U9(),it=R,lt=S,cr.transition=T}else i.current=l;if(ld&&(ld=!1,qi=i,cd=E),T=i.pendingLanes,T===0&&(Vi=null),j9(l.stateNode),jn(i,Dt()),o!==null)for(h=i.onRecoverableError,l=0;l<o.length;l++)E=o[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(ud)throw ud=!1,i=Ym,Ym=null,i;return(cd&1)!==0&&i.tag!==0&&Qo(),T=i.pendingLanes,(T&1)!==0?i===Gm?Du++:(Du=0,Gm=i):Du=0,Hi(),null}function Qo(){if(qi!==null){var i=uS(cd),o=cr.transition,l=lt;try{if(cr.transition=null,lt=16>i?16:i,qi===null)var h=!1;else{if(i=qi,qi=null,cd=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,Ne=i.current;Ne!==null;){var T=Ne,S=T.child;if((Ne.flags&16)!==0){var R=T.deletions;if(R!==null){for(var U=0;U<R.length;U++){var Z=R[U];for(Ne=Z;Ne!==null;){var ce=Ne;switch(ce.tag){case 0:case 11:case 15:Iu(8,ce,T)}var me=ce.child;if(me!==null)me.return=ce,Ne=me;else for(;Ne!==null;){ce=Ne;var ue=ce.sibling,Ae=ce.return;if(s2(ce),ce===Z){Ne=null;break}if(ue!==null){ue.return=Ae,Ne=ue;break}Ne=Ae}}}var ke=T.alternate;if(ke!==null){var Oe=ke.child;if(Oe!==null){ke.child=null;do{var Mt=Oe.sibling;Oe.sibling=null,Oe=Mt}while(Oe!==null)}}Ne=T}}if((T.subtreeFlags&2064)!==0&&S!==null)S.return=T,Ne=S;else e:for(;Ne!==null;){if(T=Ne,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:Iu(9,T,T.return)}var W=T.sibling;if(W!==null){W.return=T.return,Ne=W;break e}Ne=T.return}}var j=i.current;for(Ne=j;Ne!==null;){S=Ne;var K=S.child;if((S.subtreeFlags&2064)!==0&&K!==null)K.return=S,Ne=K;else e:for(S=j;Ne!==null;){if(R=Ne,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:sd(9,R)}}catch(Le){It(R,R.return,Le)}if(R===S){Ne=null;break e}var Te=R.sibling;if(Te!==null){Te.return=R.return,Ne=Te;break e}Ne=R.return}}if(it=E,Hi(),Yr&&typeof Yr.onPostCommitFiberRoot=="function")try{Yr.onPostCommitFiberRoot(yc,i)}catch(Le){}h=!0}return h}finally{lt=l,cr.transition=o}}return!1}function _2(i,o,l){o=Go(l,o),o=Ux(i,o,1),i=ji(i,o,1),o=kn(),i!==null&&(su(i,1,o),jn(i,o))}function It(i,o,l){if(i.tag===3)_2(i,i,l);else for(;o!==null;){if(o.tag===3){_2(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Vi===null||!Vi.has(h))){i=Go(l,i),i=Hx(o,i,1),o=ji(o,i,1),i=kn(),o!==null&&(su(o,1,i),jn(o,i));break}}o=o.return}}function m7(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=kn(),i.pingedLanes|=i.suspendedLanes&l,en===i&&(cn&l)===l&&(Yt===4||Yt===3&&(cn&130023424)===cn&&500>Dt()-qm?Rs(i,0):Vm|=l),jn(i,o)}function S2(i,o){o===0&&((i.mode&1)===0?o=1:(o=bc,bc<<=1,(bc&130023424)===0&&(bc=4194304)));var l=kn();i=pi(i,o),i!==null&&(su(i,o,l),jn(i,l))}function g7(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),S2(i,l)}function E7(i,o){var l=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),S2(i,l)}var x2;x2=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||Bn.current)Hn=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return Hn=!1,i7(i,o,l);Hn=(i.flags&131072)!==0}else Hn=!1,Ct&&(o.flags&1048576)!==0&&nx(o,jc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;rd(i,o),i=o.pendingProps;var E=Uo(o,Tn.current);qo(o,l),E=Sm(null,o,h,i,E,l);var T=xm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Un(h)?(T=!0,Uc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,mm(o),E.updater=td,o.stateNode=E,E._reactInternals=o,km(o,h,i,l),o=Rm(null,o,h,!0,T,l)):(o.tag=0,Ct&&T&&sm(o),Nn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(rd(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=T7(h),i=Ar(h,i),E){case 0:o=Im(null,o,h,i,l);break e;case 1:o=Xx(null,o,h,i,l);break e;case 11:o=Vx(null,o,h,i,l);break e;case 14:o=qx(null,o,h,Ar(h.type,i),l);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),Im(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),Xx(i,o,h,E,l);case 3:e:{if(Kx(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,dx(i,o),Wc(o,h,null,l);var S=o.memoizedState;if(h=S.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){E=Go(Error(n(423)),o),o=Qx(i,o,h,l,E);break e}else if(h!==E){E=Go(Error(n(424)),o),o=Qx(i,o,h,l,E);break e}else for(Kn=Fi(o.stateNode.containerInfo.firstChild),Xn=o,Ct=!0,wr=null,l=lx(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(jo(),h===E){o=gi(i,o,l);break e}Nn(i,o,h,l)}o=o.child}return o;case 5:return px(o),i===null&&um(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,S=E.children,Zp(h,E)?S=null:T!==null&&Zp(h,T)&&(o.flags|=32),Wx(i,o),Nn(i,o,S,l),o.child;case 6:return i===null&&um(o),null;case 13:return Jx(i,o,l);case 4:return gm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=$o(o,null,h,l):Nn(i,o,h,l),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),Vx(i,o,h,E,l);case 7:return Nn(i,o,o.pendingProps,l),o.child;case 8:return Nn(i,o,o.pendingProps.children,l),o.child;case 12:return Nn(i,o,o.pendingProps.children,l),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,T=o.memoizedProps,S=E.value,gt(qc,h._currentValue),h._currentValue=S,T!==null)if(xr(T.value,S)){if(T.children===E.children&&!Bn.current){o=gi(i,o,l);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var R=T.dependencies;if(R!==null){S=T.child;for(var U=R.firstContext;U!==null;){if(U.context===h){if(T.tag===1){U=mi(-1,l&-l),U.tag=2;var Z=T.updateQueue;if(Z!==null){Z=Z.shared;var ce=Z.pending;ce===null?U.next=U:(U.next=ce.next,ce.next=U),Z.pending=U}}T.lanes|=l,U=T.alternate,U!==null&&(U.lanes|=l),hm(T.return,l,o),R.lanes|=l;break}U=U.next}}else if(T.tag===10)S=T.type===o.type?null:T.child;else if(T.tag===18){if(S=T.return,S===null)throw Error(n(341));S.lanes|=l,R=S.alternate,R!==null&&(R.lanes|=l),hm(S,l,o),S=T.sibling}else S=T.child;if(S!==null)S.return=T;else for(S=T;S!==null;){if(S===o){S=null;break}if(T=S.sibling,T!==null){T.return=S.return,S=T;break}S=S.return}T=S}Nn(i,o,E.children,l),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,qo(o,l),E=ur(E),h=h(E),o.flags|=1,Nn(i,o,h,l),o.child;case 14:return h=o.type,E=Ar(h,o.pendingProps),E=Ar(h.type,E),qx(i,o,h,E,l);case 15:return Yx(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:Ar(h,E),rd(i,o),o.tag=1,Un(h)?(i=!0,Uc(o)):i=!1,qo(o,l),Fx(o,h,E),km(o,h,E,l),Rm(null,o,h,!0,i,l);case 19:return e2(i,o,l);case 22:return Gx(i,o,l)}throw Error(n(156,o.tag))};function w2(i,o){return rS(i,o)}function y7(i,o,l,h){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dr(i,o,l,h){return new y7(i,o,l,h)}function Zm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function T7(i){if(typeof i=="function")return Zm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===pe)return 11;if(i===oe)return 14}return 2}function Wi(i,o){var l=i.alternate;return l===null?(l=dr(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function pd(i,o,l,h,E,T){var S=2;if(h=i,typeof i=="function")Zm(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case q:return Ds(l.children,E,T,o);case ne:S=8,E|=8;break;case de:return i=dr(12,l,o,E|2),i.elementType=de,i.lanes=T,i;case ve:return i=dr(13,l,o,E),i.elementType=ve,i.lanes=T,i;case re:return i=dr(19,l,o,E),i.elementType=re,i.lanes=T,i;case ae:return md(l,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case V:S=10;break e;case se:S=9;break e;case pe:S=11;break e;case oe:S=14;break e;case xe:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=dr(S,l,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function Ds(i,o,l,h){return i=dr(7,i,h,o),i.lanes=l,i}function md(i,o,l,h){return i=dr(22,i,h,o),i.elementType=ae,i.lanes=l,i.stateNode={isHidden:!1},i}function e0(i,o,l){return i=dr(6,i,null,o),i.lanes=l,i}function t0(i,o,l){return o=dr(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function b7(i,o,l,h,E){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Np(0),this.expirationTimes=Np(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Np(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function n0(i,o,l,h,E,T,S,R,U){return i=new b7(i,o,l,R,U),o===1?(o=1,T===!0&&(o|=8)):o=0,T=dr(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},mm(T),i}function _7(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:h==null?null:""+h,children:i,containerInfo:o,implementation:l}}function A2(i){if(!i)return Ui;i=i._reactInternals;e:{if(xs(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Un(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(Un(l))return ZS(i,l,o)}return o}function C2(i,o,l,h,E,T,S,R,U){return i=n0(l,h,!0,i,E,T,S,R,U),i.context=A2(null),l=i.current,h=kn(),E=Yi(l),T=mi(h,E),T.callback=o!=null?o:null,ji(l,T,E),i.current.lanes=E,su(i,E,h),jn(i,h),i}function gd(i,o,l,h){var E=o.current,T=kn(),S=Yi(E);return l=A2(l),o.context===null?o.context=l:o.pendingContext=l,o=mi(T,S),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=ji(E,o,S),i!==null&&(Nr(i,E,S,T),Gc(i,E,S)),S}function Ed(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function v2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function r0(i,o){v2(i,o),(i=i.alternate)&&v2(i,o)}function S7(){return null}var N2=typeof reportError=="function"?reportError:function(i){console.error(i)};function i0(i){this._internalRoot=i}yd.prototype.render=i0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));gd(i,o,null,null)},yd.prototype.unmount=i0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Is(function(){gd(null,i,null,null)}),o[ci]=null}};function yd(i){this._internalRoot=i}yd.prototype.unstable_scheduleHydration=function(i){if(i){var o=dS();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Li.length&&o!==0&&o<Li[l].priority;l++);Li.splice(l,0,i),l===0&&pS(i)}};function s0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Td(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function k2(){}function x7(i,o,l,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var Z=Ed(S);T.call(Z)}}var S=C2(o,h,i,0,null,!1,!1,"",k2);return i._reactRootContainer=S,i[ci]=S.current,Tu(i.nodeType===8?i.parentNode:i),Is(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var R=h;h=function(){var Z=Ed(U);R.call(Z)}}var U=n0(i,0,!1,null,null,!1,!1,"",k2);return i._reactRootContainer=U,i[ci]=U.current,Tu(i.nodeType===8?i.parentNode:i),Is(function(){gd(o,U,l,h)}),U}function bd(i,o,l,h,E){var T=l._reactRootContainer;if(T){var S=T;if(typeof E=="function"){var R=E;E=function(){var U=Ed(S);R.call(U)}}gd(o,S,i,E)}else S=x7(l,o,i,E,h);return Ed(S)}lS=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=iu(o.pendingLanes);l!==0&&(kp(o,l|1),jn(o,Dt()),(it&6)===0&&(Ko=Dt()+500,Hi()))}break;case 13:Is(function(){var h=pi(i,1);if(h!==null){var E=kn();Nr(h,i,1,E)}}),r0(i,1)}},Pp=function(i){if(i.tag===13){var o=pi(i,134217728);if(o!==null){var l=kn();Nr(o,i,134217728,l)}r0(i,134217728)}},cS=function(i){if(i.tag===13){var o=Yi(i),l=pi(i,o);if(l!==null){var h=kn();Nr(l,i,o,h)}r0(i,o)}},dS=function(){return lt},fS=function(i,o){var l=lt;try{return lt=i,o()}finally{lt=l}},Sp=function(i,o,l){switch(o){case"input":if(Nt(i,l),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var h=l[o];if(h!==i&&h.form===i.form){var E=Fc(h);if(!E)throw Error(n(90));sn(h),Nt(h,E)}}}break;case"textarea":rt(i,l);break;case"select":o=l.value,o!=null&&we(i,!!l.multiple,o,!1)}},K_=Km,Q_=Is;var w7={usingClientEntryPoint:!1,Events:[Su,Fo,Fc,W_,X_,Km]},Mu={findFiberByHostInstance:ws,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},A7={bundleType:Mu.bundleType,version:Mu.version,rendererPackageName:Mu.rendererPackageName,rendererConfig:Mu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:H.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=tS(i),i===null?null:i.stateNode},findFiberByHostInstance:Mu.findFiberByHostInstance||S7,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var _d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_d.isDisabled&&_d.supportsFiber)try{yc=_d.inject(A7),Yr=_d}catch(i){}}return In.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=w7,In.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!s0(o))throw Error(n(200));return _7(i,o,null,l)},In.createRoot=function(i,o){if(!s0(i))throw Error(n(299));var l=!1,h="",E=N2;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=n0(i,1,!1,null,null,l,!1,h,E),i[ci]=o.current,Tu(i.nodeType===8?i.parentNode:i),new i0(o)},In.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=tS(o),i=i===null?null:i.stateNode,i},In.flushSync=function(i){return Is(i)},In.hydrate=function(i,o,l){if(!Td(o))throw Error(n(200));return bd(null,i,o,!0,l)},In.hydrateRoot=function(i,o,l){if(!s0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,T="",S=N2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),o=C2(o,null,i,1,l!=null?l:null,E,!1,T,S),i[ci]=o.current,Tu(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,E]:o.mutableSourceEagerHydrationData.push(l,E);return new yd(o)},In.render=function(i,o,l){if(!Td(o))throw Error(n(200));return bd(null,i,o,!1,l)},In.unmountComponentAtNode=function(i){if(!Td(i))throw Error(n(40));return i._reactRootContainer?(Is(function(){bd(null,null,i,!1,function(){i._reactRootContainer=null,i[ci]=null})}),!0):!1},In.unstable_batchedUpdates=Km,In.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!Td(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return bd(i,o,l,!1,h)},In.version="18.3.1-next-f1338f8080-20240426",In}var b1;function _1(){if(b1)return xf.exports;b1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),xf.exports=xN(),xf.exports}var Ks=_1();function S1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=S1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function G(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=S1(e))&&(r&&(r+=" "),r+=t);return r}var x1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},w1=Qi.createContext&&Qi.createContext(x1),wN=["attr","size","title"];function AN(e,t){if(e==null)return{};var n=CN(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CN(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hl.apply(this,arguments)}function A1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A1(Object(n),!0).forEach(function(r){vN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vN(e,t,n){return t=NN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NN(e){var t=kN(e,"string");return typeof t=="symbol"?t:t+""}function kN(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C1(e){return e&&e.map((t,n)=>Qi.createElement(t.tag,pl({key:n},t.attr),C1(t.child)))}function xt(e){return t=>Qi.createElement(PN,hl({attr:pl({},e.attr)},t),C1(e.child))}function PN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=AN(e,wN),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Qi.createElement("svg",hl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:pl(pl({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Qi.createElement("title",null,a),e.children)};return w1!==void 0?Qi.createElement(w1.Consumer,null,n=>t(n)):t(x1)}function ON(e){return xt({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const ri=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:x.jsx("button",{className:G(e,`${z}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?x.jsx("img",{className:G(`${z}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),IN="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",RN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=tt(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?x.jsx(ON,{className:G(t,`${z}-minimized-icon`)}):x.jsx("img",{src:(n==null?void 0:n.logoUrl)||IN,alt:"Copilot",className:G(t,`${z}-minimized-icon-img`)});return x.jsx(ri,{className:G(t,`${z}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},LN=()=>{const{globalClassName:e,themeVariables:t}=tt(),n=()=>{ma(!1),ti(!0)};return Ks.createPortal(x.jsx("div",{className:G(e,`${z}-minimized-container`),style:t,children:x.jsx(RN,{onClick:n})}),document.body)};function v1(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function N1(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function Qs(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function DN(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function k1(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function MN(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function FN(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function BN(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function UN(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function HN(e){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}const zN=e=>({[`${$n}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${$n}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${$n}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${$n}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${$n}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${$n}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),P1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>x.jsx("button",{"aria-label":t,title:t,className:G(e,`${z}-close-button`),disabled:r,onClick:n,children:x.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:x.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),ml=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>x.jsx("button",{className:G(`${z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),jN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?x.jsx("img",{className:G(`${z}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):x.jsx(Qs,{size:"16px"})},$N=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return x.jsx(ri,{className:G(e,n,`cim-${r}-component`,`${z}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:x.jsx(Qs,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return x.jsxs(ml,{className:G(e,n,`cim-${r}-component`,`${z}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&x.jsx(jN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function VN(e){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const qN=()=>{const{messages:e}=tr(),{handleCancel:t}=Ir();return{cancelRequest:B.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],s=r.eventSourceId||r.id;t(s)},[t,e])}},YN=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=tt(),{cancelRequest:r}=qN();return n!=null&&n.enableCancelSearch?x.jsx(ri,{className:G(t,`${z}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:x.jsx(VN,{}),disabled:!e,onClick:r}):null};function sU(){}function oU(){}function O1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function I1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const GN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XN={};function R1(e,t){return(XN.jsx?WN:GN).test(e)}const KN=/[ \t\n\f\r]/g;function QN(e){return typeof e=="object"?e.type==="text"?L1(e.value):!1:L1(e)}function L1(e){return e.replace(KN,"")===""}class ya{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ya.prototype.normal={},ya.prototype.property={},ya.prototype.space=void 0;function D1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ya(n,r,t)}function Ta(e){return e.toLowerCase()}class Rn{constructor(t,n){this.attribute=n,this.property=t}}Rn.prototype.attribute="",Rn.prototype.booleanish=!1,Rn.prototype.boolean=!1,Rn.prototype.commaOrSpaceSeparated=!1,Rn.prototype.commaSeparated=!1,Rn.prototype.defined=!1,Rn.prototype.mustUseProperty=!1,Rn.prototype.number=!1,Rn.prototype.overloadedBoolean=!1,Rn.prototype.property="",Rn.prototype.spaceSeparated=!1,Rn.prototype.space=void 0;let JN=0;const We=os(),Ut=os(),Cf=os(),Ee=os(),dt=os(),ss=os(),Vn=os();function os(){return Fu(2,++JN)}const vf=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Ut,commaOrSpaceSeparated:Vn,commaSeparated:ss,number:Ee,overloadedBoolean:Cf,spaceSeparated:dt},Symbol.toStringTag,{value:"Module"})),Nf=Object.keys(vf);class kf extends Rn{constructor(t,n,r,s){let a=-1;if(super(t,n),M1(this,"space",s),typeof r=="number")for(;++a<Nf.length;){const u=Nf[a];M1(this,Nf[a],(r&vf[u])===vf[u])}}}kf.prototype.defined=!0;function M1(e,t,n){n&&(e[t]=n)}function Js(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new kf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ta(r)]=r,n[Ta(a.attribute)]=r}return new ya(t,n,e.space)}const F1=Js({properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:dt,ariaCurrent:null,ariaDescribedBy:dt,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:dt,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:dt,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dt,ariaLevel:Ee,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:dt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:dt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Ut,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function B1(e,t){return t in e?e[t]:t}function U1(e,t){return B1(e,t.toLowerCase())}const ZN=Js({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ss,acceptCharset:dt,accessKey:dt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alpha:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:dt,autoFocus:We,autoPlay:We,blocking:dt,capture:null,charSet:null,checked:We,cite:null,className:dt,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:Ut,controls:We,controlsList:dt,coords:Ee|ss,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:Cf,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:dt,height:Ee,hidden:Cf,high:Ee,href:null,hrefLang:null,htmlFor:dt,httpEquiv:dt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:dt,itemRef:dt,itemScope:We,itemType:dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:Ee,pattern:null,ping:dt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:dt,required:We,reversed:We,rows:Ee,rowSpan:Ee,sandbox:dt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootCustomElementRegistry:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shadowRootSerializable:We,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Ut,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:We,disablePictureInPicture:We,disableRemotePlayback:We,exportParts:ss,part:dt,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:U1}),ek=Js({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",maskType:"mask-type",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:Vn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:dt,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:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,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:ss,g2:ss,glyphName:ss,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:Vn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,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:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Vn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Vn,rev:Vn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Vn,requiredFeatures:Vn,requiredFonts:Vn,requiredFormats:Vn,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:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:Vn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Vn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Vn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:B1}),H1=Js({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),z1=Js({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:U1}),j1=Js({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),tk={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"},nk=/[A-Z]/g,$1=/-[a-z]/g,rk=/^data[-\w.:]+$/i;function gl(e,t){const n=Ta(t);let r=t,s=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&rk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace($1,sk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!$1.test(a)){let u=a.replace(nk,ik);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=kf}return new s(r,t)}function ik(e){return"-"+e.toLowerCase()}function sk(e){return e.charAt(1).toUpperCase()}const ba=D1([F1,ZN,H1,z1,j1],"html"),_i=D1([F1,ek,H1,z1,j1],"svg");function V1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function q1(e){return e.join(" ").trim()}var Zs={},Pf,Y1;function ok(){if(Y1)return Pf;Y1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
18
+ `,f="/",p="*",m="",b="comment",y="declaration";function _(v,w){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];w=w||{};var k=1,C=1;function H(re){var oe=re.match(t);oe&&(k+=oe.length);var xe=re.lastIndexOf(d);C=~xe?re.length-xe:C+re.length}function Y(){var re={line:k,column:C};return function(oe){return oe.position=new L(re),de(),oe}}function L(re){this.start=re,this.end={line:k,column:C},this.source=w.source}L.prototype.content=v;function q(re){var oe=new Error(w.source+":"+k+":"+C+": "+re);if(oe.reason=re,oe.filename=w.source,oe.line=k,oe.column=C,oe.source=v,!w.silent)throw oe}function ne(re){var oe=re.exec(v);if(oe){var xe=oe[0];return H(xe),v=v.slice(xe.length),oe}}function de(){ne(n)}function V(re){var oe;for(re=re||[];oe=se();)oe!==!1&&re.push(oe);return re}function se(){var re=Y();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var oe=2;m!=v.charAt(oe)&&(p!=v.charAt(oe)||f!=v.charAt(oe+1));)++oe;if(oe+=2,m===v.charAt(oe-1))return q("End of comment missing");var xe=v.slice(2,oe-2);return C+=2,H(xe),v=v.slice(oe),C+=2,re({type:b,comment:xe})}}function pe(){var re=Y(),oe=ne(r);if(oe){if(se(),!ne(s))return q("property missing ':'");var xe=ne(a),ae=re({type:y,property:A(oe[0].replace(e,m)),value:xe?A(xe[0].replace(e,m)):m});return ne(u),ae}}function ve(){var re=[];V(re);for(var oe;oe=pe();)oe!==!1&&(re.push(oe),V(re));return re}return de(),ve()}function A(v){return v?v.replace(c,m):m}return Pf=_,Pf}var G1;function ak(){if(G1)return Zs;G1=1;var e=Zs&&Zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.default=n;const t=e(ok());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),c=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Zs}var _a={},W1;function uk(){if(W1)return _a;W1=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,c):f=f.replace(r,c),f.replace(t,u))};return _a.camelCase=d,_a}var Sa,X1;function lk(){if(X1)return Sa;X1=1;var e=Sa&&Sa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(ak()),n=uk();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,Sa=r,Sa}var ck=lk();const dk=Qe(ck),El=K1("end"),Rr=K1("start");function K1(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Q1(e){const t=Rr(e),n=El(e);if(t&&n)return{start:t,end:n}}function xa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?J1(e.position):"start"in e||"end"in e?J1(e):"line"in e||"column"in e?Of(e):""}function Of(e){return Z1(e&&e.line)+":"+Z1(e&&e.column)}function J1(e){return Of(e&&e.start)+"-"+Of(e&&e.end)}function Z1(e){return e&&typeof e=="number"?e:1}class mn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=F({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=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=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=xa(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=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}mn.prototype.file="",mn.prototype.name="",mn.prototype.reason="",mn.prototype.message="",mn.prototype.stack="",mn.prototype.column=void 0,mn.prototype.line=void 0,mn.prototype.ancestors=void 0,mn.prototype.cause=void 0,mn.prototype.fatal=void 0,mn.prototype.place=void 0,mn.prototype.ruleId=void 0,mn.prototype.source=void 0;const If={}.hasOwnProperty,fk=new Map,hk=/[A-Z]/g,pk=new Set(["table","tbody","thead","tfoot","tr"]),mk=new Set(["td","th"]),eE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gk(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=wk(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=xk(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?_i:ba,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=tE(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function tE(e,t,n){if(t.type==="element")return Ek(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return yk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return bk(e,t,n);if(t.type==="mdxjsEsm")return Tk(e,t);if(t.type==="root")return _k(e,t,n);if(t.type==="text")return Sk(e,t)}function Ek(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=_i,e.schema=s),e.ancestors.push(t);const a=rE(e,t.tagName,!1),u=Ak(e,t);let c=Lf(e,t);return pk.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!QN(d):!0})),nE(e,u,a,t),Rf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function yk(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}wa(e,t.position)}function Tk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wa(e,t.position)}function bk(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=_i,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:rE(e,t.name,!0),u=Ck(e,t),c=Lf(e,t);return nE(e,u,a,t),Rf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function _k(e,t,n){const r={};return Rf(r,Lf(e,t)),e.create(t,e.Fragment,r,n)}function Sk(e,t){return t.value}function nE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Rf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function xk(e,t,n){return r;function r(s,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function wk(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=Rr(r);return t(s,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Ak(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&If.call(t.properties,s)){const a=vk(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&mk.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ck(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else wa(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else wa(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Lf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:fk;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const c=tE(e,a,u);c!==void 0&&n.push(c)}return n}function vk(e,t,n){const r=gl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?I1(n):q1(n)),r.property==="style"){let s=typeof n=="object"?n:Nk(e,String(n));return e.stylePropertyNameCase==="css"&&(s=kk(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?tk[r.property]||r.property:r.attribute,n]}}function Nk(e,t){try{return dk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new mn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=eE+"#cannot-parse-style-attribute",s}}function rE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const c=R1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=R1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return If.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);wa(e)}function wa(e,t){const n=new mn("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=eE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function kk(e){const t={};let n;for(n in e)If.call(e,n)&&(t[Pk(n)]=e[n]);return t}function Pk(e){let t=e.replace(hk,Ok);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ok(e){return"-"+e.toLowerCase()}const Df={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"]},Ik={};function Mf(e,t){const n=Ik,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return iE(e,r,s)}function iE(e,t,n){if(Rk(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return sE(e.children,t,n)}return Array.isArray(e)?sE(e,t,n):""}function sE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=iE(e[s],t,n);return r.join("")}function Rk(e){return!!(e&&typeof e=="object")}const oE=document.createElement("i");function Ff(e){const t="&"+e+";";oE.innerHTML=t;const n=oE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function qn(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function nr(e,t){return e.length>0?(qn(e,e.length,0,t),e):t}const aE={}.hasOwnProperty;function uE(e){const t={};let n=-1;for(;++n<e.length;)Lk(t,e[n]);return t}function Lk(e,t){let n;for(n in t){const s=(aE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){aE.call(s,u)||(s[u]=[]);const c=a[u];Dk(s[u],Array.isArray(c)?c:c?[c]:[])}}}function Dk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);qn(e,0,0,r)}function lE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const An=Si(/[A-Za-z]/),gn=Si(/[\dA-Za-z]/),Mk=Si(/[#-'*+\--9=?A-Z^-~]/);function yl(e){return e!==null&&(e<32||e===127)}const Bf=Si(/\d/),Fk=Si(/[\dA-Fa-f]/),Bk=Si(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const Tl=Si(new RegExp("\\p{P}|\\p{S}","u")),as=Si(/\s/);function Si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function eo(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&gn(e.charCodeAt(n+1))&&gn(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function nt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ze(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const Uk={tokenize:Hk};function Hk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),nt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Be(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const zk={tokenize:jk},cE={tokenize:$k};function jk(e){const t=this,n=[];let r=0,s,a,u;return c;function c(C){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&k();const H=t.events.length;let Y=H,L;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){L=t.events[Y][1].end;break}w(r);let q=H;for(;q<t.events.length;)t.events[q][1].end=F({},L),q++;return qn(t.events,Y+1,0,t.events.slice(H)),t.events.length=q,f(C)}return c(C)}function f(C){if(r===n.length){if(!s)return b(C);if(s.currentConstruct&&s.currentConstruct.concrete)return _(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(cE,p,m)(C)}function p(C){return s&&k(),w(r),b(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(C)}function b(C){return t.containerState={},e.attempt(cE,y,_)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),b(C)}function _(C){if(C===null){s&&k(),w(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),A(C)}function A(C){if(C===null){v(e.exit("chunkFlow"),!0),w(0),e.consume(C);return}return Be(C)?(e.consume(C),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(C),A)}function v(C,H){const Y=t.sliceStream(C);if(H&&Y.push(null),C.previous=a,a&&(a.next=C),a=C,s.defineSkip(C.start),s.write(Y),t.parser.lazy[C.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<u&&(!s.events[L][1].end||s.events[L][1].end.offset>u))return;const q=t.events.length;let ne=q,de,V;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(de){V=t.events[ne][1].end;break}de=!0}for(w(r),L=q;L<t.events.length;)t.events[L][1].end=F({},V),L++;qn(t.events,ne+1,0,t.events.slice(q)),t.events.length=L}}function w(C){let H=n.length;for(;H-- >C;){const Y=n[H];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=C}function k(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function $k(e,t,n){return nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function to(e){if(e===null||ft(e)||as(e))return 1;if(Tl(e))return 2}function bl(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Uf={name:"attention",resolveAll:Vk,tokenize:qk};function Vk(e,t){let n=-1,r,s,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=F({},e[r][1].end),b=F({},e[n][1].start);dE(m,-d),dE(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:F({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},c.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=nr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=nr(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=nr(f,bl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=nr(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=nr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,qn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function qk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=to(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),p=to(d),m=!p||p===2&&s||n.includes(d),b=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!b)),f._close=!!(a===42?b:b&&(p||!m)),t(d)}}function dE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Yk={name:"autolink",tokenize:Gk};function Gk(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return An(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||gn(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||gn(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||yl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):Mk(y)?(e.consume(y),f):n(y)}function p(y){return gn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||gn(y))&&r++<63){const _=y===45?b:m;return e.consume(y),_}return n(y)}}const Aa={partial:!0,tokenize:Wk};function Wk(e,t,n){return r;function r(a){return Ze(a)?nt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Be(a)?t(a):n(a)}}const fE={continuation:{tokenize:Kk},exit:Qk,name:"blockQuote",tokenize:Xk};function Xk(e,t,n){const r=this;return s;function s(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function Kk(e,t,n){const r=this;return s;function s(u){return Ze(u)?nt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(fE,t,n)(u)}}function Qk(e){e.exit("blockQuote")}const hE={name:"characterEscape",tokenize:Jk};function Jk(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return Bk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const pE={name:"characterReference",tokenize:Zk};function Zk(e,t,n){const r=this;let s=0,a,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=gn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=Fk,p):(e.enter("characterReferenceValue"),a=7,u=Bf,p(m))}function p(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return u===gn&&!Ff(r.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const mE={partial:!0,tokenize:tP},gE={concrete:!0,name:"codeFenced",tokenize:eP};function eP(e,t,n){const r=this,s={partial:!0,tokenize:Y};let a=0,u=0,c;return d;function d(L){return f(L)}function f(L){const q=r.events[r.events.length-1];return a=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,c=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===c?(u++,e.consume(L),p):u<3?n(L):(e.exit("codeFencedFenceSequence"),Ze(L)?nt(e,m,"whitespace")(L):m(L))}function m(L){return L===null||Be(L)?(e.exit("codeFencedFence"),r.interrupt?t(L):e.check(mE,A,H)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(L))}function b(L){return L===null||Be(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(L)):Ze(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,y,"whitespace")(L)):L===96&&L===c?n(L):(e.consume(L),b)}function y(L){return L===null||Be(L)?m(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(L))}function _(L){return L===null||Be(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(L)):L===96&&L===c?n(L):(e.consume(L),_)}function A(L){return e.attempt(s,H,v)(L)}function v(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),w}function w(L){return a>0&&Ze(L)?nt(e,k,"linePrefix",a+1)(L):k(L)}function k(L){return L===null||Be(L)?e.check(mE,A,H)(L):(e.enter("codeFlowValue"),C(L))}function C(L){return L===null||Be(L)?(e.exit("codeFlowValue"),k(L)):(e.consume(L),C)}function H(L){return e.exit("codeFenced"),t(L)}function Y(L,q,ne){let de=0;return V;function V(oe){return L.enter("lineEnding"),L.consume(oe),L.exit("lineEnding"),se}function se(oe){return L.enter("codeFencedFence"),Ze(oe)?nt(L,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):pe(oe)}function pe(oe){return oe===c?(L.enter("codeFencedFenceSequence"),ve(oe)):ne(oe)}function ve(oe){return oe===c?(de++,L.consume(oe),ve):de>=u?(L.exit("codeFencedFenceSequence"),Ze(oe)?nt(L,re,"whitespace")(oe):re(oe)):ne(oe)}function re(oe){return oe===null||Be(oe)?(L.exit("codeFencedFence"),q(oe)):ne(oe)}}}function tP(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Hf={name:"codeIndented",tokenize:rP},nP={partial:!0,tokenize:iP};function rP(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),nt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Be(f)?e.attempt(nP,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Be(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function iP(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Be(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):nt(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Be(u)?s(u):n(u)}}const sP={name:"codeText",previous:aP,resolve:oP,tokenize:uP};function oP(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function aP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uP(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):Be(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Be(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class lP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Ca(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ca(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ca(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ca(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ca(this.left,n.reverse())}}}function Ca(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 EE(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new lP(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,cP(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=F({},p.get(s)[1].start),c=p.slice(s,n),c.unshift(r),p.splice(s,n-s+1,c))}}return qn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function cP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,m,b=-1,y=n,_=0,A=0;const v=[A];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(A=b+1,v.push(A),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):v.pop(),b=v.length;b--;){const w=c.slice(v[b],v[b+1]),k=a.pop();d.push([k,k+w.length-1]),e.splice(k,2,w)}for(d.reverse(),b=-1;++b<d.length;)f[_+d[b][0]]=_+d[b][1],_+=d[b][1]-d[b][0]-1;return f}const dP={resolve:hP,tokenize:pP},fP={partial:!0,tokenize:mP};function hP(e){return EE(e),e}function pP(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):Be(c)?e.check(fP,u,a)(c):(e.consume(c),s)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function mP(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),nt(e,a,"linePrefix")}function a(u){if(u===null||Be(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function yE(e,t,n,r,s,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(w){return w===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(w),e.exit(a),b):w===null||w===32||w===41||yl(w)?n(w):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),A(w))}function b(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===62?(e.exit("chunkString"),e.exit(c),b(w)):w===null||w===60||Be(w)?n(w):(e.consume(w),w===92?_:y)}function _(w){return w===60||w===62||w===92?(e.consume(w),y):y(w)}function A(w){return!p&&(w===null||w===41||ft(w))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(w)):p<f&&w===40?(e.consume(w),p++,A):w===41?(e.consume(w),p--,A):w===null||w===32||w===40||yl(w)?n(w):(e.consume(w),w===92?v:A)}function v(w){return w===40||w===41||w===92?(e.consume(w),A):A(w)}}function TE(e,t,n,r,s,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):Be(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Be(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function bE(e,t,n,r,s,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):Be(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),nt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Be(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:p)}function m(b){return b===u||b===92?(e.consume(b),p):p(b)}}function va(e,t){let n;return r;function r(s){return Be(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ze(s)?nt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const gP={name:"definition",tokenize:yP},EP={partial:!0,tokenize:TP};function yP(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return TE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return ft(y)?va(e,f)(y):f(y)}function f(y){return yE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(EP,m,m)(y)}function m(y){return Ze(y)?nt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||Be(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function TP(e,t,n){return r;function r(c){return ft(c)?va(e,s)(c):n(c)}function s(c){return bE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ze(c)?nt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Be(c)?t(c):n(c)}}const bP={name:"hardBreakEscape",tokenize:_P};function _P(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Be(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const SP={name:"headingAtx",resolve:xP,tokenize:wP};function xP(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},qn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function wP(e,t,n){let r=0;return s;function s(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||ft(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Be(p)?(e.exit("atxHeading"),t(p)):Ze(p)?nt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ft(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const AP=["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"],_E=["pre","script","style","textarea"],CP={concrete:!0,name:"htmlFlow",resolveTo:kP,tokenize:PP},vP={partial:!0,tokenize:IP},NP={partial:!0,tokenize:OP};function kP(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function PP(e,t,n){const r=this;let s,a,u,c,d;return f;function f(I){return p(I)}function p(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),m}function m(I){return I===33?(e.consume(I),b):I===47?(e.consume(I),a=!0,A):I===63?(e.consume(I),s=3,r.interrupt?t:N):An(I)?(e.consume(I),u=String.fromCharCode(I),v):n(I)}function b(I){return I===45?(e.consume(I),s=2,y):I===91?(e.consume(I),s=5,c=0,_):An(I)?(e.consume(I),s=4,r.interrupt?t:N):n(I)}function y(I){return I===45?(e.consume(I),r.interrupt?t:N):n(I)}function _(I){const _e="CDATA[";return I===_e.charCodeAt(c++)?(e.consume(I),c===_e.length?r.interrupt?t:pe:_):n(I)}function A(I){return An(I)?(e.consume(I),u=String.fromCharCode(I),v):n(I)}function v(I){if(I===null||I===47||I===62||ft(I)){const _e=I===47,Ue=u.toLowerCase();return!_e&&!a&&_E.includes(Ue)?(s=1,r.interrupt?t(I):pe(I)):AP.includes(u.toLowerCase())?(s=6,_e?(e.consume(I),w):r.interrupt?t(I):pe(I)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?k(I):C(I))}return I===45||gn(I)?(e.consume(I),u+=String.fromCharCode(I),v):n(I)}function w(I){return I===62?(e.consume(I),r.interrupt?t:pe):n(I)}function k(I){return Ze(I)?(e.consume(I),k):V(I)}function C(I){return I===47?(e.consume(I),V):I===58||I===95||An(I)?(e.consume(I),H):Ze(I)?(e.consume(I),C):V(I)}function H(I){return I===45||I===46||I===58||I===95||gn(I)?(e.consume(I),H):Y(I)}function Y(I){return I===61?(e.consume(I),L):Ze(I)?(e.consume(I),Y):C(I)}function L(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,q):Ze(I)?(e.consume(I),L):ne(I)}function q(I){return I===d?(e.consume(I),d=null,de):I===null||Be(I)?n(I):(e.consume(I),q)}function ne(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ft(I)?Y(I):(e.consume(I),ne)}function de(I){return I===47||I===62||Ze(I)?C(I):n(I)}function V(I){return I===62?(e.consume(I),se):n(I)}function se(I){return I===null||Be(I)?pe(I):Ze(I)?(e.consume(I),se):n(I)}function pe(I){return I===45&&s===2?(e.consume(I),xe):I===60&&s===1?(e.consume(I),ae):I===62&&s===4?(e.consume(I),D):I===63&&s===3?(e.consume(I),N):I===93&&s===5?(e.consume(I),ie):Be(I)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(vP,ee,ve)(I)):I===null||Be(I)?(e.exit("htmlFlowData"),ve(I)):(e.consume(I),pe)}function ve(I){return e.check(NP,re,ee)(I)}function re(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),oe}function oe(I){return I===null||Be(I)?ve(I):(e.enter("htmlFlowData"),pe(I))}function xe(I){return I===45?(e.consume(I),N):pe(I)}function ae(I){return I===47?(e.consume(I),u="",Q):pe(I)}function Q(I){if(I===62){const _e=u.toLowerCase();return _E.includes(_e)?(e.consume(I),D):pe(I)}return An(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),Q):pe(I)}function ie(I){return I===93?(e.consume(I),N):pe(I)}function N(I){return I===62?(e.consume(I),D):I===45&&s===2?(e.consume(I),N):pe(I)}function D(I){return I===null||Be(I)?(e.exit("htmlFlowData"),ee(I)):(e.consume(I),D)}function ee(I){return e.exit("htmlFlow"),t(I)}}function OP(e,t,n){const r=this;return s;function s(u){return Be(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function IP(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Aa,t,n)}}const RP={name:"htmlText",tokenize:LP};function LP(e,t,n){const r=this;let s,a,u;return c;function c(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),Y):N===63?(e.consume(N),C):An(N)?(e.consume(N),ne):n(N)}function f(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),a=0,_):An(N)?(e.consume(N),k):n(N)}function p(N){return N===45?(e.consume(N),y):n(N)}function m(N){return N===null?n(N):N===45?(e.consume(N),b):Be(N)?(u=m,ae(N)):(e.consume(N),m)}function b(N){return N===45?(e.consume(N),y):m(N)}function y(N){return N===62?xe(N):N===45?b(N):m(N)}function _(N){const D="CDATA[";return N===D.charCodeAt(a++)?(e.consume(N),a===D.length?A:_):n(N)}function A(N){return N===null?n(N):N===93?(e.consume(N),v):Be(N)?(u=A,ae(N)):(e.consume(N),A)}function v(N){return N===93?(e.consume(N),w):A(N)}function w(N){return N===62?xe(N):N===93?(e.consume(N),w):A(N)}function k(N){return N===null||N===62?xe(N):Be(N)?(u=k,ae(N)):(e.consume(N),k)}function C(N){return N===null?n(N):N===63?(e.consume(N),H):Be(N)?(u=C,ae(N)):(e.consume(N),C)}function H(N){return N===62?xe(N):C(N)}function Y(N){return An(N)?(e.consume(N),L):n(N)}function L(N){return N===45||gn(N)?(e.consume(N),L):q(N)}function q(N){return Be(N)?(u=q,ae(N)):Ze(N)?(e.consume(N),q):xe(N)}function ne(N){return N===45||gn(N)?(e.consume(N),ne):N===47||N===62||ft(N)?de(N):n(N)}function de(N){return N===47?(e.consume(N),xe):N===58||N===95||An(N)?(e.consume(N),V):Be(N)?(u=de,ae(N)):Ze(N)?(e.consume(N),de):xe(N)}function V(N){return N===45||N===46||N===58||N===95||gn(N)?(e.consume(N),V):se(N)}function se(N){return N===61?(e.consume(N),pe):Be(N)?(u=se,ae(N)):Ze(N)?(e.consume(N),se):de(N)}function pe(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),s=N,ve):Be(N)?(u=pe,ae(N)):Ze(N)?(e.consume(N),pe):(e.consume(N),re)}function ve(N){return N===s?(e.consume(N),s=void 0,oe):N===null?n(N):Be(N)?(u=ve,ae(N)):(e.consume(N),ve)}function re(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||ft(N)?de(N):(e.consume(N),re)}function oe(N){return N===47||N===62||ft(N)?de(N):n(N)}function xe(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function ae(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Q}function Q(N){return Ze(N)?nt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ie(N)}function ie(N){return e.enter("htmlTextData"),u(N)}}const zf={name:"labelEnd",resolveAll:BP,resolveTo:UP,tokenize:HP},DP={tokenize:zP},MP={tokenize:jP},FP={tokenize:$P};function BP(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&qn(e,0,e.length,n),e}function UP(e,t){let n=e.length,r=0,s,a,u,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},f={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=nr(c,e.slice(a+1,a+r+3)),c=nr(c,[["enter",p,t]]),c=nr(c,bl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=nr(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=nr(c,e.slice(u+1)),c=nr(c,[["exit",d,t]]),qn(e,a,e.length,c),e}function HP(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(b){return a?a._inactive?m(b):(u=r.parser.defined.includes(gr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(DP,p,u?p:m)(b):b===91?e.attempt(MP,p,u?f:m)(b):u?p(b):m(b)}function f(b){return e.attempt(FP,p,m)(b)}function p(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function zP(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return ft(m)?va(e,a)(m):a(m)}function a(m){return m===41?p(m):yE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ft(m)?va(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?bE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ft(m)?va(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function jP(e,t,n){const r=this;return s;function s(c){return TE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(gr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function $P(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const VP={name:"labelStartImage",resolveAll:zf.resolveAll,tokenize:qP};function qP(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const YP={name:"labelStartLink",resolveAll:zf.resolveAll,tokenize:GP};function GP(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const jf={name:"lineEnding",tokenize:WP};function WP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const _l={name:"thematicBreak",tokenize:XP};function XP(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Be(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?nt(e,c,"whitespace")(f):c(f))}}const Ln={continuation:{tokenize:ZP},exit:tO,name:"list",tokenize:JP},KP={partial:!0,tokenize:nO},QP={partial:!0,tokenize:eO};function JP(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Bf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(_l,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Bf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Aa,r.interrupt?n:p,e.attempt(KP,b,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return Ze(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function ZP(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Aa,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ze(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(QP,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,nt(e,e.attempt(Ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function eO(e,t,n){const r=this;return nt(e,s,"listItemIndent",r.containerState.size+1);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function tO(e){e.exit(this.containerState.type)}function nO(e,t,n){const r=this;return nt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const SE={name:"setextUnderline",resolveTo:rO,tokenize:iO};function rO(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:F({},e[r][1].start),end:F({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function iO(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ze(f)?nt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Be(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const sO={tokenize:oO};function oO(e){const t=this,n=e.attempt(Aa,r,e.attempt(this.parser.constructs.flowInitial,s,nt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(dP,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const aO={resolveAll:wE()},uO=xE("string"),lO=xE("text");function xE(e){return{resolveAll:wE(e==="text"?cO:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,c);return u;function u(p){return f(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function wE(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function cO(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,u=-1,c=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:F({},r.end)};r.end=F({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const dO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:gP},disable:{null:[]},document:{42:Ln,43:Ln,45:Ln,48:Ln,49:Ln,50:Ln,51:Ln,52:Ln,53:Ln,54:Ln,55:Ln,56:Ln,57:Ln,62:fE},flow:{35:SP,42:_l,45:[SE,_l],60:CP,61:SE,95:_l,96:gE,126:gE},flowInitial:{[-2]:Hf,[-1]:Hf,32:Hf},insideSpan:{null:[Uf,aO]},string:{38:pE,92:hE},text:{[-5]:jf,[-4]:jf,[-3]:jf,33:VP,38:pE,42:Uf,60:[Yk,RP],91:YP,92:[bP,hE],93:zf,95:Uf,96:sP}},Symbol.toStringTag,{value:"Module"}));function fO(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 s={},a=[];let u=[],c=[];const d={attempt:q(Y),check:q(L),consume:k,enter:C,exit:H,interrupt:q(L,{interrupt:!0})},f={code:null,containerState:{},defineSkip:A,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(se){return u=nr(u,se),v(),u[u.length-1]!==null?[]:(ne(t,0),f.events=bl(a,f.events,f),f.events)}function b(se,pe){return pO(y(se),pe)}function y(se){return hO(u,se)}function _(){const{_bufferIndex:se,_index:pe,line:ve,column:re,offset:oe}=r;return{_bufferIndex:se,_index:pe,line:ve,column:re,offset:oe}}function A(se){s[se.line]=se.column,V()}function v(){let se;for(;r._index<u.length;){const pe=u[r._index];if(typeof pe=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<pe.length;)w(pe.charCodeAt(r._bufferIndex));else w(pe)}}function w(se){p=p(se)}function k(se){Be(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,V()):se!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=se}function C(se,pe){const ve=pe||{};return ve.type=se,ve.start=_(),f.events.push(["enter",ve,f]),c.push(ve),ve}function H(se){const pe=c.pop();return pe.end=_(),f.events.push(["exit",pe,f]),pe}function Y(se,pe){ne(se,pe.from)}function L(se,pe){pe.restore()}function q(se,pe){return ve;function ve(re,oe,xe){let ae,Q,ie,N;return Array.isArray(re)?ee(re):"tokenize"in re?ee([re]):D(re);function D(ye){return Re;function Re(He){const Ye=He!==null&&ye[He],bt=He!==null&&ye.null,Cn=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(bt)?bt:bt?[bt]:[]];return ee(Cn)(He)}}function ee(ye){return ae=ye,Q=0,ye.length===0?xe:I(ye[Q])}function I(ye){return Re;function Re(He){return N=de(),ie=ye,ye.partial||(f.currentConstruct=ye),ye.name&&f.parser.constructs.disable.null.includes(ye.name)?Ue():ye.tokenize.call(pe?Object.assign(Object.create(f),pe):f,d,_e,Ue)(He)}}function _e(ye){return se(ie,N),oe}function Ue(ye){return N.restore(),++Q<ae.length?I(ae[Q]):xe}}}function ne(se,pe){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&qn(f.events,pe,f.events.length-pe,se.resolve(f.events.slice(pe),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function de(){const se=_(),pe=f.previous,ve=f.currentConstruct,re=f.events.length,oe=Array.from(c);return{from:re,restore:xe};function xe(){r=se,f.previous=pe,f.currentConstruct=ve,f.events.length=re,c=oe,V()}}function V(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function hO(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function pO(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
19
19
  `;break}case-3:{u=`\r
20
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function fO(e){const r={constructs:aE([uO,...(e||{}).extensions||[]]),content:s(MN),defined:[],document:s(BN),flow:s(nO),lazy:{},string:s(sO),text:s(oO)};return r;function s(a){return u;function u(c){return lO(r,a,c)}}}function hO(e){for(;!gE(e););return e}const wE=/[\0\t\n\r]/g;function pO(){let e=1,t="",n=!0,r;return s;function s(a,u,c){const d=[];let f,p,m,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(wE.lastIndex=m,f=wE.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(a.slice(m,b)),e+=b-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const mO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gO(e){return e.replace(mO,EO)}function EO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return uE(n.slice(a?2:1),a?16:10)}return Mf(n)||e}const AE={}.hasOwnProperty;function yO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),TO(n)(hO(fO(n).document().write(pO()(e,t,!0))))}function TO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(on),autolinkProtocol:me,autolinkEmail:me,atxHeading:a(Jt),blockQuote:a(bt),characterEscape:me,characterReference:me,codeFenced:a(Cn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Cn,u),codeText:a(sn,u),codeTextData:me,data:me,codeFlowValue:me,definition:a(_r),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(sr),hardBreakEscape:a(Ve),hardBreakTrailing:a(Ve),htmlFlow:a(kt,u),htmlFlowData:me,htmlText:a(kt,u),htmlTextData:me,image:a(vn),label:u,link:a(on),listItem:a(we),listItemValue:b,listOrdered:a(Fn,m),listUnordered:a(Fn),paragraph:a(Pe),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Jt),strong:a(Me),thematicBreak:a(ht)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:Ye,autolinkProtocol:He,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Ue,characterReferenceMarkerNumeric:Ue,characterReferenceValue:ye,characterReference:Re,codeFenced:d(v),codeFencedFence:A,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:V,codeIndented:d(w),codeText:d(oe),codeTextData:V,data:V,definition:d(),definitionDestinationString:U,definitionLabelString:N,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(ve),htmlFlowData:V,htmlText:d(re),htmlTextData:V,image:d(ae),label:ie,labelText:Q,lineEnding:se,link:d(xe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:k,resourceTitleString:D,resource:ee,setextHeading:d(ne),setextHeadingLineSequence:q,setextHeadingText:R,strong:d(),thematicBreak:d()}};CE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},qe=[];let Ie=-1;for(;++Ie<J.length;)if(J[Ie][1].type==="listOrdered"||J[Ie][1].type==="listUnordered")if(J[Ie][0]==="enter")qe.push(Ie);else{const ut=qe.pop();Ie=s(J,ut,Ie)}for(Ie=-1;++Ie<J.length;){const ut=t[J[Ie][0]];AE.call(ut,J[Ie][1].type)&&ut[J[Ie][1].type].call(Object.assign({sliceSerialize:J[Ie][2].sliceSerialize},Ce),J[Ie][1])}if(Ce.tokenStack.length>0){const ut=Ce.tokenStack[Ce.tokenStack.length-1];(ut[1]||vE).call(Ce,void 0,ut[0])}for(ge.position={start:xi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:xi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<t.transforms.length;)ge=t.transforms[Ie](ge)||ge;return ge}function s(J,ge,Ce){let qe=ge-1,Ie=-1,ut=!1,Vt,Ht,an,Vr;for(;++qe<=Ce;){const un=J[qe];switch(un[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{un[0]==="enter"?Ie++:Ie--,Vr=void 0;break}case"lineEndingBlank":{un[0]==="enter"&&(Vt&&!Vr&&!Ie&&!an&&(an=qe),Vr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vr=void 0}if(!Ie&&un[0]==="enter"&&un[1].type==="listItemPrefix"||Ie===-1&&un[0]==="exit"&&(un[1].type==="listUnordered"||un[1].type==="listOrdered")){if(Vt){let qr=qe;for(Ht=void 0;qr--;){const Gn=J[qr];if(Gn[1].type==="lineEnding"||Gn[1].type==="lineEndingBlank"){if(Gn[0]==="exit")continue;Ht&&(J[Ht][1].type="lineEndingBlank",ut=!0),Gn[1].type="lineEnding",Ht=qr}else if(!(Gn[1].type==="linePrefix"||Gn[1].type==="blockQuotePrefix"||Gn[1].type==="blockQuotePrefixWhitespace"||Gn[1].type==="blockQuoteMarker"||Gn[1].type==="listItemIndent"))break}an&&(!Ht||an<Ht)&&(Vt._spread=!0),Vt.end=Object.assign({},Ht?J[Ht][1].start:un[1].end),J.splice(Ht||qe,0,["exit",Vt,un[2]]),qe++,Ce++}if(un[1].type==="listItemPrefix"){const qr={type:"listItem",_spread:!1,start:Object.assign({},un[1].start),end:void 0};Vt=qr,J.splice(qe,0,["enter",qr,un[2]]),qe++,Ce++,an=void 0,Vr=!0}}}return J[ge][1]._spread=ut,Ce}function a(J,ge){return Ce;function Ce(qe){c.call(this,J(qe),qe),ge&&ge.call(this,qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,ge,Ce){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ge,Ce||void 0]),J.position={start:xi(ge.start),end:void 0}}function d(J){return ge;function ge(Ce){J&&J.call(this,Ce),f.call(this,Ce)}}function f(J,ge){const Ce=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==J.type&&(ge?ge.call(this,J,qe[0]):(qe[1]||vE).call(this,J,qe[0]));else throw new Error("Cannot close `"+J.type+"` ("+Sa({start:J.start,end:J.end})+"): it’s not open");Ce.position.end=xi(J.end)}function p(){return Df(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=J}function _(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=J}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/(\r?\n|\r)$/g,"")}function N(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=gr(this.sliceSerialize(J)).toLowerCase()}function C(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function U(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function Y(J){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(J).length;ge.depth=Ce}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function q(J){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function me(J){const Ce=this.stack[this.stack.length-1].children;let qe=Ce[Ce.length-1];(!qe||qe.type!=="text")&&(qe=rt(),qe.position={start:xi(J.start),end:void 0},Ce.push(qe)),this.stack.push(qe)}function V(J){const ge=this.stack.pop();ge.value+=this.sliceSerialize(J),ge.position.end=xi(J.end)}function se(J){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=xi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(me.call(this,J),V.call(this,J))}function he(){this.data.atHardBreak=!0}function ve(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function re(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function oe(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function xe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function ae(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Q(J){const ge=this.sliceSerialize(J),Ce=this.stack[this.stack.length-2];Ce.label=gO(ge),Ce.identifier=gr(ge).toLowerCase()}function ie(){const J=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const qe=J.children;Ce.children=qe}else Ce.alt=ge}function k(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function D(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function ee(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function _e(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=gr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Ue(J){this.data.characterReferenceType=J.type}function ye(J){const ge=this.sliceSerialize(J),Ce=this.data.characterReferenceType;let qe;Ce?(qe=uE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=Mf(ge);const Ie=this.stack[this.stack.length-1];Ie.value+=qe}function Re(J){const ge=this.stack.pop();ge.position.end=xi(J.end)}function He(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(J)}function Ye(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(J)}function bt(){return{type:"blockquote",children:[]}}function Cn(){return{type:"code",lang:null,meta:null,value:""}}function sn(){return{type:"inlineCode",value:""}}function _r(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function sr(){return{type:"emphasis",children:[]}}function Jt(){return{type:"heading",depth:0,children:[]}}function Ve(){return{type:"break"}}function kt(){return{type:"html",value:""}}function vn(){return{type:"image",title:null,url:"",alt:null}}function on(){return{type:"link",title:null,url:"",children:[]}}function Fn(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function we(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Pe(){return{type:"paragraph",children:[]}}function Me(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function ht(){return{type:"thematicBreak"}}}function xi(e){return{line:e.line,column:e.column,offset:e.offset}}function CE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?CE(e,r):bO(e,r)}}function bO(e,t){let n;for(n in t)if(AE.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 vE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Sa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Sa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Sa({start:t.start,end:t.end})+") is still open")}function _O(e){const t=this;t.parser=n;function n(r){return yO(r,de(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function SO(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function xO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
21
- `}]}function wO(e,t){const n=t.value?t.value+`
22
- `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function AO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=eo(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function kO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function kE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=r:s.push({type:"text",value:r}),s}function PO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kE(e,t);const s={src:eo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function OO(e,t){const n={src:eo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function IO(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function RO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kE(e,t);const s={href:eo(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function LO(e,t){const n={href:eo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function DO(e,t,n){const r=e.all(t),s=n?MO(n):NE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(s||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
20
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function mO(e){const r={constructs:uE([dO,...(e||{}).extensions||[]]),content:s(Uk),defined:[],document:s(zk),flow:s(sO),lazy:{},string:s(uO),text:s(lO)};return r;function s(a){return u;function u(c){return fO(r,a,c)}}}function gO(e){for(;!EE(e););return e}const AE=/[\0\t\n\r]/g;function EO(){let e=1,t="",n=!0,r;return s;function s(a,u,c){const d=[];let f,p,m,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(AE.lastIndex=m,f=AE.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(a.slice(m,b)),e+=b-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const yO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function TO(e){return e.replace(yO,bO)}function bO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return lE(n.slice(a?2:1),a?16:10)}return Ff(n)||e}const CE={}.hasOwnProperty;function _O(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),SO(n)(gO(mO(n).document().write(EO()(e,t,!0))))}function SO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(on),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(Jt),blockQuote:a(bt),characterEscape:de,characterReference:de,codeFenced:a(Cn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Cn,u),codeText:a(sn,u),codeTextData:de,data:de,codeFlowValue:de,definition:a(_r),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(sr),hardBreakEscape:a(Ve),hardBreakTrailing:a(Ve),htmlFlow:a(Nt,u),htmlFlowData:de,htmlText:a(Nt,u),htmlTextData:de,image:a(vn),label:u,link:a(on),listItem:a(we),listItemValue:b,listOrdered:a(Fn,m),listUnordered:a(Fn),paragraph:a(Pe),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Jt),strong:a(Me),thematicBreak:a(ht)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:Ye,autolinkProtocol:He,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Ue,characterReferenceMarkerNumeric:Ue,characterReferenceValue:ye,characterReference:Re,codeFenced:d(v),codeFencedFence:A,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:V,codeIndented:d(w),codeText:d(oe),codeTextData:V,data:V,definition:d(),definitionDestinationString:H,definitionLabelString:k,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(pe),hardBreakTrailing:d(pe),htmlFlow:d(ve),htmlFlowData:V,htmlText:d(re),htmlTextData:V,image:d(ae),label:ie,labelText:Q,lineEnding:se,link:d(xe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:N,resourceTitleString:D,resource:ee,setextHeading:d(ne),setextHeadingLineSequence:q,setextHeadingText:L,strong:d(),thematicBreak:d()}};vE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},qe=[];let Ie=-1;for(;++Ie<J.length;)if(J[Ie][1].type==="listOrdered"||J[Ie][1].type==="listUnordered")if(J[Ie][0]==="enter")qe.push(Ie);else{const ut=qe.pop();Ie=s(J,ut,Ie)}for(Ie=-1;++Ie<J.length;){const ut=t[J[Ie][0]];CE.call(ut,J[Ie][1].type)&&ut[J[Ie][1].type].call(Object.assign({sliceSerialize:J[Ie][2].sliceSerialize},Ce),J[Ie][1])}if(Ce.tokenStack.length>0){const ut=Ce.tokenStack[Ce.tokenStack.length-1];(ut[1]||NE).call(Ce,void 0,ut[0])}for(ge.position={start:xi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:xi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<t.transforms.length;)ge=t.transforms[Ie](ge)||ge;return ge}function s(J,ge,Ce){let qe=ge-1,Ie=-1,ut=!1,Vt,Ht,an,Vr;for(;++qe<=Ce;){const un=J[qe];switch(un[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{un[0]==="enter"?Ie++:Ie--,Vr=void 0;break}case"lineEndingBlank":{un[0]==="enter"&&(Vt&&!Vr&&!Ie&&!an&&(an=qe),Vr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vr=void 0}if(!Ie&&un[0]==="enter"&&un[1].type==="listItemPrefix"||Ie===-1&&un[0]==="exit"&&(un[1].type==="listUnordered"||un[1].type==="listOrdered")){if(Vt){let qr=qe;for(Ht=void 0;qr--;){const Gn=J[qr];if(Gn[1].type==="lineEnding"||Gn[1].type==="lineEndingBlank"){if(Gn[0]==="exit")continue;Ht&&(J[Ht][1].type="lineEndingBlank",ut=!0),Gn[1].type="lineEnding",Ht=qr}else if(!(Gn[1].type==="linePrefix"||Gn[1].type==="blockQuotePrefix"||Gn[1].type==="blockQuotePrefixWhitespace"||Gn[1].type==="blockQuoteMarker"||Gn[1].type==="listItemIndent"))break}an&&(!Ht||an<Ht)&&(Vt._spread=!0),Vt.end=Object.assign({},Ht?J[Ht][1].start:un[1].end),J.splice(Ht||qe,0,["exit",Vt,un[2]]),qe++,Ce++}if(un[1].type==="listItemPrefix"){const qr={type:"listItem",_spread:!1,start:Object.assign({},un[1].start),end:void 0};Vt=qr,J.splice(qe,0,["enter",qr,un[2]]),qe++,Ce++,an=void 0,Vr=!0}}}return J[ge][1]._spread=ut,Ce}function a(J,ge){return Ce;function Ce(qe){c.call(this,J(qe),qe),ge&&ge.call(this,qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,ge,Ce){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ge,Ce||void 0]),J.position={start:xi(ge.start),end:void 0}}function d(J){return ge;function ge(Ce){J&&J.call(this,Ce),f.call(this,Ce)}}function f(J,ge){const Ce=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==J.type&&(ge?ge.call(this,J,qe[0]):(qe[1]||NE).call(this,J,qe[0]));else throw new Error("Cannot close `"+J.type+"` ("+xa({start:J.start,end:J.end})+"): it’s not open");Ce.position.end=xi(J.end)}function p(){return Mf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=J}function _(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=J}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/(\r?\n|\r)$/g,"")}function k(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=gr(this.sliceSerialize(J)).toLowerCase()}function C(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function H(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function Y(J){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(J).length;ge.depth=Ce}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function q(J){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function de(J){const Ce=this.stack[this.stack.length-1].children;let qe=Ce[Ce.length-1];(!qe||qe.type!=="text")&&(qe=rt(),qe.position={start:xi(J.start),end:void 0},Ce.push(qe)),this.stack.push(qe)}function V(J){const ge=this.stack.pop();ge.value+=this.sliceSerialize(J),ge.position.end=xi(J.end)}function se(J){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=xi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(de.call(this,J),V.call(this,J))}function pe(){this.data.atHardBreak=!0}function ve(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function re(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function oe(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function xe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function ae(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Q(J){const ge=this.sliceSerialize(J),Ce=this.stack[this.stack.length-2];Ce.label=TO(ge),Ce.identifier=gr(ge).toLowerCase()}function ie(){const J=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const qe=J.children;Ce.children=qe}else Ce.alt=ge}function N(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function D(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function ee(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function _e(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=gr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Ue(J){this.data.characterReferenceType=J.type}function ye(J){const ge=this.sliceSerialize(J),Ce=this.data.characterReferenceType;let qe;Ce?(qe=lE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=Ff(ge);const Ie=this.stack[this.stack.length-1];Ie.value+=qe}function Re(J){const ge=this.stack.pop();ge.position.end=xi(J.end)}function He(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(J)}function Ye(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(J)}function bt(){return{type:"blockquote",children:[]}}function Cn(){return{type:"code",lang:null,meta:null,value:""}}function sn(){return{type:"inlineCode",value:""}}function _r(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function sr(){return{type:"emphasis",children:[]}}function Jt(){return{type:"heading",depth:0,children:[]}}function Ve(){return{type:"break"}}function Nt(){return{type:"html",value:""}}function vn(){return{type:"image",title:null,url:"",alt:null}}function on(){return{type:"link",title:null,url:"",children:[]}}function Fn(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function we(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Pe(){return{type:"paragraph",children:[]}}function Me(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function ht(){return{type:"thematicBreak"}}}function xi(e){return{line:e.line,column:e.column,offset:e.offset}}function vE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?vE(e,r):xO(e,r)}}function xO(e,t){let n;for(n in t)if(CE.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function NE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+xa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+xa({start:t.start,end:t.end})+") is still open")}function wO(e){const t=this;t.parser=n;function n(r){return _O(r,fe(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function AO(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function CO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
21
+ `}]}function vO(e,t){const n=t.value?t.value+`
22
+ `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function NO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=eo(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function OO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function kE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=r:s.push({type:"text",value:r}),s}function RO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kE(e,t);const s={src:eo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function LO(e,t){const n={src:eo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function DO(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function MO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kE(e,t);const s={href:eo(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function FO(e,t){const n={href:eo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function BO(e,t,n){const r=e.all(t),s=n?UO(n):PE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(s||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
23
23
  `}),p.type==="element"&&p.tagName==="p"&&!s?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
24
- `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function MO(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=NE(n[r])}return t}function NE(e){const t=e.spread;return t==null?e.children.length>1:t}function FO(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const u=r[s];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function BO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function HO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zO(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Rr(t.children[1]),d=El(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function jO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],b={},y=u?u[d]:void 0;y&&(b.align=y);let _={type:"element",tagName:a,properties:b,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function $O(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const PE=9,OE=32;function VO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(IE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(IE(t.slice(s),s>0,!1)),a.join("")}function IE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===PE||a===OE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===PE||a===OE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function qO(e,t){const n={type:"text",value:VO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function YO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const GO={blockquote:SO,break:xO,code:wO,delete:AO,emphasis:CO,footnoteReference:vO,heading:kO,html:NO,imageReference:PO,image:OO,inlineCode:IO,linkReference:RO,link:LO,listItem:DO,list:FO,paragraph:BO,root:UO,strong:HO,table:zO,tableCell:$O,tableRow:jO,text:qO,thematicBreak:YO,toml:Sl,yaml:Sl,definition:Sl,footnoteDefinition:Sl};function Sl(){}const RE=-1,xl=0,va=1,wl=2,jf=3,$f=4,Vf=5,qf=6,LE=7,DE=8,ME=typeof self=="object"?self:globalThis,FE=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ME[e](t)},WO=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case xl:case RE:return n(u,s);case va:{const c=n([],s);for(const d of u)c.push(r(d));return c}case wl:{const c=n({},s);for(const[d,f]of u)c[r(d)]=r(f);return c}case jf:return n(new Date(u),s);case $f:{const{source:c,flags:d}=u;return n(new RegExp(c,d),s)}case Vf:{const c=n(new Map,s);for(const[d,f]of u)c.set(r(d),r(f));return c}case qf:{const c=n(new Set,s);for(const d of u)c.add(r(d));return c}case LE:{const{name:c,message:d}=u;return n(typeof ME[c]=="function"?FE(c,d):new Error(d),s)}case DE:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(FE(a,u),s)};return r},BE=e=>WO(new Map,e)(0),us="",{toString:XO}={},{keys:KO}=Object,ka=e=>{const t=typeof e;if(t!=="object"||!e)return[xl,t];const n=XO.call(e).slice(8,-1);switch(n){case"Array":return[va,us];case"Object":return[wl,us];case"Date":return[jf,us];case"RegExp":return[$f,us];case"Map":return[Vf,us];case"Set":return[qf,us];case"DataView":return[va,n]}return n.includes("Array")?[va,n]:e instanceof Error?[LE,e.name||"Error"]:[wl,n]},Al=([e,t])=>e===xl&&(t==="function"||t==="symbol"),QO=(e,t,n,r)=>{const s=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=ka(u);switch(c){case xl:{let p=u;switch(d){case"bigint":c=DE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([RE],u)}return s([c,p],u)}case va:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),s([d,[...b]],u)}const p=[],m=s([c,p],u);for(const b of u)p.push(a(b));return m}case wl:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=s([c,p],u);for(const b of KO(u))(e||!Al(ka(u[b])))&&p.push([a(b),a(u[b])]);return m}case jf:return s([c,isNaN(u.getTime())?us:u.toISOString()],u);case $f:{const{source:p,flags:m}=u;return s([c,{source:p,flags:m}],u)}case Vf:{const p=[],m=s([c,p],u);for(const[b,y]of u)(e||!(Al(ka(b))||Al(ka(y))))&&p.push([a(b),a(y)]);return m}case qf:{const p=[],m=s([c,p],u);for(const b of u)(e||!Al(ka(b)))&&p.push(a(b));return m}}const{message:f}=u;return s([c,{name:d,message:f}],u)};return a},UE=(e,{json:t,lossy:n}={})=>{const r=[];return QO(!(t||n),!!t,new Map,r)(e),r},ls=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?BE(UE(e,t)):structuredClone(e):(e,t)=>BE(UE(e,t));function JO(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 ZO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function e3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||JO,r=e.options.footnoteBackLabel||ZO,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),b=eo(m.toLowerCase());let y=0;const _=[],A=e.footnoteCounts.get(m);for(;A!==void 0&&++y<=A;){_.length>0&&_.push({type:"text",value:" "});let N=typeof n=="string"?n:n(d,y);typeof N=="string"&&(N={type:"text",value:N}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const N=v.children[v.children.length-1];N&&N.type==="text"?N.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(..._)}else p.push(..._);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,w),c.push(w)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:de(F({},ls(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
24
+ `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function UO(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=PE(n[r])}return t}function PE(e){const t=e.spread;return t==null?e.children.length>1:t}function HO(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const u=r[s];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function zO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function $O(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VO(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Rr(t.children[1]),d=El(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function qO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],b={},y=u?u[d]:void 0;y&&(b.align=y);let _={type:"element",tagName:a,properties:b,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function YO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const OE=9,IE=32;function GO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(RE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(RE(t.slice(s),s>0,!1)),a.join("")}function RE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===OE||a===IE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===OE||a===IE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function WO(e,t){const n={type:"text",value:GO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function XO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const KO={blockquote:AO,break:CO,code:vO,delete:NO,emphasis:kO,footnoteReference:PO,heading:OO,html:IO,imageReference:RO,image:LO,inlineCode:DO,linkReference:MO,link:FO,listItem:BO,list:HO,paragraph:zO,root:jO,strong:$O,table:VO,tableCell:YO,tableRow:qO,text:WO,thematicBreak:XO,toml:Sl,yaml:Sl,definition:Sl,footnoteDefinition:Sl};function Sl(){}const LE=-1,xl=0,Na=1,wl=2,$f=3,Vf=4,qf=5,Yf=6,DE=7,ME=8,FE=typeof self=="object"?self:globalThis,BE=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new FE[e](t)},QO=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case xl:case LE:return n(u,s);case Na:{const c=n([],s);for(const d of u)c.push(r(d));return c}case wl:{const c=n({},s);for(const[d,f]of u)c[r(d)]=r(f);return c}case $f:return n(new Date(u),s);case Vf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),s)}case qf:{const c=n(new Map,s);for(const[d,f]of u)c.set(r(d),r(f));return c}case Yf:{const c=n(new Set,s);for(const d of u)c.add(r(d));return c}case DE:{const{name:c,message:d}=u;return n(typeof FE[c]=="function"?BE(c,d):new Error(d),s)}case ME:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(BE(a,u),s)};return r},UE=e=>QO(new Map,e)(0),us="",{toString:JO}={},{keys:ZO}=Object,ka=e=>{const t=typeof e;if(t!=="object"||!e)return[xl,t];const n=JO.call(e).slice(8,-1);switch(n){case"Array":return[Na,us];case"Object":return[wl,us];case"Date":return[$f,us];case"RegExp":return[Vf,us];case"Map":return[qf,us];case"Set":return[Yf,us];case"DataView":return[Na,n]}return n.includes("Array")?[Na,n]:e instanceof Error?[DE,e.name||"Error"]:[wl,n]},Al=([e,t])=>e===xl&&(t==="function"||t==="symbol"),e3=(e,t,n,r)=>{const s=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=ka(u);switch(c){case xl:{let p=u;switch(d){case"bigint":c=ME,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([LE],u)}return s([c,p],u)}case Na:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),s([d,[...b]],u)}const p=[],m=s([c,p],u);for(const b of u)p.push(a(b));return m}case wl:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=s([c,p],u);for(const b of ZO(u))(e||!Al(ka(u[b])))&&p.push([a(b),a(u[b])]);return m}case $f:return s([c,isNaN(u.getTime())?us:u.toISOString()],u);case Vf:{const{source:p,flags:m}=u;return s([c,{source:p,flags:m}],u)}case qf:{const p=[],m=s([c,p],u);for(const[b,y]of u)(e||!(Al(ka(b))||Al(ka(y))))&&p.push([a(b),a(y)]);return m}case Yf:{const p=[],m=s([c,p],u);for(const b of u)(e||!Al(ka(b)))&&p.push(a(b));return m}}const{message:f}=u;return s([c,{name:d,message:f}],u)};return a},HE=(e,{json:t,lossy:n}={})=>{const r=[];return e3(!(t||n),!!t,new Map,r)(e),r},ls=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?UE(HE(e,t)):structuredClone(e):(e,t)=>UE(HE(e,t));function t3(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 n3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function r3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||t3,r=e.options.footnoteBackLabel||n3,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),b=eo(m.toLowerCase());let y=0;const _=[],A=e.footnoteCounts.get(m);for(;A!==void 0&&++y<=A;){_.length>0&&_.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const k=v.children[v.children.length-1];k&&k.type==="text"?k.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(..._)}else p.push(..._);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,w),c.push(w)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:fe(F({},ls(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
25
25
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
26
- `}]}}const Cl=(function(e){if(e==null)return i3;if(typeof e=="function")return vl(e);if(typeof e=="object")return Array.isArray(e)?t3(e):n3(e);if(typeof e=="string")return r3(e);throw new Error("Expected function, string, or object as test")});function t3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Cl(e[n]);return vl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function n3(e){const t=e;return vl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function r3(e){return vl(t);function t(n){return n&&n.type===e}}function vl(e){return t;function t(n,r,s){return!!(s3(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function i3(){return!0}function s3(e){return e!==null&&typeof e=="object"&&"type"in e}function hU(e){return e}const HE=[],o3=!0,Yf=!1,a3="skip";function zE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=Cl(s),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=HE,_,A,v;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=u3(n(d,p)),y[0]===Yf))return y;if("children"in d&&d.children){const w=d;if(w.children&&y[0]!==a3)for(A=(r?w.children.length:-1)+u,v=p.concat(w);A>-1&&A<w.children.length;){const N=w.children[A];if(_=c(N,A,v)(),_[0]===Yf)return _;A=typeof _[1]=="number"?_[1]:A+u}}return y}}}function u3(e){return Array.isArray(e)?e:typeof e=="number"?[o3,e]:e==null?HE:[e]}function kl(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),zE(e,a,c,s);function c(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const Gf={}.hasOwnProperty,l3={};function c3(e,t){const n=t||l3,r=new Map,s=new Map,a=new Map,u=F(F({},GO),n.handlers),c={all:f,applyData:f3,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:d3,wrap:p3};return kl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,b=String(p.identifier).toUpperCase();m.has(b)||m.set(b,p)}}),c;function d(p,m){const b=p.type,y=c.handlers[b];if(Gf.call(c.handlers,b)&&y)return y(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in p){const A=p,{children:v}=A,w=dn(A,["children"]),N=ls(w);return N.children=c.all(p),N}return ls(p)}return(c.options.unknownHandler||h3)(c,p,m)}function f(p){const m=[];if("children"in p){const b=p.children;let y=-1;for(;++y<b.length;){const _=c.one(b[y],p);if(_){if(y&&b[y-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=jE(_.value)),!Array.isArray(_)&&_.type==="element")){const A=_.children[0];A&&A.type==="text"&&(A.value=jE(A.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function d3(e,t){e.position&&(t.position=K1(e))}function f3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,ls(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function h3(e,t){const n=t.data||{},r="value"in t&&!(Gf.call(n,"hProperties")||Gf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function p3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
26
+ `}]}}const Cl=(function(e){if(e==null)return a3;if(typeof e=="function")return vl(e);if(typeof e=="object")return Array.isArray(e)?i3(e):s3(e);if(typeof e=="string")return o3(e);throw new Error("Expected function, string, or object as test")});function i3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Cl(e[n]);return vl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function s3(e){const t=e;return vl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function o3(e){return vl(t);function t(n){return n&&n.type===e}}function vl(e){return t;function t(n,r,s){return!!(u3(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function a3(){return!0}function u3(e){return e!==null&&typeof e=="object"&&"type"in e}function gU(e){return e}const zE=[],l3=!0,Gf=!1,c3="skip";function jE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=Cl(s),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=zE,_,A,v;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=d3(n(d,p)),y[0]===Gf))return y;if("children"in d&&d.children){const w=d;if(w.children&&y[0]!==c3)for(A=(r?w.children.length:-1)+u,v=p.concat(w);A>-1&&A<w.children.length;){const k=w.children[A];if(_=c(k,A,v)(),_[0]===Gf)return _;A=typeof _[1]=="number"?_[1]:A+u}}return y}}}function d3(e){return Array.isArray(e)?e:typeof e=="number"?[l3,e]:e==null?zE:[e]}function Nl(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),jE(e,a,c,s);function c(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const Wf={}.hasOwnProperty,f3={};function h3(e,t){const n=t||f3,r=new Map,s=new Map,a=new Map,u=F(F({},KO),n.handlers),c={all:f,applyData:m3,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:p3,wrap:E3};return Nl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,b=String(p.identifier).toUpperCase();m.has(b)||m.set(b,p)}}),c;function d(p,m){const b=p.type,y=c.handlers[b];if(Wf.call(c.handlers,b)&&y)return y(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in p){const A=p,{children:v}=A,w=dn(A,["children"]),k=ls(w);return k.children=c.all(p),k}return ls(p)}return(c.options.unknownHandler||g3)(c,p,m)}function f(p){const m=[];if("children"in p){const b=p.children;let y=-1;for(;++y<b.length;){const _=c.one(b[y],p);if(_){if(y&&b[y-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=$E(_.value)),!Array.isArray(_)&&_.type==="element")){const A=_.children[0];A&&A.type==="text"&&(A.value=$E(A.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function p3(e,t){e.position&&(t.position=Q1(e))}function m3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,ls(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function g3(e,t){const n=t.data||{},r="value"in t&&!(Wf.call(n,"hProperties")||Wf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function E3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
27
27
  `});++r<e.length;)r&&n.push({type:"text",value:`
28
28
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
29
- `}),n}function jE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function $E(e,t){const n=c3(e,t),r=n.one(e,void 0),s=e3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
30
- `},s),a}function m3(e,t){return e&&"run"in e?function(n,r){return Ke(this,null,function*(){const s=$E(n,F({file:r},t));yield e.run(s,r)})}:function(n,r){return $E(n,F({file:r},e||t))}}function VE(e){if(e)throw e}var Wf,qE;function g3(){if(qE)return Wf;qE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var b;for(b in f);return typeof b=="undefined"||e.call(f,b)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Wf=function d(){var f,p,m,b,y,_,A=arguments[0],v=1,w=arguments.length,N=!1;for(typeof A=="boolean"&&(N=A,A=arguments[1]||{},v=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});v<w;++v)if(f=arguments[v],f!=null)for(p in f)m=c(A,p),b=c(f,p),A!==b&&(N&&b&&(a(b)||(y=s(b)))?(y?(y=!1,_=m&&s(m)?m:[]):_=m&&a(m)?m:{},u(A,{name:p,newValue:d(N,_,b)})):typeof b!="undefined"&&u(A,{name:p,newValue:b}));return A},Wf}var E3=g3();const Xf=Qe(E3);function Kf(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function y3(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...s);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?T3(p,c)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function T3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return s(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...c){n||(n=!0,t(u,...c))}function a(u){s(null,u)}}const Lr={basename:b3,dirname:_3,extname:S3,join:x3,sep:"/"};function b3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Na(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function _3(e){if(Na(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function S3(e){Na(e);let t=e.length,n=-1,r=0,s=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function x3(...e){let t=-1,n;for(;++t<e.length;)Na(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":w3(n)}function w3(e){Na(e);const t=e.codePointAt(0)===47;let n=A3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function A3(e,t){let n="",r=0,s=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(s===u-1||a===1))if(s!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function Na(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const C3={cwd:v3};function v3(){return"/"}function Qf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function k3(e){if(typeof e=="string")e=new URL(e);else if(!Qf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return N3(e)}function N3(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Jf=["history","path","basename","stem","extname","dirname"];class YE{constructor(t){let n;t?Qf(t)?n={path:t}:typeof t=="string"||P3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":C3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Jf.length;){const a=Jf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)Jf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Lr.basename(this.path):void 0}set basename(t){eh(t,"basename"),Zf(t,"basename"),this.path=Lr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Lr.dirname(this.path):void 0}set dirname(t){GE(this.basename,"dirname"),this.path=Lr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Lr.extname(this.path):void 0}set extname(t){if(Zf(t,"extname"),GE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Lr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qf(t)&&(t=k3(t)),eh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Lr.basename(this.path,this.extname):void 0}set stem(t){eh(t,"stem"),Zf(t,"stem"),this.path=Lr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new mn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Zf(e,t){if(e&&e.includes(Lr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Lr.sep+"`")}function eh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function GE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function P3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const O3=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),I3={}.hasOwnProperty;class th extends O3{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=y3()}copy(){const t=new th;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Xf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ih("data",this.frozen),this.namespace[t]=n,this):I3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ih("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Nl(t),r=this.parser||this.Parser;return nh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),nh("process",this.parser||this.Parser),rh("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const c=Nl(t),d=r.parse(c);r.run(d,c,function(p,m,b){if(p||!m||!b)return f(p);const y=m,_=r.stringify(y,b);D3(_)?b.value=_:b.result=_,f(p,b)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),nh("processSync",this.parser||this.Parser),rh("processSync",this.compiler||this.Compiler),this.process(t,s),XE("processSync","process",n),r;function s(a,u){n=!0,VE(a),r=u}}run(t,n,r){WE(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=Nl(n);s.run(t,d,f);function f(p,m,b){const y=m||t;p?c(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),XE("runSync","run",r),s;function a(u,c){VE(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=Nl(n),s=this.compiler||this.Compiler;return rh("stringify",s),WE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(ih("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))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");c(f.plugins),f.settings&&(s.settings=Xf(!0,s.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const A=r[b][1];Kf(A)&&Kf(y)&&(y=Xf(!0,A,y)),r[b]=[f,y,..._]}}}}const R3=new th().freeze();function nh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ih(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 WE(e){if(!Kf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function XE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Nl(e){return L3(e)?e:new YE(e)}function L3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function D3(e){return typeof e=="string"||M3(e)}function M3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const F3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",KE=[],QE={allowDangerousHtml:!0},B3=/^(https?|ircs?|mailto|xmpp)$/i,U3=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function JE(e){const t=H3(e),n=z3(e);return j3(t.runSync(t.parse(n),n),e)}function H3(e){const t=e.rehypePlugins||KE,n=e.remarkPlugins||KE,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),QE):QE;return R3().use(_O).use(n).use(m3,r).use(t)}function z3(e){const t=e.children||"",n=new YE;return typeof t=="string"&&(n.value=t),n}function j3(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||$3;for(const p of U3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+F3+p.id,void 0);return kl(e,f),hN(e,{Fragment:x.Fragment,components:s,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function f(p,m,b){if(p.type==="raw"&&b&&typeof m=="number")return u?b.children.splice(m,1):b.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Lf)if(Object.hasOwn(Lf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],A=Lf[y];(A===null||A.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,b)),y&&b&&typeof m=="number")return c&&p.children?b.children.splice(m,1,...p.children):b.children.splice(m,1),m}}}function $3(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||B3.test(e.slice(0,t))?e:""}const ZE=/[#.]/g;function V3(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){ZE.lastIndex=s;const c=ZE.exec(n),d=n.slice(s,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),c&&(a=c[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function ey(e,t,n){const r=n?W3(n):void 0;function s(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=V3(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,q3(u))c.unshift(u);else for(const[m,b]of Object.entries(u))Y3(e,d.properties,m,b)}for(const f of c)sh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function q3(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Y3(e,t,n,r){const s=gl(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?s.spaceSeparated?a=$1(r):s.commaSeparated?a=P1(r):s.commaOrSpaceSeparated?a=$1(P1(r).join(" ")):a=ty(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?G3(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(ty(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function sh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)sh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?sh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ty(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ya(n)===ya(t)))return!0}return n}function G3(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function W3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const X3=["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"],K3=ey(Ta,"div"),Q3=ey(_i,"g",X3);function J3(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=ny(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=ny(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function ny(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
31
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const cs={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/"},ry={}.hasOwnProperty,Z3=Object.prototype;function eI(e,t){const n=t||{};return oh({file:n.file||void 0,location:!1,schema:n.space==="svg"?_i:Ta,verbose:n.verbose||!1},e)}function oh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Pl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:iy(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=J3(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Pl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Pl(e,r,n),n}default:return n=tI(e,t),n}}function iy(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=oh(e,t[n]);r.push(s)}return r}function tI(e,t){const n=e.schema;e.schema=t.namespaceURI===cs.svg?_i:Ta;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;ry.call(Z3,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?Q3:K3)(t.tagName,s,iy(e,t.childNodes));if(Pl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&no(d.startTag),p=d&&d.endTag&&no(d.endTag),m=oh(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Pl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=nI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function nI(e,t,n){const r=no(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)ry.call(n.attrs,u)&&(a[gl(e.schema,u).property]=no(n.attrs[u]));n.startTag;const c=no(n.startTag),d=n.endTag?no(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function no(e){const t=sy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=sy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function sy(e){return e.line&&e.column?e:void 0}const oy={}.hasOwnProperty;function ay(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&oy.call(s,e)){const d=String(s[e]);u=oy.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const rI={},iI={}.hasOwnProperty,uy=ay("type",{handlers:{root:oI,element:dI,text:lI,comment:cI,doctype:uI}});function sI(e,t){const r=(t||rI).space;return uy(e,r==="svg"?_i:Ta)}function oI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ah(e.children,n,t),ro(e,n),n}function aI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ah(e.children,n,t),ro(e,n),n}function uI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ro(e,t),t}function lI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ro(e,t),t}function cI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ro(e,t),t}function dI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=_i);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&iI.call(e.properties,a)){const d=fI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:cs[u],childNodes:[],parentNode:null};return c.childNodes=ah(e.children,c,r),ro(e,c),e.tagName==="template"&&e.content&&(c.content=aI(e.content,r)),c}function fI(e,t,n){const r=gl(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?O1(n):V1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=cs[r.space]}return s}function ah(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=uy(e[r],n);a.parentNode=t,s.push(a)}return s}function ro(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 hI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],pI=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]),wt="�";var P;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(P||(P={}));const Dn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ly(e){return e>=55296&&e<=57343}function mI(e){return e>=56320&&e<=57343}function gI(e,t){return(e-55296)*1024+9216+t}function cy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function dy(e){return e>=64976&&e<=65007||pI.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const EI=65536;class yI{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=EI,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:a}=this,u=s+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(mI(n))return this.pos++,this._addGap(),gI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}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(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.LINE_FEED:r}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,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ly(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){cy(t)?this._err(te.controlCharacterInInputStream):dy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Xe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Xe||(Xe={}));function fy(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}const TI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),bI=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]]);function _I(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=bI.get(e))!==null&&t!==void 0?t:e}var Wt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Wt||(Wt={}));const SI=32;var wi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(wi||(wi={}));function uh(e){return e>=Wt.ZERO&&e<=Wt.NINE}function xI(e){return e>=Wt.UPPER_A&&e<=Wt.UPPER_F||e>=Wt.LOWER_A&&e<=Wt.LOWER_F}function wI(e){return e>=Wt.UPPER_A&&e<=Wt.UPPER_Z||e>=Wt.LOWER_A&&e<=Wt.LOWER_Z||uh(e)}function AI(e){return e===Wt.EQUALS||wI(e)}var Xt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Xt||(Xt={}));var ii;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ii||(ii={}));class CI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Xt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ii.Strict}startEntity(t){this.decodeMode=t,this.state=Xt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Xt.EntityStart:return t.charCodeAt(n)===Wt.NUM?(this.state=Xt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Xt.NamedEntity,this.stateNamedEntity(t,n));case Xt.NumericStart:return this.stateNumericStart(t,n);case Xt.NumericDecimal:return this.stateNumericDecimal(t,n);case Xt.NumericHex:return this.stateNumericHex(t,n);case Xt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|SI)===Wt.LOWER_X?(this.state=Xt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Xt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(uh(s)||xI(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(uh(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Wt.SEMI)this.consumed+=1;else if(this.decodeMode===ii.Strict)return 0;return this.emitCodePoint(_I(this.result),this.consumed),this.errors&&(t!==Wt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&wi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=vI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ii.Attribute&&(a===0||AI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&wi.VALUE_LENGTH)>>14,a!==0){if(u===Wt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ii.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&wi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~wi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Xt.NamedEntity:return this.result!==0&&(this.decodeMode!==ii.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Xt.NumericDecimal:return this.emitNumericEntity(0,2);case Xt.NumericHex:return this.emitNumericEntity(0,3);case Xt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Xt.EntityStart:return 0}}}function vI(e,t,n,r){const s=(t&wi.BRANCH_LENGTH)>>7,a=t&wi.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,c=u+s-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+s]}return-1}var le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var ds;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(ds||(ds={}));var rr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(rr||(rr={}));var X;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(X||(X={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const kI=new Map([[X.A,g.A],[X.ADDRESS,g.ADDRESS],[X.ANNOTATION_XML,g.ANNOTATION_XML],[X.APPLET,g.APPLET],[X.AREA,g.AREA],[X.ARTICLE,g.ARTICLE],[X.ASIDE,g.ASIDE],[X.B,g.B],[X.BASE,g.BASE],[X.BASEFONT,g.BASEFONT],[X.BGSOUND,g.BGSOUND],[X.BIG,g.BIG],[X.BLOCKQUOTE,g.BLOCKQUOTE],[X.BODY,g.BODY],[X.BR,g.BR],[X.BUTTON,g.BUTTON],[X.CAPTION,g.CAPTION],[X.CENTER,g.CENTER],[X.CODE,g.CODE],[X.COL,g.COL],[X.COLGROUP,g.COLGROUP],[X.DD,g.DD],[X.DESC,g.DESC],[X.DETAILS,g.DETAILS],[X.DIALOG,g.DIALOG],[X.DIR,g.DIR],[X.DIV,g.DIV],[X.DL,g.DL],[X.DT,g.DT],[X.EM,g.EM],[X.EMBED,g.EMBED],[X.FIELDSET,g.FIELDSET],[X.FIGCAPTION,g.FIGCAPTION],[X.FIGURE,g.FIGURE],[X.FONT,g.FONT],[X.FOOTER,g.FOOTER],[X.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[X.FORM,g.FORM],[X.FRAME,g.FRAME],[X.FRAMESET,g.FRAMESET],[X.H1,g.H1],[X.H2,g.H2],[X.H3,g.H3],[X.H4,g.H4],[X.H5,g.H5],[X.H6,g.H6],[X.HEAD,g.HEAD],[X.HEADER,g.HEADER],[X.HGROUP,g.HGROUP],[X.HR,g.HR],[X.HTML,g.HTML],[X.I,g.I],[X.IMG,g.IMG],[X.IMAGE,g.IMAGE],[X.INPUT,g.INPUT],[X.IFRAME,g.IFRAME],[X.KEYGEN,g.KEYGEN],[X.LABEL,g.LABEL],[X.LI,g.LI],[X.LINK,g.LINK],[X.LISTING,g.LISTING],[X.MAIN,g.MAIN],[X.MALIGNMARK,g.MALIGNMARK],[X.MARQUEE,g.MARQUEE],[X.MATH,g.MATH],[X.MENU,g.MENU],[X.META,g.META],[X.MGLYPH,g.MGLYPH],[X.MI,g.MI],[X.MO,g.MO],[X.MN,g.MN],[X.MS,g.MS],[X.MTEXT,g.MTEXT],[X.NAV,g.NAV],[X.NOBR,g.NOBR],[X.NOFRAMES,g.NOFRAMES],[X.NOEMBED,g.NOEMBED],[X.NOSCRIPT,g.NOSCRIPT],[X.OBJECT,g.OBJECT],[X.OL,g.OL],[X.OPTGROUP,g.OPTGROUP],[X.OPTION,g.OPTION],[X.P,g.P],[X.PARAM,g.PARAM],[X.PLAINTEXT,g.PLAINTEXT],[X.PRE,g.PRE],[X.RB,g.RB],[X.RP,g.RP],[X.RT,g.RT],[X.RTC,g.RTC],[X.RUBY,g.RUBY],[X.S,g.S],[X.SCRIPT,g.SCRIPT],[X.SEARCH,g.SEARCH],[X.SECTION,g.SECTION],[X.SELECT,g.SELECT],[X.SOURCE,g.SOURCE],[X.SMALL,g.SMALL],[X.SPAN,g.SPAN],[X.STRIKE,g.STRIKE],[X.STRONG,g.STRONG],[X.STYLE,g.STYLE],[X.SUB,g.SUB],[X.SUMMARY,g.SUMMARY],[X.SUP,g.SUP],[X.TABLE,g.TABLE],[X.TBODY,g.TBODY],[X.TEMPLATE,g.TEMPLATE],[X.TEXTAREA,g.TEXTAREA],[X.TFOOT,g.TFOOT],[X.TD,g.TD],[X.TH,g.TH],[X.THEAD,g.THEAD],[X.TITLE,g.TITLE],[X.TR,g.TR],[X.TRACK,g.TRACK],[X.TT,g.TT],[X.U,g.U],[X.UL,g.UL],[X.SVG,g.SVG],[X.VAR,g.VAR],[X.WBR,g.WBR],[X.XMP,g.XMP]]);function io(e){var t;return(t=kI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const fe=g,NI={[le.HTML]:new Set([fe.ADDRESS,fe.APPLET,fe.AREA,fe.ARTICLE,fe.ASIDE,fe.BASE,fe.BASEFONT,fe.BGSOUND,fe.BLOCKQUOTE,fe.BODY,fe.BR,fe.BUTTON,fe.CAPTION,fe.CENTER,fe.COL,fe.COLGROUP,fe.DD,fe.DETAILS,fe.DIR,fe.DIV,fe.DL,fe.DT,fe.EMBED,fe.FIELDSET,fe.FIGCAPTION,fe.FIGURE,fe.FOOTER,fe.FORM,fe.FRAME,fe.FRAMESET,fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6,fe.HEAD,fe.HEADER,fe.HGROUP,fe.HR,fe.HTML,fe.IFRAME,fe.IMG,fe.INPUT,fe.LI,fe.LINK,fe.LISTING,fe.MAIN,fe.MARQUEE,fe.MENU,fe.META,fe.NAV,fe.NOEMBED,fe.NOFRAMES,fe.NOSCRIPT,fe.OBJECT,fe.OL,fe.P,fe.PARAM,fe.PLAINTEXT,fe.PRE,fe.SCRIPT,fe.SECTION,fe.SELECT,fe.SOURCE,fe.STYLE,fe.SUMMARY,fe.TABLE,fe.TBODY,fe.TD,fe.TEMPLATE,fe.TEXTAREA,fe.TFOOT,fe.TH,fe.THEAD,fe.TITLE,fe.TR,fe.TRACK,fe.UL,fe.WBR,fe.XMP]),[le.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[le.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},lh=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var O;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(O||(O={}));const Lt={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function PI(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Pa(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function OI(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function Ai(e){return OI(e)||Pa(e)}function hy(e){return Ai(e)||PI(e)}function Ol(e){return e+32}function py(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function my(e){return py(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function II(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:ly(e)?te.surrogateCharacterReference:dy(e)?te.noncharacterCharacterReference:cy(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class RI{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new yI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new CI(TI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=II(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Xe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(fy(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=io(t.tagName),t.type===Xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Xe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=py(t)?Xe.WHITESPACE_CHARACTER:t===P.NULL?Xe.NULL_CHARACTER:Xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ii.Attribute:ii.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=O.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ai(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ai(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=O.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=wt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Pa(t)?Ol(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ai(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=O.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ai(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ai(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ai(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ai(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Dn.SCRIPT,!1)&&my(this.preprocessor.peek(Dn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Dn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Dn.SCRIPT,!1)&&my(this.preprocessor.peek(Dn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Dn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=wt;break}default:this.currentAttr.name+=String.fromCodePoint(Pa(t)?Ol(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=wt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Dn.DASH_DASH,!0)?(this._createCommentToken(Dn.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(Dn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Dn.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(Dn.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Dn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=wt;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=O.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Pa(t))this._createDoctypeToken(String.fromCharCode(Ol(t))),this.state=O.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(wt),this.state=O.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=O.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=wt;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Pa(t)?Ol(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Dn.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Dn.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&hy(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){hy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const gy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Ey=new Set([...gy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Il=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),LI=new Set([...Il,g.OL,g.UL]),DI=new Set([...Il,g.BUTTON]),yy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Ty=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),MI=new Set([g.TR,g.TEMPLATE,g.HTML]),FI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),BI=new Set([g.TABLE,g.TEMPLATE,g.HTML]),UI=new Set([g.TD,g.TH]);class HI{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(lh,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(UI,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(BI,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(FI,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(MI,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case le.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case le.SVG:{if(Ty.has(s))return!1;break}case le.MATHML:{if(yy.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Il)}hasInListItemScope(t){return this.hasInDynamicScope(t,LI)}hasInButtonScope(t){return this.hasInDynamicScope(t,DI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(lh.has(n))return!0;if(Il.has(n))return!1;break}case le.SVG:{if(Ty.has(n))return!1;break}case le.MATHML:{if(yy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===le.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&gy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ey.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ey.has(this.currentTagId);)this.pop()}}const ch=3;var Dr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Dr||(Dr={}));const by={type:Dr.Marker};class zI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Dr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ch)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ch)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=ch&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(by)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Dr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Dr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(by);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Dr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Dr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Dr.Element&&n.element===t)}}const Ci={createDocument(){return{nodeName:"#document",mode:rr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{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){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ci.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return 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(Ci.isTextNode(n)){n.value+=t;return}}Ci.appendChild(e,Ci.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ci.isTextNode(r)?r.value+=t:Ci.insertBefore(e,Ci.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=F(F({},e.sourceCodeLocation),t)}},_y="html",jI="about:legacy-compat",$I="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Sy=["+//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//"],VI=[...Sy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],qI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),xy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],YI=[...xy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function wy(e,t){return t.some(n=>e.startsWith(n))}function GI(e){return e.name===_y&&e.publicId===null&&(e.systemId===null||e.systemId===jI)}function WI(e){if(e.name!==_y)return rr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===$I)return rr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),qI.has(n))return rr.QUIRKS;let r=t===null?VI:Sy;if(wy(n,r))return rr.QUIRKS;if(r=t===null?xy:YI,wy(n,r))return rr.LIMITED_QUIRKS}return rr.NO_QUIRKS}const Ay={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},XI="definitionurl",KI="definitionURL",QI=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])),JI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),ZI=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])),eR=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function tR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ds.COLOR||r===ds.SIZE||r===ds.FACE)||eR.has(t)}function Cy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===XI){e.attrs[t].name=KI;break}}function vy(e){for(let t=0;t<e.attrs.length;t++){const n=QI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function dh(e){for(let t=0;t<e.attrs.length;t++){const n=JI.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 nR(e){const t=ZI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=io(e.tagName))}function rR(e,t){return t===le.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function iR(e,t,n){if(t===le.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ds.ENCODING){const s=n[r].value.toLowerCase();return s===Ay.TEXT_HTML||s===Ay.APPLICATION_XML}}return t===le.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function sR(e,t,n,r){return(!r||r===le.HTML)&&iR(e,t,n)||(!r||r===le.MATHML)&&rR(e,t)}const oR="hidden",aR=8,uR=3;var M;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(M||(M={}));const lR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ky=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Ny={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ci,onParseError:null};class Py{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.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=F(F({},Ny),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new RI(this.options,this),this.activeFormattingElements=new zI(this.treeAdapter),this.fragmentContextID=r?io(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new HI(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=F(F({},Ny),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,le.HTML,[]));const s=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:lR,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=Lt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==le.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Lt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Lt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Lt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Lt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&de(F({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,le.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),a=n.type===Xe.END_TAG&&s===n.tagName?{endTag:F({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case Xe.CHARACTER:{this.onCharacter(t);break}case Xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Xe.COMMENT:{this.onComment(t);break}case Xe.DOCTYPE:{this.onDoctype(t);break}case Xe.START_TAG:{this._processStartTag(t);break}case Xe.END_TAG:{this.onEndTag(t);break}case Xe.EOF:{this.onEof(t);break}case Xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return sR(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Dr.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=M.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=M.IN_TABLE;return}case g.BODY:{this.insertionMode=M.IN_BODY;return}case g.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return ky.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return NI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){UL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Oa(this,t);break}case M.BEFORE_HTML:{Ia(this,t);break}case M.BEFORE_HEAD:{Ra(this,t);break}case M.IN_HEAD:{La(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Da(this,t);break}case M.AFTER_HEAD:{Ma(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{Iy(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{mh(this,t);break}case M.IN_TABLE_TEXT:{Hy(this,t);break}case M.IN_COLUMN_GROUP:{Dl(this,t);break}case M.AFTER_BODY:{Bl(this,t);break}case M.AFTER_AFTER_BODY:{Ul(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){BL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Oa(this,t);break}case M.BEFORE_HTML:{Ia(this,t);break}case M.BEFORE_HEAD:{Ra(this,t);break}case M.IN_HEAD:{La(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Da(this,t);break}case M.AFTER_HEAD:{Ma(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{mh(this,t);break}case M.IN_COLUMN_GROUP:{Dl(this,t);break}case M.AFTER_BODY:{Bl(this,t);break}case M.AFTER_AFTER_BODY:{Ul(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){hh(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{hh(this,t);break}case M.IN_TABLE_TEXT:{Ua(this,t);break}case M.AFTER_BODY:{gR(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{ER(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{yR(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{Ua(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?HL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Oa(this,t);break}case M.BEFORE_HTML:{TR(this,t);break}case M.BEFORE_HEAD:{_R(this,t);break}case M.IN_HEAD:{Er(this,t);break}case M.IN_HEAD_NO_SCRIPT:{wR(this,t);break}case M.AFTER_HEAD:{CR(this,t);break}case M.IN_BODY:{En(this,t);break}case M.IN_TABLE:{so(this,t);break}case M.IN_TABLE_TEXT:{Ua(this,t);break}case M.IN_CAPTION:{SL(this,t);break}case M.IN_COLUMN_GROUP:{gh(this,t);break}case M.IN_TABLE_BODY:{Ml(this,t);break}case M.IN_ROW:{Fl(this,t);break}case M.IN_CELL:{AL(this,t);break}case M.IN_SELECT:{$y(this,t);break}case M.IN_SELECT_IN_TABLE:{vL(this,t);break}case M.IN_TEMPLATE:{NL(this,t);break}case M.AFTER_BODY:{OL(this,t);break}case M.IN_FRAMESET:{IL(this,t);break}case M.AFTER_FRAMESET:{LL(this,t);break}case M.AFTER_AFTER_BODY:{ML(this,t);break}case M.AFTER_AFTER_FRAMESET:{FL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?zL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Oa(this,t);break}case M.BEFORE_HTML:{bR(this,t);break}case M.BEFORE_HEAD:{SR(this,t);break}case M.IN_HEAD:{xR(this,t);break}case M.IN_HEAD_NO_SCRIPT:{AR(this,t);break}case M.AFTER_HEAD:{vR(this,t);break}case M.IN_BODY:{Ll(this,t);break}case M.TEXT:{fL(this,t);break}case M.IN_TABLE:{Fa(this,t);break}case M.IN_TABLE_TEXT:{Ua(this,t);break}case M.IN_CAPTION:{xL(this,t);break}case M.IN_COLUMN_GROUP:{wL(this,t);break}case M.IN_TABLE_BODY:{Eh(this,t);break}case M.IN_ROW:{jy(this,t);break}case M.IN_CELL:{CL(this,t);break}case M.IN_SELECT:{Vy(this,t);break}case M.IN_SELECT_IN_TABLE:{kL(this,t);break}case M.IN_TEMPLATE:{PL(this,t);break}case M.AFTER_BODY:{Yy(this,t);break}case M.IN_FRAMESET:{RL(this,t);break}case M.AFTER_FRAMESET:{DL(this,t);break}case M.AFTER_AFTER_BODY:{Ul(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Oa(this,t);break}case M.BEFORE_HTML:{Ia(this,t);break}case M.BEFORE_HEAD:{Ra(this,t);break}case M.IN_HEAD:{La(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Da(this,t);break}case M.AFTER_HEAD:{Ma(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{By(this,t);break}case M.TEXT:{hL(this,t);break}case M.IN_TABLE_TEXT:{Ua(this,t);break}case M.IN_TEMPLATE:{qy(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{ph(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Oy(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{mh(this,t);break}case M.IN_TABLE_TEXT:{Uy(this,t);break}}}}function cR(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):Fy(e,t),n}function dR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function fR(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=uR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=hR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function hR(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 pR(e,t,n){const r=e.treeAdapter.getTagName(t),s=io(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function mR(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function fh(e,t){for(let n=0;n<aR;n++){const r=cR(e,t);if(!r)break;const s=dR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=fR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&pR(e,u,a),mR(e,s,r)}}function hh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function gR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function ER(e,t){e._appendCommentNode(t,e.document)}function ph(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 r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function yR(e,t){e._setDocumentType(t);const n=t.forceQuirks?rr.QUIRKS:WI(t);GI(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Oa(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,rr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function TR(e,t){t.tagID===g.HTML?(e._insertElement(t,le.HTML),e.insertionMode=M.BEFORE_HEAD):Ia(e,t)}function bR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ia(e,t)}function Ia(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function _R(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:Ra(e,t)}}function SR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Ra(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ra(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function Er(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Lt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Lt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Lt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Lt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:La(e,t)}}function xR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{La(e,t);break}case g.TEMPLATE:{fs(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function fs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function La(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function wR(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Er(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:Da(e,t)}}function AR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{Da(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Da(e,t){const n=t.type===Xe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function CR(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Er(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ma(e,t)}}function vR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ma(e,t);break}case g.TEMPLATE:{fs(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ma(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Rl(e,t)}function Rl(e,t){switch(t.type){case Xe.CHARACTER:{Iy(e,t);break}case Xe.WHITESPACE_CHARACTER:{Oy(e,t);break}case Xe.COMMENT:{hh(e,t);break}case Xe.START_TAG:{En(e,t);break}case Xe.END_TAG:{Ll(e,t);break}case Xe.EOF:{By(e,t);break}}}function Oy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Iy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function kR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function NR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function PR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET)}function OR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function IR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&lh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function RR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function LR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function DR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function MR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=Lt.PLAINTEXT}function FR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function BR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(fh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function UR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function HR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(fh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function jR(e,t){e.treeAdapter.getDocumentMode(e.document)!==rr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function Ry(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Ly(e){const t=fy(e,ds.TYPE);return t!=null&&t.toLowerCase()===oR}function $R(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),Ly(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function VR(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function qR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function YR(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Ry(e,t)}function GR(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function WR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function XR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function Dy(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function KR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function QR(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function JR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function ZR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,le.HTML)}function eL(e,t){e._reconstructActiveFormattingElements(),Cy(t),dh(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function tL(e,t){e._reconstructActiveFormattingElements(),vy(t),dh(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function My(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function En(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{UR(e,t);break}case g.A:{BR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{IR(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{OR(e,t);break}case g.LI:case g.DD:case g.DT:{DR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Ry(e,t);break}case g.HR:{qR(e,t);break}case g.RB:case g.RTC:{JR(e,t);break}case g.RT:case g.RP:{ZR(e,t);break}case g.PRE:case g.LISTING:{RR(e,t);break}case g.XMP:{WR(e,t);break}case g.SVG:{tL(e,t);break}case g.HTML:{kR(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Er(e,t);break}case g.BODY:{NR(e,t);break}case g.FORM:{LR(e,t);break}case g.NOBR:{HR(e,t);break}case g.MATH:{eL(e,t);break}case g.TABLE:{jR(e,t);break}case g.INPUT:{$R(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{VR(e,t);break}case g.IMAGE:{YR(e,t);break}case g.BUTTON:{FR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{zR(e,t);break}case g.IFRAME:{XR(e,t);break}case g.SELECT:{KR(e,t);break}case g.OPTION:case g.OPTGROUP:{QR(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Dy(e,t);break}case g.FRAMESET:{PR(e,t);break}case g.TEXTAREA:{GR(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Dy(e,t):My(e,t);break}case g.PLAINTEXT:{MR(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:My(e,t)}}function nL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function rL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,Yy(e,t))}function iL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function sL(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function oL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function aL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function uL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function lL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function cL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function dL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Fy(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function Ll(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{fh(e,t);break}case g.P:{oL(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{iL(e,t);break}case g.LI:{aL(e);break}case g.DD:case g.DT:{uL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{lL(e);break}case g.BR:{dL(e);break}case g.BODY:{nL(e,t);break}case g.HTML:{rL(e,t);break}case g.FORM:{sL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{cL(e,t);break}case g.TEMPLATE:{fs(e,t);break}default:Fy(e,t)}}function By(e,t){e.tmplInsertionModeStack.length>0?qy(e,t):ph(e,t)}function fL(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function hL(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function mh(e,t){if(e.openElements.currentTagId!==void 0&&ky.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Xe.CHARACTER:{Hy(e,t);break}case Xe.WHITESPACE_CHARACTER:{Uy(e,t);break}}else Ba(e,t)}function pL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CAPTION}function mL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function gL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,gh(e,t)}function EL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_TABLE_BODY}function yL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,Ml(e,t)}function TL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function bL(e,t){Ly(t)?e._appendElement(t,le.HTML):Ba(e,t),t.ackSelfClosing=!0}function _L(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function so(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{yL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Er(e,t);break}case g.COL:{gL(e,t);break}case g.FORM:{_L(e,t);break}case g.TABLE:{TL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{EL(e,t);break}case g.INPUT:{bL(e,t);break}case g.CAPTION:{pL(e,t);break}case g.COLGROUP:{mL(e,t);break}default:Ba(e,t)}}function Fa(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{fs(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ba(e,t)}}function Ba(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Rl(e,t),e.fosterParentingEnabled=n}function Uy(e,t){e.pendingCharacterTokens.push(t)}function Hy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ua(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ba(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const zy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function SL(e,t){const n=t.tagID;zy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,so(e,t)):En(e,t)}function xL(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===g.TABLE&&Fa(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ll(e,t)}}function gh(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Er(e,t);break}default:Dl(e,t)}}function wL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TEMPLATE:{fs(e,t);break}case g.COL:break;default:Dl(e,t)}}function Dl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function Ml(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=M.IN_ROW,Fl(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,so(e,t));break}default:so(e,t)}}function Eh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Fa(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:Fa(e,t)}}function Fl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Ml(e,t));break}default:so(e,t)}}function jy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Eh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Eh(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Fa(e,t)}}function AL(e,t){const n=t.tagID;zy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Fl(e,t)):En(e,t)}function CL(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),jy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ll(e,t)}}function $y(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{Er(e,t);break}}}function Vy(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{fs(e,t);break}}}function vL(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):$y(e,t)}function kL(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Vy(e,t)}function NL(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Er(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,so(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,gh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,Ml(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,Fl(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,En(e,t)}}function PL(e,t){t.tagID===g.TEMPLATE&&fs(e,t)}function qy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ph(e,t)}function OL(e,t){t.tagID===g.HTML?En(e,t):Bl(e,t)}function Yy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Bl(e,t)}function Bl(e,t){e.insertionMode=M.IN_BODY,Rl(e,t)}function IL(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.FRAMESET:{e._insertElement(t,le.HTML);break}case g.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Er(e,t);break}}}function RL(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function LL(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.NOFRAMES:{Er(e,t);break}}}function DL(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function ML(e,t){t.tagID===g.HTML?En(e,t):Ul(e,t)}function Ul(e,t){e.insertionMode=M.IN_BODY,Rl(e,t)}function FL(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.NOFRAMES:{Er(e,t);break}}}function BL(e,t){t.chars=wt,e._insertCharacters(t)}function UL(e,t){e._insertCharacters(t),e.framesetOk=!1}function Gy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function HL(e,t){if(tR(t))Gy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?Cy(t):r===le.SVG&&(nR(t),vy(t)),dh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function zL(e,t){if(t.tagID===g.P||t.tagID===g.BR){Gy(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===le.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const jL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,$L=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Wy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Xy(e,t){const n=ZL(e),r=ay("type",{handlers:{root:VL,element:qL,text:YL,comment:Qy,doctype:GL,raw:XL},unknown:KL}),s={parser:n?new Py(Wy):Py.getFragmentParser(void 0,Wy),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),oo(s,Rr());const a=n?s.parser.document:s.parser.getFragment(),u=eI(a,{file:s.options.file});return s.stitches&&kl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Ky(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function VL(e,t){Ky(e.children,t)}function qL(e,t){QL(e,t),Ky(e.children,t),JL(e,t)}function YL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:Ha(e)};oo(t,Rr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function GL(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ha(e)};oo(t,Rr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function WL(e,t){t.stitches=!0;const n=e6(e);if("children"in e&&"children"in n){const r=Xy({type:"root",children:e.children},t.options);n.children=r.children}Qy({type:"comment",value:{stitch:n}},t)}function Qy(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:Ha(e)};oo(t,Rr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function XL(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,Jy(t,Rr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(jL,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function KL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))WL(n,t);else{let r="";throw $L.has(n.type)&&(r=". 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"+r)}}function oo(e,t){Jy(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=Lt.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 Jy(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function QL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;oo(t,Rr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:cs.html;s===cs.html&&n==="svg"&&(s=cs.svg);const a=sI(de(F({},e),{children:[]}),{space:s===cs.svg?"svg":"html"}),u={type:Xe.START_TAG,tagName:n,tagID:io(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ha(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function JL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&hI.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;oo(t,El(e));const r={type:Xe.END_TAG,tagName:n,tagID:io(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ha(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function ZL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ha(e){const t=Rr(e)||{line:void 0,column:void 0,offset:void 0},n=El(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 e6(e){return"children"in e?ls(de(F({},e),{children:[]})):ls(e)}function Zy(e){return function(t,n){return Xy(t,de(F({},e),{file:n}))}}const hs=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],eT={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...hs,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...hs],h2:[["className","sr-only"]],img:[...hs,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...hs,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...hs],table:[...hs],ul:[...hs,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},vi={}.hasOwnProperty;function t6(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},eT),t):eT,stack:[]},s=tT(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function tT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return n6(e,n);case"doctype":return r6(e,n);case"element":return i6(e,n);case"root":return s6(e,n);case"text":return o6(e,n)}}}function n6(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return za(a,t),a}}function r6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return za(n,t),n}}function i6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=nT(e,t.children),s=a6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&vi.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:s,children:r};return za(u,t),u}function s6(e,t){const r={type:"root",children:nT(e,t.children)};return za(r,t),r}function o6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return za(r,t),r}function nT(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=tT(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function a6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&vi.call(r,n)?r[n]:void 0,u=r&&vi.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(vi.call(c,f)){const p=c[f];let m=rT(e,sT(a,f),f,p);m==null&&(m=rT(e,sT(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&vi.call(s,n)){const p=s[n];for(f in p)vi.call(p,f)&&!vi.call(d,f)&&(d[f]=p[f])}return d}function rT(e,t,n,r){return t?Array.isArray(r)?u6(e,t,n,r):iT(e,t,n,r):void 0}function u6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=iT(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function iT(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&l6(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function l6(e,t,n){const r=e.schema.protocols&&vi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),c=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function za(e,t){const n=K1(t);t.data&&(e.data=ls(t.data)),n&&(e.position=n)}function sT(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function c6(e){return function(t){return t6(t,e)}}const oT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return x.jsx("a",de(F(F({className:G(e,`${z}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},d6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=tt();return!e&&!t?null:x.jsx("div",{className:G(n,`${z}-disclaimer`),children:t?x.jsx(JE,{rehypePlugins:[Zy,c6],components:{ul:({children:r})=>x.jsx("ul",{className:G(n,`${z}-ul`),children:r}),ol:({children:r})=>x.jsx("ol",{className:G(n,`${z}-ol`),children:r}),li:({children:r})=>x.jsx("li",{className:G(n,`${z}-li`),children:r}),a:({href:r,title:s,children:a})=>x.jsx(oT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>x.jsx("img",{className:G(n,`${z}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>x.jsx("p",{className:G(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>x.jsx("span",{className:G(n,`${z}-disclaimer-text-span`),children:r})},children:t}):x.jsx("p",{className:G(n,`${z}-disclaimer-text`),children:e})})},yh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:s,imageFile:a}=tr(),{setImageFile:u}=Xs(),{logger:c,globalClassName:d,searchConfig:f,features:p}=tt(),m=B.useRef(null),b=B.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",A=!!s||!1,v=A?"connected":"disconnected",w=t||!A,N=()=>a?new Promise((R,q)=>{const ne=new FileReader;ne.readAsDataURL(a),ne.onload=()=>R(ne.result),ne.onerror=me=>q(me)}):Promise.resolve(""),C=R=>Ke(null,null,function*(){var me;if(w)return;const q=10*1024*1024,ne=(me=R.target.files)==null?void 0:me[0];if(ne){if(ne.size>q){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ne)}}),U=()=>{u(null),b.current&&(b.current.value="")},Y=R=>Ke(null,null,function*(){var me;R.preventDefault();const q=(((me=m.current)==null?void 0:me.value)||"").trim();let ne="";try{ne=yield N()}catch(V){c==null||c.error("Error converting file to base64:",V),alert("There was an error processing the file. Please try again.");return}q&&(U(),m.current.value="",r(q,ne))});return x.jsxs("div",{className:G(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&x.jsxs("div",{className:G(d,`cim-${n}-component`,`${z}-image-file-preview`),children:[x.jsx("img",{className:G(d,`cim-${n}-component`,`${z}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),x.jsx("span",{className:G(d,`cim-${n}-component`,`${z}-image-file-name`),title:_,children:_}),x.jsx(N1,{className:G(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:U})]}),x.jsxs("form",{className:G(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:Y,children:[x.jsx("span",{role:"status",className:G(`${z}-connection-status-icon`,v)}),y&&x.jsxs("div",{role:"button",className:G(d,e,`cim-${n}-component`,w&&"disabled",`${z}-image-upload-button`),"aria-disabled":w,tabIndex:0,children:[x.jsx("label",{className:G(d,e,`cim-${n}-component`,w&&"disabled",`${z}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:x.jsx(Fk,{})}),x.jsx("input",{className:G(d,e,`cim-${n}-component`,`${z}-file-input`),type:"file",ref:b,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${z}-file-input`,disabled:w,onInput:C})]}),x.jsx("input",{className:G(d,e,`cim-${n}-component`,`${z}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,name:`${z}-user-input`}),x.jsx($k,{isLoading:w}),x.jsx(Hk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:w})]}),x.jsx(d6,{})]})};function f6(e){return xt({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function h6(e){return xt({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const aT=B.createContext({isOpen:!1}),Th=B.createContext(null),uT=B.createContext(null),ao=()=>{var n,r;const e=B.useContext(Th),t=B.useContext(uT);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},lT=({onClearChat:e,componentType:t})=>{const n=ao(),r=()=>{e(),n()};return x.jsxs("button",{className:G(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[x.jsx(h6,{}),"Clear chat"]})};function p6(e){return e==null?[]:Array.isArray(e)?e:[e]}var m6=(e,...t)=>e.concat(t),g6=(e,...t)=>e.filter(n=>!t.includes(n)),E6=e=>Array.from(new Set(e));function cT(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?s?c:0:a>=u?s?0:t>u?u:t:a}function y6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return cT(e,t,{step:-r,loop:s})}var T6=e=>Array.isArray(e),dT=e=>e!=null&&typeof e=="object",b6=e=>dT(e)&&!T6(e),Hl=e=>typeof e=="string",uo=e=>typeof e=="function",_6=e=>e==null,S6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),x6=e=>Object.prototype.toString.call(e),fT=Function.prototype.toString,w6=fT.call(Object),A6=e=>{if(!dT(e)||x6(e)!="[object Object]"||k6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=S6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&fT.call(n)==w6},C6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,v6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,k6=e=>C6(e)||v6(e),N6=e=>e(),P6=()=>{},bh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function O6(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:I6,max:R6}=Math,L6=e=>Number.isNaN(e),D6=e=>L6(e)?0:e,hT=(e,t,n)=>I6(R6(D6(e),t),n);function _h(e){if(!A6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=_h(s))}return n}function Sh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function M6(e,t){if(e==null)throw new Error(t())}function F6(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var B6=Object.defineProperty,U6=(e,t,n)=>t in e?B6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xh=(e,t,n)=>U6(e,typeof t!="symbol"?t+"":t,n),pT=()=>{},zl=e=>typeof e=="object"&&e!==null,lo=e=>e?"":void 0,mT=e=>e?"true":void 0,H6=1,z6=9,j6=11,Kt=e=>zl(e)&&e.nodeType===H6&&typeof e.nodeName=="string",jl=e=>zl(e)&&e.nodeType===z6,$6=e=>zl(e)&&e===e.window,gT=e=>Kt(e)?e.localName||"":"#document";function V6(e){return["html","body","#document"].includes(gT(e))}var q6=e=>zl(e)&&e.nodeType!==void 0,ps=e=>q6(e)&&e.nodeType===j6&&"host"in e,Y6=e=>Kt(e)&&e.localName==="input",G6=e=>Kt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ja(e){if(!e)return!1;const t=e.getRootNode();return ho(t)===e}var W6=/(textarea|select)/;function X6(e){if(e==null||!Kt(e))return!1;try{return Y6(e)&&e.selectionStart!=null||W6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function co(e,t){var r;if(!e||!t||!Kt(e)||!Kt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ps(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Mr(e){var t;return jl(e)?e:$6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function K6(e){return Mr(e).documentElement}function fo(e){var t,n,r;return ps(e)?fo(e.host):jl(e)?(t=e.defaultView)!=null?t:window:Kt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ho(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function Q6(e){if(gT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ps(e)&&e.host||K6(e);return ps(t)?t.host:t}function wh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),jl(t)||ps(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Ah=new WeakMap;function po(e){return Ah.has(e)||Ah.set(e,fo(e).getComputedStyle(e)),Ah.get(e)}var Ch=new Set(["menu","listbox","dialog","grid","tree","region"]),J6=e=>Ch.has(e),ET=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function yT(e,t){const n=new Set,r=wh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=ET(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(m&&J6(m)&&!b&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function TT(e,t){const n=wh(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=ET(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";m&&Ch.has(m)&&!b&&(t(p),s(p))}}}};s(e)}function Z6(e){const t=new Set;return TT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function e4(e){const t=e.getAttribute("role");return!!(t&&Ch.has(t))}function t4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function n4(e){var t;return t4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function r4(e){if(!e.id)return!1;const t=wh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&e4(e))}var vh=()=>typeof document!="undefined";function i4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var kh=e=>vh()&&e.test(i4()),s4=e=>vh()&&e.test(navigator.vendor),bT=()=>vh()&&!!navigator.maxTouchPoints,o4=()=>kh(/^iPhone/i),a4=()=>kh(/^iPad/i)||Nh()&&navigator.maxTouchPoints>1,$l=()=>o4()||a4(),u4=()=>Nh()||$l(),Nh=()=>kh(/^Mac/i),l4=()=>u4()&&s4(/apple/i);function c4(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function yr(e){var n;const t=c4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var _T=e=>e.button===0,d4=e=>e.button===2||Nh()&&e.ctrlKey&&e.button===0,f4=e=>"touches"in e&&e.touches.length>0,h4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},ST={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function p4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=h4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in ST&&(s=ST[s]),s}function xT(e,t="client"){const n=f4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Qt=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},wT=e=>Kt(e)&&e.tagName==="IFRAME",m4=/^(audio|video|details)$/;function AT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var g4=e=>!Number.isNaN(AT(e)),E4=e=>AT(e)<0;function y4(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function CT(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<s.length;){const d=s[c++];if(!d||a.has(d))continue;a.add(d);const f=y4(d,t);if(f){const p=Array.from(f.querySelectorAll(Vl)).filter(n),m=u.get(d);if(m!==void 0){const b=m+1;r.splice(b,0,...p),p.forEach((y,_)=>{u.set(y,b+_)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,b+_)})}s.push(...p)}}return r}var Vl="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",vT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Vl));(n==!0||n=="if-empty"&&s.length===0)&&Kt(e)&&Fr(e)&&s.unshift(e);const u=[];for(const c of s)if(Fr(c)){if(wT(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...vT(d,{getShadowRoot:r}));continue}u.push(c)}return r?CT(u,r,Fr):u};function Fr(e){return!Kt(e)||e.closest("[inert]")?!1:e.matches(Vl)&&G6(e)}function mo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Vl));n&&ms(e)&&s.unshift(e);const a=[];for(const u of s)if(ms(u)){if(wT(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...mo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=CT(a,r,ms);return!u.length&&n?s:u}return!a.length&&n?s:a}function ms(e){return Kt(e)&&e.tabIndex>0?!0:Fr(e)&&!E4(e)}function T4(e,t={}){const n=mo(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function b4(e,t={}){const{current:n,getShadowRoot:r}=t,s=mo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:ho(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function $a(e){return e.tabIndex<0&&(m4.test(e.localName)||X6(e))&&!g4(e)?0:e.tabIndex}function kT(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=mo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var _4=class L2{constructor(){xh(this,"id",null),xh(this,"fn_cleanup"),xh(this,"cleanup",()=>{this.cancel()})}static create(){return new L2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function jt(e){const t=_4.create();return t.request(e),t.cleanup}function NT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function Ph(e){const t=Q6(e);return V6(t)?Mr(t).body:Kt(t)&&w4(t)?t:Ph(t)}var S4=/auto|scroll|overlay|hidden|clip/,x4=new Set(["inline","contents"]);function w4(e){const t=fo(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return S4.test(n+s+r)&&!x4.has(a)}var go="default",Oh="",ql=new WeakMap;function A4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return $l()?(go==="default"&&(Oh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),go="disabled"):t&&(ql.set(t,t.style.userSelect),t.style.userSelect="none"),()=>C4({target:t,doc:r})}function C4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if($l()){if(go!=="disabled")return;go="restoring",setTimeout(()=>{NT(()=>{go==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Oh||""),Oh="",go="default")})},300)}else if(t&&ql.has(t)){const a=ql.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),ql.delete(t)}}function v4(e={}){const u=e,{defer:t,target:n}=u,r=dn(u,["defer","target"]),s=t?jt:c=>c(),a=[];return a.push(s(()=>{const c=typeof n=="function"?n():n;a.push(A4(de(F({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function k4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=c=>{const d=xT(c),f=Math.sqrt(Mu(d.x,2)+Mu(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=xT(c);r({point:d,event:c})},u=[Qt(e,"pointermove",s,!1),Qt(e,"pointerup",a,!1),Qt(e,"pointercancel",a,!1),Qt(e,"contextmenu",a,!1),v4({doc:e})];return()=>{u.forEach(c=>c())}}function N4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,b]=T4(e,{includeContainer:!0,getShadowRoot:a}),y=b4(c,{current:n,getShadowRoot:a}),_=!m&&!b;f.shiftKey&&ja(y)?(s==null||s(),p=b):f.shiftKey&&(ja(m)||_)?p=n:!f.shiftKey&&ja(n)?(s==null||s(),p=m):!f.shiftKey&&(ja(b)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Qt(u,"keydown",d,!0)}function P4(e,t){const c=t,{defer:n,triggerElement:r}=c,s=dn(c,["defer","triggerElement"]),a=n?jt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(N4(d,F({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function O4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Yl(e,t){if(!e)return pT;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function I4(e,t,n){if(!e)return pT;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function R4(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),c(f))})}),()=>t.abort()]}function L4(e,t){const{timeout:n,rootNode:r}=t,s=fo(r),a=Mr(r),u=new s.AbortController;return R4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var D4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),M4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,PT=e=>{const t={};let n;for(;n=M4.exec(e);)t[n[1]]=n[2];return t},F4=(e,t)=>{if(Hl(e)){if(Hl(t))return`${e};${t}`;e=PT(e)}else Hl(t)&&(t=PT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function $t(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=bh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=D4(t[s],n[s]);continue}if(s==="style"){t[s]=F4(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function pU(e){return e}var Eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Eo||{}),Ih="__init__";function B4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Mr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>ho(t()),a=u=>t().getElementById(u);return de(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:ja,getById:a})}function U4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var yo=()=>e=>Array.from(new Set(e)),OT=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Gl(e){var m,b;const t=(m=e().value)!=null?m:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=B.useState(t),[s,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(s);c.current=u?e().value:s;const d=B.useRef(c.current);OT(()=>{d.current=c.current},[s,e().value]);const f=y=>{var v,w;const _=d.current,A=uo(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:A,prev:_}),u||a(A),n(A,_)||(w=(v=e()).onChange)==null||w.call(v,A,_)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?Ks.flushSync:N6)(()=>f(y))},invoke(y,_){var A,v;(v=(A=e()).onChange)==null||v.call(A,y,_)},hash(y){var _,A,v;return(v=(A=(_=e()).hash)==null?void 0:A.call(_,y))!=null?v:String(y)}}}Gl.cleanup=e=>{B.useEffect(()=>e,[])},Gl.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function H4(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var z4=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Wl(e,t={}){var se,he,ve,re,oe,xe;const n=B.useMemo(()=>{const{id:ae,ids:Q,getRootNode:ie}=t;return B4({id:ae,ids:Q,getRootNode:ie})},[t]),r=(...ae)=>{e.debug&&console.log(...ae)},s=(he=(se=e.props)==null?void 0:se.call(e,{props:_h(t),scope:n}))!=null?he:t,a=j4(s),u=(ve=e.context)==null?void 0:ve.call(e,{prop:a,bindable:Gl,scope:n,flush:RT,getContext(){return d},getComputed(){return Y},getRefs(){return A},getEvent(){return y()}}),c=IT(u),d={get(ae){var Q;return(Q=c.current)==null?void 0:Q[ae].ref.current},set(ae,Q){var ie;(ie=c.current)==null||ie[ae].set(Q)},initial(ae){var Q;return(Q=c.current)==null?void 0:Q[ae].initial},hash(ae){var ie,k;const Q=(ie=c.current)==null?void 0:ie[ae].get();return(k=c.current)==null?void 0:k[ae].hash(Q)}},f=B.useRef(new Map),p=B.useRef(null),m=B.useRef(null),b=B.useRef({type:""}),y=()=>de(F({},b.current),{current(){return b.current},previous(){return m.current}}),_=()=>de(F({},R),{matches(...ae){return ae.includes(R.ref.current)},hasTag(ae){var Q,ie;return!!((ie=(Q=e.states[R.ref.current])==null?void 0:Q.tags)!=null&&ie.includes(ae))}}),A=H4((oe=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?oe:{}),v=()=>({state:_(),context:d,event:y(),prop:a,send:V,action:w,guard:N,track:z4,refs:A,computed:Y,flush:RT,scope:n,choose:U}),w=ae=>{const Q=uo(ae)?ae(v()):ae;if(!Q)return;const ie=Q.map(k=>{var ee,I;const D=(I=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:I[k];return D||Sh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),D});for(const k of ie)k==null||k(v())},N=ae=>{var Q,ie;return uo(ae)?ae(v()):(ie=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:ie[ae](v())},C=ae=>{const Q=uo(ae)?ae(v()):ae;if(!Q)return;const ie=Q.map(D=>{var I,_e;const ee=(_e=(I=e.implementations)==null?void 0:I.effects)==null?void 0:_e[D];return ee||Sh(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),ee}),k=[];for(const D of ie){const ee=D==null?void 0:D(v());ee&&k.push(ee)}return()=>k.forEach(D=>D==null?void 0:D())},U=ae=>p6(ae).find(Q=>{let ie=!Q.guard;return Hl(Q.guard)?ie=!!N(Q.guard):uo(Q.guard)&&(ie=Q.guard(v())),ie}),Y=ae=>{M6(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[ae];return Q({context:d,event:y(),prop:a,refs:A,scope:n,computed:Y})},R=Gl(()=>({defaultValue:e.initialState({prop:a}),onChange(ae,Q){var k,D,ee,I;if(Q){const _e=f.current.get(Q);_e==null||_e(),f.current.delete(Q)}Q&&w((k=e.states[Q])==null?void 0:k.exit),w((D=p.current)==null?void 0:D.actions);const ie=C((ee=e.states[ae])==null?void 0:ee.effects);if(ie&&f.current.set(ae,ie),Q===Ih){w(e.entry);const _e=C(e.effects);_e&&f.current.set(Ih,_e)}w((I=e.states[ae])==null?void 0:I.entry)}})),q=B.useRef(void 0),ne=B.useRef(Eo.NotStarted);OT(()=>{queueMicrotask(()=>{var D;const ie=ne.current===Eo.Started;ne.current=Eo.Started,r(ie?"rehydrating...":"initializing...");const k=(D=q.current)!=null?D:R.initial;R.invoke(k,ie?R.get():Ih)});const ae=f.current,Q=R.ref.current;return()=>{r("unmounting..."),q.current=Q,ne.current=Eo.Stopped,ae.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{w(e.exit)})}},[]);const me=()=>"ref"in R?R.ref.current:R.get(),V=ae=>{queueMicrotask(()=>{var I,_e,Ue,ye,Re;if(ne.current!==Eo.Started)return;m.current=b.current,b.current=ae;let Q=me();const ie=(Ue=(I=e.states[Q].on)==null?void 0:I[ae.type])!=null?Ue:(_e=e.on)==null?void 0:_e[ae.type],k=U(ie);if(!k)return;p.current=k;const D=(ye=k.target)!=null?ye:Q;r("transition",ae.type,k.target||Q,`(${k.actions})`);const ee=D!==Q;ee?Ks.flushSync(()=>R.set(D)):k.reenter&&!ee?R.invoke(Q,Q):w((Re=k.actions)!=null?Re:[])})};return(xe=e.watch)==null||xe.call(e,v()),{state:_(),send:V,context:d,prop:a,scope:n,refs:A,computed:Y,event:y(),getStatus:()=>ne.current}}function IT(e){const t=B.useRef(e);return t.current=e,t}function j4(e){const t=IT(e);return function(r){return t.current[r]}}function RT(e){queueMicrotask(()=>{Ks.flushSync(()=>e())})}var Rh=U4(e=>e);function Xl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function $4(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Lh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=dn(f,["asChild","children"]);if(!s)return B.createElement(e,de(F({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=$4(c);return B.cloneElement(c,de(F({},$t(u,c.props)),{ref:r?Xl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},yn=(()=>{const e=new Map;return new Proxy(Lh,{apply(t,n,r){return Lh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Lh(r)),e.get(r)}})})();function V4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function gs(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const m=new Error(a!=null?a:V4(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[q4,Dh]=gs({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[LT,Va]=gs({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),DT=B.forwardRef((e,t)=>{const n=Dh(),r=Va(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(yn.div,de(F({},s),{ref:Xl(r.ref,t)}))});DT.displayName="PopoverContent";const MT=B.forwardRef((e,t)=>{const n=Dh(),r=Va(),s=$t(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(yn.div,de(F({},s),{ref:t}))});MT.displayName="PopoverPositioner";const qa=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},F({},e)]),FT=e=>qa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function Y4(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var G4={props({props:e}){return de(F({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",po(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});jt(()=>{var c,d;const u=Kl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{jt(()=>{e.set("prevAnimationName",Kl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,b;((b=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?b:d.target)===s&&e.set("prevAnimationName",Kl(t.get("styles")))},u=d=>{const f=Kl(t.get("styles"));yr(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const c=Yl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),NT(()=>c())}}}}};function Kl(e){return(e==null?void 0:e.animationName)||"none"}yo()(["onExitComplete","present","immediate"]);function W4(e,t={}){const{sync:n=!1}=t,r=X4(e);return B.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function X4(e){const t=B.useRef(e);return t.current=e,t}const Mh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=dn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=de(F({},a),{present:r,onExitComplete:W4(e.onExitComplete)}),d=Wl(G4,c),f=Y4(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var Es=(e,t=[])=>({parts:(...n)=>{if(K4(t))return Es(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Es(e,[...t,...n]),omit:(...n)=>Es(e,t.filter(r=>!n.includes(r))),rename:n=>Es(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${To(e)}"][data-part="${To(r)}"]`,`& [data-scope="${To(e)}"][data-part="${To(r)}"]`].join(", "),attrs:{"data-scope":To(e),"data-part":To(r)}}}),{})}),To=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),K4=e=>e.length===0;const Q4=["top","right","bottom","left"],ki=Math.min,si=Math.max,Ql=Math.round,Jl=Math.floor,Br=e=>({x:e,y:e}),J4={left:"right",right:"left",bottom:"top",top:"bottom"};function BT(e,t,n){return si(e,ki(t,n))}function oi(e,t){return typeof e=="function"?e(t):e}function Ni(e){return e.split("-")[0]}function bo(e){return e.split("-")[1]}function Fh(e){return e==="x"?"y":"x"}function Bh(e){return e==="y"?"height":"width"}function Ur(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Uh(e){return Fh(Ur(e))}function Z4(e,t,n){n===void 0&&(n=!1);const r=bo(e),s=Uh(e),a=Bh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Zl(u)),[u,Zl(u)]}function eD(e){const t=Zl(e);return[Hh(e),t,Hh(t)]}function Hh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const UT=["left","right"],HT=["right","left"],tD=["top","bottom"],nD=["bottom","top"];function rD(e,t,n){switch(e){case"top":case"bottom":return n?t?HT:UT:t?UT:HT;case"left":case"right":return t?tD:nD;default:return[]}}function iD(e,t,n,r){const s=bo(e);let a=rD(Ni(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Hh)))),a}function Zl(e){const t=Ni(e);return J4[t]+e.slice(t.length)}function sD(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function zT(e){return typeof e!="number"?sD(e):{top:e,right:e,bottom:e,left:e}}function ec(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function jT(e,t,n){let{reference:r,floating:s}=e;const a=Ur(t),u=Uh(t),c=Bh(u),d=Ni(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const _=bo(t);return _&&(y[u]+=b*(_==="end"?1:-1)*(n&&f?-1:1)),y}function oD(e,t){return Ke(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=oi(t,e),_=zT(y),v=c[b?m==="floating"?"reference":"floating":m],w=ec(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),N=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),U=(yield a.isElement==null?void 0:a.isElement(C))&&(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1},Y=ec(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:C,strategy:d}):N);return{top:(w.top-Y.top+_.top)/U.y,bottom:(Y.bottom-w.bottom+_.bottom)/U.y,left:(w.left-Y.left+_.left)/U.x,right:(Y.right-w.right+_.right)/U.x}})}const aD=50,uD=(e,t,n)=>Ke(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,c=u.detectOverflow?u:de(F({},u),{detectOverflow:oD}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=jT(f,r,d),b=r,y=0;const _={};for(let A=0;A<a.length;A++){const v=a[A];if(!v)continue;const{name:w,fn:N}=v,{x:C,y:U,data:Y,reset:R}=yield N({x:p,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:_,rects:f,platform:c,elements:{reference:e,floating:t}});p=C!=null?C:p,m=U!=null?U:m,_[w]=F(F({},_[w]),Y),R&&y<aD&&(y++,typeof R=="object"&&(R.placement&&(b=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):R.rects),{x:p,y:m}=jT(f,b,d)),A=-1)}return{x:p,y:m,placement:b,strategy:s,middlewareData:_}}),lD=e=>({name:"arrow",options:e,fn(n){return Ke(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=oi(e,n)||{};if(p==null)return{};const b=zT(m),y={x:r,y:s},_=Uh(a),A=Bh(_),v=yield c.getDimensions(p),w=_==="y",N=w?"top":"left",C=w?"bottom":"right",U=w?"clientHeight":"clientWidth",Y=u.reference[A]+u.reference[_]-y[_]-u.floating[A],R=y[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ne=q?q[U]:0;(!ne||!(yield c.isElement==null?void 0:c.isElement(q)))&&(ne=d.floating[U]||u.floating[A]);const me=Y/2-R/2,V=ne/2-v[A]/2-1,se=ki(b[N],V),he=ki(b[C],V),ve=ne-v[A]-he,re=ne/2-v[A]/2+me,oe=BT(se,re,ve),xe=!f.arrow&&bo(a)!=null&&re!==oe&&u.reference[A]/2-(re<se?se:he)-v[A]/2<0,ae=xe?re<se?re-se:re-ve:0;return{[_]:y[_]+ae,data:F({[_]:oe,centerOffset:re-oe-ae},xe&&{alignmentOffset:ae}),reset:xe}})}}),cD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ke(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,oe=oi(e,n),{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:v=!0}=oe,w=dn(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const N=Ni(a),C=Ur(d),U=Ni(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(U||!v?[Zl(d)]:eD(d)),q=A!=="none";!y&&q&&R.push(...iD(d,v,A,Y));const ne=[d,...R],me=yield f.detectOverflow(n,w),V=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&V.push(me[N]),b){const xe=Z4(a,c,Y);V.push(me[xe[0]],me[xe[1]])}if(se=[...se,{placement:a,overflows:V}],!V.every(xe=>xe<=0)){var he,ve;const xe=(((he=u.flip)==null?void 0:he.index)||0)+1,ae=ne[xe];if(ae&&(!(b==="alignment"?C!==Ur(ae):!1)||se.every(k=>Ur(k.placement)===C?k.overflows[0]>0:!0)))return{data:{index:xe,overflows:se},reset:{placement:ae}};let Q=(ve=se.filter(ie=>ie.overflows[0]<=0).sort((ie,k)=>ie.overflows[1]-k.overflows[1])[0])==null?void 0:ve.placement;if(!Q)switch(_){case"bestFit":{var re;const ie=(re=se.filter(k=>{if(q){const D=Ur(k.placement);return D===C||D==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(D=>D>0).reduce((D,ee)=>D+ee,0)]).sort((k,D)=>k[1]-D[1])[0])==null?void 0:re[0];ie&&(Q=ie);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function $T(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function VT(e){return Q4.some(t=>e[t]>=0)}const dD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ke(this,null,function*(){const{rects:r,platform:s}=n,c=oi(e,n),{strategy:a="referenceHidden"}=c,u=dn(c,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,de(F({},u),{elementContext:"reference"})),f=$T(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:VT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,de(F({},u),{altBoundary:!0})),f=$T(d,r.floating);return{data:{escapedOffsets:f,escaped:VT(f)}}}default:return{}}})}}},qT=new Set(["left","top"]);function fD(e,t){return Ke(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=Ni(n),c=bo(n),d=Ur(n)==="y",f=qT.has(u)?-1:1,p=a&&d?-1:1,m=oi(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:b*f}:{x:b*f,y:y*p}})}const hD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ke(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield fD(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:de(F({},f),{placement:c})}})}}},pD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ke(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,C=oi(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:U=>{let{x:Y,y:R}=U;return{x:Y,y:R}}}}=C,p=dn(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},b=yield u.detectOverflow(n,p),y=Ur(a),_=Fh(y);let A=m[_],v=m[y];const w=(U,Y)=>BT(Y+b[U==="y"?"top":"left"],Y,Y-b[U==="y"?"bottom":"right"]);c&&(A=w(_,A)),d&&(v=w(y,v));const N=f.fn(de(F({},n),{[_]:A,[y]:v}));return de(F({},N),{data:{x:N.x-r,y:N.y-s,enabled:{[_]:c,[y]:d}}})})}}},mD=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=oi(e,t),b={x:s,y:a},y=Ur(u),_=Fh(y);let A=b[_],v=b[y];const w=oi(f,t),N=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(n=w.mainAxis)!=null?n:0,crossAxis:(r=w.crossAxis)!=null?r:0};if(p){const Y=_==="y"?"height":"width",R=c.reference[_]-c.floating[Y]+N.mainAxis,q=c.reference[_]+c.reference[Y]-N.mainAxis;A<R?A=R:A>q&&(A=q)}if(m){var C,U;const Y=_==="y"?"width":"height",R=qT.has(Ni(u)),q=c.reference[y]-c.floating[Y]+(R&&((C=d.offset)==null?void 0:C[y])||0)+(R?0:N.crossAxis),ne=c.reference[y]+c.reference[Y]+(R?0:((U=d.offset)==null?void 0:U[y])||0)-(R?N.crossAxis:0);v<q?v=q:v>ne&&(v=ne)}return{[_]:A,[y]:v}}}},gD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ke(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,V=oi(e,n),{apply:c=()=>{}}=V,d=dn(V,["apply"]),f=yield a.detectOverflow(n,d),p=Ni(r),m=bo(r),b=Ur(r)==="y",{width:y,height:_}=s.floating;let A,v;p==="top"||p==="bottom"?(A=p,v=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(v=p,A=m==="end"?"top":"bottom");const w=_-f.top-f.bottom,N=y-f.left-f.right,C=ki(_-f[A],w),U=ki(y-f[v],N),Y=n.middlewareData.shift,R=!Y;let q=C,ne=U;Y!=null&&Y.enabled.x&&(ne=N),Y!=null&&Y.enabled.y&&(q=w),R&&!m&&(b?ne=y-2*si(f.left,f.right):q=_-2*si(f.top,f.bottom)),yield c(de(F({},n),{availableWidth:ne,availableHeight:q}));const me=yield a.getDimensions(u.floating);return y!==me.width||_!==me.height?{reset:{rects:!0}}:{}})}}};function tc(){return typeof window!="undefined"}function _o(e){return YT(e)?(e.nodeName||"").toLowerCase():"#document"}function Yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hr(e){var t;return(t=(YT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function YT(e){return tc()?e instanceof Node||e instanceof Yn(e).Node:!1}function Tr(e){return tc()?e instanceof Element||e instanceof Yn(e).Element:!1}function zr(e){return tc()?e instanceof HTMLElement||e instanceof Yn(e).HTMLElement:!1}function GT(e){return!tc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Yn(e).ShadowRoot}function Ya(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function ED(e){return/^(table|td|th)$/.test(_o(e))}function nc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const yD=/transform|translate|scale|rotate|perspective|filter/,TD=/paint|layout|strict|content/,ys=e=>!!e&&e!=="none";let zh;function jh(e){const t=Tr(e)?br(e):e;return ys(t.transform)||ys(t.translate)||ys(t.scale)||ys(t.rotate)||ys(t.perspective)||!$h()&&(ys(t.backdropFilter)||ys(t.filter))||yD.test(t.willChange||"")||TD.test(t.contain||"")}function bD(e){let t=Pi(e);for(;zr(t)&&!So(t);){if(jh(t))return t;if(nc(t))return null;t=Pi(t)}return null}function $h(){return zh==null&&(zh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),zh}function So(e){return/^(html|body|#document)$/.test(_o(e))}function br(e){return Yn(e).getComputedStyle(e)}function rc(e){return Tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pi(e){if(_o(e)==="html")return e;const t=e.assignedSlot||e.parentNode||GT(e)&&e.host||Hr(e);return GT(t)?t.host:t}function WT(e){const t=Pi(e);return So(t)?(e.ownerDocument||e).body:zr(t)&&Ya(t)?t:WT(t)}function Ga(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=WT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Yn(s);if(a){const c=Vh(u);return t.concat(u,u.visualViewport||[],Ya(s)?s:[],c&&n?Ga(c):[])}else return t.concat(s,Ga(s,[],n))}function Vh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function XT(e){const t=br(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=zr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=Ql(n)!==a||Ql(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function qh(e){return Tr(e)?e:e.contextElement}function xo(e){const t=qh(e);if(!zr(t))return Br(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=XT(t);let u=(a?Ql(n.width):n.width)/r,c=(a?Ql(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const _D=Br(0);function KT(e){const t=Yn(e);return!$h()||!t.visualViewport?_D:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function SD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Yn(e)?!1:t}function Ts(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=qh(e);let u=Br(1);t&&(r?Tr(r)&&(u=xo(r)):u=xo(e));const c=SD(a,n,r)?KT(a):Br(0);let d=(s.left+c.x)/u.x,f=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const b=Yn(a),y=r&&Tr(r)?Yn(r):r;let _=b,A=Vh(_);for(;A&&r&&y!==_;){const v=xo(A),w=A.getBoundingClientRect(),N=br(A),C=w.left+(A.clientLeft+parseFloat(N.paddingLeft))*v.x,U=w.top+(A.clientTop+parseFloat(N.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,m*=v.y,d+=C,f+=U,_=Yn(A),A=Vh(_)}}return ec({width:p,height:m,x:d,y:f})}function ic(e,t){const n=rc(e).scrollLeft;return t?t.left+n:Ts(Hr(e)).left+n}function QT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ic(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function xD(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Hr(r),c=t?nc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Br(1);const p=Br(0),m=zr(r);if((m||!m&&!a)&&((_o(r)!=="body"||Ya(u))&&(d=rc(r)),zr(r))){const y=Ts(r);f=xo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!m&&!a?QT(u,d):Br(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function wD(e){return Array.from(e.getClientRects())}function AD(e){const t=Hr(e),n=rc(e),r=e.ownerDocument.body,s=si(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=si(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+ic(e);const c=-n.scrollTop;return br(r).direction==="rtl"&&(u+=si(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const JT=25;function CD(e,t){const n=Yn(e),r=Hr(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(s){a=s.width,u=s.height;const p=$h();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=ic(r);if(f<=0){const p=r.ownerDocument,m=p.body,b=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=JT&&(a-=_)}else f<=JT&&(a+=f);return{width:a,height:u,x:c,y:d}}const vD=new Set(["absolute","fixed"]);function kD(e,t){const n=Ts(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=zr(e)?xo(e):Br(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function ZT(e,t,n){let r;if(t==="viewport")r=CD(e,n);else if(t==="document")r=AD(Hr(e));else if(Tr(t))r=kD(t,n);else{const s=KT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ec(r)}function eb(e,t){const n=Pi(e);return n===t||!Tr(n)||So(n)?!1:br(n).position==="fixed"||eb(n,t)}function ND(e,t){const n=t.get(e);if(n)return n;let r=Ga(e,[],!1).filter(c=>Tr(c)&&_o(c)!=="body"),s=null;const a=br(e).position==="fixed";let u=a?Pi(e):e;for(;Tr(u)&&!So(u);){const c=br(u),d=jh(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&vD.has(s.position)||Ya(u)&&!d&&eb(e,u))?r=r.filter(p=>p!==u):s=c,u=Pi(u)}return t.set(e,r),r}function PD(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?nc(t)?[]:ND(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=ZT(t,p,s);return f.top=si(m.top,f.top),f.right=ki(m.right,f.right),f.bottom=ki(m.bottom,f.bottom),f.left=si(m.left,f.left),f},ZT(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function OD(e){const{width:t,height:n}=XT(e);return{width:t,height:n}}function ID(e,t,n){const r=zr(t),s=Hr(t),a=n==="fixed",u=Ts(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Br(0);function f(){d.x=ic(s)}if(r||!r&&!a)if((_o(t)!=="body"||Ya(s))&&(c=rc(t)),r){const y=Ts(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?QT(s,c):Br(0),m=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:m,y:b,width:u.width,height:u.height}}function Yh(e){return br(e).position==="static"}function tb(e,t){if(!zr(e)||br(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Hr(e)===n&&(n=n.ownerDocument.body),n}function nb(e,t){const n=Yn(e);if(nc(e))return n;if(!zr(e)){let s=Pi(e);for(;s&&!So(s);){if(Tr(s)&&!Yh(s))return s;s=Pi(s)}return n}let r=tb(e,t);for(;r&&ED(r)&&Yh(r);)r=tb(r,t);return r&&So(r)&&Yh(r)&&!jh(r)?n:r||bD(e)||n}const RD=function(e){return Ke(this,null,function*(){const t=this.getOffsetParent||nb,n=this.getDimensions,r=yield n(e.floating);return{reference:ID(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function LD(e){return br(e).direction==="rtl"}const DD={convertOffsetParentRelativeRectToViewportRelativeRect:xD,getDocumentElement:Hr,getClippingRect:PD,getOffsetParent:nb,getElementRects:RD,getClientRects:wD,getDimensions:OD,getScale:xo,isElement:Tr,isRTL:LD};function rb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function MD(e,t){let n=null,r;const s=Hr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:b,height:y}=f;if(c||t(),!b||!y)return;const _=Jl(m),A=Jl(s.clientWidth-(p+b)),v=Jl(s.clientHeight-(m+y)),w=Jl(p),C={rootMargin:-_+"px "+-A+"px "+-v+"px "+-w+"px",threshold:si(0,ki(1,d))||1};let U=!0;function Y(R){const q=R[0].intersectionRatio;if(q!==d){if(!U)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!rb(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(Y,de(F({},C),{root:s.ownerDocument}))}catch(R){n=new IntersectionObserver(Y,C)}n.observe(e)}return u(!0),a}function FD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=qh(e),p=s||a?[...f?Ga(f):[],...Ga(t)]:[];p.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=f&&c?MD(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(w=>{let[N]=w;N&&N.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,A=d?Ts(e):null;d&&v();function v(){const w=Ts(e);A&&!rb(A,w)&&n(),A=w,_=requestAnimationFrame(v)}return n(),()=>{var w;p.forEach(N=>{s&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),m==null||m(),(w=y)==null||w.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const BD=hD,UD=pD,HD=cD,zD=gD,jD=dD,$D=lD,VD=mD,qD=(e,t,n)=>{const r=new Map,s=F({platform:DD},n),a=de(F({},s.platform),{_c:r});return uD(e,t,de(F({},s),{platform:a}))};function ib(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return de(F({},s),{toJSON:()=>s})}function YD(e){if(!e)return ib();const{x:t,y:n,width:r,height:s}=e;return ib(t,n,r,s)}function GD(e,t){return{contextElement:Kt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?YD(r):n.getBoundingClientRect()}}}var Wa=e=>({variable:e,reference:`var(${e})`}),ai={arrowSize:Wa("--arrow-size"),arrowSizeHalf:Wa("--arrow-size-half"),arrowBg:Wa("--arrow-background"),transformOrigin:Wa("--transform-origin"),arrowOffset:Wa("--arrow-offset")},WD=e=>e==="top"||e==="bottom"?"y":"x";function XD(e,t){return{name:"transformOrigin",fn(n){var me,V,se,he,ve;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=WD(d),p=((me=s.arrow)==null?void 0:me.x)||0,m=((V=s.arrow)==null?void 0:V.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+b/2,A=m+y/2,v=Math.abs(((se=s.shift)==null?void 0:se.y)||0),w=u.reference.height/2,N=y/2,C=(ve=(he=e.offset)==null?void 0:he.mainAxis)!=null?ve:e.gutter,U=typeof C=="number"?C+N:C!=null?C:N,Y=v>U,R={top:`${_}px calc(100% + ${U}px)`,bottom:`${_}px ${-U}px`,left:`calc(100% + ${U}px) ${A}px`,right:`${-U}px ${A}px`}[d],q=`${_}px ${u.reference.y+w-c}px`,ne=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(ai.transformOrigin.variable,ne?q:R),{data:{transformOrigin:ne?q:R}}}}}var KD={name:"rects",fn({rects:e}){return{data:e}}},QD=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${ai.arrowOffset.reference})`}),{}}}};function JD(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var ZD={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function sb(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Gh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function e5(e,t,n){const r=e||t.createElement("div");return $D({element:r,padding:n.arrowPadding})}function t5(e,t){var n;if(!_6((n=t.offset)!=null?n:t.gutter))return BD(({placement:r})=>{var p,m,b,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:c}=JD(r),d=c?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return _h({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function n5(e){if(!e.flip)return;const t=Gh(e.boundary);return HD(de(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function r5(e){if(!e.slide&&!e.overlap)return;const t=Gh(e.boundary);return UD(de(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:VD()}))}function i5(e){return zD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function s5(e){var t;if(e.hideWhenDetached)return jD({strategy:"referenceHidden",boundary:(t=Gh(e.boundary))!=null?t:"clippingAncestors"})}function o5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function a5(e,t,n={}){const r=GD(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},ZD,n),a=t.querySelector("[data-part=arrow]"),u=[t5(a,s),n5(s),r5(s),e5(a,t.ownerDocument,s),QD(a),XD({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),i5(s),s5(s),KD],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>Ke(null,null,function*(){var U;if(!r||!t)return;const A=yield qD(r,t,{placement:c,middleware:u,strategy:d});f==null||f(A),p==null||p({placed:!0});const v=fo(t),w=sb(v,A.x),N=sb(v,A.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${N}px`),s.hideWhenDetached&&(((U=A.middlewareData.hide)==null?void 0:U.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const Y=po(C);t.style.setProperty("--z-index",Y.zIndex)}}),b=()=>Ke(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=o5(s.listeners),_=s.listeners?FD(r,t,b,y):P6;return b(),()=>{_==null||_(),p==null||p({placed:!1})}}function ob(e,t,n={}){const c=n,{defer:r}=c,s=dn(c,["defer"]),a=r?jt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(a5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var u5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function l5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:ai.arrowSize.reference,height:ai.arrowSize.reference,[ai.arrowSizeHalf.variable]:`calc(${ai.arrowSize.reference} / 2)`,[ai.arrowOffset.variable]:`calc(${ai.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?u5[t.split("-")[0]]:void 0,background:ai.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,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)"}}}var wo=new WeakMap,sc=new WeakMap,oc={},Wh=0,ab=e=>e&&(e.host||ab(e.parentNode)),c5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ab(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),d5=new Set(["script","output","status","next-route-announcer"]),f5=e=>d5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),h5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=c5(n,Array.isArray(e)?e:[e]);oc[r]||(oc[r]=new WeakMap);const c=oc[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Kt(y)&&TT(y,_=>{m(_)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))b(_);else try{if(f5(_))return;const v=_.getAttribute(s)==="true",w=(wo.get(_)||0)+1,N=(c.get(_)||0)+1;wo.set(_,w),c.set(_,N),d.push(_),w===1&&v&&sc.set(_,!0),N===1&&_.setAttribute(r,""),v||_.setAttribute(s,"true")}catch(A){console.error("[zag-js > ariaHidden] cannot operate on ",_,A)}})};return b(n),f.clear(),Wh++,()=>{d.forEach(y=>{const _=wo.get(y)-1,A=c.get(y)-1;wo.set(y,_),c.set(y,A),_||(sc.has(y)||y.removeAttribute(s),sc.delete(y)),A||y.removeAttribute(r)}),Wh--,Wh||(wo=new WeakMap,wo=new WeakMap,sc=new WeakMap,oc={})}},p5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,m5=(e,t=p5(e),n="data-aria-hidden",r=!0)=>{if(t)return h5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},g5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function ub(e,t={}){const{defer:n=!0}=t,r=n?g5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(m5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function E5(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function y5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var lb="pointerdown.outside",cb="focus.outside";function T5(e){for(const t of e)if(Kt(t)&&Fr(t))return!0;return!1}var db=e=>"clientY"in e;function b5(e,t){if(!db(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function _5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function fb(e,t){if(!t||!db(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},c={x:e.clientX,y:e.clientY};return _5(u,c)?r||a:!1}function S5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Mr(e),f=fo(e),p=E5(f),m=y5(f);function b(C,U){if(!Kt(U)||!U.isConnected||co(e,U)||b5(e,C)||c&&yT(e,U))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const q=Ph(Y);if(fb(C,q))return!1}const R=Ph(e);return fb(C,R)?!1:!(n!=null&&n(U))}const y=new Set,_=ps(e==null?void 0:e.getRootNode());function A(C){function U(Y){var me,V;const R=u&&!bT()?jt:se=>se(),q=Y!=null?Y:C,ne=(V=(me=q==null?void 0:q.composedPath)==null?void 0:me.call(q))!=null?V:[q==null?void 0:q.target];R(()=>{const se=_?ne[0]:yr(C);if(!(!e||!b(C,se))){if(s||a){const he=bh(s,a);e.addEventListener(lb,he,{once:!0})}hb(e,lb,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:d4(q),focusable:T5(ne),target:se}})}})}C.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(Qt(d,"click",U,{once:!0})),y.add(m.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const v=new Set,w=setTimeout(()=>{v.add(Qt(d,"pointerdown",A,!0)),v.add(m.addEventListener("pointerdown",A,!0)),v.add(p.addEventListener("pointerdown",A,!0))},0);function N(C){(u?jt:Y=>Y())(()=>{var q,ne;const Y=(ne=(q=C==null?void 0:C.composedPath)==null?void 0:q.call(C))!=null?ne:[C==null?void 0:C.target],R=_?Y[0]:yr(C);if(!(!e||!b(C,R))){if(r||a){const me=bh(r,a);e.addEventListener(cb,me,{once:!0})}hb(e,cb,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Fr(R),target:R}})}})}return bT()||(v.add(Qt(d,"focusin",N,!0)),v.add(m.addEventListener("focusin",N,!0)),v.add(p.addEventListener("focusin",N,!0))),()=>{clearTimeout(w),y.forEach(C=>C()),v.forEach(C=>C())}}function x5(e,t){const{defer:n}=t,r=n?jt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(S5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function hb(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function w5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Qt(Mr(e),"keydown",n,{capture:!0})}var pb="layer:request-dismiss",ir={layers:[],branches:[],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 r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?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 n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>co(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>co(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>ir.dismiss(r.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 r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];C5(e,pb,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),A5(e,pb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function A5(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function C5(e,t,n){e.addEventListener(t,n,{once:!0})}var mb;function gb(){ir.layers.forEach(({node:e})=>{e.style.pointerEvents=ir.isBelowPointerBlockingLayer(e)?"none":"auto"})}function v5(e){e.style.pointerEvents=""}function k5(e,t){const n=Mr(e),r=[];return ir.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(mb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=L4(()=>{const c=s();return Kt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Yl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{ir.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=mb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function N5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Sh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};ir.add(f),gb();function p(A){var w,N;const v=yr(A.detail.originalEvent);ir.isBelowPointerBlockingLayer(e)||ir.isInBranch(v)||((w=t.onPointerDownOutside)==null||w.call(t,A),(N=t.onInteractOutside)==null||N.call(t,A),!A.defaultPrevented&&(c&&console.log("onPointerDownOutside:",A.detail.originalEvent),r==null||r()))}function m(A){var w,N;const v=yr(A.detail.originalEvent);ir.isInBranch(v)||((w=t.onFocusOutside)==null||w.call(t,A),(N=t.onInteractOutside)==null||N.call(t,A),!A.defaultPrevented&&(c&&console.log("onFocusOutside:",A.detail.originalEvent),r==null||r()))}function b(A){var v;ir.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,A),!A.defaultPrevented&&r&&(A.preventDefault(),r()))}function y(A){var C;if(!e)return!1;const v=typeof u=="function"?u():u,w=Array.isArray(v)?v:[v],N=(C=t.persistentElements)==null?void 0:C.map(U=>U()).filter(Kt);return N&&w.push(...N),w.some(U=>co(U,A))||ir.isInNestedLayer(e,A)}const _=[a?k5(e,t.persistentElements):void 0,w5(e,b),x5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{ir.remove(e),gb(),v5(e),_.forEach(A=>A==null?void 0:A())}}function Eb(e,t){const{defer:n}=t,r=n?jt:a=>a(),s=[];return s.push(r(()=>{const a=uo(e)?e():e;s.push(N5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var P5=Object.defineProperty,O5=(e,t,n)=>t in e?P5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,At=(e,t,n)=>O5(e,typeof t!="symbol"?t+"":t,n),yb={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},I5=[],R5=class{constructor(e,t){At(this,"trapStack"),At(this,"config"),At(this,"doc"),At(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),At(this,"portalContainers",new Set),At(this,"listenerCleanups",[]),At(this,"handleFocus",r=>{const s=yr(r),a=this.findContainerIndex(s,r)>=0;if(a||jl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if($a(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>$a(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),At(this,"handlePointerDown",r=>{const s=yr(r);if(!(this.findContainerIndex(s,r)>=0)){if(Ka(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ka(this.config.allowOutsideClick,r)||r.preventDefault()}}),At(this,"handleClick",r=>{const s=yr(r);this.findContainerIndex(s,r)>=0||Ka(this.config.clickOutsideDeactivates,r)||Ka(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),At(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;Xa(r)&&r.preventDefault(),this.tryFocus(a)}}),At(this,"handleEscapeKey",r=>{L5(r)&&Ka(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),At(this,"_mutationObserver"),At(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return n4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?r4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),At(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),At(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Fr(r)){const s=ho(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),At(this,"tryFocus",r=>{if(r!==!1&&r!==ho(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,D5(r)&&r.select()}}),At(this,"deactivate",r=>{if(!this.state.active)return this;const s=F({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),yb.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),c=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{Tb(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),At(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),At(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),At(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),At(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),At(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),At(this,"getNodeForOption",(r,{hasFallback:s=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),At(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||yr(s);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Fr(u)&&!ms(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[m];c=$a(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Xa(s)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Fr(u)&&!ms(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[m];c=$a(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Xa(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||I5;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Xa(r)&&!r.shiftKey},isKeyBackward(r){return Xa(r)&&r.shiftKey}},t);this.doc=n.document||Mr(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;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{Z6(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?yT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=mo(e,{getShadowRoot:this.config.getShadowRoot}),n=vT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let c=!1;for(let f=0;f<t.length;f++)if($a(t[f])>0){c=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(ms(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(ms(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:s,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),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 yb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Tb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Qt(this.doc,"focusin",this.handleFocus,!0),Qt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Qt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Qt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Qt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Qt(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=ho(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Xa=e=>e.key==="Tab",Ka=(e,...t)=>typeof e=="function"?e(...t):e,L5=e=>!e.isComposing&&e.key==="Escape",Tb=e=>setTimeout(e,0),D5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function bb(e,t={}){let n;const r=jt(()=>{const s=typeof e=="function"?e():e;if(s){n=new R5(s,de(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Mr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Xh="data-scroll-lock";function M5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function _b(e){const t=po(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Sb(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Xh))return;const u=_b(r)||_b(s),c=n.innerWidth-r.clientWidth;s.setAttribute(Xh,"");const d=()=>I4(r,"--scrollbar-width",`${c}px`),f=M5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Yl(s,_)},m=()=>{var Y,R;const{scrollX:_,scrollY:A,visualViewport:v}=n,w=(Y=v==null?void 0:v.offsetLeft)!=null?Y:0,N=(R=v==null?void 0:v.offsetTop)!=null?R:0,C={position:"fixed",overflow:"hidden",top:`${-(A-Math.floor(N))}px`,left:`${-(_-Math.floor(w))}px`,right:"0"};!u&&c>0&&(C[f]=`${c}px`);const U=Yl(s,C);return()=>{U==null||U(),n.scrollTo({left:_,top:A,behavior:"instant"})}},b=[d(),$l()?m():p()];return()=>{b.forEach(_=>_==null?void 0:_()),s.removeAttribute(Xh)}}var F5=Es("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),jr=F5.build(),xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},wb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},B5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},U5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Cb=e=>e.getById(xb(e)),Ao=e=>e.getById(wb(e)),Co=e=>e.getById(Kh(e)),vb=e=>e.getById(Ab(e)),H5=e=>e.getById(Qh(e)),z5=e=>e.getById(Jh(e));function j5(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),b=l5(de(F({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(de(F({id:B5(c)},jr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(de(F({},jr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(de(F({},jr.anchor.attrs),{dir:u("dir"),id:xb(c)}))},getTriggerProps(){return t.button(de(F({},jr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:wb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Kh(c),onPointerDown(y){_T(y)&&l4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(de(F({},jr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(de(F({id:Ab(c)},jr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(de(F({},jr.content.attrs),{dir:u("dir"),id:Kh(c),tabIndex:-1,role:"dialog","aria-modal":mT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":lo(d),"aria-labelledby":m.title?Qh(c):void 0,"aria-describedby":m.description?Jh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(de(F({},jr.title.attrs),{id:Qh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(de(F({},jr.description.attrs),{id:Jh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(de(F({},jr.closeTrigger.attrs),{dir:u("dir"),id:U5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var $5={props({props:e}){return de(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=Cb(n))!=null?a:Ao(n);return ob(r,()=>vb(n),de(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Co(n);let s=!0;return Eb(r,{type:"popover",pointerBlocking:t("modal"),exclude:Ao(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(s=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:P4(()=>Co(t),{triggerElement:Ao(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?ub(()=>[Co(t),Ao(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Sb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?bb(()=>Co(t),{initialFocus:()=>kT({root:Co(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=Cb(n))!=null?u:Ao(n);ob(s,()=>vb(n),de(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){jt(()=>{Object.assign(e.get("renderedElements"),{title:!!H5(t),description:!!z5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||jt(()=>{const n=kT({root:Co(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||jt(()=>{const a=Ao(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};yo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[gU,ac]=gs({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[EU,Zh]=gs({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),V5=e=>{const t=B.useId(),{getRootNode:n}=ac(),{dir:r}=Zh(),s=F({id:t,dir:r,getRootNode:n},e),a=Wl($5,s);return j5(a,Rh)},q5=e=>{const[t,u]=FT(e),c=u,{children:n}=c,r=dn(c,["children"]),s=V5(r),a=Mh($t({present:s.open},t));return x.jsx(q4,{value:s,children:x.jsx(LT,{value:a,children:n})})},kb=B.forwardRef((e,t)=>{const n=Dh(),r=Va(),s=$t(de(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(yn.button,de(F({},s),{ref:t}))});kb.displayName="PopoverTrigger";function Y5(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function G5(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function W5(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function X5(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function K5(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function Q5(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function ep(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function Nb(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const J5=({className:e,componentType:t,children:n})=>{const[r,s]=B.useState(!1),{globalClassName:a}=tt(),u=f=>{s(f.open)},c=B.useCallback(()=>{s(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return x.jsxs(q5,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(kb,{"aria-label":`Overflow menu for ${t}`,className:G(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(Nb,{})}),x.jsx(MT,{children:x.jsx(DT,{className:G(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(uT.Provider,{value:d,children:n})})})]})};function Pb(e){return xt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function Ob(e){return xt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[Z5,bs]=gs({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Ib=B.forwardRef((e,t)=>{const n=bs(),r=$t(n.getControlProps(),e);return x.jsx(yn.div,de(F(F({},r),e),{ref:t}))});Ib.displayName="CarouselControl";const Rb=B.forwardRef((e,t)=>{const[n,r]=qa()(e,["readOnly","index"]),s=bs(),a=$t(s.getIndicatorProps(n),r);return x.jsx(yn.button,de(F({},a),{ref:t}))});Rb.displayName="CarouselIndicator";const Lb=B.forwardRef((e,t)=>{const n=bs(),r=$t(n.getIndicatorGroupProps(),e);return x.jsx(yn.div,de(F({},r),{ref:t}))});Lb.displayName="CarouselIndicatorGroup";const Db=B.forwardRef((e,t)=>{const[n,r]=qa()(e,["index","snapAlign"]),s=bs(),a=$t(s.getItemProps(n),r);return x.jsx(yn.div,de(F({},a),{ref:t}))});Db.displayName="CarouselItem";const Mb=B.forwardRef((e,t)=>{const n=bs(),r=$t(n.getItemGroupProps(),e);return x.jsx(yn.div,de(F({},r),{ref:t}))});Mb.displayName="CarouselItemGroup";const Fb=B.forwardRef((e,t)=>{const n=bs(),r=$t(n.getNextTriggerProps(),e);return x.jsx(yn.button,de(F({},r),{ref:t}))});Fb.displayName="CarouselNextTrigger";const Bb=B.forwardRef((e,t)=>{const n=bs(),r=$t(n.getPrevTriggerProps(),e);return x.jsx(yn.button,de(F({},r),{ref:t}))});Bb.displayName="CarouselPrevTrigger";function e8(e){const t=po(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(b,y){let _=parseFloat(b);return/%/.test(b)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(s,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function t8(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function Ub(e){let t=[];for(const n of e.children)t=t.concat(n,Ub(n));return t}function Hb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?Ub(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!t8(n,m,u))continue;const b=po(p);let[y,_]=b.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const A=a==="x"?_:y,v=m[c]-n[c]+e[f];switch(A){case"none":break;case"start":r[a].start.push({node:p,position:v});break;case"center":r[a].center.push({node:p,position:v+m[d]/2});break;case"end":r[a].end.push({node:p,position:v+m[d]});break}}}return r}function zb(e){const t=e.getBoundingClientRect(),n=e8(e),r=Hb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:jb([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map($b(0,s.x))),y:jb([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map($b(0,s.y)))}}function n8(e,t,n){const r=Hb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var jb=e=>[...new Set(e)],$b=(e,t)=>n=>Math.max(e,Math.min(t,n)),r8=Es("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ui=r8.build(),i8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},s8=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},uc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},o8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},a8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},u8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Vb=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},Mn=e=>e.getById(uc(e)),qb=e=>O4(Mn(e),"[data-part=item]"),l8=(e,t)=>e.getById(Vb(e,t)),Yb=e=>{const t=Mn(e);if(!t)return;const n=mo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function c8(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),b=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),A=c("slidesPerPage"),v=c("padding"),w=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/y.length},scrollToIndex(N,C){a({type:"INDEX.SET",index:N,instant:C})},scrollTo(N,C){a({type:"PAGE.SET",index:N,instant:C})},scrollNext(N){a({type:"PAGE.NEXT",instant:N})},scrollPrev(N){a({type:"PAGE.PREV",instant:N})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(N){return Array.from(r.get("slidesInView")).includes(N)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(de(F({},ui.root.attrs),{id:i8(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":A,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(de(F({},ui.itemGroup.attrs),{id:uc(u),"data-orientation":c("orientation"),"data-dragging":lo(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(N){co(N.currentTarget,yr(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){co(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!c("allowMouseDrag")||!_T(N))return;const C=yr(N);Fr(C)&&C!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:O6(N=>{const C=c("orientation")==="horizontal"?"deltaX":"deltaY";N[C]<0&&!s("canScrollPrev")||N[C]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:v,[b?"paddingInline":"paddingBlock"]:v,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(N){const C=r.get("slidesInView").includes(N.index);return t.element(de(F({},ui.item.attrs),{id:s8(u,N.index),dir:c("dir"),role:"group","data-index":N.index,"data-inview":lo(C),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":w.item(N.index,c("slideCount")),"aria-hidden":mT(!C),style:{scrollSnapAlign:(()=>{var ne;const U=(ne=N.snapAlign)!=null?ne:"start",Y=c("slidesPerMove"),R=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(N.index+R)%R===0?U:void 0})()}}))},getControlProps(){return t.element(de(F({},ui.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(de(F({},ui.prevTrigger.attrs),{id:a8(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":w.prevTrigger,"data-orientation":c("orientation"),"aria-controls":uc(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(de(F({},ui.nextTrigger.attrs),{dir:c("dir"),id:o8(u),type:"button","aria-label":w.nextTrigger,"data-orientation":c("orientation"),"aria-controls":uc(u),disabled:!p,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(de(F({},ui.indicatorGroup.attrs),{dir:c("dir"),id:u8(u),"data-orientation":c("orientation"),onKeyDown(N){if(N.defaultPrevented)return;const C="indicator",U={ArrowDown(q){b||(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowUp(q){b||(a({type:"PAGE.PREV",src:C}),q.preventDefault())},ArrowRight(q){b&&(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowLeft(q){b&&(a({type:"PAGE.PREV",src:C}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:C}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:C}),q.preventDefault()}},Y=p4(N,{dir:c("dir"),orientation:c("orientation")}),R=U[Y];R==null||R(N)}}))},getIndicatorProps(N){return t.button(de(F({},ui.indicator.attrs),{dir:c("dir"),id:Vb(u,N.index),type:"button","data-orientation":c("orientation"),"data-index":N.index,"data-readonly":lo(N.readOnly),"data-current":lo(N.index===_),"aria-label":w.indicator(N.index),onClick(C){C.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(de(F({},ui.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":lo(d),"aria-label":d?w.autoplayStop:w.autoplayStart,onClick(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var d8={props({props:e}){return F6(e,["slideCount"],"carousel"),de(F({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:F({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:f8(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return b6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Mn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Mn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Yb(e)});return Yb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Mn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};jt(()=>{s(),jt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return qb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Mn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var b;const p=f.target,m=Number((b=p.dataset.index)!=null?b:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?m6(d,m):g6(d,m)},n.get("slidesInView"));n.set("slidesInView",E6(c))},{root:r,threshold:t("inViewThreshold")});return qb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Mn(n);return r?Qt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Qt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return k4(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Qt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=hT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=Mn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";s(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Mn(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=cT(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=y6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Mn(r);if(!s)return;const a=n8(s,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=hT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Mn(n);if(!r)return;const s=zb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Mn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Mn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Mn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=zb(r),c=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);jt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=l8(n,e.get("page"));r&&jt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function f8(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}yo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),yo()(["index","readOnly"]),yo()(["index","snapAlign"]);const h8=e=>{const t=B.useId(),{getRootNode:n}=ac(),{dir:r}=Zh(),s=F({id:t,dir:r,getRootNode:n},e),a=Wl(d8,s);return c8(a,Rh)},Gb=B.forwardRef((e,t)=>{const[n,r]=qa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=h8(n),a=$t(s.getRootProps(),r);return x.jsx(Z5,{value:s,children:x.jsx(yn.div,de(F({},a),{ref:t}))})});Gb.displayName="CarouselRoot";const p8=180,m8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},g8=({globalClassName:e,className:t,itemMinWidth:n=p8,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ne,me)=>({node:ne,key:B.isValidElement(ne)&&ne.key!=null?ne.key:`carousel-item-${me}`})),b=m.length,y=B.useRef(null),[_,A]=B.useState(0),{width:v}=wv();B.useLayoutEffect(()=>{y.current&&A(y.current.getBoundingClientRect().width)},[v,b]);const w=m8(r),N=n+w,C=_>0?(_+w)/N:1,U=Math.max(1,Math.floor(C));if(b===0)return null;const Y=b>U,R=Math.ceil(b/U),q=Y?Math.max(1,C):U;return x.jsxs(Gb,{ref:y,className:G(e,t,`${z}-carousel`),slidesPerPage:q,slidesPerMove:U,spacing:r,loop:s,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":f,children:[x.jsx(Mb,{className:G(e,`${z}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map(({node:ne,key:me},V)=>x.jsx(Db,{index:V,className:G(e,`${z}-carousel__item`),children:ne},me))}),c&&Y&&x.jsxs(Ib,{className:G(e,`${z}-carousel__control`),children:[x.jsx(Bb,{className:G(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:x.jsx(W5,{size:"16px"})}),x.jsx(Fb,{className:G(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:x.jsx(X5,{size:"16px"})})]}),u&&Y&&x.jsx(Lb,{className:G(e,`${z}-carousel__indicator-group`),children:Array.from({length:R},(ne,me)=>x.jsx(Rb,{index:me,className:G(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${me+1}`},me))})]})},[E8,y8]=gs({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),T8=e=>qa()(e,["lazyMount","unmountOnExit"]),[b8,Qa]=gs({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Wb=B.forwardRef((e,t)=>{const n=Qa(),r=y8(),s=Mh(de(F({},r),{present:n.open})),a=$t(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:x.jsx(yn.div,de(F({},a),{ref:Xl(s.ref,t)}))});Wb.displayName="DialogBackdrop";const tp=B.forwardRef((e,t)=>{const n=Qa(),r=Va(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(yn.div,de(F({},s),{ref:Xl(r.ref,t)}))});tp.displayName="DialogContent";const np=B.forwardRef((e,t)=>{const n=Qa(),r=$t(n.getDescriptionProps(),e);return x.jsx(yn.div,de(F({},r),{ref:t}))});np.displayName="DialogDescription";const rp=B.forwardRef((e,t)=>{const n=Qa(),r=$t(n.getPositionerProps(),e);return Va().unmounted?null:x.jsx(yn.div,de(F({},r),{ref:t}))});rp.displayName="DialogPositioner";var _8=Es("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),_s=_8.build(),Xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Kb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},ip=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Qb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},op=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Jb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},lc=e=>e.getById(ip(e)),S8=e=>e.getById(Xb(e)),x8=e=>e.getById(Kb(e)),w8=e=>e.getById(Qb(e)),A8=e=>e.getById(sp(e)),C8=e=>e.getById(op(e)),v8=e=>e.getById(Jb(e));function k8(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(de(F({},_s.trigger.attrs),{dir:a("dir"),id:Qb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ip(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(de(F({},_s.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Kb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(de(F({},_s.positioner.attrs),{dir:a("dir"),id:Xb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(de(F({},_s.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:ip(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:sp(u),"aria-describedby":f.description?op(u):void 0}))},getTitleProps(){return t.element(de(F({},_s.title.attrs),{dir:a("dir"),id:sp(u)}))},getDescriptionProps(){return t.element(de(F({},_s.description.attrs),{dir:a("dir"),id:op(u)}))},getCloseTriggerProps(){return t.button(de(F({},_s.closeTrigger.attrs),{dir:a("dir"),id:Jb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var N8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>v8(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return F({role:"dialog",modal:s,trapFocus:s,preventScroll:s,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return Eb(()=>lc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[w8(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return Sb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?bb(()=>lc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?ub(()=>[lc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){jt(()=>{e.set("rendered",{title:!!A8(t),description:!!C8(t)})})},syncZIndex({scope:e}){jt(()=>{const t=lc(e);if(!t)return;const n=po(t);[S8(e),x8(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};yo()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const P8=e=>{const t=B.useId(),{getRootNode:n}=ac(),{dir:r}=Zh(),s=F({id:t,getRootNode:n,dir:r},e),a=Wl(N8,s);return k8(a,Rh)},Zb=e=>{const[t,c]=FT(e),d=c,{children:n}=d,r=dn(d,["children"]),[s]=T8(t),a=P8(r),u=Mh($t({present:a.open},t));return x.jsx(b8,{value:a,children:x.jsx(E8,{value:s,children:x.jsx(LT,{value:u,children:n})})})},e_=B.forwardRef((e,t)=>{const n=Qa(),r=$t(n.getTitleProps(),e);return x.jsx(yn.h2,de(F({},r),{ref:t}))});e_.displayName="DialogTitle";const O8=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=B.useMemo(()=>({isOpen:t}),[t]);return x.jsx(Th.Provider,{value:r,children:x.jsx(aT.Provider,{value:s,children:e})})},t_=()=>B.useContext(aT),n_=()=>{const e=B.useContext(Th);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},I8=`${z}-overflow-menu-button-trigger`,R8=({componentType:e,children:t})=>{const{isOpen:n}=t_(),{closeMenu:r}=n_(),{globalClassName:s}=tt(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${I8}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?x.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:G(`${z}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},L8=({componentType:e,className:t})=>{const{toggleMenu:n}=n_(),{isOpen:r}=t_(),{globalClassName:s}=tt();return x.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:G(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:x.jsx(Nb,{})})},ap=()=>{const{status:e,entryType:t}=er(),{messages:n}=tr(),r=t==="ask_cim",s=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&s},D8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{previousComponentType:r}=er(),s=ao(),a=()=>{dl(r||"dialog"),s()};return t?x.jsx(ri,{className:G(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:x.jsx(Pb,{})}):x.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(Pb,{}),"Show ",r||"dialog"]})},M8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{isModalFullscreen:r}=er(),s=ao(),a=()=>{yf(!r),s()},u=r?Dk:Mk,c="Toggle Fullscreen";return t?x.jsx(ri,{ariaLabel:c,title:c,className:G(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:x.jsx(u,{}),onClick:a}):x.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(u,{}),c]})},F8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{dialogPosition:r}=er(),s=ao(),a=r==="bottom-left",u=()=>{Tf(a?"bottom-right":"bottom-left"),s()},c=a?G5:Y5,d=a?"Move right":"Move left";return t?x.jsx(ri,{className:G(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:x.jsx(c,{})}):x.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(c,{}),d]})},r_=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:c}=tt(),{mode:d}=er(),f=u==="messaging"&&c&&!!r,p=d==="standalone",m=e==="modal",b=m?D8:i_,y=m?M8:F8,_=B.useMemo(()=>s?Bk(s):{},[s]);return x.jsx(O8,{children:x.jsxs("div",{className:G(a,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[x.jsxs("div",{className:G(a,`${z}-${e}-header`,{standalone:p,embedded:!p}),style:_,children:[(s==null?void 0:s.logoUrl)&&x.jsx("img",{alt:"",role:"img",className:G(a,`${z}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),x.jsx(e_,{className:G(a,`${z}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),x.jsxs("div",{className:G(a,`${z}-${e}-controls`),children:[x.jsx(b,{componentType:e,isIcon:!0}),x.jsx(L8,{componentType:e}),x.jsx(N1,{className:G(a,`cim-${e}-component`),onClick:n})]})]}),x.jsxs(R8,{componentType:e,children:[x.jsx(y,{componentType:e}),x.jsx(z8,{componentType:e}),x.jsx(lT,{componentType:e,onClearChat:t}),f&&x.jsx(B8,{componentType:e,onDownloadTranscript:r})]})]})})},B8=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=tt(),r=ao(),[s,a]=B.useState(!1),u=()=>Ke(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return x.jsxs("button",{className:G(`${z}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[x.jsx(f6,{}),"Download transcript"]})},U8={sparkle:ep,plus:K5,"paper-plane":Q5},up=({icon:e,className:t})=>{const n=U8[e];return n?x.jsx(n,{className:t,"aria-hidden":"true"}):null},H8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=tt(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},b=_=>x.jsxs(x.Fragment,{children:[c&&x.jsx(up,{icon:c,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:_})]});return x.jsx("div",{className:G(t,`${z}-suggestion-container ${f}`,e),children:n.map(_=>s?x.jsx(ml,{disabled:r,className:G(t,`${z}-suggestion-button standalone`,m),onClick:p(_),children:b(_)},_):x.jsx("button",{disabled:r,className:G(t,`${z}-suggestion-button embedded`,m),onClick:p(_),children:b(_)},_))})},z8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=tt();if(!r)return null;const s=()=>{ti(!1),cl(!0)};return t?x.jsx(ri,{className:G(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:x.jsx(v1,{})}):x.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[x.jsx(v1,{}),"Minimize"]})},i_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),r=ao(),s=()=>{dl("modal"),r()};return t?x.jsx(ri,{className:G(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:x.jsx(Ob,{})}):x.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[x.jsx(Ob,{}),"Show modal"]})},j8=({isWidgetStandalone:e})=>{var _,A;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:s}=tt(),{askCimPrompts:a,messages:u}=tr(),{isLoading:c,handleSuggestion:d}=Ir(),f=s==null?void 0:s.icon,p=(_=s==null?void 0:s.iconPosition)!=null?_:"left",m=B.useMemo(()=>{const v=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return u.some(N=>N.name==="conversation_reset")&&r||v},[u,n,r]),b=((A=a.message)==null?void 0:A.suggestions)||[],y=(v,w)=>()=>{d(v,w)};return x.jsxs("div",{className:G(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[x.jsx("p",{className:G(t,`${z}-ask-cim-entry-text`),children:m}),!!(b!=null&&b.length)&&x.jsx("div",{className:G(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:b.map(v=>{var w;return x.jsxs(ml,{disabled:c,className:G(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!f,"icon-right":!!f&&p==="right"}),onClick:y(v,((w=a.message)==null?void 0:w.eventSourceId)||""),children:[f&&x.jsx(up,{icon:f,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:v.displayText})]},v.displayText)})})]})},$8=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:s}=tt();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),m=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return x.jsxs("div",{className:G(r,`${z}-product-tile`,{embedded:!e,standalone:e}),children:[m?x.jsx("a",{href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:x.jsx("img",{className:G(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):x.jsx("img",{className:G(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),x.jsxs("div",{className:G(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[x.jsxs("div",{className:G(r,`${z}-product-tile-content`),children:[u&&x.jsx("p",{className:`${z}-product-tile-brand`,children:u}),m?x.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:G(r,`${z}-product-tile-pdp`),href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",x.jsx("span",{className:G(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):x.jsx("p",{className:G(r,`${z}-product-tile-name`),title:a,children:a})]}),x.jsx("div",{className:G(r,`${z}-product-tile-footer`),children:x.jsx("p",{className:G(r,`${z}-product-tile-price`),children:c})})]})]})},V8=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=tt(),s=t;return n?x.jsxs("div",{className:G(r,`${z}-display-products`),children:[x.jsx("p",{children:s.message}),s.products&&s.products.length>0&&x.jsx(g8,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:s.products.map(a=>{const u=n.getPid(a);return x.jsx($8,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},q8=({globalClassName:e,message:t,isWidgetStandalone:n})=>x.jsx("div",{className:G(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:x.jsxs("p",{className:G(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[x.jsx(Ik,{})," ",t.message||"An error occurred while processing your request."]})}),Y8=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:s})=>{var _;const{isLoading:a}=Ir(),{messages:u}=tr(),c=u.find(A=>A.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?aA(f):null,b=a||!d||!(d&&(p===t||t==="ask_cim")),y=A=>{const v=n.suggestions.find(w=>w.displayText===A);v&&s(v,n.eventSourceId||n.id)};return x.jsxs("div",{className:G(e,`${z}-follow-up`),children:[x.jsx("p",{className:G(e,`${z}-text`),children:n.message}),x.jsx(H8,{suggestions:n.suggestions.map(A=>A.displayText),disabled:b,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function s_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function G8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function W8(e,t,n){const s=Cl((n||{}).ignore||[]),a=X8(t);let u=-1;for(;++u<a.length;)zE(e,"text",c);function c(f,p){let m=-1,b;for(;++m<p.length;){const y=p[m],_=b?b.children:void 0;if(s(y,_?_.indexOf(y):void 0,b))return;b=y}if(b)return d(f,p)}function d(f,p){const m=p[p.length-1],b=a[u][0],y=a[u][1];let _=0;const v=m.children.indexOf(f);let w=!1,N=[];b.lastIndex=0;let C=b.exec(f.value);for(;C;){const U=C.index,Y={index:C.index,input:C.input,stack:[...p,f]};let R=y(...C,Y);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?b.lastIndex=U+1:(_!==U&&N.push({type:"text",value:f.value.slice(_,U)}),Array.isArray(R)?N.push(...R):R&&N.push(R),_=U+C[0].length,w=!0),!b.global)break;C=b.exec(f.value)}return w?(_<f.value.length&&N.push({type:"text",value:f.value.slice(_)}),m.children.splice(v,1,...N)):N=[f],v+N.length}}function X8(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 s=n[r];t.push([K8(s[0]),Q8(s[1])])}return t}function K8(e){return typeof e=="string"?new RegExp(G8(e),"g"):e}function Q8(e){return typeof e=="function"?e:function(){return e}}const lp="phrasing",cp=["autolink","link","image","label"];function J8(){return{transforms:[sM],enter:{literalAutolink:eM,literalAutolinkEmail:dp,literalAutolinkHttp:dp,literalAutolinkWww:dp},exit:{literalAutolink:iM,literalAutolinkEmail:rM,literalAutolinkHttp:tM,literalAutolinkWww:nM}}}function Z8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:lp,notInConstruct:cp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:lp,notInConstruct:cp},{character:":",before:"[ps]",after:"\\/",inConstruct:lp,notInConstruct:cp}]}}function eM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function dp(e){this.config.enter.autolinkProtocol.call(this,e)}function tM(e){this.config.exit.autolinkProtocol.call(this,e)}function nM(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 rM(e){this.config.exit.autolinkEmail.call(this,e)}function iM(e){this.exit(e)}function sM(e){W8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,oM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),aM]],{ignore:["link","linkReference"]})}function oM(e,t,n,r,s){let a="";if(!o_(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!uM(n)))return!1;const u=lM(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function aM(e,t,n,r){return!o_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function uM(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function lM(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 s=s_(e,"(");let a=s_(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function o_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||as(n)||Tl(n))&&(!t||n!==47)}a_.peek=yM;function cM(){this.buffer()}function dM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function fM(){this.buffer()}function hM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function pM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mM(e){this.exit(e)}function gM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function EM(e){this.exit(e)}function yM(){return"["}function a_(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=s.move("]"),a}function TM(){return{enter:{gfmFootnoteCallString:cM,gfmFootnoteCall:dM,gfmFootnoteDefinitionLabelString:fM,gfmFootnoteDefinition:hM},exit:{gfmFootnoteCallString:pM,gfmFootnoteCall:mM,gfmFootnoteDefinitionLabelString:gM,gfmFootnoteDefinition:EM}}}function bM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:a_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
32
- `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?u_:_M))),f(),d}}function _M(e,t,n){return t===0?e:u_(e,t,n)}function u_(e,t,n){return(n?"":" ")+e}const SM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];l_.peek=vM;function xM(){return{canContainEols:["delete"],enter:{strikethrough:AM},exit:{strikethrough:CM}}}function wM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:SM}],handlers:{delete:l_}}}function AM(e){this.enter({type:"delete",children:[]},e)}function CM(e){this.exit(e)}function l_(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,de(F({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function vM(){return"~"}function kM(e){return e.length}function NM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||kM,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const A=[],v=[];let w=-1;for(e[p].length>f&&(f=e[p].length);++w<e[p].length;){const N=PM(e[p][w]);if(n.alignDelimiters!==!1){const C=s(N);v[w]=C,(d[w]===void 0||C>d[w])&&(d[w]=C)}A.push(N)}u[p]=A,c[p]=v}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=c_(r[m]);else{const A=c_(r);for(;++m<f;)a[m]=A}m=-1;const b=[],y=[];for(;++m<f;){const A=a[m];let v="",w="";A===99?(v=":",w=":"):A===108?v=":":A===114&&(w=":");let N=n.alignDelimiters===!1?1:Math.max(1,d[m]-v.length-w.length);const C=v+"-".repeat(N)+w;n.alignDelimiters!==!1&&(N=v.length+N+w.length,N>d[m]&&(d[m]=N),y[m]=N),b[m]=C}u.splice(1,0,b),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const A=u[p],v=c[p];m=-1;const w=[];for(;++m<f;){const N=A[m]||"";let C="",U="";if(n.alignDelimiters!==!1){const Y=d[m]-(v[m]||0),R=a[m];R===114?C=" ".repeat(Y):R===99?Y%2?(C=" ".repeat(Y/2+.5),U=" ".repeat(Y/2-.5)):(C=" ".repeat(Y/2),U=C):U=" ".repeat(Y)}n.delimiterStart!==!1&&!m&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||m)&&w.push(" "),n.alignDelimiters!==!1&&w.push(C),w.push(N),n.alignDelimiters!==!1&&w.push(U),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&w.push("|")}_.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return _.join(`
33
- `)}function PM(e){return e==null?"":String(e)}function c_(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function OM(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),IM);return s(),u}function IM(e,t,n){return">"+(n?"":" ")+e}function RM(e,t){return d_(e,t.inConstruct,!0)&&!d_(e,t.notInConstruct,!1)}function d_(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function f_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
34
- `&&RM(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
- `}function LM(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>u&&(u=a):a=1,s=r+t.length,r=n.indexOf(t,s);return u}function DM(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function MM(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function FM(e,t,n,r){const s=MM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(DM(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,BM);return m(),b}const c=n.createTracker(r),d=s.repeat(Math.max(LM(a,s)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,F({before:p,after:" ",encode:["`"]},c.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,F({before:p,after:`
29
+ `}),n}function $E(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function VE(e,t){const n=h3(e,t),r=n.one(e,void 0),s=r3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
30
+ `},s),a}function y3(e,t){return e&&"run"in e?function(n,r){return Ke(this,null,function*(){const s=VE(n,F({file:r},t));yield e.run(s,r)})}:function(n,r){return VE(n,F({file:r},e||t))}}function qE(e){if(e)throw e}var Xf,YE;function T3(){if(YE)return Xf;YE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var b;for(b in f);return typeof b=="undefined"||e.call(f,b)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Xf=function d(){var f,p,m,b,y,_,A=arguments[0],v=1,w=arguments.length,k=!1;for(typeof A=="boolean"&&(k=A,A=arguments[1]||{},v=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});v<w;++v)if(f=arguments[v],f!=null)for(p in f)m=c(A,p),b=c(f,p),A!==b&&(k&&b&&(a(b)||(y=s(b)))?(y?(y=!1,_=m&&s(m)?m:[]):_=m&&a(m)?m:{},u(A,{name:p,newValue:d(k,_,b)})):typeof b!="undefined"&&u(A,{name:p,newValue:b}));return A},Xf}var b3=T3();const Kf=Qe(b3);function Qf(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function _3(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...s);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?S3(p,c)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function S3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return s(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...c){n||(n=!0,t(u,...c))}function a(u){s(null,u)}}const Lr={basename:x3,dirname:w3,extname:A3,join:C3,sep:"/"};function x3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pa(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function w3(e){if(Pa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function A3(e){Pa(e);let t=e.length,n=-1,r=0,s=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function C3(...e){let t=-1,n;for(;++t<e.length;)Pa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":v3(n)}function v3(e){Pa(e);const t=e.codePointAt(0)===47;let n=N3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function N3(e,t){let n="",r=0,s=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(s===u-1||a===1))if(s!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function Pa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const k3={cwd:P3};function P3(){return"/"}function Jf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function O3(e){if(typeof e=="string")e=new URL(e);else if(!Jf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return I3(e)}function I3(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Zf=["history","path","basename","stem","extname","dirname"];class GE{constructor(t){let n;t?Jf(t)?n={path:t}:typeof t=="string"||R3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":k3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Zf.length;){const a=Zf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)Zf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Lr.basename(this.path):void 0}set basename(t){th(t,"basename"),eh(t,"basename"),this.path=Lr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Lr.dirname(this.path):void 0}set dirname(t){WE(this.basename,"dirname"),this.path=Lr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Lr.extname(this.path):void 0}set extname(t){if(eh(t,"extname"),WE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Lr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Jf(t)&&(t=O3(t)),th(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Lr.basename(this.path,this.extname):void 0}set stem(t){th(t,"stem"),eh(t,"stem"),this.path=Lr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new mn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function eh(e,t){if(e&&e.includes(Lr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Lr.sep+"`")}function th(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function WE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function R3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const L3=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),D3={}.hasOwnProperty;class nh extends L3{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=_3()}copy(){const t=new nh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Kf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(sh("data",this.frozen),this.namespace[t]=n,this):D3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=kl(t),r=this.parser||this.Parser;return rh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),rh("process",this.parser||this.Parser),ih("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const c=kl(t),d=r.parse(c);r.run(d,c,function(p,m,b){if(p||!m||!b)return f(p);const y=m,_=r.stringify(y,b);B3(_)?b.value=_:b.result=_,f(p,b)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),rh("processSync",this.parser||this.Parser),ih("processSync",this.compiler||this.Compiler),this.process(t,s),KE("processSync","process",n),r;function s(a,u){n=!0,qE(a),r=u}}run(t,n,r){XE(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=kl(n);s.run(t,d,f);function f(p,m,b){const y=m||t;p?c(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),KE("runSync","run",r),s;function a(u,c){qE(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=kl(n),s=this.compiler||this.Compiler;return ih("stringify",s),XE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(sh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))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");c(f.plugins),f.settings&&(s.settings=Kf(!0,s.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const A=r[b][1];Qf(A)&&Qf(y)&&(y=Kf(!0,A,y)),r[b]=[f,y,..._]}}}}const M3=new nh().freeze();function rh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ih(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sh(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 XE(e){if(!Qf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function KE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function kl(e){return F3(e)?e:new GE(e)}function F3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function B3(e){return typeof e=="string"||U3(e)}function U3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const H3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",QE=[],JE={allowDangerousHtml:!0},z3=/^(https?|ircs?|mailto|xmpp)$/i,j3=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ZE(e){const t=$3(e),n=V3(e);return q3(t.runSync(t.parse(n),n),e)}function $3(e){const t=e.rehypePlugins||QE,n=e.remarkPlugins||QE,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),JE):JE;return M3().use(wO).use(n).use(y3,r).use(t)}function V3(e){const t=e.children||"",n=new GE;return typeof t=="string"&&(n.value=t),n}function q3(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||Y3;for(const p of j3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+H3+p.id,void 0);return Nl(e,f),gk(e,{Fragment:x.Fragment,components:s,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function f(p,m,b){if(p.type==="raw"&&b&&typeof m=="number")return u?b.children.splice(m,1):b.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Df)if(Object.hasOwn(Df,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],A=Df[y];(A===null||A.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,b)),y&&b&&typeof m=="number")return c&&p.children?b.children.splice(m,1,...p.children):b.children.splice(m,1),m}}}function Y3(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||z3.test(e.slice(0,t))?e:""}const ey=/[#.]/g;function G3(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){ey.lastIndex=s;const c=ey.exec(n),d=n.slice(s,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),c&&(a=c[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function ty(e,t,n){const r=n?Q3(n):void 0;function s(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=G3(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,W3(u))c.unshift(u);else for(const[m,b]of Object.entries(u))X3(e,d.properties,m,b)}for(const f of c)oh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function W3(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function X3(e,t,n,r){const s=gl(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?s.spaceSeparated?a=V1(r):s.commaSeparated?a=O1(r):s.commaOrSpaceSeparated?a=V1(O1(r).join(" ")):a=ny(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?K3(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(ny(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function oh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)oh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?oh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ny(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ta(n)===Ta(t)))return!0}return n}function K3(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Q3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const J3=["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"],Z3=ty(ba,"div"),eI=ty(_i,"g",J3);function tI(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=ry(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=ry(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function ry(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
31
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const cs={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/"},iy={}.hasOwnProperty,nI=Object.prototype;function rI(e,t){const n=t||{};return ah({file:n.file||void 0,location:!1,schema:n.space==="svg"?_i:ba,verbose:n.verbose||!1},e)}function ah(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Pl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:sy(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=tI(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Pl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Pl(e,r,n),n}default:return n=iI(e,t),n}}function sy(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=ah(e,t[n]);r.push(s)}return r}function iI(e,t){const n=e.schema;e.schema=t.namespaceURI===cs.svg?_i:ba;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;iy.call(nI,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?eI:Z3)(t.tagName,s,sy(e,t.childNodes));if(Pl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&no(d.startTag),p=d&&d.endTag&&no(d.endTag),m=ah(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Pl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=sI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function sI(e,t,n){const r=no(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)iy.call(n.attrs,u)&&(a[gl(e.schema,u).property]=no(n.attrs[u]));n.startTag;const c=no(n.startTag),d=n.endTag?no(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function no(e){const t=oy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=oy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function oy(e){return e.line&&e.column?e:void 0}const ay={}.hasOwnProperty;function uy(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&ay.call(s,e)){const d=String(s[e]);u=ay.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const oI={},aI={}.hasOwnProperty,ly=uy("type",{handlers:{root:lI,element:pI,text:fI,comment:hI,doctype:dI}});function uI(e,t){const r=(t||oI).space;return ly(e,r==="svg"?_i:ba)}function lI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=uh(e.children,n,t),ro(e,n),n}function cI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=uh(e.children,n,t),ro(e,n),n}function dI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ro(e,t),t}function fI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ro(e,t),t}function hI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ro(e,t),t}function pI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=_i);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&aI.call(e.properties,a)){const d=mI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:cs[u],childNodes:[],parentNode:null};return c.childNodes=uh(e.children,c,r),ro(e,c),e.tagName==="template"&&e.content&&(c.content=cI(e.content,r)),c}function mI(e,t,n){const r=gl(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?I1(n):q1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=cs[r.space]}return s}function uh(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=ly(e[r],n);a.parentNode=t,s.push(a)}return s}function ro(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 gI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],EI=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]),wt="�";var P;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(P||(P={}));const Dn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function cy(e){return e>=55296&&e<=57343}function yI(e){return e>=56320&&e<=57343}function TI(e,t){return(e-55296)*1024+9216+t}function dy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function fy(e){return e>=64976&&e<=65007||EI.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const bI=65536;class _I{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=bI,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:a}=this,u=s+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(yI(n))return this.pos++,this._addGap(),TI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}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(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.LINE_FEED:r}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,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,cy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){dy(t)?this._err(te.controlCharacterInInputStream):fy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Xe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Xe||(Xe={}));function hy(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}const SI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),xI=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]]);function wI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=xI.get(e))!==null&&t!==void 0?t:e}var Wt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Wt||(Wt={}));const AI=32;var wi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(wi||(wi={}));function lh(e){return e>=Wt.ZERO&&e<=Wt.NINE}function CI(e){return e>=Wt.UPPER_A&&e<=Wt.UPPER_F||e>=Wt.LOWER_A&&e<=Wt.LOWER_F}function vI(e){return e>=Wt.UPPER_A&&e<=Wt.UPPER_Z||e>=Wt.LOWER_A&&e<=Wt.LOWER_Z||lh(e)}function NI(e){return e===Wt.EQUALS||vI(e)}var Xt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Xt||(Xt={}));var ii;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ii||(ii={}));class kI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Xt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ii.Strict}startEntity(t){this.decodeMode=t,this.state=Xt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Xt.EntityStart:return t.charCodeAt(n)===Wt.NUM?(this.state=Xt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Xt.NamedEntity,this.stateNamedEntity(t,n));case Xt.NumericStart:return this.stateNumericStart(t,n);case Xt.NumericDecimal:return this.stateNumericDecimal(t,n);case Xt.NumericHex:return this.stateNumericHex(t,n);case Xt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|AI)===Wt.LOWER_X?(this.state=Xt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Xt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(lh(s)||CI(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(lh(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Wt.SEMI)this.consumed+=1;else if(this.decodeMode===ii.Strict)return 0;return this.emitCodePoint(wI(this.result),this.consumed),this.errors&&(t!==Wt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&wi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=PI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ii.Attribute&&(a===0||NI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&wi.VALUE_LENGTH)>>14,a!==0){if(u===Wt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ii.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&wi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~wi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Xt.NamedEntity:return this.result!==0&&(this.decodeMode!==ii.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Xt.NumericDecimal:return this.emitNumericEntity(0,2);case Xt.NumericHex:return this.emitNumericEntity(0,3);case Xt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Xt.EntityStart:return 0}}}function PI(e,t,n,r){const s=(t&wi.BRANCH_LENGTH)>>7,a=t&wi.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,c=u+s-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+s]}return-1}var le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var ds;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(ds||(ds={}));var rr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(rr||(rr={}));var X;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(X||(X={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const OI=new Map([[X.A,g.A],[X.ADDRESS,g.ADDRESS],[X.ANNOTATION_XML,g.ANNOTATION_XML],[X.APPLET,g.APPLET],[X.AREA,g.AREA],[X.ARTICLE,g.ARTICLE],[X.ASIDE,g.ASIDE],[X.B,g.B],[X.BASE,g.BASE],[X.BASEFONT,g.BASEFONT],[X.BGSOUND,g.BGSOUND],[X.BIG,g.BIG],[X.BLOCKQUOTE,g.BLOCKQUOTE],[X.BODY,g.BODY],[X.BR,g.BR],[X.BUTTON,g.BUTTON],[X.CAPTION,g.CAPTION],[X.CENTER,g.CENTER],[X.CODE,g.CODE],[X.COL,g.COL],[X.COLGROUP,g.COLGROUP],[X.DD,g.DD],[X.DESC,g.DESC],[X.DETAILS,g.DETAILS],[X.DIALOG,g.DIALOG],[X.DIR,g.DIR],[X.DIV,g.DIV],[X.DL,g.DL],[X.DT,g.DT],[X.EM,g.EM],[X.EMBED,g.EMBED],[X.FIELDSET,g.FIELDSET],[X.FIGCAPTION,g.FIGCAPTION],[X.FIGURE,g.FIGURE],[X.FONT,g.FONT],[X.FOOTER,g.FOOTER],[X.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[X.FORM,g.FORM],[X.FRAME,g.FRAME],[X.FRAMESET,g.FRAMESET],[X.H1,g.H1],[X.H2,g.H2],[X.H3,g.H3],[X.H4,g.H4],[X.H5,g.H5],[X.H6,g.H6],[X.HEAD,g.HEAD],[X.HEADER,g.HEADER],[X.HGROUP,g.HGROUP],[X.HR,g.HR],[X.HTML,g.HTML],[X.I,g.I],[X.IMG,g.IMG],[X.IMAGE,g.IMAGE],[X.INPUT,g.INPUT],[X.IFRAME,g.IFRAME],[X.KEYGEN,g.KEYGEN],[X.LABEL,g.LABEL],[X.LI,g.LI],[X.LINK,g.LINK],[X.LISTING,g.LISTING],[X.MAIN,g.MAIN],[X.MALIGNMARK,g.MALIGNMARK],[X.MARQUEE,g.MARQUEE],[X.MATH,g.MATH],[X.MENU,g.MENU],[X.META,g.META],[X.MGLYPH,g.MGLYPH],[X.MI,g.MI],[X.MO,g.MO],[X.MN,g.MN],[X.MS,g.MS],[X.MTEXT,g.MTEXT],[X.NAV,g.NAV],[X.NOBR,g.NOBR],[X.NOFRAMES,g.NOFRAMES],[X.NOEMBED,g.NOEMBED],[X.NOSCRIPT,g.NOSCRIPT],[X.OBJECT,g.OBJECT],[X.OL,g.OL],[X.OPTGROUP,g.OPTGROUP],[X.OPTION,g.OPTION],[X.P,g.P],[X.PARAM,g.PARAM],[X.PLAINTEXT,g.PLAINTEXT],[X.PRE,g.PRE],[X.RB,g.RB],[X.RP,g.RP],[X.RT,g.RT],[X.RTC,g.RTC],[X.RUBY,g.RUBY],[X.S,g.S],[X.SCRIPT,g.SCRIPT],[X.SEARCH,g.SEARCH],[X.SECTION,g.SECTION],[X.SELECT,g.SELECT],[X.SOURCE,g.SOURCE],[X.SMALL,g.SMALL],[X.SPAN,g.SPAN],[X.STRIKE,g.STRIKE],[X.STRONG,g.STRONG],[X.STYLE,g.STYLE],[X.SUB,g.SUB],[X.SUMMARY,g.SUMMARY],[X.SUP,g.SUP],[X.TABLE,g.TABLE],[X.TBODY,g.TBODY],[X.TEMPLATE,g.TEMPLATE],[X.TEXTAREA,g.TEXTAREA],[X.TFOOT,g.TFOOT],[X.TD,g.TD],[X.TH,g.TH],[X.THEAD,g.THEAD],[X.TITLE,g.TITLE],[X.TR,g.TR],[X.TRACK,g.TRACK],[X.TT,g.TT],[X.U,g.U],[X.UL,g.UL],[X.SVG,g.SVG],[X.VAR,g.VAR],[X.WBR,g.WBR],[X.XMP,g.XMP]]);function io(e){var t;return(t=OI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const he=g,II={[le.HTML]:new Set([he.ADDRESS,he.APPLET,he.AREA,he.ARTICLE,he.ASIDE,he.BASE,he.BASEFONT,he.BGSOUND,he.BLOCKQUOTE,he.BODY,he.BR,he.BUTTON,he.CAPTION,he.CENTER,he.COL,he.COLGROUP,he.DD,he.DETAILS,he.DIR,he.DIV,he.DL,he.DT,he.EMBED,he.FIELDSET,he.FIGCAPTION,he.FIGURE,he.FOOTER,he.FORM,he.FRAME,he.FRAMESET,he.H1,he.H2,he.H3,he.H4,he.H5,he.H6,he.HEAD,he.HEADER,he.HGROUP,he.HR,he.HTML,he.IFRAME,he.IMG,he.INPUT,he.LI,he.LINK,he.LISTING,he.MAIN,he.MARQUEE,he.MENU,he.META,he.NAV,he.NOEMBED,he.NOFRAMES,he.NOSCRIPT,he.OBJECT,he.OL,he.P,he.PARAM,he.PLAINTEXT,he.PRE,he.SCRIPT,he.SECTION,he.SELECT,he.SOURCE,he.STYLE,he.SUMMARY,he.TABLE,he.TBODY,he.TD,he.TEMPLATE,he.TEXTAREA,he.TFOOT,he.TH,he.THEAD,he.TITLE,he.TR,he.TRACK,he.UL,he.WBR,he.XMP]),[le.MATHML]:new Set([he.MI,he.MO,he.MN,he.MS,he.MTEXT,he.ANNOTATION_XML]),[le.SVG]:new Set([he.TITLE,he.FOREIGN_OBJECT,he.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},ch=new Set([he.H1,he.H2,he.H3,he.H4,he.H5,he.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var O;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(O||(O={}));const Lt={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function RI(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Oa(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function LI(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function Ai(e){return LI(e)||Oa(e)}function py(e){return Ai(e)||RI(e)}function Ol(e){return e+32}function my(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function gy(e){return my(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function DI(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:cy(e)?te.surrogateCharacterReference:fy(e)?te.noncharacterCharacterReference:dy(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class MI{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new _I(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new kI(SI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=DI(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Xe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(hy(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=io(t.tagName),t.type===Xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Xe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=my(t)?Xe.WHITESPACE_CHARACTER:t===P.NULL?Xe.NULL_CHARACTER:Xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ii.Attribute:ii.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=O.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ai(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ai(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=O.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=wt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Oa(t)?Ol(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ai(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=O.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ai(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ai(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ai(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ai(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Dn.SCRIPT,!1)&&gy(this.preprocessor.peek(Dn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Dn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Dn.SCRIPT,!1)&&gy(this.preprocessor.peek(Dn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Dn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=wt;break}default:this.currentAttr.name+=String.fromCodePoint(Oa(t)?Ol(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=wt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=wt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Dn.DASH_DASH,!0)?(this._createCommentToken(Dn.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(Dn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Dn.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(Dn.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Dn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=wt;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=O.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Oa(t))this._createDoctypeToken(String.fromCharCode(Ol(t))),this.state=O.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(wt),this.state=O.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=O.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=wt;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Oa(t)?Ol(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Dn.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Dn.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=wt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&py(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){py(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Ey=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),yy=new Set([...Ey,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Il=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),FI=new Set([...Il,g.OL,g.UL]),BI=new Set([...Il,g.BUTTON]),Ty=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),by=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),UI=new Set([g.TR,g.TEMPLATE,g.HTML]),HI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),zI=new Set([g.TABLE,g.TEMPLATE,g.HTML]),jI=new Set([g.TD,g.TH]);class $I{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(ch,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(jI,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(zI,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(HI,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(UI,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case le.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case le.SVG:{if(by.has(s))return!1;break}case le.MATHML:{if(Ty.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Il)}hasInListItemScope(t){return this.hasInDynamicScope(t,FI)}hasInButtonScope(t){return this.hasInDynamicScope(t,BI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(ch.has(n))return!0;if(Il.has(n))return!1;break}case le.SVG:{if(by.has(n))return!1;break}case le.MATHML:{if(Ty.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===le.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Ey.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&yy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&yy.has(this.currentTagId);)this.pop()}}const dh=3;var Dr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Dr||(Dr={}));const _y={type:Dr.Marker};class VI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Dr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<dh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<dh)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=dh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(_y)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Dr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Dr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(_y);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Dr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Dr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Dr.Element&&n.element===t)}}const Ci={createDocument(){return{nodeName:"#document",mode:rr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{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){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ci.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return 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(Ci.isTextNode(n)){n.value+=t;return}}Ci.appendChild(e,Ci.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ci.isTextNode(r)?r.value+=t:Ci.insertBefore(e,Ci.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=F(F({},e.sourceCodeLocation),t)}},Sy="html",qI="about:legacy-compat",YI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",xy=["+//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//"],GI=[...xy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],WI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),wy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],XI=[...wy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ay(e,t){return t.some(n=>e.startsWith(n))}function KI(e){return e.name===Sy&&e.publicId===null&&(e.systemId===null||e.systemId===qI)}function QI(e){if(e.name!==Sy)return rr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===YI)return rr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),WI.has(n))return rr.QUIRKS;let r=t===null?GI:xy;if(Ay(n,r))return rr.QUIRKS;if(r=t===null?wy:XI,Ay(n,r))return rr.LIMITED_QUIRKS}return rr.NO_QUIRKS}const Cy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},JI="definitionurl",ZI="definitionURL",eR=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])),tR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),nR=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])),rR=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function iR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===ds.COLOR||r===ds.SIZE||r===ds.FACE)||rR.has(t)}function vy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===JI){e.attrs[t].name=ZI;break}}function Ny(e){for(let t=0;t<e.attrs.length;t++){const n=eR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function fh(e){for(let t=0;t<e.attrs.length;t++){const n=tR.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 sR(e){const t=nR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=io(e.tagName))}function oR(e,t){return t===le.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function aR(e,t,n){if(t===le.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===ds.ENCODING){const s=n[r].value.toLowerCase();return s===Cy.TEXT_HTML||s===Cy.APPLICATION_XML}}return t===le.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function uR(e,t,n,r){return(!r||r===le.HTML)&&aR(e,t,n)||(!r||r===le.MATHML)&&oR(e,t)}const lR="hidden",cR=8,dR=3;var M;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(M||(M={}));const fR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ky=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Py={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ci,onParseError:null};class Oy{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.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=F(F({},Py),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new MI(this.options,this),this.activeFormattingElements=new VI(this.treeAdapter),this.fragmentContextID=r?io(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new $I(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=F(F({},Py),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,le.HTML,[]));const s=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:fR,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=Lt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==le.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Lt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Lt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Lt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Lt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&fe(F({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,le.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),a=n.type===Xe.END_TAG&&s===n.tagName?{endTag:F({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case Xe.CHARACTER:{this.onCharacter(t);break}case Xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Xe.COMMENT:{this.onComment(t);break}case Xe.DOCTYPE:{this.onDoctype(t);break}case Xe.START_TAG:{this._processStartTag(t);break}case Xe.END_TAG:{this.onEndTag(t);break}case Xe.EOF:{this.onEof(t);break}case Xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return uR(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Dr.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=M.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=M.IN_TABLE;return}case g.BODY:{this.insertionMode=M.IN_BODY;return}case g.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return ky.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return II[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){jL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ia(this,t);break}case M.BEFORE_HTML:{Ra(this,t);break}case M.BEFORE_HEAD:{La(this,t);break}case M.IN_HEAD:{Da(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Ma(this,t);break}case M.AFTER_HEAD:{Fa(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{Ry(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{gh(this,t);break}case M.IN_TABLE_TEXT:{zy(this,t);break}case M.IN_COLUMN_GROUP:{Dl(this,t);break}case M.AFTER_BODY:{Bl(this,t);break}case M.AFTER_AFTER_BODY:{Ul(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){zL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ia(this,t);break}case M.BEFORE_HTML:{Ra(this,t);break}case M.BEFORE_HEAD:{La(this,t);break}case M.IN_HEAD:{Da(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Ma(this,t);break}case M.AFTER_HEAD:{Fa(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{gh(this,t);break}case M.IN_COLUMN_GROUP:{Dl(this,t);break}case M.AFTER_BODY:{Bl(this,t);break}case M.AFTER_AFTER_BODY:{Ul(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ph(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{ph(this,t);break}case M.IN_TABLE_TEXT:{Ha(this,t);break}case M.AFTER_BODY:{TR(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{bR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{_R(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{Ha(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?$L(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ia(this,t);break}case M.BEFORE_HTML:{SR(this,t);break}case M.BEFORE_HEAD:{wR(this,t);break}case M.IN_HEAD:{Er(this,t);break}case M.IN_HEAD_NO_SCRIPT:{vR(this,t);break}case M.AFTER_HEAD:{kR(this,t);break}case M.IN_BODY:{En(this,t);break}case M.IN_TABLE:{so(this,t);break}case M.IN_TABLE_TEXT:{Ha(this,t);break}case M.IN_CAPTION:{AL(this,t);break}case M.IN_COLUMN_GROUP:{Eh(this,t);break}case M.IN_TABLE_BODY:{Ml(this,t);break}case M.IN_ROW:{Fl(this,t);break}case M.IN_CELL:{NL(this,t);break}case M.IN_SELECT:{Vy(this,t);break}case M.IN_SELECT_IN_TABLE:{PL(this,t);break}case M.IN_TEMPLATE:{IL(this,t);break}case M.AFTER_BODY:{LL(this,t);break}case M.IN_FRAMESET:{DL(this,t);break}case M.AFTER_FRAMESET:{FL(this,t);break}case M.AFTER_AFTER_BODY:{UL(this,t);break}case M.AFTER_AFTER_FRAMESET:{HL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?VL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ia(this,t);break}case M.BEFORE_HTML:{xR(this,t);break}case M.BEFORE_HEAD:{AR(this,t);break}case M.IN_HEAD:{CR(this,t);break}case M.IN_HEAD_NO_SCRIPT:{NR(this,t);break}case M.AFTER_HEAD:{PR(this,t);break}case M.IN_BODY:{Ll(this,t);break}case M.TEXT:{mL(this,t);break}case M.IN_TABLE:{Ba(this,t);break}case M.IN_TABLE_TEXT:{Ha(this,t);break}case M.IN_CAPTION:{CL(this,t);break}case M.IN_COLUMN_GROUP:{vL(this,t);break}case M.IN_TABLE_BODY:{yh(this,t);break}case M.IN_ROW:{$y(this,t);break}case M.IN_CELL:{kL(this,t);break}case M.IN_SELECT:{qy(this,t);break}case M.IN_SELECT_IN_TABLE:{OL(this,t);break}case M.IN_TEMPLATE:{RL(this,t);break}case M.AFTER_BODY:{Gy(this,t);break}case M.IN_FRAMESET:{ML(this,t);break}case M.AFTER_FRAMESET:{BL(this,t);break}case M.AFTER_AFTER_BODY:{Ul(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Ia(this,t);break}case M.BEFORE_HTML:{Ra(this,t);break}case M.BEFORE_HEAD:{La(this,t);break}case M.IN_HEAD:{Da(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Ma(this,t);break}case M.AFTER_HEAD:{Fa(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{Uy(this,t);break}case M.TEXT:{gL(this,t);break}case M.IN_TABLE_TEXT:{Ha(this,t);break}case M.IN_TEMPLATE:{Yy(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{mh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Iy(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{gh(this,t);break}case M.IN_TABLE_TEXT:{Hy(this,t);break}}}}function hR(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):By(e,t),n}function pR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function mR(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=dR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=gR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function gR(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 ER(e,t,n){const r=e.treeAdapter.getTagName(t),s=io(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function yR(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function hh(e,t){for(let n=0;n<cR;n++){const r=hR(e,t);if(!r)break;const s=pR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=mR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&ER(e,u,a),yR(e,s,r)}}function ph(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function TR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function bR(e,t){e._appendCommentNode(t,e.document)}function mh(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 r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function _R(e,t){e._setDocumentType(t);const n=t.forceQuirks?rr.QUIRKS:QI(t);KI(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Ia(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,rr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function SR(e,t){t.tagID===g.HTML?(e._insertElement(t,le.HTML),e.insertionMode=M.BEFORE_HEAD):Ra(e,t)}function xR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ra(e,t)}function Ra(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function wR(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:La(e,t)}}function AR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?La(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function La(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function Er(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Lt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Lt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Lt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Lt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Da(e,t)}}function CR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Da(e,t);break}case g.TEMPLATE:{fs(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function fs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function Da(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function vR(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Er(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:Ma(e,t)}}function NR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{Ma(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ma(e,t){const n=t.type===Xe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function kR(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Er(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Fa(e,t)}}function PR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Fa(e,t);break}case g.TEMPLATE:{fs(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Fa(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Rl(e,t)}function Rl(e,t){switch(t.type){case Xe.CHARACTER:{Ry(e,t);break}case Xe.WHITESPACE_CHARACTER:{Iy(e,t);break}case Xe.COMMENT:{ph(e,t);break}case Xe.START_TAG:{En(e,t);break}case Xe.END_TAG:{Ll(e,t);break}case Xe.EOF:{Uy(e,t);break}}}function Iy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ry(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function OR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function IR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function RR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET)}function LR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function DR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&ch.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function MR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function FR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function BR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function UR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=Lt.PLAINTEXT}function HR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function zR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(hh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function jR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $R(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(hh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function VR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function qR(e,t){e.treeAdapter.getDocumentMode(e.document)!==rr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function Ly(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Dy(e){const t=hy(e,ds.TYPE);return t!=null&&t.toLowerCase()===lR}function YR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),Dy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function GR(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function WR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function XR(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Ly(e,t)}function KR(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function QR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function JR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function My(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function ZR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function eL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function tL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function nL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,le.HTML)}function rL(e,t){e._reconstructActiveFormattingElements(),vy(t),fh(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function iL(e,t){e._reconstructActiveFormattingElements(),Ny(t),fh(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function Fy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function En(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{jR(e,t);break}case g.A:{zR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{DR(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{LR(e,t);break}case g.LI:case g.DD:case g.DT:{BR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Ly(e,t);break}case g.HR:{WR(e,t);break}case g.RB:case g.RTC:{tL(e,t);break}case g.RT:case g.RP:{nL(e,t);break}case g.PRE:case g.LISTING:{MR(e,t);break}case g.XMP:{QR(e,t);break}case g.SVG:{iL(e,t);break}case g.HTML:{OR(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Er(e,t);break}case g.BODY:{IR(e,t);break}case g.FORM:{FR(e,t);break}case g.NOBR:{$R(e,t);break}case g.MATH:{rL(e,t);break}case g.TABLE:{qR(e,t);break}case g.INPUT:{YR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{GR(e,t);break}case g.IMAGE:{XR(e,t);break}case g.BUTTON:{HR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{VR(e,t);break}case g.IFRAME:{JR(e,t);break}case g.SELECT:{ZR(e,t);break}case g.OPTION:case g.OPTGROUP:{eL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{My(e,t);break}case g.FRAMESET:{RR(e,t);break}case g.TEXTAREA:{KR(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?My(e,t):Fy(e,t);break}case g.PLAINTEXT:{UR(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:Fy(e,t)}}function sL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function oL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,Gy(e,t))}function aL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function uL(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function lL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function cL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function dL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function fL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function hL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function pL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function By(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function Ll(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{hh(e,t);break}case g.P:{lL(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{aL(e,t);break}case g.LI:{cL(e);break}case g.DD:case g.DT:{dL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{fL(e);break}case g.BR:{pL(e);break}case g.BODY:{sL(e,t);break}case g.HTML:{oL(e,t);break}case g.FORM:{uL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{hL(e,t);break}case g.TEMPLATE:{fs(e,t);break}default:By(e,t)}}function Uy(e,t){e.tmplInsertionModeStack.length>0?Yy(e,t):mh(e,t)}function mL(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function gL(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function gh(e,t){if(e.openElements.currentTagId!==void 0&&ky.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Xe.CHARACTER:{zy(e,t);break}case Xe.WHITESPACE_CHARACTER:{Hy(e,t);break}}else Ua(e,t)}function EL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CAPTION}function yL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function TL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Eh(e,t)}function bL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_TABLE_BODY}function _L(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,Ml(e,t)}function SL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function xL(e,t){Dy(t)?e._appendElement(t,le.HTML):Ua(e,t),t.ackSelfClosing=!0}function wL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function so(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{_L(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Er(e,t);break}case g.COL:{TL(e,t);break}case g.FORM:{wL(e,t);break}case g.TABLE:{SL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{bL(e,t);break}case g.INPUT:{xL(e,t);break}case g.CAPTION:{EL(e,t);break}case g.COLGROUP:{yL(e,t);break}default:Ua(e,t)}}function Ba(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{fs(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ua(e,t)}}function Ua(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Rl(e,t),e.fosterParentingEnabled=n}function Hy(e,t){e.pendingCharacterTokens.push(t)}function zy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ha(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ua(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const jy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function AL(e,t){const n=t.tagID;jy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,so(e,t)):En(e,t)}function CL(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===g.TABLE&&Ba(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ll(e,t)}}function Eh(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Er(e,t);break}default:Dl(e,t)}}function vL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TEMPLATE:{fs(e,t);break}case g.COL:break;default:Dl(e,t)}}function Dl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function Ml(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=M.IN_ROW,Fl(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,so(e,t));break}default:so(e,t)}}function yh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Ba(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:Ba(e,t)}}function Fl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Ml(e,t));break}default:so(e,t)}}function $y(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,yh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,yh(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Ba(e,t)}}function NL(e,t){const n=t.tagID;jy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Fl(e,t)):En(e,t)}function kL(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),$y(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ll(e,t)}}function Vy(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{Er(e,t);break}}}function qy(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{fs(e,t);break}}}function PL(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Vy(e,t)}function OL(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):qy(e,t)}function IL(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Er(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,so(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Eh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,Ml(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,Fl(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,En(e,t)}}function RL(e,t){t.tagID===g.TEMPLATE&&fs(e,t)}function Yy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):mh(e,t)}function LL(e,t){t.tagID===g.HTML?En(e,t):Bl(e,t)}function Gy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Bl(e,t)}function Bl(e,t){e.insertionMode=M.IN_BODY,Rl(e,t)}function DL(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.FRAMESET:{e._insertElement(t,le.HTML);break}case g.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Er(e,t);break}}}function ML(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function FL(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.NOFRAMES:{Er(e,t);break}}}function BL(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function UL(e,t){t.tagID===g.HTML?En(e,t):Ul(e,t)}function Ul(e,t){e.insertionMode=M.IN_BODY,Rl(e,t)}function HL(e,t){switch(t.tagID){case g.HTML:{En(e,t);break}case g.NOFRAMES:{Er(e,t);break}}}function zL(e,t){t.chars=wt,e._insertCharacters(t)}function jL(e,t){e._insertCharacters(t),e.framesetOk=!1}function Wy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function $L(e,t){if(iR(t))Wy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?vy(t):r===le.SVG&&(sR(t),Ny(t)),fh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function VL(e,t){if(t.tagID===g.P||t.tagID===g.BR){Wy(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===le.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const qL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,YL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Xy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ky(e,t){const n=n6(e),r=uy("type",{handlers:{root:GL,element:WL,text:XL,comment:Jy,doctype:KL,raw:JL},unknown:ZL}),s={parser:n?new Oy(Xy):Oy.getFragmentParser(void 0,Xy),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),oo(s,Rr());const a=n?s.parser.document:s.parser.getFragment(),u=rI(a,{file:s.options.file});return s.stitches&&Nl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Qy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function GL(e,t){Qy(e.children,t)}function WL(e,t){e6(e,t),Qy(e.children,t),t6(e,t)}function XL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:za(e)};oo(t,Rr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function KL(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:za(e)};oo(t,Rr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function QL(e,t){t.stitches=!0;const n=r6(e);if("children"in e&&"children"in n){const r=Ky({type:"root",children:e.children},t.options);n.children=r.children}Jy({type:"comment",value:{stitch:n}},t)}function Jy(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:za(e)};oo(t,Rr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function JL(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,Zy(t,Rr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(qL,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function ZL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))QL(n,t);else{let r="";throw YL.has(n.type)&&(r=". 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"+r)}}function oo(e,t){Zy(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=Lt.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 Zy(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function e6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;oo(t,Rr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:cs.html;s===cs.html&&n==="svg"&&(s=cs.svg);const a=uI(fe(F({},e),{children:[]}),{space:s===cs.svg?"svg":"html"}),u={type:Xe.START_TAG,tagName:n,tagID:io(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:za(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function t6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&gI.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;oo(t,El(e));const r={type:Xe.END_TAG,tagName:n,tagID:io(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:za(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function n6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function za(e){const t=Rr(e)||{line:void 0,column:void 0,offset:void 0},n=El(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 r6(e){return"children"in e?ls(fe(F({},e),{children:[]})):ls(e)}function eT(e){return function(t,n){return Ky(t,fe(F({},e),{file:n}))}}const hs=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],tT={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...hs,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...hs],h2:[["className","sr-only"]],img:[...hs,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...hs,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...hs],table:[...hs],ul:[...hs,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},vi={}.hasOwnProperty;function i6(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},tT),t):tT,stack:[]},s=nT(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function nT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return s6(e,n);case"doctype":return o6(e,n);case"element":return a6(e,n);case"root":return u6(e,n);case"text":return l6(e,n)}}}function s6(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return ja(a,t),a}}function o6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ja(n,t),n}}function a6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=rT(e,t.children),s=c6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&vi.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:s,children:r};return ja(u,t),u}function u6(e,t){const r={type:"root",children:rT(e,t.children)};return ja(r,t),r}function l6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ja(r,t),r}function rT(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=nT(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function c6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&vi.call(r,n)?r[n]:void 0,u=r&&vi.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(vi.call(c,f)){const p=c[f];let m=iT(e,oT(a,f),f,p);m==null&&(m=iT(e,oT(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&vi.call(s,n)){const p=s[n];for(f in p)vi.call(p,f)&&!vi.call(d,f)&&(d[f]=p[f])}return d}function iT(e,t,n,r){return t?Array.isArray(r)?d6(e,t,n,r):sT(e,t,n,r):void 0}function d6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=sT(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function sT(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&f6(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function f6(e,t,n){const r=e.schema.protocols&&vi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),c=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&s.slice(0,p.length)===p)return!0}return!1}function ja(e,t){const n=Q1(t);t.data&&(e.data=ls(t.data)),n&&(e.position=n)}function oT(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function h6(e){return function(t){return i6(t,e)}}const aT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return x.jsx("a",fe(F(F({className:G(e,`${z}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},p6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=tt();return!e&&!t?null:x.jsx("div",{className:G(n,`${z}-disclaimer`),children:t?x.jsx(ZE,{rehypePlugins:[eT,h6],components:{ul:({children:r})=>x.jsx("ul",{className:G(n,`${z}-ul`),children:r}),ol:({children:r})=>x.jsx("ol",{className:G(n,`${z}-ol`),children:r}),li:({children:r})=>x.jsx("li",{className:G(n,`${z}-li`),children:r}),a:({href:r,title:s,children:a})=>x.jsx(aT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>x.jsx("img",{className:G(n,`${z}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>x.jsx("p",{className:G(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>x.jsx("span",{className:G(n,`${z}-disclaimer-text-span`),children:r})},children:t}):x.jsx("p",{className:G(n,`${z}-disclaimer-text`),children:e})})},Th=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:s,imageFile:a}=tr(),{setImageFile:u}=Xs(),{logger:c,globalClassName:d,searchConfig:f,features:p}=tt(),m=B.useRef(null),b=B.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",A=!!s||!1,v=A?"connected":"disconnected",w=t||!A,k=()=>a?new Promise((L,q)=>{const ne=new FileReader;ne.readAsDataURL(a),ne.onload=()=>L(ne.result),ne.onerror=de=>q(de)}):Promise.resolve(""),C=L=>Ke(null,null,function*(){var de;if(w)return;const q=10*1024*1024,ne=(de=L.target.files)==null?void 0:de[0];if(ne){if(ne.size>q){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ne)}}),H=()=>{u(null),b.current&&(b.current.value="")},Y=L=>Ke(null,null,function*(){var de;L.preventDefault();const q=(((de=m.current)==null?void 0:de.value)||"").trim();let ne="";try{ne=yield k()}catch(V){c==null||c.error("Error converting file to base64:",V),alert("There was an error processing the file. Please try again.");return}q&&(H(),m.current.value="",r(q,ne))});return x.jsxs("div",{className:G(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&x.jsxs("div",{className:G(d,`cim-${n}-component`,`${z}-image-file-preview`),children:[x.jsx("img",{className:G(d,`cim-${n}-component`,`${z}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),x.jsx("span",{className:G(d,`cim-${n}-component`,`${z}-image-file-name`),title:_,children:_}),x.jsx(P1,{className:G(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:H})]}),x.jsxs("form",{className:G(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:Y,children:[x.jsx("span",{role:"status",className:G(`${z}-connection-status-icon`,v)}),y&&x.jsxs("div",{role:"button",className:G(d,e,`cim-${n}-component`,w&&"disabled",`${z}-image-upload-button`),"aria-disabled":w,tabIndex:0,children:[x.jsx("label",{className:G(d,e,`cim-${n}-component`,w&&"disabled",`${z}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:x.jsx(HN,{})}),x.jsx("input",{className:G(d,e,`cim-${n}-component`,`${z}-file-input`),type:"file",ref:b,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${z}-file-input`,disabled:w,onInput:C})]}),x.jsx("input",{className:G(d,e,`cim-${n}-component`,`${z}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,name:`${z}-user-input`}),x.jsx(YN,{isLoading:w}),x.jsx($N,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:w})]}),x.jsx(p6,{})]})};function m6(e){return xt({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function g6(e){return xt({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const uT=B.createContext({isOpen:!1}),bh=B.createContext(null),lT=B.createContext(null),ao=()=>{var n,r;const e=B.useContext(bh),t=B.useContext(lT);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},cT=({onClearChat:e,componentType:t})=>{const n=ao(),r=()=>{e(),n()};return x.jsxs("button",{className:G(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[x.jsx(g6,{}),"Clear chat"]})};function E6(e){return e==null?[]:Array.isArray(e)?e:[e]}var y6=(e,...t)=>e.concat(t),T6=(e,...t)=>e.filter(n=>!t.includes(n)),b6=e=>Array.from(new Set(e));function dT(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?s?c:0:a>=u?s?0:t>u?u:t:a}function _6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return dT(e,t,{step:-r,loop:s})}var S6=e=>Array.isArray(e),fT=e=>e!=null&&typeof e=="object",x6=e=>fT(e)&&!S6(e),Hl=e=>typeof e=="string",uo=e=>typeof e=="function",w6=e=>e==null,A6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),C6=e=>Object.prototype.toString.call(e),hT=Function.prototype.toString,v6=hT.call(Object),N6=e=>{if(!fT(e)||C6(e)!="[object Object]"||O6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=A6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&hT.call(n)==v6},k6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,P6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,O6=e=>k6(e)||P6(e),I6=e=>e(),R6=()=>{},_h=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function L6(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:D6,max:M6}=Math,F6=e=>Number.isNaN(e),B6=e=>F6(e)?0:e,pT=(e,t,n)=>D6(M6(B6(e),t),n);function Sh(e){if(!N6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=Sh(s))}return n}function xh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function U6(e,t){if(e==null)throw new Error(t())}function H6(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var z6=Object.defineProperty,j6=(e,t,n)=>t in e?z6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wh=(e,t,n)=>j6(e,typeof t!="symbol"?t+"":t,n),mT=()=>{},zl=e=>typeof e=="object"&&e!==null,lo=e=>e?"":void 0,gT=e=>e?"true":void 0,$6=1,V6=9,q6=11,Kt=e=>zl(e)&&e.nodeType===$6&&typeof e.nodeName=="string",jl=e=>zl(e)&&e.nodeType===V6,Y6=e=>zl(e)&&e===e.window,ET=e=>Kt(e)?e.localName||"":"#document";function G6(e){return["html","body","#document"].includes(ET(e))}var W6=e=>zl(e)&&e.nodeType!==void 0,ps=e=>W6(e)&&e.nodeType===q6&&"host"in e,X6=e=>Kt(e)&&e.localName==="input",K6=e=>Kt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function $a(e){if(!e)return!1;const t=e.getRootNode();return ho(t)===e}var Q6=/(textarea|select)/;function J6(e){if(e==null||!Kt(e))return!1;try{return X6(e)&&e.selectionStart!=null||Q6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function co(e,t){var r;if(!e||!t||!Kt(e)||!Kt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ps(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Mr(e){var t;return jl(e)?e:Y6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function Z6(e){return Mr(e).documentElement}function fo(e){var t,n,r;return ps(e)?fo(e.host):jl(e)?(t=e.defaultView)!=null?t:window:Kt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function ho(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function e4(e){if(ET(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ps(e)&&e.host||Z6(e);return ps(t)?t.host:t}function Ah(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),jl(t)||ps(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Ch=new WeakMap;function po(e){return Ch.has(e)||Ch.set(e,fo(e).getComputedStyle(e)),Ch.get(e)}var vh=new Set(["menu","listbox","dialog","grid","tree","region"]),t4=e=>vh.has(e),yT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function TT(e,t){const n=new Set,r=Ah(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=yT(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(m&&t4(m)&&!b&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function bT(e,t){const n=Ah(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=yT(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";m&&vh.has(m)&&!b&&(t(p),s(p))}}}};s(e)}function n4(e){const t=new Set;return bT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function r4(e){const t=e.getAttribute("role");return!!(t&&vh.has(t))}function i4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function s4(e){var t;return i4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function o4(e){if(!e.id)return!1;const t=Ah(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&r4(e))}var Nh=()=>typeof document!="undefined";function a4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var kh=e=>Nh()&&e.test(a4()),u4=e=>Nh()&&e.test(navigator.vendor),_T=()=>Nh()&&!!navigator.maxTouchPoints,l4=()=>kh(/^iPhone/i),c4=()=>kh(/^iPad/i)||Ph()&&navigator.maxTouchPoints>1,$l=()=>l4()||c4(),d4=()=>Ph()||$l(),Ph=()=>kh(/^Mac/i),f4=()=>d4()&&u4(/apple/i);function h4(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function yr(e){var n;const t=h4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var ST=e=>e.button===0,p4=e=>e.button===2||Ph()&&e.ctrlKey&&e.button===0,m4=e=>"touches"in e&&e.touches.length>0,g4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},xT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function E4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=g4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in xT&&(s=xT[s]),s}function wT(e,t="client"){const n=m4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Qt=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},AT=e=>Kt(e)&&e.tagName==="IFRAME",y4=/^(audio|video|details)$/;function CT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var T4=e=>!Number.isNaN(CT(e)),b4=e=>CT(e)<0;function _4(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function vT(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<s.length;){const d=s[c++];if(!d||a.has(d))continue;a.add(d);const f=_4(d,t);if(f){const p=Array.from(f.querySelectorAll(Vl)).filter(n),m=u.get(d);if(m!==void 0){const b=m+1;r.splice(b,0,...p),p.forEach((y,_)=>{u.set(y,b+_)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,b+_)})}s.push(...p)}}return r}var Vl="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",NT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Vl));(n==!0||n=="if-empty"&&s.length===0)&&Kt(e)&&Fr(e)&&s.unshift(e);const u=[];for(const c of s)if(Fr(c)){if(AT(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...NT(d,{getShadowRoot:r}));continue}u.push(c)}return r?vT(u,r,Fr):u};function Fr(e){return!Kt(e)||e.closest("[inert]")?!1:e.matches(Vl)&&K6(e)}function mo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Vl));n&&ms(e)&&s.unshift(e);const a=[];for(const u of s)if(ms(u)){if(AT(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...mo(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=vT(a,r,ms);return!u.length&&n?s:u}return!a.length&&n?s:a}function ms(e){return Kt(e)&&e.tabIndex>0?!0:Fr(e)&&!b4(e)}function S4(e,t={}){const n=mo(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function x4(e,t={}){const{current:n,getShadowRoot:r}=t,s=mo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:ho(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function Va(e){return e.tabIndex<0&&(y4.test(e.localName)||J6(e))&&!T4(e)?0:e.tabIndex}function kT(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=mo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var w4=class D2{constructor(){wh(this,"id",null),wh(this,"fn_cleanup"),wh(this,"cleanup",()=>{this.cancel()})}static create(){return new D2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function jt(e){const t=w4.create();return t.request(e),t.cleanup}function PT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function Oh(e){const t=e4(e);return G6(t)?Mr(t).body:Kt(t)&&v4(t)?t:Oh(t)}var A4=/auto|scroll|overlay|hidden|clip/,C4=new Set(["inline","contents"]);function v4(e){const t=fo(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return A4.test(n+s+r)&&!C4.has(a)}var go="default",Ih="",ql=new WeakMap;function N4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return $l()?(go==="default"&&(Ih=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),go="disabled"):t&&(ql.set(t,t.style.userSelect),t.style.userSelect="none"),()=>k4({target:t,doc:r})}function k4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if($l()){if(go!=="disabled")return;go="restoring",setTimeout(()=>{PT(()=>{go==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Ih||""),Ih="",go="default")})},300)}else if(t&&ql.has(t)){const a=ql.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),ql.delete(t)}}function P4(e={}){const u=e,{defer:t,target:n}=u,r=dn(u,["defer","target"]),s=t?jt:c=>c(),a=[];return a.push(s(()=>{const c=typeof n=="function"?n():n;a.push(N4(fe(F({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function O4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=c=>{const d=wT(c),f=Math.sqrt(Fu(d.x,2)+Fu(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=wT(c);r({point:d,event:c})},u=[Qt(e,"pointermove",s,!1),Qt(e,"pointerup",a,!1),Qt(e,"pointercancel",a,!1),Qt(e,"contextmenu",a,!1),P4({doc:e})];return()=>{u.forEach(c=>c())}}function I4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,b]=S4(e,{includeContainer:!0,getShadowRoot:a}),y=x4(c,{current:n,getShadowRoot:a}),_=!m&&!b;f.shiftKey&&$a(y)?(s==null||s(),p=b):f.shiftKey&&($a(m)||_)?p=n:!f.shiftKey&&$a(n)?(s==null||s(),p=m):!f.shiftKey&&($a(b)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Qt(u,"keydown",d,!0)}function R4(e,t){const c=t,{defer:n,triggerElement:r}=c,s=dn(c,["defer","triggerElement"]),a=n?jt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(I4(d,F({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function L4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Yl(e,t){if(!e)return mT;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function D4(e,t,n){if(!e)return mT;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function M4(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),c(f))})}),()=>t.abort()]}function F4(e,t){const{timeout:n,rootNode:r}=t,s=fo(r),a=Mr(r),u=new s.AbortController;return M4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var B4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),U4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,OT=e=>{const t={};let n;for(;n=U4.exec(e);)t[n[1]]=n[2];return t},H4=(e,t)=>{if(Hl(e)){if(Hl(t))return`${e};${t}`;e=OT(e)}else Hl(t)&&(t=OT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function $t(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=_h(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=B4(t[s],n[s]);continue}if(s==="style"){t[s]=H4(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function EU(e){return e}var Eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Eo||{}),Rh="__init__";function z4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Mr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>ho(t()),a=u=>t().getElementById(u);return fe(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:$a,getById:a})}function j4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var yo=()=>e=>Array.from(new Set(e)),IT=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Gl(e){var m,b;const t=(m=e().value)!=null?m:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=B.useState(t),[s,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(s);c.current=u?e().value:s;const d=B.useRef(c.current);IT(()=>{d.current=c.current},[s,e().value]);const f=y=>{var v,w;const _=d.current,A=uo(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:A,prev:_}),u||a(A),n(A,_)||(w=(v=e()).onChange)==null||w.call(v,A,_)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?Ks.flushSync:I6)(()=>f(y))},invoke(y,_){var A,v;(v=(A=e()).onChange)==null||v.call(A,y,_)},hash(y){var _,A,v;return(v=(A=(_=e()).hash)==null?void 0:A.call(_,y))!=null?v:String(y)}}}Gl.cleanup=e=>{B.useEffect(()=>e,[])},Gl.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function $4(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var V4=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Wl(e,t={}){var se,pe,ve,re,oe,xe;const n=B.useMemo(()=>{const{id:ae,ids:Q,getRootNode:ie}=t;return z4({id:ae,ids:Q,getRootNode:ie})},[t]),r=(...ae)=>{e.debug&&console.log(...ae)},s=(pe=(se=e.props)==null?void 0:se.call(e,{props:Sh(t),scope:n}))!=null?pe:t,a=q4(s),u=(ve=e.context)==null?void 0:ve.call(e,{prop:a,bindable:Gl,scope:n,flush:LT,getContext(){return d},getComputed(){return Y},getRefs(){return A},getEvent(){return y()}}),c=RT(u),d={get(ae){var Q;return(Q=c.current)==null?void 0:Q[ae].ref.current},set(ae,Q){var ie;(ie=c.current)==null||ie[ae].set(Q)},initial(ae){var Q;return(Q=c.current)==null?void 0:Q[ae].initial},hash(ae){var ie,N;const Q=(ie=c.current)==null?void 0:ie[ae].get();return(N=c.current)==null?void 0:N[ae].hash(Q)}},f=B.useRef(new Map),p=B.useRef(null),m=B.useRef(null),b=B.useRef({type:""}),y=()=>fe(F({},b.current),{current(){return b.current},previous(){return m.current}}),_=()=>fe(F({},L),{matches(...ae){return ae.includes(L.ref.current)},hasTag(ae){var Q,ie;return!!((ie=(Q=e.states[L.ref.current])==null?void 0:Q.tags)!=null&&ie.includes(ae))}}),A=$4((oe=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?oe:{}),v=()=>({state:_(),context:d,event:y(),prop:a,send:V,action:w,guard:k,track:V4,refs:A,computed:Y,flush:LT,scope:n,choose:H}),w=ae=>{const Q=uo(ae)?ae(v()):ae;if(!Q)return;const ie=Q.map(N=>{var ee,I;const D=(I=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:I[N];return D||xh(`[zag-js] No implementation found for action "${JSON.stringify(N)}"`),D});for(const N of ie)N==null||N(v())},k=ae=>{var Q,ie;return uo(ae)?ae(v()):(ie=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:ie[ae](v())},C=ae=>{const Q=uo(ae)?ae(v()):ae;if(!Q)return;const ie=Q.map(D=>{var I,_e;const ee=(_e=(I=e.implementations)==null?void 0:I.effects)==null?void 0:_e[D];return ee||xh(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),ee}),N=[];for(const D of ie){const ee=D==null?void 0:D(v());ee&&N.push(ee)}return()=>N.forEach(D=>D==null?void 0:D())},H=ae=>E6(ae).find(Q=>{let ie=!Q.guard;return Hl(Q.guard)?ie=!!k(Q.guard):uo(Q.guard)&&(ie=Q.guard(v())),ie}),Y=ae=>{U6(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[ae];return Q({context:d,event:y(),prop:a,refs:A,scope:n,computed:Y})},L=Gl(()=>({defaultValue:e.initialState({prop:a}),onChange(ae,Q){var N,D,ee,I;if(Q){const _e=f.current.get(Q);_e==null||_e(),f.current.delete(Q)}Q&&w((N=e.states[Q])==null?void 0:N.exit),w((D=p.current)==null?void 0:D.actions);const ie=C((ee=e.states[ae])==null?void 0:ee.effects);if(ie&&f.current.set(ae,ie),Q===Rh){w(e.entry);const _e=C(e.effects);_e&&f.current.set(Rh,_e)}w((I=e.states[ae])==null?void 0:I.entry)}})),q=B.useRef(void 0),ne=B.useRef(Eo.NotStarted);IT(()=>{queueMicrotask(()=>{var D;const ie=ne.current===Eo.Started;ne.current=Eo.Started,r(ie?"rehydrating...":"initializing...");const N=(D=q.current)!=null?D:L.initial;L.invoke(N,ie?L.get():Rh)});const ae=f.current,Q=L.ref.current;return()=>{r("unmounting..."),q.current=Q,ne.current=Eo.Stopped,ae.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{w(e.exit)})}},[]);const de=()=>"ref"in L?L.ref.current:L.get(),V=ae=>{queueMicrotask(()=>{var I,_e,Ue,ye,Re;if(ne.current!==Eo.Started)return;m.current=b.current,b.current=ae;let Q=de();const ie=(Ue=(I=e.states[Q].on)==null?void 0:I[ae.type])!=null?Ue:(_e=e.on)==null?void 0:_e[ae.type],N=H(ie);if(!N)return;p.current=N;const D=(ye=N.target)!=null?ye:Q;r("transition",ae.type,N.target||Q,`(${N.actions})`);const ee=D!==Q;ee?Ks.flushSync(()=>L.set(D)):N.reenter&&!ee?L.invoke(Q,Q):w((Re=N.actions)!=null?Re:[])})};return(xe=e.watch)==null||xe.call(e,v()),{state:_(),send:V,context:d,prop:a,scope:n,refs:A,computed:Y,event:y(),getStatus:()=>ne.current}}function RT(e){const t=B.useRef(e);return t.current=e,t}function q4(e){const t=RT(e);return function(r){return t.current[r]}}function LT(e){queueMicrotask(()=>{Ks.flushSync(()=>e())})}var Lh=j4(e=>e);function Xl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function Y4(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Dh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=dn(f,["asChild","children"]);if(!s)return B.createElement(e,fe(F({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=Y4(c);return B.cloneElement(c,fe(F({},$t(u,c.props)),{ref:r?Xl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},yn=(()=>{const e=new Map;return new Proxy(Dh,{apply(t,n,r){return Dh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Dh(r)),e.get(r)}})})();function G4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function gs(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const m=new Error(a!=null?a:G4(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[W4,Mh]=gs({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[DT,qa]=gs({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),MT=B.forwardRef((e,t)=>{const n=Mh(),r=qa(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(yn.div,fe(F({},s),{ref:Xl(r.ref,t)}))});MT.displayName="PopoverContent";const FT=B.forwardRef((e,t)=>{const n=Mh(),r=qa(),s=$t(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(yn.div,fe(F({},s),{ref:t}))});FT.displayName="PopoverPositioner";const Ya=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},F({},e)]),BT=e=>Ya()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function X4(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var K4={props({props:e}){return fe(F({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",po(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});jt(()=>{var c,d;const u=Kl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{jt(()=>{e.set("prevAnimationName",Kl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,b;((b=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?b:d.target)===s&&e.set("prevAnimationName",Kl(t.get("styles")))},u=d=>{const f=Kl(t.get("styles"));yr(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const c=Yl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),PT(()=>c())}}}}};function Kl(e){return(e==null?void 0:e.animationName)||"none"}yo()(["onExitComplete","present","immediate"]);function Q4(e,t={}){const{sync:n=!1}=t,r=J4(e);return B.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function J4(e){const t=B.useRef(e);return t.current=e,t}const Fh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=dn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=fe(F({},a),{present:r,onExitComplete:Q4(e.onExitComplete)}),d=Wl(K4,c),f=X4(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var Es=(e,t=[])=>({parts:(...n)=>{if(Z4(t))return Es(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Es(e,[...t,...n]),omit:(...n)=>Es(e,t.filter(r=>!n.includes(r))),rename:n=>Es(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${To(e)}"][data-part="${To(r)}"]`,`& [data-scope="${To(e)}"][data-part="${To(r)}"]`].join(", "),attrs:{"data-scope":To(e),"data-part":To(r)}}}),{})}),To=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Z4=e=>e.length===0;const eD=["top","right","bottom","left"],Ni=Math.min,si=Math.max,Ql=Math.round,Jl=Math.floor,Br=e=>({x:e,y:e}),tD={left:"right",right:"left",bottom:"top",top:"bottom"};function UT(e,t,n){return si(e,Ni(t,n))}function oi(e,t){return typeof e=="function"?e(t):e}function ki(e){return e.split("-")[0]}function bo(e){return e.split("-")[1]}function Bh(e){return e==="x"?"y":"x"}function Uh(e){return e==="y"?"height":"width"}function Ur(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Hh(e){return Bh(Ur(e))}function nD(e,t,n){n===void 0&&(n=!1);const r=bo(e),s=Hh(e),a=Uh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Zl(u)),[u,Zl(u)]}function rD(e){const t=Zl(e);return[zh(e),t,zh(t)]}function zh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const HT=["left","right"],zT=["right","left"],iD=["top","bottom"],sD=["bottom","top"];function oD(e,t,n){switch(e){case"top":case"bottom":return n?t?zT:HT:t?HT:zT;case"left":case"right":return t?iD:sD;default:return[]}}function aD(e,t,n,r){const s=bo(e);let a=oD(ki(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(zh)))),a}function Zl(e){const t=ki(e);return tD[t]+e.slice(t.length)}function uD(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function jT(e){return typeof e!="number"?uD(e):{top:e,right:e,bottom:e,left:e}}function ec(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function $T(e,t,n){let{reference:r,floating:s}=e;const a=Ur(t),u=Hh(t),c=Uh(u),d=ki(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const _=bo(t);return _&&(y[u]+=b*(_==="end"?1:-1)*(n&&f?-1:1)),y}function lD(e,t){return Ke(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=oi(t,e),_=jT(y),v=c[b?m==="floating"?"reference":"floating":m],w=ec(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),k=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),H=(yield a.isElement==null?void 0:a.isElement(C))&&(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1},Y=ec(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:C,strategy:d}):k);return{top:(w.top-Y.top+_.top)/H.y,bottom:(Y.bottom-w.bottom+_.bottom)/H.y,left:(w.left-Y.left+_.left)/H.x,right:(Y.right-w.right+_.right)/H.x}})}const cD=50,dD=(e,t,n)=>Ke(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,c=u.detectOverflow?u:fe(F({},u),{detectOverflow:lD}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=$T(f,r,d),b=r,y=0;const _={};for(let A=0;A<a.length;A++){const v=a[A];if(!v)continue;const{name:w,fn:k}=v,{x:C,y:H,data:Y,reset:L}=yield k({x:p,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:_,rects:f,platform:c,elements:{reference:e,floating:t}});p=C!=null?C:p,m=H!=null?H:m,_[w]=F(F({},_[w]),Y),L&&y<cD&&(y++,typeof L=="object"&&(L.placement&&(b=L.placement),L.rects&&(f=L.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):L.rects),{x:p,y:m}=$T(f,b,d)),A=-1)}return{x:p,y:m,placement:b,strategy:s,middlewareData:_}}),fD=e=>({name:"arrow",options:e,fn(n){return Ke(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=oi(e,n)||{};if(p==null)return{};const b=jT(m),y={x:r,y:s},_=Hh(a),A=Uh(_),v=yield c.getDimensions(p),w=_==="y",k=w?"top":"left",C=w?"bottom":"right",H=w?"clientHeight":"clientWidth",Y=u.reference[A]+u.reference[_]-y[_]-u.floating[A],L=y[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ne=q?q[H]:0;(!ne||!(yield c.isElement==null?void 0:c.isElement(q)))&&(ne=d.floating[H]||u.floating[A]);const de=Y/2-L/2,V=ne/2-v[A]/2-1,se=Ni(b[k],V),pe=Ni(b[C],V),ve=ne-v[A]-pe,re=ne/2-v[A]/2+de,oe=UT(se,re,ve),xe=!f.arrow&&bo(a)!=null&&re!==oe&&u.reference[A]/2-(re<se?se:pe)-v[A]/2<0,ae=xe?re<se?re-se:re-ve:0;return{[_]:y[_]+ae,data:F({[_]:oe,centerOffset:re-oe-ae},xe&&{alignmentOffset:ae}),reset:xe}})}}),hD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ke(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,oe=oi(e,n),{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:v=!0}=oe,w=dn(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=ki(a),C=Ur(d),H=ki(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),L=y||(H||!v?[Zl(d)]:rD(d)),q=A!=="none";!y&&q&&L.push(...aD(d,v,A,Y));const ne=[d,...L],de=yield f.detectOverflow(n,w),V=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&V.push(de[k]),b){const xe=nD(a,c,Y);V.push(de[xe[0]],de[xe[1]])}if(se=[...se,{placement:a,overflows:V}],!V.every(xe=>xe<=0)){var pe,ve;const xe=(((pe=u.flip)==null?void 0:pe.index)||0)+1,ae=ne[xe];if(ae&&(!(b==="alignment"?C!==Ur(ae):!1)||se.every(N=>Ur(N.placement)===C?N.overflows[0]>0:!0)))return{data:{index:xe,overflows:se},reset:{placement:ae}};let Q=(ve=se.filter(ie=>ie.overflows[0]<=0).sort((ie,N)=>ie.overflows[1]-N.overflows[1])[0])==null?void 0:ve.placement;if(!Q)switch(_){case"bestFit":{var re;const ie=(re=se.filter(N=>{if(q){const D=Ur(N.placement);return D===C||D==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(D=>D>0).reduce((D,ee)=>D+ee,0)]).sort((N,D)=>N[1]-D[1])[0])==null?void 0:re[0];ie&&(Q=ie);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function VT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qT(e){return eD.some(t=>e[t]>=0)}const pD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ke(this,null,function*(){const{rects:r,platform:s}=n,c=oi(e,n),{strategy:a="referenceHidden"}=c,u=dn(c,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,fe(F({},u),{elementContext:"reference"})),f=VT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:qT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,fe(F({},u),{altBoundary:!0})),f=VT(d,r.floating);return{data:{escapedOffsets:f,escaped:qT(f)}}}default:return{}}})}}},YT=new Set(["left","top"]);function mD(e,t){return Ke(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=ki(n),c=bo(n),d=Ur(n)==="y",f=YT.has(u)?-1:1,p=a&&d?-1:1,m=oi(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:b*f}:{x:b*f,y:y*p}})}const gD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ke(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield mD(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:fe(F({},f),{placement:c})}})}}},ED=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ke(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,C=oi(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:H=>{let{x:Y,y:L}=H;return{x:Y,y:L}}}}=C,p=dn(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},b=yield u.detectOverflow(n,p),y=Ur(a),_=Bh(y);let A=m[_],v=m[y];const w=(H,Y)=>UT(Y+b[H==="y"?"top":"left"],Y,Y-b[H==="y"?"bottom":"right"]);c&&(A=w(_,A)),d&&(v=w(y,v));const k=f.fn(fe(F({},n),{[_]:A,[y]:v}));return fe(F({},k),{data:{x:k.x-r,y:k.y-s,enabled:{[_]:c,[y]:d}}})})}}},yD=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=oi(e,t),b={x:s,y:a},y=Ur(u),_=Bh(y);let A=b[_],v=b[y];const w=oi(f,t),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(n=w.mainAxis)!=null?n:0,crossAxis:(r=w.crossAxis)!=null?r:0};if(p){const Y=_==="y"?"height":"width",L=c.reference[_]-c.floating[Y]+k.mainAxis,q=c.reference[_]+c.reference[Y]-k.mainAxis;A<L?A=L:A>q&&(A=q)}if(m){var C,H;const Y=_==="y"?"width":"height",L=YT.has(ki(u)),q=c.reference[y]-c.floating[Y]+(L&&((C=d.offset)==null?void 0:C[y])||0)+(L?0:k.crossAxis),ne=c.reference[y]+c.reference[Y]+(L?0:((H=d.offset)==null?void 0:H[y])||0)-(L?k.crossAxis:0);v<q?v=q:v>ne&&(v=ne)}return{[_]:A,[y]:v}}}},TD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ke(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,V=oi(e,n),{apply:c=()=>{}}=V,d=dn(V,["apply"]),f=yield a.detectOverflow(n,d),p=ki(r),m=bo(r),b=Ur(r)==="y",{width:y,height:_}=s.floating;let A,v;p==="top"||p==="bottom"?(A=p,v=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(v=p,A=m==="end"?"top":"bottom");const w=_-f.top-f.bottom,k=y-f.left-f.right,C=Ni(_-f[A],w),H=Ni(y-f[v],k),Y=n.middlewareData.shift,L=!Y;let q=C,ne=H;Y!=null&&Y.enabled.x&&(ne=k),Y!=null&&Y.enabled.y&&(q=w),L&&!m&&(b?ne=y-2*si(f.left,f.right):q=_-2*si(f.top,f.bottom)),yield c(fe(F({},n),{availableWidth:ne,availableHeight:q}));const de=yield a.getDimensions(u.floating);return y!==de.width||_!==de.height?{reset:{rects:!0}}:{}})}}};function tc(){return typeof window!="undefined"}function _o(e){return GT(e)?(e.nodeName||"").toLowerCase():"#document"}function Yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hr(e){var t;return(t=(GT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function GT(e){return tc()?e instanceof Node||e instanceof Yn(e).Node:!1}function Tr(e){return tc()?e instanceof Element||e instanceof Yn(e).Element:!1}function zr(e){return tc()?e instanceof HTMLElement||e instanceof Yn(e).HTMLElement:!1}function WT(e){return!tc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Yn(e).ShadowRoot}function Ga(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function bD(e){return/^(table|td|th)$/.test(_o(e))}function nc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const _D=/transform|translate|scale|rotate|perspective|filter/,SD=/paint|layout|strict|content/,ys=e=>!!e&&e!=="none";let jh;function $h(e){const t=Tr(e)?br(e):e;return ys(t.transform)||ys(t.translate)||ys(t.scale)||ys(t.rotate)||ys(t.perspective)||!Vh()&&(ys(t.backdropFilter)||ys(t.filter))||_D.test(t.willChange||"")||SD.test(t.contain||"")}function xD(e){let t=Pi(e);for(;zr(t)&&!So(t);){if($h(t))return t;if(nc(t))return null;t=Pi(t)}return null}function Vh(){return jh==null&&(jh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),jh}function So(e){return/^(html|body|#document)$/.test(_o(e))}function br(e){return Yn(e).getComputedStyle(e)}function rc(e){return Tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pi(e){if(_o(e)==="html")return e;const t=e.assignedSlot||e.parentNode||WT(e)&&e.host||Hr(e);return WT(t)?t.host:t}function XT(e){const t=Pi(e);return So(t)?(e.ownerDocument||e).body:zr(t)&&Ga(t)?t:XT(t)}function Wa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=XT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Yn(s);if(a){const c=qh(u);return t.concat(u,u.visualViewport||[],Ga(s)?s:[],c&&n?Wa(c):[])}else return t.concat(s,Wa(s,[],n))}function qh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function KT(e){const t=br(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=zr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=Ql(n)!==a||Ql(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Yh(e){return Tr(e)?e:e.contextElement}function xo(e){const t=Yh(e);if(!zr(t))return Br(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=KT(t);let u=(a?Ql(n.width):n.width)/r,c=(a?Ql(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const wD=Br(0);function QT(e){const t=Yn(e);return!Vh()||!t.visualViewport?wD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Yn(e)?!1:t}function Ts(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Yh(e);let u=Br(1);t&&(r?Tr(r)&&(u=xo(r)):u=xo(e));const c=AD(a,n,r)?QT(a):Br(0);let d=(s.left+c.x)/u.x,f=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const b=Yn(a),y=r&&Tr(r)?Yn(r):r;let _=b,A=qh(_);for(;A&&r&&y!==_;){const v=xo(A),w=A.getBoundingClientRect(),k=br(A),C=w.left+(A.clientLeft+parseFloat(k.paddingLeft))*v.x,H=w.top+(A.clientTop+parseFloat(k.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,m*=v.y,d+=C,f+=H,_=Yn(A),A=qh(_)}}return ec({width:p,height:m,x:d,y:f})}function ic(e,t){const n=rc(e).scrollLeft;return t?t.left+n:Ts(Hr(e)).left+n}function JT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ic(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function CD(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Hr(r),c=t?nc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Br(1);const p=Br(0),m=zr(r);if((m||!m&&!a)&&((_o(r)!=="body"||Ga(u))&&(d=rc(r)),zr(r))){const y=Ts(r);f=xo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!m&&!a?JT(u,d):Br(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function vD(e){return Array.from(e.getClientRects())}function ND(e){const t=Hr(e),n=rc(e),r=e.ownerDocument.body,s=si(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=si(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+ic(e);const c=-n.scrollTop;return br(r).direction==="rtl"&&(u+=si(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const ZT=25;function kD(e,t){const n=Yn(e),r=Hr(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(s){a=s.width,u=s.height;const p=Vh();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=ic(r);if(f<=0){const p=r.ownerDocument,m=p.body,b=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=ZT&&(a-=_)}else f<=ZT&&(a+=f);return{width:a,height:u,x:c,y:d}}const PD=new Set(["absolute","fixed"]);function OD(e,t){const n=Ts(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=zr(e)?xo(e):Br(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function eb(e,t,n){let r;if(t==="viewport")r=kD(e,n);else if(t==="document")r=ND(Hr(e));else if(Tr(t))r=OD(t,n);else{const s=QT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ec(r)}function tb(e,t){const n=Pi(e);return n===t||!Tr(n)||So(n)?!1:br(n).position==="fixed"||tb(n,t)}function ID(e,t){const n=t.get(e);if(n)return n;let r=Wa(e,[],!1).filter(c=>Tr(c)&&_o(c)!=="body"),s=null;const a=br(e).position==="fixed";let u=a?Pi(e):e;for(;Tr(u)&&!So(u);){const c=br(u),d=$h(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&PD.has(s.position)||Ga(u)&&!d&&tb(e,u))?r=r.filter(p=>p!==u):s=c,u=Pi(u)}return t.set(e,r),r}function RD(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?nc(t)?[]:ID(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=eb(t,p,s);return f.top=si(m.top,f.top),f.right=Ni(m.right,f.right),f.bottom=Ni(m.bottom,f.bottom),f.left=si(m.left,f.left),f},eb(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function LD(e){const{width:t,height:n}=KT(e);return{width:t,height:n}}function DD(e,t,n){const r=zr(t),s=Hr(t),a=n==="fixed",u=Ts(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Br(0);function f(){d.x=ic(s)}if(r||!r&&!a)if((_o(t)!=="body"||Ga(s))&&(c=rc(t)),r){const y=Ts(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?JT(s,c):Br(0),m=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:m,y:b,width:u.width,height:u.height}}function Gh(e){return br(e).position==="static"}function nb(e,t){if(!zr(e)||br(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Hr(e)===n&&(n=n.ownerDocument.body),n}function rb(e,t){const n=Yn(e);if(nc(e))return n;if(!zr(e)){let s=Pi(e);for(;s&&!So(s);){if(Tr(s)&&!Gh(s))return s;s=Pi(s)}return n}let r=nb(e,t);for(;r&&bD(r)&&Gh(r);)r=nb(r,t);return r&&So(r)&&Gh(r)&&!$h(r)?n:r||xD(e)||n}const MD=function(e){return Ke(this,null,function*(){const t=this.getOffsetParent||rb,n=this.getDimensions,r=yield n(e.floating);return{reference:DD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function FD(e){return br(e).direction==="rtl"}const BD={convertOffsetParentRelativeRectToViewportRelativeRect:CD,getDocumentElement:Hr,getClippingRect:RD,getOffsetParent:rb,getElementRects:MD,getClientRects:vD,getDimensions:LD,getScale:xo,isElement:Tr,isRTL:FD};function ib(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function UD(e,t){let n=null,r;const s=Hr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:b,height:y}=f;if(c||t(),!b||!y)return;const _=Jl(m),A=Jl(s.clientWidth-(p+b)),v=Jl(s.clientHeight-(m+y)),w=Jl(p),C={rootMargin:-_+"px "+-A+"px "+-v+"px "+-w+"px",threshold:si(0,Ni(1,d))||1};let H=!0;function Y(L){const q=L[0].intersectionRatio;if(q!==d){if(!H)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!ib(f,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(Y,fe(F({},C),{root:s.ownerDocument}))}catch(L){n=new IntersectionObserver(Y,C)}n.observe(e)}return u(!0),a}function HD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Yh(e),p=s||a?[...f?Wa(f):[],...Wa(t)]:[];p.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=f&&c?UD(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(w=>{let[k]=w;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,A=d?Ts(e):null;d&&v();function v(){const w=Ts(e);A&&!ib(A,w)&&n(),A=w,_=requestAnimationFrame(v)}return n(),()=>{var w;p.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),m==null||m(),(w=y)==null||w.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const zD=gD,jD=ED,$D=hD,VD=TD,qD=pD,YD=fD,GD=yD,WD=(e,t,n)=>{const r=new Map,s=F({platform:BD},n),a=fe(F({},s.platform),{_c:r});return dD(e,t,fe(F({},s),{platform:a}))};function sb(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return fe(F({},s),{toJSON:()=>s})}function XD(e){if(!e)return sb();const{x:t,y:n,width:r,height:s}=e;return sb(t,n,r,s)}function KD(e,t){return{contextElement:Kt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?XD(r):n.getBoundingClientRect()}}}var Xa=e=>({variable:e,reference:`var(${e})`}),ai={arrowSize:Xa("--arrow-size"),arrowSizeHalf:Xa("--arrow-size-half"),arrowBg:Xa("--arrow-background"),transformOrigin:Xa("--transform-origin"),arrowOffset:Xa("--arrow-offset")},QD=e=>e==="top"||e==="bottom"?"y":"x";function JD(e,t){return{name:"transformOrigin",fn(n){var de,V,se,pe,ve;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=QD(d),p=((de=s.arrow)==null?void 0:de.x)||0,m=((V=s.arrow)==null?void 0:V.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+b/2,A=m+y/2,v=Math.abs(((se=s.shift)==null?void 0:se.y)||0),w=u.reference.height/2,k=y/2,C=(ve=(pe=e.offset)==null?void 0:pe.mainAxis)!=null?ve:e.gutter,H=typeof C=="number"?C+k:C!=null?C:k,Y=v>H,L={top:`${_}px calc(100% + ${H}px)`,bottom:`${_}px ${-H}px`,left:`calc(100% + ${H}px) ${A}px`,right:`${-H}px ${A}px`}[d],q=`${_}px ${u.reference.y+w-c}px`,ne=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(ai.transformOrigin.variable,ne?q:L),{data:{transformOrigin:ne?q:L}}}}}var ZD={name:"rects",fn({rects:e}){return{data:e}}},e5=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${ai.arrowOffset.reference})`}),{}}}};function t5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var n5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function ob(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Wh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function r5(e,t,n){const r=e||t.createElement("div");return YD({element:r,padding:n.arrowPadding})}function i5(e,t){var n;if(!w6((n=t.offset)!=null?n:t.gutter))return zD(({placement:r})=>{var p,m,b,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:c}=t5(r),d=c?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return Sh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function s5(e){if(!e.flip)return;const t=Wh(e.boundary);return $D(fe(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function o5(e){if(!e.slide&&!e.overlap)return;const t=Wh(e.boundary);return jD(fe(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:GD()}))}function a5(e){return VD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function u5(e){var t;if(e.hideWhenDetached)return qD({strategy:"referenceHidden",boundary:(t=Wh(e.boundary))!=null?t:"clippingAncestors"})}function l5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function c5(e,t,n={}){const r=KD(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},n5,n),a=t.querySelector("[data-part=arrow]"),u=[i5(a,s),s5(s),o5(s),r5(a,t.ownerDocument,s),e5(a),JD({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),a5(s),u5(s),ZD],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>Ke(null,null,function*(){var H;if(!r||!t)return;const A=yield WD(r,t,{placement:c,middleware:u,strategy:d});f==null||f(A),p==null||p({placed:!0});const v=fo(t),w=ob(v,A.x),k=ob(v,A.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${k}px`),s.hideWhenDetached&&(((H=A.middlewareData.hide)==null?void 0:H.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const Y=po(C);t.style.setProperty("--z-index",Y.zIndex)}}),b=()=>Ke(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=l5(s.listeners),_=s.listeners?HD(r,t,b,y):R6;return b(),()=>{_==null||_(),p==null||p({placed:!1})}}function ab(e,t,n={}){const c=n,{defer:r}=c,s=dn(c,["defer"]),a=r?jt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(c5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var d5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function f5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:ai.arrowSize.reference,height:ai.arrowSize.reference,[ai.arrowSizeHalf.variable]:`calc(${ai.arrowSize.reference} / 2)`,[ai.arrowOffset.variable]:`calc(${ai.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?d5[t.split("-")[0]]:void 0,background:ai.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,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)"}}}var wo=new WeakMap,sc=new WeakMap,oc={},Xh=0,ub=e=>e&&(e.host||ub(e.parentNode)),h5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ub(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),p5=new Set(["script","output","status","next-route-announcer"]),m5=e=>p5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),g5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=h5(n,Array.isArray(e)?e:[e]);oc[r]||(oc[r]=new WeakMap);const c=oc[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Kt(y)&&bT(y,_=>{m(_)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))b(_);else try{if(m5(_))return;const v=_.getAttribute(s)==="true",w=(wo.get(_)||0)+1,k=(c.get(_)||0)+1;wo.set(_,w),c.set(_,k),d.push(_),w===1&&v&&sc.set(_,!0),k===1&&_.setAttribute(r,""),v||_.setAttribute(s,"true")}catch(A){console.error("[zag-js > ariaHidden] cannot operate on ",_,A)}})};return b(n),f.clear(),Xh++,()=>{d.forEach(y=>{const _=wo.get(y)-1,A=c.get(y)-1;wo.set(y,_),c.set(y,A),_||(sc.has(y)||y.removeAttribute(s),sc.delete(y)),A||y.removeAttribute(r)}),Xh--,Xh||(wo=new WeakMap,wo=new WeakMap,sc=new WeakMap,oc={})}},E5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,y5=(e,t=E5(e),n="data-aria-hidden",r=!0)=>{if(t)return g5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},T5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function lb(e,t={}){const{defer:n=!0}=t,r=n?T5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(y5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function b5(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function _5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var cb="pointerdown.outside",db="focus.outside";function S5(e){for(const t of e)if(Kt(t)&&Fr(t))return!0;return!1}var fb=e=>"clientY"in e;function x5(e,t){if(!fb(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function w5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function hb(e,t){if(!t||!fb(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},c={x:e.clientX,y:e.clientY};return w5(u,c)?r||a:!1}function A5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Mr(e),f=fo(e),p=b5(f),m=_5(f);function b(C,H){if(!Kt(H)||!H.isConnected||co(e,H)||x5(e,C)||c&&TT(e,H))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const q=Oh(Y);if(hb(C,q))return!1}const L=Oh(e);return hb(C,L)?!1:!(n!=null&&n(H))}const y=new Set,_=ps(e==null?void 0:e.getRootNode());function A(C){function H(Y){var de,V;const L=u&&!_T()?jt:se=>se(),q=Y!=null?Y:C,ne=(V=(de=q==null?void 0:q.composedPath)==null?void 0:de.call(q))!=null?V:[q==null?void 0:q.target];L(()=>{const se=_?ne[0]:yr(C);if(!(!e||!b(C,se))){if(s||a){const pe=_h(s,a);e.addEventListener(cb,pe,{once:!0})}pb(e,cb,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:p4(q),focusable:S5(ne),target:se}})}})}C.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(Qt(d,"click",H,{once:!0})),y.add(m.addEventListener("click",H,{once:!0})),y.add(p.addEventListener("click",H,{once:!0}))):H()}const v=new Set,w=setTimeout(()=>{v.add(Qt(d,"pointerdown",A,!0)),v.add(m.addEventListener("pointerdown",A,!0)),v.add(p.addEventListener("pointerdown",A,!0))},0);function k(C){(u?jt:Y=>Y())(()=>{var q,ne;const Y=(ne=(q=C==null?void 0:C.composedPath)==null?void 0:q.call(C))!=null?ne:[C==null?void 0:C.target],L=_?Y[0]:yr(C);if(!(!e||!b(C,L))){if(r||a){const de=_h(r,a);e.addEventListener(db,de,{once:!0})}pb(e,db,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Fr(L),target:L}})}})}return _T()||(v.add(Qt(d,"focusin",k,!0)),v.add(m.addEventListener("focusin",k,!0)),v.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(w),y.forEach(C=>C()),v.forEach(C=>C())}}function C5(e,t){const{defer:n}=t,r=n?jt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(A5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function pb(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function v5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Qt(Mr(e),"keydown",n,{capture:!0})}var mb="layer:request-dismiss",ir={layers:[],branches:[],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 r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?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 n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>co(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>co(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>ir.dismiss(r.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 r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];k5(e,mb,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),N5(e,mb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function N5(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function k5(e,t,n){e.addEventListener(t,n,{once:!0})}var gb;function Eb(){ir.layers.forEach(({node:e})=>{e.style.pointerEvents=ir.isBelowPointerBlockingLayer(e)?"none":"auto"})}function P5(e){e.style.pointerEvents=""}function O5(e,t){const n=Mr(e),r=[];return ir.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(gb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=F4(()=>{const c=s();return Kt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Yl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{ir.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=gb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function I5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){xh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};ir.add(f),Eb();function p(A){var w,k;const v=yr(A.detail.originalEvent);ir.isBelowPointerBlockingLayer(e)||ir.isInBranch(v)||((w=t.onPointerDownOutside)==null||w.call(t,A),(k=t.onInteractOutside)==null||k.call(t,A),!A.defaultPrevented&&(c&&console.log("onPointerDownOutside:",A.detail.originalEvent),r==null||r()))}function m(A){var w,k;const v=yr(A.detail.originalEvent);ir.isInBranch(v)||((w=t.onFocusOutside)==null||w.call(t,A),(k=t.onInteractOutside)==null||k.call(t,A),!A.defaultPrevented&&(c&&console.log("onFocusOutside:",A.detail.originalEvent),r==null||r()))}function b(A){var v;ir.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,A),!A.defaultPrevented&&r&&(A.preventDefault(),r()))}function y(A){var C;if(!e)return!1;const v=typeof u=="function"?u():u,w=Array.isArray(v)?v:[v],k=(C=t.persistentElements)==null?void 0:C.map(H=>H()).filter(Kt);return k&&w.push(...k),w.some(H=>co(H,A))||ir.isInNestedLayer(e,A)}const _=[a?O5(e,t.persistentElements):void 0,v5(e,b),C5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{ir.remove(e),Eb(),P5(e),_.forEach(A=>A==null?void 0:A())}}function yb(e,t){const{defer:n}=t,r=n?jt:a=>a(),s=[];return s.push(r(()=>{const a=uo(e)?e():e;s.push(I5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var R5=Object.defineProperty,L5=(e,t,n)=>t in e?R5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,At=(e,t,n)=>L5(e,typeof t!="symbol"?t+"":t,n),Tb={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},D5=[],M5=class{constructor(e,t){At(this,"trapStack"),At(this,"config"),At(this,"doc"),At(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),At(this,"portalContainers",new Set),At(this,"listenerCleanups",[]),At(this,"handleFocus",r=>{const s=yr(r),a=this.findContainerIndex(s,r)>=0;if(a||jl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Va(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Va(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),At(this,"handlePointerDown",r=>{const s=yr(r);if(!(this.findContainerIndex(s,r)>=0)){if(Qa(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Qa(this.config.allowOutsideClick,r)||r.preventDefault()}}),At(this,"handleClick",r=>{const s=yr(r);this.findContainerIndex(s,r)>=0||Qa(this.config.clickOutsideDeactivates,r)||Qa(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),At(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;Ka(r)&&r.preventDefault(),this.tryFocus(a)}}),At(this,"handleEscapeKey",r=>{F5(r)&&Qa(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),At(this,"_mutationObserver"),At(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return s4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?o4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),At(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),At(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Fr(r)){const s=ho(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),At(this,"tryFocus",r=>{if(r!==!1&&r!==ho(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,B5(r)&&r.select()}}),At(this,"deactivate",r=>{if(!this.state.active)return this;const s=F({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),Tb.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),c=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{bb(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),At(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),At(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),At(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),At(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),At(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),At(this,"getNodeForOption",(r,{hasFallback:s=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),At(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||yr(s);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Fr(u)&&!ms(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[m];c=Va(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Ka(s)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Fr(u)&&!ms(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[m];c=Va(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Ka(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||D5;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Ka(r)&&!r.shiftKey},isKeyBackward(r){return Ka(r)&&r.shiftKey}},t);this.doc=n.document||Mr(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;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{n4(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?TT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=mo(e,{getShadowRoot:this.config.getShadowRoot}),n=NT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let c=!1;for(let f=0;f<t.length;f++)if(Va(t[f])>0){c=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(ms(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(ms(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:s,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),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 Tb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?bb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Qt(this.doc,"focusin",this.handleFocus,!0),Qt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Qt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Qt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Qt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Qt(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=ho(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Ka=e=>e.key==="Tab",Qa=(e,...t)=>typeof e=="function"?e(...t):e,F5=e=>!e.isComposing&&e.key==="Escape",bb=e=>setTimeout(e,0),B5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function _b(e,t={}){let n;const r=jt(()=>{const s=typeof e=="function"?e():e;if(s){n=new M5(s,fe(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Mr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Kh="data-scroll-lock";function U5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Sb(e){const t=po(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function xb(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Kh))return;const u=Sb(r)||Sb(s),c=n.innerWidth-r.clientWidth;s.setAttribute(Kh,"");const d=()=>D4(r,"--scrollbar-width",`${c}px`),f=U5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),Yl(s,_)},m=()=>{var Y,L;const{scrollX:_,scrollY:A,visualViewport:v}=n,w=(Y=v==null?void 0:v.offsetLeft)!=null?Y:0,k=(L=v==null?void 0:v.offsetTop)!=null?L:0,C={position:"fixed",overflow:"hidden",top:`${-(A-Math.floor(k))}px`,left:`${-(_-Math.floor(w))}px`,right:"0"};!u&&c>0&&(C[f]=`${c}px`);const H=Yl(s,C);return()=>{H==null||H(),n.scrollTo({left:_,top:A,behavior:"instant"})}},b=[d(),$l()?m():p()];return()=>{b.forEach(_=>_==null?void 0:_()),s.removeAttribute(Kh)}}var H5=Es("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),jr=H5.build(),wb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},Ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Cb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},z5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},j5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},vb=e=>e.getById(wb(e)),Ao=e=>e.getById(Ab(e)),Co=e=>e.getById(Qh(e)),Nb=e=>e.getById(Cb(e)),$5=e=>e.getById(Jh(e)),V5=e=>e.getById(Zh(e));function q5(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),b=f5(fe(F({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(fe(F({id:z5(c)},jr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(fe(F({},jr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(fe(F({},jr.anchor.attrs),{dir:u("dir"),id:wb(c)}))},getTriggerProps(){return t.button(fe(F({},jr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:Ab(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Qh(c),onPointerDown(y){ST(y)&&f4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(fe(F({},jr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(fe(F({id:Cb(c)},jr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(fe(F({},jr.content.attrs),{dir:u("dir"),id:Qh(c),tabIndex:-1,role:"dialog","aria-modal":gT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":lo(d),"aria-labelledby":m.title?Jh(c):void 0,"aria-describedby":m.description?Zh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(fe(F({},jr.title.attrs),{id:Jh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(fe(F({},jr.description.attrs),{id:Zh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(fe(F({},jr.closeTrigger.attrs),{dir:u("dir"),id:j5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var Y5={props({props:e}){return fe(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=vb(n))!=null?a:Ao(n);return ab(r,()=>Nb(n),fe(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Co(n);let s=!0;return yb(r,{type:"popover",pointerBlocking:t("modal"),exclude:Ao(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(s=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:R4(()=>Co(t),{triggerElement:Ao(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?lb(()=>[Co(t),Ao(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return xb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?_b(()=>Co(t),{initialFocus:()=>kT({root:Co(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=vb(n))!=null?u:Ao(n);ab(s,()=>Nb(n),fe(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){jt(()=>{Object.assign(e.get("renderedElements"),{title:!!$5(t),description:!!V5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||jt(()=>{const n=kT({root:Co(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||jt(()=>{const a=Ao(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};yo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[TU,ac]=gs({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[bU,ep]=gs({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),G5=e=>{const t=B.useId(),{getRootNode:n}=ac(),{dir:r}=ep(),s=F({id:t,dir:r,getRootNode:n},e),a=Wl(Y5,s);return q5(a,Lh)},W5=e=>{const[t,u]=BT(e),c=u,{children:n}=c,r=dn(c,["children"]),s=G5(r),a=Fh($t({present:s.open},t));return x.jsx(W4,{value:s,children:x.jsx(DT,{value:a,children:n})})},kb=B.forwardRef((e,t)=>{const n=Mh(),r=qa(),s=$t(fe(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(yn.button,fe(F({},s),{ref:t}))});kb.displayName="PopoverTrigger";function X5(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function K5(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function Q5(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function J5(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function Z5(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function e8(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function tp(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function Pb(e){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const t8=({className:e,componentType:t,children:n})=>{const[r,s]=B.useState(!1),{globalClassName:a}=tt(),u=f=>{s(f.open)},c=B.useCallback(()=>{s(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return x.jsxs(W5,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(kb,{"aria-label":`Overflow menu for ${t}`,className:G(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(Pb,{})}),x.jsx(FT,{children:x.jsx(MT,{className:G(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(lT.Provider,{value:d,children:n})})})]})};function Ob(e){return xt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function Ib(e){return xt({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[n8,bs]=gs({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Rb=B.forwardRef((e,t)=>{const n=bs(),r=$t(n.getControlProps(),e);return x.jsx(yn.div,fe(F(F({},r),e),{ref:t}))});Rb.displayName="CarouselControl";const Lb=B.forwardRef((e,t)=>{const[n,r]=Ya()(e,["readOnly","index"]),s=bs(),a=$t(s.getIndicatorProps(n),r);return x.jsx(yn.button,fe(F({},a),{ref:t}))});Lb.displayName="CarouselIndicator";const Db=B.forwardRef((e,t)=>{const n=bs(),r=$t(n.getIndicatorGroupProps(),e);return x.jsx(yn.div,fe(F({},r),{ref:t}))});Db.displayName="CarouselIndicatorGroup";const Mb=B.forwardRef((e,t)=>{const[n,r]=Ya()(e,["index","snapAlign"]),s=bs(),a=$t(s.getItemProps(n),r);return x.jsx(yn.div,fe(F({},a),{ref:t}))});Mb.displayName="CarouselItem";const Fb=B.forwardRef((e,t)=>{const n=bs(),r=$t(n.getItemGroupProps(),e);return x.jsx(yn.div,fe(F({},r),{ref:t}))});Fb.displayName="CarouselItemGroup";const Bb=B.forwardRef((e,t)=>{const n=bs(),r=$t(n.getNextTriggerProps(),e);return x.jsx(yn.button,fe(F({},r),{ref:t}))});Bb.displayName="CarouselNextTrigger";const Ub=B.forwardRef((e,t)=>{const n=bs(),r=$t(n.getPrevTriggerProps(),e);return x.jsx(yn.button,fe(F({},r),{ref:t}))});Ub.displayName="CarouselPrevTrigger";function r8(e){const t=po(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(b,y){let _=parseFloat(b);return/%/.test(b)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(s,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function i8(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function Hb(e){let t=[];for(const n of e.children)t=t.concat(n,Hb(n));return t}function zb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?Hb(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!i8(n,m,u))continue;const b=po(p);let[y,_]=b.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const A=a==="x"?_:y,v=m[c]-n[c]+e[f];switch(A){case"none":break;case"start":r[a].start.push({node:p,position:v});break;case"center":r[a].center.push({node:p,position:v+m[d]/2});break;case"end":r[a].end.push({node:p,position:v+m[d]});break}}}return r}function jb(e){const t=e.getBoundingClientRect(),n=r8(e),r=zb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:$b([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(Vb(0,s.x))),y:$b([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(Vb(0,s.y)))}}function s8(e,t,n){const r=zb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var $b=e=>[...new Set(e)],Vb=(e,t)=>n=>Math.max(e,Math.min(t,n)),o8=Es("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ui=o8.build(),a8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},u8=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},uc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},l8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},c8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},d8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},qb=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},Mn=e=>e.getById(uc(e)),Yb=e=>L4(Mn(e),"[data-part=item]"),f8=(e,t)=>e.getById(qb(e,t)),Gb=e=>{const t=Mn(e);if(!t)return;const n=mo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function h8(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),b=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),A=c("slidesPerPage"),v=c("padding"),w=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/y.length},scrollToIndex(k,C){a({type:"INDEX.SET",index:k,instant:C})},scrollTo(k,C){a({type:"PAGE.SET",index:k,instant:C})},scrollNext(k){a({type:"PAGE.NEXT",instant:k})},scrollPrev(k){a({type:"PAGE.PREV",instant:k})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(k){return Array.from(r.get("slidesInView")).includes(k)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(fe(F({},ui.root.attrs),{id:a8(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":A,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(fe(F({},ui.itemGroup.attrs),{id:uc(u),"data-orientation":c("orientation"),"data-dragging":lo(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(k){co(k.currentTarget,yr(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){co(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!c("allowMouseDrag")||!ST(k))return;const C=yr(k);Fr(C)&&C!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:L6(k=>{const C=c("orientation")==="horizontal"?"deltaX":"deltaY";k[C]<0&&!s("canScrollPrev")||k[C]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:v,[b?"paddingInline":"paddingBlock"]:v,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const C=r.get("slidesInView").includes(k.index);return t.element(fe(F({},ui.item.attrs),{id:u8(u,k.index),dir:c("dir"),role:"group","data-index":k.index,"data-inview":lo(C),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":w.item(k.index,c("slideCount")),"aria-hidden":gT(!C),style:{scrollSnapAlign:(()=>{var ne;const H=(ne=k.snapAlign)!=null?ne:"start",Y=c("slidesPerMove"),L=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(k.index+L)%L===0?H:void 0})()}}))},getControlProps(){return t.element(fe(F({},ui.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(fe(F({},ui.prevTrigger.attrs),{id:c8(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":w.prevTrigger,"data-orientation":c("orientation"),"aria-controls":uc(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(fe(F({},ui.nextTrigger.attrs),{dir:c("dir"),id:l8(u),type:"button","aria-label":w.nextTrigger,"data-orientation":c("orientation"),"aria-controls":uc(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(fe(F({},ui.indicatorGroup.attrs),{dir:c("dir"),id:d8(u),"data-orientation":c("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const C="indicator",H={ArrowDown(q){b||(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowUp(q){b||(a({type:"PAGE.PREV",src:C}),q.preventDefault())},ArrowRight(q){b&&(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowLeft(q){b&&(a({type:"PAGE.PREV",src:C}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:C}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:C}),q.preventDefault()}},Y=E4(k,{dir:c("dir"),orientation:c("orientation")}),L=H[Y];L==null||L(k)}}))},getIndicatorProps(k){return t.button(fe(F({},ui.indicator.attrs),{dir:c("dir"),id:qb(u,k.index),type:"button","data-orientation":c("orientation"),"data-index":k.index,"data-readonly":lo(k.readOnly),"data-current":lo(k.index===_),"aria-label":w.indicator(k.index),onClick(C){C.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(fe(F({},ui.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":lo(d),"aria-label":d?w.autoplayStop:w.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var p8={props({props:e}){return H6(e,["slideCount"],"carousel"),fe(F({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:F({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:m8(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return x6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Mn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Mn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Gb(e)});return Gb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Mn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};jt(()=>{s(),jt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return Yb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Mn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var b;const p=f.target,m=Number((b=p.dataset.index)!=null?b:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?y6(d,m):T6(d,m)},n.get("slidesInView"));n.set("slidesInView",b6(c))},{root:r,threshold:t("inViewThreshold")});return Yb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Mn(n);return r?Qt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Qt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return O4(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Qt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=pT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=Mn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";s(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Mn(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=dT(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=_6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Mn(r);if(!s)return;const a=s8(s,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=pT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Mn(n);if(!r)return;const s=jb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Mn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Mn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Mn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=jb(r),c=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);jt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=f8(n,e.get("page"));r&&jt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function m8(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}yo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),yo()(["index","readOnly"]),yo()(["index","snapAlign"]);const g8=e=>{const t=B.useId(),{getRootNode:n}=ac(),{dir:r}=ep(),s=F({id:t,dir:r,getRootNode:n},e),a=Wl(p8,s);return h8(a,Lh)},Wb=B.forwardRef((e,t)=>{const[n,r]=Ya()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=g8(n),a=$t(s.getRootProps(),r);return x.jsx(n8,{value:s,children:x.jsx(yn.div,fe(F({},a),{ref:t}))})});Wb.displayName="CarouselRoot";const E8=180,y8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},T8=({globalClassName:e,className:t,itemMinWidth:n=E8,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ne,de)=>({node:ne,key:B.isValidElement(ne)&&ne.key!=null?ne.key:`carousel-item-${de}`})),b=m.length,y=B.useRef(null),[_,A]=B.useState(0),{width:v}=vv();B.useLayoutEffect(()=>{y.current&&A(y.current.getBoundingClientRect().width)},[v,b]);const w=y8(r),k=n+w,C=_>0?(_+w)/k:1,H=Math.max(1,Math.floor(C));if(b===0)return null;const Y=b>H,L=Math.ceil(b/H),q=Y?Math.max(1,C):H;return x.jsxs(Wb,{ref:y,className:G(e,t,`${z}-carousel`),slidesPerPage:q,slidesPerMove:H,spacing:r,loop:s,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":f,children:[x.jsx(Fb,{className:G(e,`${z}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map(({node:ne,key:de},V)=>x.jsx(Mb,{index:V,className:G(e,`${z}-carousel__item`),children:ne},de))}),c&&Y&&x.jsxs(Rb,{className:G(e,`${z}-carousel__control`),children:[x.jsx(Ub,{className:G(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:x.jsx(Q5,{size:"16px"})}),x.jsx(Bb,{className:G(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:x.jsx(J5,{size:"16px"})})]}),u&&Y&&x.jsx(Db,{className:G(e,`${z}-carousel__indicator-group`),children:Array.from({length:L},(ne,de)=>x.jsx(Lb,{index:de,className:G(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${de+1}`},de))})]})},[b8,_8]=gs({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),S8=e=>Ya()(e,["lazyMount","unmountOnExit"]),[x8,Ja]=gs({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Xb=B.forwardRef((e,t)=>{const n=Ja(),r=_8(),s=Fh(fe(F({},r),{present:n.open})),a=$t(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:x.jsx(yn.div,fe(F({},a),{ref:Xl(s.ref,t)}))});Xb.displayName="DialogBackdrop";const np=B.forwardRef((e,t)=>{const n=Ja(),r=qa(),s=$t(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(yn.div,fe(F({},s),{ref:Xl(r.ref,t)}))});np.displayName="DialogContent";const rp=B.forwardRef((e,t)=>{const n=Ja(),r=$t(n.getDescriptionProps(),e);return x.jsx(yn.div,fe(F({},r),{ref:t}))});rp.displayName="DialogDescription";const ip=B.forwardRef((e,t)=>{const n=Ja(),r=$t(n.getPositionerProps(),e);return qa().unmounted?null:x.jsx(yn.div,fe(F({},r),{ref:t}))});ip.displayName="DialogPositioner";var w8=Es("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),_s=w8.build(),Kb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Qb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Jb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},op=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Zb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},lc=e=>e.getById(sp(e)),A8=e=>e.getById(Kb(e)),C8=e=>e.getById(Qb(e)),v8=e=>e.getById(Jb(e)),N8=e=>e.getById(op(e)),k8=e=>e.getById(ap(e)),P8=e=>e.getById(Zb(e));function O8(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(fe(F({},_s.trigger.attrs),{dir:a("dir"),id:Jb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":sp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(fe(F({},_s.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Qb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(fe(F({},_s.positioner.attrs),{dir:a("dir"),id:Kb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(fe(F({},_s.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:sp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:op(u),"aria-describedby":f.description?ap(u):void 0}))},getTitleProps(){return t.element(fe(F({},_s.title.attrs),{dir:a("dir"),id:op(u)}))},getDescriptionProps(){return t.element(fe(F({},_s.description.attrs),{dir:a("dir"),id:ap(u)}))},getCloseTriggerProps(){return t.button(fe(F({},_s.closeTrigger.attrs),{dir:a("dir"),id:Zb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var I8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>P8(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return F({role:"dialog",modal:s,trapFocus:s,preventScroll:s,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return yb(()=>lc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[v8(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return xb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?_b(()=>lc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?lb(()=>[lc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){jt(()=>{e.set("rendered",{title:!!N8(t),description:!!k8(t)})})},syncZIndex({scope:e}){jt(()=>{const t=lc(e);if(!t)return;const n=po(t);[A8(e),C8(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};yo()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const R8=e=>{const t=B.useId(),{getRootNode:n}=ac(),{dir:r}=ep(),s=F({id:t,getRootNode:n,dir:r},e),a=Wl(I8,s);return O8(a,Lh)},e_=e=>{const[t,c]=BT(e),d=c,{children:n}=d,r=dn(d,["children"]),[s]=S8(t),a=R8(r),u=Fh($t({present:a.open},t));return x.jsx(x8,{value:a,children:x.jsx(b8,{value:s,children:x.jsx(DT,{value:u,children:n})})})},t_=B.forwardRef((e,t)=>{const n=Ja(),r=$t(n.getTitleProps(),e);return x.jsx(yn.h2,fe(F({},r),{ref:t}))});t_.displayName="DialogTitle";const L8=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=B.useMemo(()=>({isOpen:t}),[t]);return x.jsx(bh.Provider,{value:r,children:x.jsx(uT.Provider,{value:s,children:e})})},n_=()=>B.useContext(uT),r_=()=>{const e=B.useContext(bh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},D8=`${z}-overflow-menu-button-trigger`,M8=({componentType:e,children:t})=>{const{isOpen:n}=n_(),{closeMenu:r}=r_(),{globalClassName:s}=tt(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${D8}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?x.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:G(`${z}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},F8=({componentType:e,className:t})=>{const{toggleMenu:n}=r_(),{isOpen:r}=n_(),{globalClassName:s}=tt();return x.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:G(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:x.jsx(Pb,{})})},up=()=>{const{status:e,entryType:t}=er(),{messages:n}=tr(),r=t==="ask_cim",s=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&s},B8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{previousComponentType:r}=er(),s=ao(),a=()=>{dl(r||"dialog"),s()};return t?x.jsx(ri,{className:G(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:x.jsx(Ob,{})}):x.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(Ob,{}),"Show ",r||"dialog"]})},U8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{isModalFullscreen:r}=er(),s=ao(),a=()=>{Tf(!r),s()},u=r?BN:UN,c="Toggle Fullscreen";return t?x.jsx(ri,{ariaLabel:c,title:c,className:G(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:x.jsx(u,{}),onClick:a}):x.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(u,{}),c]})},H8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{dialogPosition:r}=er(),s=ao(),a=r==="bottom-left",u=()=>{bf(a?"bottom-right":"bottom-left"),s()},c=a?K5:X5,d=a?"Move right":"Move left";return t?x.jsx(ri,{className:G(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:x.jsx(c,{})}):x.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(c,{}),d]})},i_=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:c}=tt(),{mode:d}=er(),f=u==="messaging"&&c&&!!r,p=d==="standalone",m=e==="modal",b=m?B8:s_,y=m?U8:H8,_=B.useMemo(()=>s?zN(s):{},[s]);return x.jsx(L8,{children:x.jsxs("div",{className:G(a,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[x.jsxs("div",{className:G(a,`${z}-${e}-header`,{standalone:p,embedded:!p}),style:_,children:[(s==null?void 0:s.logoUrl)&&x.jsx("img",{alt:"",role:"img",className:G(a,`${z}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),x.jsx(t_,{className:G(a,`${z}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),x.jsxs("div",{className:G(a,`${z}-${e}-controls`),children:[x.jsx(b,{componentType:e,isIcon:!0}),x.jsx(F8,{componentType:e}),x.jsx(P1,{className:G(a,`cim-${e}-component`),onClick:n})]})]}),x.jsxs(M8,{componentType:e,children:[x.jsx(y,{componentType:e}),x.jsx(V8,{componentType:e}),x.jsx(cT,{componentType:e,onClearChat:t}),f&&x.jsx(z8,{componentType:e,onDownloadTranscript:r})]})]})})},z8=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=tt(),r=ao(),[s,a]=B.useState(!1),u=()=>Ke(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return x.jsxs("button",{className:G(`${z}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[x.jsx(m6,{}),"Download transcript"]})},j8={sparkle:tp,plus:Z5,"paper-plane":e8},lp=({icon:e,className:t})=>{const n=j8[e];return n?x.jsx(n,{className:t,"aria-hidden":"true"}):null},$8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=tt(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},b=_=>x.jsxs(x.Fragment,{children:[c&&x.jsx(lp,{icon:c,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:_})]});return x.jsx("div",{className:G(t,`${z}-suggestion-container ${f}`,e),children:n.map(_=>s?x.jsx(ml,{disabled:r,className:G(t,`${z}-suggestion-button standalone`,m),onClick:p(_),children:b(_)},_):x.jsx("button",{disabled:r,className:G(t,`${z}-suggestion-button embedded`,m),onClick:p(_),children:b(_)},_))})},V8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=tt();if(!r)return null;const s=()=>{ti(!1),ma(!0)};return t?x.jsx(ri,{className:G(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:x.jsx(N1,{})}):x.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[x.jsx(N1,{}),"Minimize"]})},s_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),r=ao(),s=()=>{dl("modal"),r()};return t?x.jsx(ri,{className:G(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:x.jsx(Ib,{})}):x.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[x.jsx(Ib,{}),"Show modal"]})},q8=({isWidgetStandalone:e})=>{var _,A;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:s}=tt(),{askCimPrompts:a,messages:u}=tr(),{isLoading:c,handleSuggestion:d}=Ir(),f=s==null?void 0:s.icon,p=(_=s==null?void 0:s.iconPosition)!=null?_:"left",m=B.useMemo(()=>{const v=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return u.some(k=>k.name==="conversation_reset")&&r||v},[u,n,r]),b=((A=a.message)==null?void 0:A.suggestions)||[],y=(v,w)=>()=>{d(v,w)};return x.jsxs("div",{className:G(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[x.jsx("p",{className:G(t,`${z}-ask-cim-entry-text`),children:m}),!!(b!=null&&b.length)&&x.jsx("div",{className:G(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:b.map(v=>{var w;return x.jsxs(ml,{disabled:c,className:G(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!f,"icon-right":!!f&&p==="right"}),onClick:y(v,((w=a.message)==null?void 0:w.eventSourceId)||""),children:[f&&x.jsx(lp,{icon:f,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:v.displayText})]},v.displayText)})})]})},Y8=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:s}=tt();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),m=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return x.jsxs("div",{className:G(r,`${z}-product-tile`,{embedded:!e,standalone:e}),children:[m?x.jsx("a",{href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:x.jsx("img",{className:G(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):x.jsx("img",{className:G(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),x.jsxs("div",{className:G(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[x.jsxs("div",{className:G(r,`${z}-product-tile-content`),children:[u&&x.jsx("p",{className:`${z}-product-tile-brand`,children:u}),m?x.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:G(r,`${z}-product-tile-pdp`),href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",x.jsx("span",{className:G(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):x.jsx("p",{className:G(r,`${z}-product-tile-name`),title:a,children:a})]}),x.jsx("div",{className:G(r,`${z}-product-tile-footer`),children:x.jsx("p",{className:G(r,`${z}-product-tile-price`),children:c})})]})]})},G8=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=tt(),s=t;return n?x.jsxs("div",{className:G(r,`${z}-display-products`),children:[x.jsx("p",{children:s.message}),s.products&&s.products.length>0&&x.jsx(T8,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:s.products.map(a=>{const u=n.getPid(a);return x.jsx(Y8,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},W8=({globalClassName:e,message:t,isWidgetStandalone:n})=>x.jsx("div",{className:G(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:x.jsxs("p",{className:G(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[x.jsx(DN,{})," ",t.message||"An error occurred while processing your request."]})}),X8=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:s})=>{var _;const{isLoading:a}=Ir(),{messages:u}=tr(),c=u.find(A=>A.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?uA(f):null,b=a||!d||!(d&&(p===t||t==="ask_cim")),y=A=>{const v=n.suggestions.find(w=>w.displayText===A);v&&s(v,n.eventSourceId||n.id)};return x.jsxs("div",{className:G(e,`${z}-follow-up`),children:[x.jsx("p",{className:G(e,`${z}-text`),children:n.message}),x.jsx($8,{suggestions:n.suggestions.map(A=>A.displayText),disabled:b,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function o_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function K8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Q8(e,t,n){const s=Cl((n||{}).ignore||[]),a=J8(t);let u=-1;for(;++u<a.length;)jE(e,"text",c);function c(f,p){let m=-1,b;for(;++m<p.length;){const y=p[m],_=b?b.children:void 0;if(s(y,_?_.indexOf(y):void 0,b))return;b=y}if(b)return d(f,p)}function d(f,p){const m=p[p.length-1],b=a[u][0],y=a[u][1];let _=0;const v=m.children.indexOf(f);let w=!1,k=[];b.lastIndex=0;let C=b.exec(f.value);for(;C;){const H=C.index,Y={index:C.index,input:C.input,stack:[...p,f]};let L=y(...C,Y);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?b.lastIndex=H+1:(_!==H&&k.push({type:"text",value:f.value.slice(_,H)}),Array.isArray(L)?k.push(...L):L&&k.push(L),_=H+C[0].length,w=!0),!b.global)break;C=b.exec(f.value)}return w?(_<f.value.length&&k.push({type:"text",value:f.value.slice(_)}),m.children.splice(v,1,...k)):k=[f],v+k.length}}function J8(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 s=n[r];t.push([Z8(s[0]),eM(s[1])])}return t}function Z8(e){return typeof e=="string"?new RegExp(K8(e),"g"):e}function eM(e){return typeof e=="function"?e:function(){return e}}const cp="phrasing",dp=["autolink","link","image","label"];function tM(){return{transforms:[uM],enter:{literalAutolink:rM,literalAutolinkEmail:fp,literalAutolinkHttp:fp,literalAutolinkWww:fp},exit:{literalAutolink:aM,literalAutolinkEmail:oM,literalAutolinkHttp:iM,literalAutolinkWww:sM}}}function nM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:cp,notInConstruct:dp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:cp,notInConstruct:dp},{character:":",before:"[ps]",after:"\\/",inConstruct:cp,notInConstruct:dp}]}}function rM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function fp(e){this.config.enter.autolinkProtocol.call(this,e)}function iM(e){this.config.exit.autolinkProtocol.call(this,e)}function sM(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 oM(e){this.config.exit.autolinkEmail.call(this,e)}function aM(e){this.exit(e)}function uM(e){Q8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,lM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),cM]],{ignore:["link","linkReference"]})}function lM(e,t,n,r,s){let a="";if(!a_(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!dM(n)))return!1;const u=fM(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function cM(e,t,n,r){return!a_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function dM(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function fM(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 s=o_(e,"(");let a=o_(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function a_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||as(n)||Tl(n))&&(!t||n!==47)}u_.peek=_M;function hM(){this.buffer()}function pM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function mM(){this.buffer()}function gM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function EM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yM(e){this.exit(e)}function TM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bM(e){this.exit(e)}function _M(){return"["}function u_(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=s.move("]"),a}function SM(){return{enter:{gfmFootnoteCallString:hM,gfmFootnoteCall:pM,gfmFootnoteDefinitionLabelString:mM,gfmFootnoteDefinition:gM},exit:{gfmFootnoteCallString:EM,gfmFootnoteCall:yM,gfmFootnoteDefinitionLabelString:TM,gfmFootnoteDefinition:bM}}}function xM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:u_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
32
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?l_:wM))),f(),d}}function wM(e,t,n){return t===0?e:l_(e,t,n)}function l_(e,t,n){return(n?"":" ")+e}const AM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];c_.peek=PM;function CM(){return{canContainEols:["delete"],enter:{strikethrough:NM},exit:{strikethrough:kM}}}function vM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:AM}],handlers:{delete:c_}}}function NM(e){this.enter({type:"delete",children:[]},e)}function kM(e){this.exit(e)}function c_(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,fe(F({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function PM(){return"~"}function OM(e){return e.length}function IM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||OM,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const A=[],v=[];let w=-1;for(e[p].length>f&&(f=e[p].length);++w<e[p].length;){const k=RM(e[p][w]);if(n.alignDelimiters!==!1){const C=s(k);v[w]=C,(d[w]===void 0||C>d[w])&&(d[w]=C)}A.push(k)}u[p]=A,c[p]=v}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=d_(r[m]);else{const A=d_(r);for(;++m<f;)a[m]=A}m=-1;const b=[],y=[];for(;++m<f;){const A=a[m];let v="",w="";A===99?(v=":",w=":"):A===108?v=":":A===114&&(w=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[m]-v.length-w.length);const C=v+"-".repeat(k)+w;n.alignDelimiters!==!1&&(k=v.length+k+w.length,k>d[m]&&(d[m]=k),y[m]=k),b[m]=C}u.splice(1,0,b),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const A=u[p],v=c[p];m=-1;const w=[];for(;++m<f;){const k=A[m]||"";let C="",H="";if(n.alignDelimiters!==!1){const Y=d[m]-(v[m]||0),L=a[m];L===114?C=" ".repeat(Y):L===99?Y%2?(C=" ".repeat(Y/2+.5),H=" ".repeat(Y/2-.5)):(C=" ".repeat(Y/2),H=C):H=" ".repeat(Y)}n.delimiterStart!==!1&&!m&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&w.push(" "),n.alignDelimiters!==!1&&w.push(C),w.push(k),n.alignDelimiters!==!1&&w.push(H),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&w.push("|")}_.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return _.join(`
33
+ `)}function RM(e){return e==null?"":String(e)}function d_(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function LM(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),DM);return s(),u}function DM(e,t,n){return">"+(n?"":" ")+e}function MM(e,t){return f_(e,t.inConstruct,!0)&&!f_(e,t.notInConstruct,!1)}function f_(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function h_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
34
+ `&&MM(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
+ `}function FM(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>u&&(u=a):a=1,s=r+t.length,r=n.indexOf(t,s);return u}function BM(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function UM(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function HM(e,t,n,r){const s=UM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(BM(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,zM);return m(),b}const c=n.createTracker(r),d=s.repeat(Math.max(FM(a,s)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,F({before:p,after:" ",encode:["`"]},c.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,F({before:p,after:`
36
36
  `,encode:["`"]},c.current()))),m()}return p+=c.move(`
37
37
  `),a&&(p+=c.move(a+`
38
- `)),p+=c.move(d),f(),p}function BM(e,t,n){return(n?"":" ")+e}function fp(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 UM(e,t,n,r){const s=fp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),F({before:f,after:"]"},d.current()))),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,F({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({before:f,after:e.title?" ":`
39
- `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,F({before:f,after:s},d.current()))),f+=d.move(s),c()),u(),f}function HM(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ja(e){return"&#x"+e.toString(16).toUpperCase()+";"}function cc(e,t,n){const r=to(e),s=to(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}h_.peek=zM;function h_(e,t,n,r){const s=HM(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(s);let d=u.move(n.containerPhrasing(e,F({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=cc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Ja(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=cc(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Ja(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function zM(e,t,n){return n.options.emphasis||"*"}function jM(e,t){let n=!1;return kl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Yf}),!!((!e.depth||e.depth<3)&&Df(e)&&(t.options.setext||n))}function $M(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(jM(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,de(F({},a.current()),{before:`
38
+ `)),p+=c.move(d),f(),p}function zM(e,t,n){return(n?"":" ")+e}function hp(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 jM(e,t,n,r){const s=hp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),F({before:f,after:"]"},d.current()))),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,F({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({before:f,after:e.title?" ":`
39
+ `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,F({before:f,after:s},d.current()))),f+=d.move(s),c()),u(),f}function $M(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Za(e){return"&#x"+e.toString(16).toUpperCase()+";"}function cc(e,t,n){const r=to(e),s=to(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}p_.peek=VM;function p_(e,t,n,r){const s=$M(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(s);let d=u.move(n.containerPhrasing(e,F({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=cc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Za(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=cc(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Za(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function VM(e,t,n){return n.options.emphasis||"*"}function qM(e,t){let n=!1;return Nl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Gf}),!!((!e.depth||e.depth<3)&&Mf(e)&&(t.options.setext||n))}function YM(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(qM(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,fe(F({},a.current()),{before:`
40
40
  `,after:`
41
41
  `}));return m(),p(),b+`
42
42
  `+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
43
43
  `))+1))}const u="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,F({before:"# ",after:`
44
- `},a.current()));return/^[\t ]/.test(f)&&(f=Ja(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}p_.peek=VM;function p_(e){return e.value||""}function VM(){return"<"}m_.peek=qM;function m_(e,t,n,r){const s=fp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,F({before:f,after:"]"},d.current()))),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,F({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,F({before:f,after:s},d.current()))),f+=d.move(s),c()),f+=d.move(")"),u(),f}function qM(){return"!"}g_.peek=YM;function g_(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,F({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function YM(){return"!"}E_.peek=GM;function E_(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function GM(){return"`"}function y_(e,t){const n=Df(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}T_.peek=WM;function T_(e,t,n,r){const s=fp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(y_(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,F({before:m,after:">"},u.current()))),m+=u.move(">"),c(),n.stack=p,m}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,F({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,F({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,F({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,F({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),c(),f}function WM(e,t,n){return y_(e,n)?"<":"["}b_.peek=XM;function b_(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,F({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function XM(){return"["}function hp(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 KM(e){const t=hp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function QM(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function __(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function JM(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?QM(n):hp(n);const c=e.ordered?u==="."?")":".":KM(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),__(n)===u&&p){let m=-1;for(;++m<e.children.length;){const b=e.children[m];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function ZM(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function eF(e,t,n,r){const s=ZM(n);let a=n.bulletCurrent||hp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),p);return d(),f;function p(m,b,y){return b?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function tF(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const nF=Cl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function rF(e,t,n,r){return(e.children.some(function(u){return nF(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function iF(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}S_.peek=sF;function S_(e,t,n,r){const s=iF(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(s+s);let d=u.move(n.containerPhrasing(e,F({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=cc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Ja(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=cc(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Ja(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function sF(e,t,n){return n.options.strong||"*"}function oF(e,t,n,r){return n.safe(e.value,r)}function aF(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function uF(e,t,n){const r=(__(n)+(n.options.ruleSpaces?" ":"")).repeat(aF(n));return n.options.ruleSpaces?r.slice(0,-1):r}const x_={blockquote:OM,break:f_,code:FM,definition:UM,emphasis:h_,hardBreak:f_,heading:$M,html:p_,image:m_,imageReference:g_,inlineCode:E_,link:T_,linkReference:b_,list:JM,listItem:eF,paragraph:tF,root:rF,strong:S_,text:oF,thematicBreak:uF};function lF(){return{enter:{table:cF,tableData:w_,tableHeader:w_,tableRow:fF},exit:{codeText:hF,table:dF,tableData:pp,tableHeader:pp,tableRow:pp}}}function cF(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function dF(e){this.exit(e),this.data.inTable=void 0}function fF(e){this.enter({type:"tableRow",children:[]},e)}function pp(e){this.exit(e)}function w_(e){this.enter({type:"tableCell",children:[]},e)}function hF(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,pF));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function pF(e,t){return t==="|"?t:e}function mF(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
45
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:u,tableCell:d,tableRow:c}};function u(y,_,A,v){return f(p(y,A,v),y.align)}function c(y,_,A,v){const w=m(y,A,v),N=f([w]);return N.slice(0,N.indexOf(`
46
- `))}function d(y,_,A,v){const w=A.enter("tableCell"),N=A.enter("phrasing"),C=A.containerPhrasing(y,de(F({},v),{before:a,after:a}));return N(),w(),C}function f(y,_){return NM(y,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(y,_,A){const v=y.children;let w=-1;const N=[],C=_.enter("table");for(;++w<v.length;)N[w]=m(v[w],_,A);return C(),N}function m(y,_,A){const v=y.children;let w=-1;const N=[],C=_.enter("tableRow");for(;++w<v.length;)N[w]=d(v[w],y,_,A);return C(),N}function b(y,_,A){let v=x_.inlineCode(y,_,A);return A.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function gF(){return{exit:{taskListCheckValueChecked:A_,taskListCheckValueUnchecked:A_,paragraph:yF}}}function EF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:TF}}}function A_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function yF(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,u;for(;++a<s.length;){const c=s[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function TF(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=x_.listItem(e,t,n,F(F({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function bF(){return[J8(),TM(),xM(),lF(),gF()]}function _F(e){return{extensions:[Z8(),bM(e),wM(),mF(e),EF()]}}const SF={tokenize:kF,partial:!0},C_={tokenize:NF,partial:!0},v_={tokenize:PF,partial:!0},k_={tokenize:OF,partial:!0},xF={tokenize:IF,partial:!0},N_={name:"wwwAutolink",tokenize:CF,previous:O_},P_={name:"protocolAutolink",tokenize:vF,previous:I_},li={name:"emailAutolink",tokenize:AF,previous:R_},$r={};function wF(){return{text:$r}}let Ss=48;for(;Ss<123;)$r[Ss]=li,Ss++,Ss===58?Ss=65:Ss===91&&(Ss=97);$r[43]=li,$r[45]=li,$r[46]=li,$r[95]=li,$r[72]=[li,P_],$r[104]=[li,P_],$r[87]=[li,N_],$r[119]=[li,N_];function AF(e,t,n){const r=this;let s,a;return u;function u(m){return!mp(m)||!R_.call(r,r.previous)||gp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return mp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(xF,p,f)(m):m===45||m===95||gn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&An(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function CF(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!O_.call(r,r.previous)||gp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(SF,e.attempt(C_,e.attempt(v_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function vF(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&I_.call(r,r.previous)&&!gp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(An(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||yl(m)||ft(m)||as(m)||Tl(m)?n(m):e.attempt(C_,e.attempt(v_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function kF(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function NF(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(k_,d,c)(f):f===null||ft(f)||as(f)||f!==45&&Tl(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function PF(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(k_,t,a)(u):u===null||ft(u)||as(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function OF(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),s):c===60||c===null||ft(c)||as(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||ft(c)||as(c)?t(c):r(c)}function a(c){return An(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):An(c)?(e.consume(c),u):n(c)}}function IF(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return gn(a)?n(a):t(a)}}function O_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function I_(e){return!An(e)}function R_(e){return!(e===47||mp(e))}function mp(e){return e===43||e===45||e===46||e===95||gn(e)}function gp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const RF={tokenize:zF,partial:!0};function LF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:BF,continuation:{tokenize:UF},exit:HF}},text:{91:{name:"gfmFootnoteCall",tokenize:FF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:DF,resolveTo:MF}}}}function DF(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=gr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function MF(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function FF(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||ft(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(gr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ft(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function BF(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!c||_===null||_===91||ft(_))return n(_);if(_===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=gr(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ft(_)||(c=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),s.includes(a)||s.push(a),nt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function UF(e,t,n){return e.check(wa,t,e.attempt(RF,t,n))}function HF(e){e.exit("gfmFootnoteDefinition")}function zF(e,t,n){const r=this;return nt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function jF(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&qn(b,b.length,0,bl(y,u.slice(f+1,d),c)),qn(b,b.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),qn(u,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const f=this.previous,p=this.events;let m=0;return b;function b(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const A=to(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const v=u.exit("strikethroughSequenceTemporary"),w=to(_);return v._open=!w||w===2&&!!A,v._close=!A||A===2&&!!w,c(_)}}}class $F{constructor(){this.map=[]}add(t,n,r){VF(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function VF(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function qF(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function YF(){return{flow:{null:{name:"table",tokenize:GF,resolveAll:WF}}}}function GF(e,t,n){const r=this;let s=0,a=0,u;return c;function c(V){let se=r.events.length-1;for(;se>-1;){const re=r.events[se][1].type;if(re==="lineEnding"||re==="linePrefix")se--;else break}const he=se>-1?r.events[se][1].type:null,ve=he==="tableHead"||he==="tableRow"?R:d;return ve===R&&r.parser.lazy[r.now().line]?n(V):ve(V)}function d(V){return e.enter("tableHead"),e.enter("tableRow"),f(V)}function f(V){return V===124||(u=!0,a+=1),p(V)}function p(V){return V===null?n(V):Be(V)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),y):n(V):Ze(V)?nt(e,p,"whitespace")(V):(a+=1,u&&(u=!1,s+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||ft(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?b:m)}function b(V){return V===92||V===124?(e.consume(V),m):m(V)}function y(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),u=!1,Ze(V)?nt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):_(V))}function _(V){return V===45||V===58?v(V):V===124?(u=!0,e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),A):Y(V)}function A(V){return Ze(V)?nt(e,v,"whitespace")(V):v(V)}function v(V){return V===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),w):V===45?(a+=1,w(V)):V===null||Be(V)?U(V):Y(V)}function w(V){return V===45?(e.enter("tableDelimiterFiller"),N(V)):Y(V)}function N(V){return V===45?(e.consume(V),N):V===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(V))}function C(V){return Ze(V)?nt(e,U,"whitespace")(V):U(V)}function U(V){return V===124?_(V):V===null||Be(V)?!u||s!==a?Y(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):Y(V)}function Y(V){return n(V)}function R(V){return e.enter("tableRow"),q(V)}function q(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),q):V===null||Be(V)?(e.exit("tableRow"),t(V)):Ze(V)?nt(e,q,"whitespace")(V):(e.enter("data"),ne(V))}function ne(V){return V===null||V===124||ft(V)?(e.exit("data"),q(V)):(e.consume(V),V===92?me:ne)}function me(V){return V===92||V===124?(e.consume(V),ne):ne(V)}}function WF(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const b=new $F;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(L_(b,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",p,t]])),s=_.type==="tableDelimiterRow"?2:p?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=dc(b,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=dc(b,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=dc(b,t,a,s,n,m)):u[1]!==0&&(m=dc(b,t,u,s,n,m)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&L_(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=qF(t.events,n))}return e}function dc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},vo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=vo(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=vo(t.events,n[2]),p=vo(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,A=n[3]-n[2]-1;e.add(_,A,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},vo(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function L_(e,t,n,r,s){const a=[],u=vo(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function vo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const XF={name:"tasklistCheck",tokenize:QF};function KF(){return{text:{91:XF}}}function QF(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return ft(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Be(d)?t(d):Ze(d)?e.check({tokenize:JF},t,n)(d):n(d)}}function JF(e,t,n){return nt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function ZF(e){return aE([wF(),LF(),jF(e),YF(),KF()])}const e9={};function t9(e){const t=this,n=e||e9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(ZF(n)),a.push(bF()),u.push(_F(n))}const fc=()=>x.jsx("span",{className:`${z}-blinking-cursor`,children:x.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Ep=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>x.jsx(JE,{remarkPlugins:[t9],rehypePlugins:[Zy],components:{h1:({children:s})=>x.jsx("h1",{className:G(e,`${z}-header h1`),children:s}),h2:({children:s})=>x.jsx("h2",{className:G(e,`${z}-header h2`),children:s}),h3:({children:s})=>x.jsx("h3",{className:G(e,`${z}-header h3`),children:s}),ul:({children:s})=>x.jsx("ul",{className:G(e,`${z}-ul`),children:s}),ol:({children:s})=>x.jsx("ol",{className:G(e,`${z}-ol`),children:s}),li:({children:s})=>x.jsx("li",{className:G(e,`${z}-li`),children:s}),a:({href:s,children:a})=>x.jsx(oT,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>x.jsx("div",{className:G(e,`${z}-table-container`),children:x.jsx("table",{className:G(e,`${z}-table`),children:s})}),thead:({children:s})=>x.jsx("thead",{className:G(e,`${z}-thead`),children:s}),tbody:({children:s})=>x.jsx("tbody",{className:G(e,`${z}-tbody`),children:s}),tr:({children:s})=>x.jsx("tr",{className:G(e,`${z}-tr`),children:s}),th:({children:s})=>x.jsx("th",{className:G(e,`${z}-th`),children:s}),td:({children:s})=>x.jsx("td",{className:G(e,`${z}-td`),children:s}),span:({className:s,children:a})=>s===`${z}-blinking-cursor`?x.jsx(fc,{}):x.jsx("span",{children:a})},children:r+(n?`<span className='${z}-blinking-cursor'></span>`:"")}),n9=({globalClassName:e,message:t})=>{const[n,r]=B.useState(!1),s=t.tool_name||t.toolName,a=!!t.thought,u=!!s,c=()=>{r(d=>!d)};return x.jsxs("div",{children:[x.jsxs("div",{className:G(e,`${z}-progress-message`,"standalone"),children:[x.jsx("span",{className:G(e,`${z}-message-icon`,"progress-icon","standalone"),children:x.jsx(C1,{})}),x.jsx("p",{className:G(e,`${z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&x.jsxs(x.Fragment,{children:[x.jsx(ml,{className:G(e,`${z}-thought-context-button`),onClick:c,children:n?x.jsxs(x.Fragment,{children:["Hide ",x.jsx(Rk,{})]}):x.jsxs(x.Fragment,{children:["Context ",x.jsx(Lk,{})]})}),n&&x.jsx("div",{className:G(e,`${z}-thought-container`),children:a&&x.jsx("p",{className:G(e,`${z}-progress-thought`),children:t.thought})})]})]})},r9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?x.jsx(n9,{globalClassName:e,message:t}):x.jsxs("div",{className:G(e,`${z}-progress-message`,"embedded"),title:t.message,children:[x.jsx("span",{className:G(e,`${z}-message-icon`,"progress-icon","embedded"),children:x.jsx(C1,{})}),x.jsx("i",{className:G(e,`${z}-progress-text`,"embedded"),children:t.message})]}),i9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var s;const r=(s=t.searchParams)==null?void 0:s.query;return x.jsxs("div",{className:G(e,`${z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&x.jsxs("div",{className:G(e,`${z}-refined-event-query`,{embedded:!n,standalone:n}),children:[x.jsx("span",{className:G(e,`${z}-message-icon`,`${z}-refined-event-icon`,{embedded:!n,standalone:n}),children:x.jsx(Qs,{role:"img"})}),x.jsx("p",{className:G(e,`${z}-text`,`${z}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),x.jsx(Ep,{text:t.message})]})},D_=e=>{var d,f;const{configModule:t}=tt(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:s={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(s).filter(([p])=>!r.includes(p))),u=Object.keys(a),c=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:c}},hc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>x.jsx("span",{className:G(t,`${z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),M_=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),s=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=s[c])==null?void 0:f.join(", "))||"";return x.jsxs("div",{className:G(e,`${z}-facets`),children:[x.jsx("p",{className:G(e,`${z}-facet-category`),children:c}),x.jsx("p",{className:G(e,`${z}-facet-values`),children:d})]},c)})},Za=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>x.jsx("span",{className:G(e,`${z}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),s9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:s}=t,{facetFiltersList:a,filterCount:u}=D_(t),c=new Date(s).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?x.jsxs("div",{className:G(e,`${z}-user-message standalone`),children:[x.jsxs("div",{className:G(e,`${z}-user-message-row standalone`),children:[d?x.jsx("img",{className:G(e,`${z}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):x.jsx("span",{className:G(e,`${z}-message-icon user-message-icon standalone`),children:x.jsx(k1,{})}),x.jsx("p",{className:G(e,`${z}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&x.jsx(hc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),x.jsx(M_,{globalClassName:e,facetFiltersList:a,message:t}),x.jsx(Za,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):x.jsxs("div",{className:G(e,`${z}-user-message embedded`),children:[x.jsxs("div",{className:G(e,`${z}-user-message-row embedded`),children:[d?x.jsx("img",{className:G(e,`${z}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):x.jsx("span",{className:G(e,`${z}-message-icon user-message-icon embedded`),children:x.jsx(k1,{})}),x.jsx("p",{className:G(e,`${z}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&x.jsx(hc,{isWidgetStandalone:!1,filterCount:u})]}),x.jsx(Za,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},o9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:s,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>x.jsxs("div",{className:G(e,`${z}-user-search standalone`),children:[x.jsxs("div",{children:[x.jsxs("div",{className:G(e,`${z}-user-search-query standalone`),children:[d?x.jsx("img",{className:G(e,`${z}-user-search-image standalone`),src:d,alt:s||r,loading:"lazy"}):x.jsx("span",{className:G(e,`${z}-message-icon user-search-icon standalone`),children:x.jsx(Qs,{})}),x.jsx("p",{className:G(e,`${z}-text bold`),children:`${n}: ${s||r}`}),u.length>0&&x.jsx(hc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),x.jsx(M_,{globalClassName:e,facetFiltersList:u,message:a})]}),x.jsx(Za,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),a9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:s,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=D_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:m,queryLabel:b}=B.useMemo(()=>{var A,v,w;const _=typeof((A=r==null?void 0:r.clientContext)==null?void 0:A.cimLabel)=="string"?(v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel:r==null?void 0:r.label;switch(s){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(w=r==null?void 0:r.browseParams)==null?void 0:w.categoryId,queryLabel:_||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:_||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[s,r]);return m?n?x.jsx(o9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:b,facetFiltersList:u,filterCount:c}):x.jsxs("div",{className:G(e,`${z}-user-search embedded`),children:[x.jsxs("div",{className:G(e,`${z}-user-search-query embedded`),children:[f?x.jsx("img",{className:G(e,`${z}-user-search-image embedded`),src:f,alt:b||m,loading:"lazy"}):x.jsx("span",{className:G(e,`${z}-message-icon user-search-icon embedded`),children:x.jsx(Qs,{})}),x.jsx("p",{className:G(e,`${z}-text bold embedded`),children:b||m}),u.length>0&&x.jsx(hc,{isWidgetStandalone:!1,filterCount:c})]}),x.jsx(Za,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},F_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:s,isWidgetStandalone:a,handleSuggestionClick:u})=>{var b;const{isLoading:c,isResponseLoading:d}=Ir(),f=c&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const p=e.name,m=!!((b=e.request)!=null&&b.userPrompt);switch(p){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return m?x.jsx(s9,{globalClassName:t,isWidgetStandalone:a,message:e}):x.jsx(a9,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return x.jsx(i9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return x.jsx(Y8,{globalClassName:t,entryType:s,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return x.jsx(Ep,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return x.jsx(q8,{message:e,isWidgetStandalone:a});case"display_products":return x.jsx(V8,{message:e,isWidgetStandalone:a});case"progress":return x.jsx(r9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return s==="ask_cim"?null:x.jsxs(x.Fragment,{children:[x.jsx("p",{className:G(t,`${z}-reset-message`),children:"This conversation has been reset."}),x.jsx("p",{className:G(t,`${z}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},u9=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:s}=tt(),{groupedMessages:a}=tr(),{entryType:u}=er();return x.jsxs(x.Fragment,{children:[u==="ask_cim"&&x.jsx(j8,{isWidgetStandalone:e}),a.map(c=>{if(c.messages&&c.type==="group"){let d=new Date(c.createdAt).toLocaleString();const f=c.messages[c.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),x.jsxs("div",{className:G(n,`${z}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>x.jsx("div",{className:`${z}-message-group-child`,children:x.jsx(F_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),x.jsx(Za,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return x.jsx("div",{className:G(n,`${z}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:x.jsx(F_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},l9=({isOpen:e}={})=>{const{messages:t}=Ir(),{autoScroll:n}=tt(),r=B.useRef(null);return B.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),B.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},c9={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},yp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:s})=>{const a=l9({isOpen:e});return x.jsxs(x.Fragment,{children:[x.jsx(u9,{isWidgetStandalone:t,handleSuggestionClick:r}),n&&x.jsx("div",{style:F(F({},c9),s),children:x.jsx(fc,{})}),x.jsx("div",{ref:a})]})},B_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{copilot:r,isLoading:s,handleUserInput:a,handleSuggestion:u,resetConversation:c}=Ir();return ap()?r?x.jsxs("div",{className:G(e,`${z}-container`,`${z}-embedded-chat`),style:t,children:[x.jsx("div",{className:G(e,`${z}-message-container`,`container-${n}`,"embedded"),children:x.jsx(yp,{isWidgetStandalone:!1,isLoading:s,handleSuggestionClick:u})}),x.jsx(yh,{componentType:"chat",className:"embedded-chat",isLoading:s,onSubmit:a}),x.jsx("div",{className:G(`${z}-embedded-chat-menu`),children:x.jsxs(J5,{componentType:"chat",children:[x.jsx(i_,{componentType:"chat"}),x.jsx(lT,{componentType:"chat",onClearChat:c})]})})]}):x.jsx("div",{children:"Loading Copilot..."}):null},U_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=B.useState((d=e.container)==null?void 0:d.current),a=B.useSyncExternalStore(f9,()=>!1,()=>!0),{getRootNode:u}=ac();if(B.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return x.jsx(x.Fragment,{children:t});const c=r!=null?r:d9(u);return x.jsx(x.Fragment,{children:B.Children.map(t,f=>Ks.createPortal(f,c))})},d9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ps(n)?n:Mr(t).body},f9=()=>()=>{},H_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=er(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:b}=Ir(),y=ap(),{isOpen:_}=s||{},A=r==="standalone",v=()=>{ti(!1)};return y?d?x.jsx(Zb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,children:x.jsx(U_,{children:x.jsx(rp,{className:G(e,`${z}-container`,`${z}-dialog`,a,u&&"full-height"),style:F(F({},t),c&&{width:c}),children:x.jsxs(tp,{className:G(e,`${z}-dialog-content`,{standalone:A,embedded:!A}),children:[x.jsx(r_,{componentType:"dialog",onClearChat:b,onClose:v}),x.jsx(np,{className:G(e,`${z}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:x.jsx(yp,{isWidgetStandalone:A,isLoading:f,isOpen:_,handleSuggestionClick:m})}),x.jsx(yh,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):x.jsx("div",{children:"Loading Copilot..."}):null},z_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{mode:r,status:s,isModalFullscreen:a}=er(),{copilot:u,isLoading:c,handleUserInput:d,handleSuggestion:f,resetConversation:p}=Ir(),{isOpen:m}=s||{},b=r==="standalone",y=ap(),_=({open:v})=>{ti(v)},A=()=>{ti(!1)};return y?u?x.jsx(Zb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:_,children:x.jsx(U_,{children:x.jsxs("div",{className:G(e,`${z}-modal-container`),style:t,children:[x.jsx(Wb,{className:G(e,`${z}-modal-backdrop`)}),x.jsx(rp,{className:G(e,`${z}-container`,`${z}-modal`,{fullscreen:a,standalone:b,embedded:!b}),children:x.jsxs(tp,{className:G(e,`${z}-modal-content`,{standalone:b,embedded:!b}),children:[x.jsx(r_,{componentType:"modal",onClearChat:p,onClose:A}),x.jsx(np,{className:G(e,`${z}-message-container`,`container-${n}`,{standalone:b,embedded:!b}),children:x.jsx(yp,{isWidgetStandalone:b,isLoading:c,isOpen:m,handleSuggestionClick:f,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),x.jsx(yh,{componentType:"modal",isLoading:c,onSubmit:d})]})})]})})}):x.jsx("div",{children:"Loading Copilot..."}):null},h9=()=>{const e=er(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?x.jsx(Ok,{}):t==="dialog"?x.jsx(H_,{}):t==="modal"?x.jsx(z_,{}):x.jsx(B_,{})},p9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=_f();B.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&s(d))};return Hv(a),()=>{zv(a)}},[e,t,n,r,s])},m9=()=>{const{copilot:e}=tr(),{entryType:t,activePromptsId:n,params:r}=ni(),{setIsInitialized:s,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:c,setIsResponseLoading:d}=_f(),{getCopilotSuggestions:f}=p1();p9();const p=B.useCallback(_=>{if(!t||!_)return;f(_,t,v=>{a(v.id)})},[t,f,a]);B.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=B.useCallback(_=>{_.eventSourceId===n&&(u(_),a(_.id),s(!0))},[n,u,a,s]),b=B.useCallback(_=>{(_==null?void 0:_.eventSourceId)===n&&(c(_),d(!1))},[n,c,d]),y=B.useCallback(()=>{s(!0),d(!1)},[s,d]);return B.useEffect(()=>{if(e)return e.on("follow_up",m),e.on("inquiry",b),e.on("error",y),()=>{e.off("follow_up",m),e.off("inquiry",b),e.off("error",y)}},[e,m,b,y]),null},j_={copilot:"Ask Copilot",messaging:"Ask a question"},g9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=tt(),{placeholder:s,isResponseLoading:a}=ni(),u=s||j_[r],[c,d]=B.useState(""),f=t||a,p=m=>{const b=c.trim();b&&(m.preventDefault(),e(b),d(""))};return x.jsxs("form",{className:G(n,`${z}-prompts-input-container`),name:`${z}-prompts-form`,onSubmit:p,children:[x.jsx("label",{htmlFor:`${z}-prompts-input`,"aria-label":u,children:x.jsx(ep,{className:G(n,`${z}-prompts-input-icon`)})}),x.jsx("input",{id:`${z}-prompts-input`,className:G(n,`${z}-prompts-input`),name:`${z}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),x.jsx(ri,{className:G(n,`${z}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:x.jsx(Qs,{}),disabled:f})]})},E9=()=>{const{globalClassName:e,mode:t}=tt(),{placeholder:n}=ni(),r=n||j_[t];return x.jsxs("div",{className:G(e,`${z}-prompts-header`),children:[x.jsx(ep,{className:G(e,`${z}-prompts-input-icon`),"aria-hidden":"true"}),x.jsx("span",{className:G(e,`${z}-prompts-header-text`),children:r})]})},$_=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:s}=tt(),a=s==null?void 0:s.icon,u=(c=s==null?void 0:s.iconPosition)!=null?c:"left";return x.jsxs("button",{className:G(r,`${z}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&x.jsx(up,{icon:a,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:e})]})},y9="Ask me something else",T9=({label:e,disabled:t=!1})=>x.jsx($_,{label:e||y9,disabled:t,onClick:()=>ti(!0)}),b9=({sendCopilotPrompt:e})=>{var N,C;const{globalClassName:t}=tt(),{promptsMessage:n,isResponseLoading:r,isInitialized:s,isInline:a,askElseButtonLabel:u,staticQuestions:c,staticQuestionsStrategy:d,disableAskElseButton:f}=ni(),p=d==="override"&&c.length>0,m=s?(C=(N=n==null?void 0:n.suggestions)==null?void 0:N.map(U=>U.displayText.trim()).filter(Boolean))!=null?C:[]:[];let b;p?b=c:d==="prepend"?b=[...c,...m]:b=[...m,...c];const y=s?Array.from(new Set(b)):[],_=!s,v=y.length>0&&!a&&!f,w=U=>()=>{const Y=U.trim();Y&&e(Y)};return x.jsxs("div",{className:G(t,`${z}-prompts-button-group`),children:[_&&x.jsx(fc,{}),y.map(U=>x.jsx($_,{label:U,disabled:r,onClick:w(U)},U)),v&&x.jsx(T9,{label:u,disabled:r})]})},_9=()=>{const{globalClassName:e}=tt(),{isInline:t,userPrompt:n}=ni();return!n||!t?null:x.jsx("div",{className:G(e,`${z}-prompts-user-message-container`),children:x.jsx("p",{className:G(e,`${z}-prompts-user-message`),children:n})})},S9=()=>{const{globalClassName:e,openLinksInNewTab:t}=tt(),{isInline:n,responseMessage:r,isResponseLoading:s}=ni();return!n||!r&&!s?null:s?x.jsx(fc,{}):r?x.jsx("div",{className:G(e,`${z}-prompts-response-container`,`${z}-message-container`),children:x.jsx(Ep,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},x9=()=>{const{globalClassName:e,themeVariables:t}=tt(),{connected:n,copilot:r}=tr(),{handleCopilotRequestAck:s}=Xs(),{status:{isOpen:a}}=er(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p,promptsDisplay:m}=ni(),b=m!=="buttons",y=m!=="input",{setActivePromptsId:_,setUserPrompt:A,setResponseMessage:v,setIsResponseLoading:w}=_f(),[N,C]=B.useState(null);B.useEffect(()=>{if(!d||N)return;const Y=document.getElementById(d);Y&&C(Y)},[d,N]);const U=B.useCallback(Y=>{if(!r||!f||!p)return;const R=ne=>{c?(v(null),A(Y),_(ne.id),w(!0)):(a||ti(!0),s(ne))},q={userPrompt:Y,clientContext:F({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(q,R);break;case"search":r.search(F({searchParams:p},q),R);break;case"browse":r.browse(F({browseParams:p},q),R);break;case"pdp":r.productView(F(F({},p),q),R);break}},[r,c,f,p,a,_,v,A,w,s]);return!n||!u||!N||!f?null:Ks.createPortal(x.jsxs("div",{className:G(e,`${z}-prompts-extension-container`),style:t,children:[b&&x.jsx(g9,{onSubmit:U}),!b&&x.jsx(E9,{}),y&&x.jsx(b9,{sendCopilotPrompt:U}),x.jsxs("div",{className:G(e,`${z}-prompts-extension-messages-container`),children:[x.jsx(_9,{}),x.jsx(S9,{})]})]}),N)},w9=()=>x.jsxs(x.Fragment,{children:[x.jsx(m9,{}),x.jsx(x9,{})]}),Tp=e=>x.jsxs(m1,de(F({},e),{children:[x.jsx(h9,{}),x.jsx(w9,{})]}));var pc={},V_;function A9(){if(V_)return pc;V_=1;var e=b1();return pc.createRoot=e.createRoot,pc.hydrateRoot=e.hydrateRoot,pc}var q_=A9();const C9=r=>{var s=r,{elementId:e,timeout:t=5e3}=s,n=dn(s,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const m of d)if(m.type==="childList"&&m.addedNodes.length)for(const b of m.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(Ws(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=q_.createRoot(b))==null||p.render(x.jsx(Tp,F({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ws(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},v9=r=>{var s=r,{timeout:e,elementId:t}=s,n=dn(s,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ws(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Ws(!0,"warn","Container element not found for id:",t),Ws(!0,"warn","Beginning observation for element"),C9(F({elementId:t,timeout:e},n));return}q_.createRoot(a).render(x.jsx(Tp,F({},n)))},k9={search:Zv,browse:Dv,pdp:{setPdpContext:Zg,updatePdpProductId:Fv,updatePdpLink:Bv},components:{setEntryType:pa,toggleWidgetOpen:ti,toggleWidgetMinimized:cl,toggleModalFullscreen:yf,setWidgetType:dl,setWidgetDialogPosition:Tf,togglePromptsExtensionOpen:t1,togglePromptsExtensionInline:n1,loadPromptsComponent:Yv,getAskCimPrompts:jv,getSearchPrompts:$v,getBrowsePrompts:Vv,getProductViewPrompts:qv},session:Gv},N9=()=>Object.freeze({search:Object.freeze(Tt.state),browse:Object.freeze(at.state),pdp:Object.freeze(mr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType});De.CopilotDialog=H_,De.CopilotEmbed=B_,De.CopilotModal=z_,De.CopilotWidget=Tp,De.CopilotWidgetProvider=m1,De.eventHandlers=k9,De.injectCopilotWidget=v9,De.state=N9,De.useCopilot=Ir,Object.defineProperty(De,Symbol.toStringTag,{value:"Module"})}));
44
+ `},a.current()));return/^[\t ]/.test(f)&&(f=Za(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}m_.peek=GM;function m_(e){return e.value||""}function GM(){return"<"}g_.peek=WM;function g_(e,t,n,r){const s=hp(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,F({before:f,after:"]"},d.current()))),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,F({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,F({before:f,after:s},d.current()))),f+=d.move(s),c()),f+=d.move(")"),u(),f}function WM(){return"!"}E_.peek=XM;function E_(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,F({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function XM(){return"!"}y_.peek=KM;function y_(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function KM(){return"`"}function T_(e,t){const n=Mf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}b_.peek=QM;function b_(e,t,n,r){const s=hp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(T_(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,F({before:m,after:">"},u.current()))),m+=u.move(">"),c(),n.stack=p,m}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,F({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,F({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,F({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,F({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),c(),f}function QM(e,t,n){return T_(e,n)?"<":"["}__.peek=JM;function __(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,F({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function JM(){return"["}function pp(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 ZM(e){const t=pp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function eF(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function S_(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function tF(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?eF(n):pp(n);const c=e.ordered?u==="."?")":".":ZM(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),S_(n)===u&&p){let m=-1;for(;++m<e.children.length;){const b=e.children[m];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function nF(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function rF(e,t,n,r){const s=nF(n);let a=n.bulletCurrent||pp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),p);return d(),f;function p(m,b,y){return b?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function iF(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const sF=Cl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function oF(e,t,n,r){return(e.children.some(function(u){return sF(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function aF(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}x_.peek=uF;function x_(e,t,n,r){const s=aF(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(s+s);let d=u.move(n.containerPhrasing(e,F({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=cc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Za(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=cc(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Za(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function uF(e,t,n){return n.options.strong||"*"}function lF(e,t,n,r){return n.safe(e.value,r)}function cF(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function dF(e,t,n){const r=(S_(n)+(n.options.ruleSpaces?" ":"")).repeat(cF(n));return n.options.ruleSpaces?r.slice(0,-1):r}const w_={blockquote:LM,break:h_,code:HM,definition:jM,emphasis:p_,hardBreak:h_,heading:YM,html:m_,image:g_,imageReference:E_,inlineCode:y_,link:b_,linkReference:__,list:tF,listItem:rF,paragraph:iF,root:oF,strong:x_,text:lF,thematicBreak:dF};function fF(){return{enter:{table:hF,tableData:A_,tableHeader:A_,tableRow:mF},exit:{codeText:gF,table:pF,tableData:mp,tableHeader:mp,tableRow:mp}}}function hF(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function pF(e){this.exit(e),this.data.inTable=void 0}function mF(e){this.enter({type:"tableRow",children:[]},e)}function mp(e){this.exit(e)}function A_(e){this.enter({type:"tableCell",children:[]},e)}function gF(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,EF));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function EF(e,t){return t==="|"?t:e}function yF(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
45
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:u,tableCell:d,tableRow:c}};function u(y,_,A,v){return f(p(y,A,v),y.align)}function c(y,_,A,v){const w=m(y,A,v),k=f([w]);return k.slice(0,k.indexOf(`
46
+ `))}function d(y,_,A,v){const w=A.enter("tableCell"),k=A.enter("phrasing"),C=A.containerPhrasing(y,fe(F({},v),{before:a,after:a}));return k(),w(),C}function f(y,_){return IM(y,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(y,_,A){const v=y.children;let w=-1;const k=[],C=_.enter("table");for(;++w<v.length;)k[w]=m(v[w],_,A);return C(),k}function m(y,_,A){const v=y.children;let w=-1;const k=[],C=_.enter("tableRow");for(;++w<v.length;)k[w]=d(v[w],y,_,A);return C(),k}function b(y,_,A){let v=w_.inlineCode(y,_,A);return A.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function TF(){return{exit:{taskListCheckValueChecked:C_,taskListCheckValueUnchecked:C_,paragraph:_F}}}function bF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:SF}}}function C_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function _F(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,u;for(;++a<s.length;){const c=s[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function SF(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=w_.listItem(e,t,n,F(F({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function xF(){return[tM(),SM(),CM(),fF(),TF()]}function wF(e){return{extensions:[nM(),xM(e),vM(),yF(e),bF()]}}const AF={tokenize:OF,partial:!0},v_={tokenize:IF,partial:!0},N_={tokenize:RF,partial:!0},k_={tokenize:LF,partial:!0},CF={tokenize:DF,partial:!0},P_={name:"wwwAutolink",tokenize:kF,previous:I_},O_={name:"protocolAutolink",tokenize:PF,previous:R_},li={name:"emailAutolink",tokenize:NF,previous:L_},$r={};function vF(){return{text:$r}}let Ss=48;for(;Ss<123;)$r[Ss]=li,Ss++,Ss===58?Ss=65:Ss===91&&(Ss=97);$r[43]=li,$r[45]=li,$r[46]=li,$r[95]=li,$r[72]=[li,O_],$r[104]=[li,O_],$r[87]=[li,P_],$r[119]=[li,P_];function NF(e,t,n){const r=this;let s,a;return u;function u(m){return!gp(m)||!L_.call(r,r.previous)||Ep(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return gp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(CF,p,f)(m):m===45||m===95||gn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&An(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function kF(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!I_.call(r,r.previous)||Ep(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(AF,e.attempt(v_,e.attempt(N_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function PF(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&R_.call(r,r.previous)&&!Ep(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(An(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||yl(m)||ft(m)||as(m)||Tl(m)?n(m):e.attempt(v_,e.attempt(N_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function OF(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function IF(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(k_,d,c)(f):f===null||ft(f)||as(f)||f!==45&&Tl(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function RF(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(k_,t,a)(u):u===null||ft(u)||as(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function LF(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),s):c===60||c===null||ft(c)||as(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||ft(c)||as(c)?t(c):r(c)}function a(c){return An(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):An(c)?(e.consume(c),u):n(c)}}function DF(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return gn(a)?n(a):t(a)}}function I_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function R_(e){return!An(e)}function L_(e){return!(e===47||gp(e))}function gp(e){return e===43||e===45||e===46||e===95||gn(e)}function Ep(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const MF={tokenize:VF,partial:!0};function FF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zF,continuation:{tokenize:jF},exit:$F}},text:{91:{name:"gfmFootnoteCall",tokenize:HF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:BF,resolveTo:UF}}}}function BF(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=gr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function UF(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function HF(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||ft(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(gr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ft(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function zF(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!c||_===null||_===91||ft(_))return n(_);if(_===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=gr(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ft(_)||(c=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),s.includes(a)||s.push(a),nt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function jF(e,t,n){return e.check(Aa,t,e.attempt(MF,t,n))}function $F(e){e.exit("gfmFootnoteDefinition")}function VF(e,t,n){const r=this;return nt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function qF(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&qn(b,b.length,0,bl(y,u.slice(f+1,d),c)),qn(b,b.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),qn(u,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const f=this.previous,p=this.events;let m=0;return b;function b(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const A=to(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const v=u.exit("strikethroughSequenceTemporary"),w=to(_);return v._open=!w||w===2&&!!A,v._close=!A||A===2&&!!w,c(_)}}}class YF{constructor(){this.map=[]}add(t,n,r){GF(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function GF(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function WF(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function XF(){return{flow:{null:{name:"table",tokenize:KF,resolveAll:QF}}}}function KF(e,t,n){const r=this;let s=0,a=0,u;return c;function c(V){let se=r.events.length-1;for(;se>-1;){const re=r.events[se][1].type;if(re==="lineEnding"||re==="linePrefix")se--;else break}const pe=se>-1?r.events[se][1].type:null,ve=pe==="tableHead"||pe==="tableRow"?L:d;return ve===L&&r.parser.lazy[r.now().line]?n(V):ve(V)}function d(V){return e.enter("tableHead"),e.enter("tableRow"),f(V)}function f(V){return V===124||(u=!0,a+=1),p(V)}function p(V){return V===null?n(V):Be(V)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),y):n(V):Ze(V)?nt(e,p,"whitespace")(V):(a+=1,u&&(u=!1,s+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||ft(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?b:m)}function b(V){return V===92||V===124?(e.consume(V),m):m(V)}function y(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),u=!1,Ze(V)?nt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):_(V))}function _(V){return V===45||V===58?v(V):V===124?(u=!0,e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),A):Y(V)}function A(V){return Ze(V)?nt(e,v,"whitespace")(V):v(V)}function v(V){return V===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),w):V===45?(a+=1,w(V)):V===null||Be(V)?H(V):Y(V)}function w(V){return V===45?(e.enter("tableDelimiterFiller"),k(V)):Y(V)}function k(V){return V===45?(e.consume(V),k):V===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(V))}function C(V){return Ze(V)?nt(e,H,"whitespace")(V):H(V)}function H(V){return V===124?_(V):V===null||Be(V)?!u||s!==a?Y(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):Y(V)}function Y(V){return n(V)}function L(V){return e.enter("tableRow"),q(V)}function q(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),q):V===null||Be(V)?(e.exit("tableRow"),t(V)):Ze(V)?nt(e,q,"whitespace")(V):(e.enter("data"),ne(V))}function ne(V){return V===null||V===124||ft(V)?(e.exit("data"),q(V)):(e.consume(V),V===92?de:ne)}function de(V){return V===92||V===124?(e.consume(V),ne):ne(V)}}function QF(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const b=new YF;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(D_(b,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",p,t]])),s=_.type==="tableDelimiterRow"?2:p?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=dc(b,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=dc(b,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=dc(b,t,a,s,n,m)):u[1]!==0&&(m=dc(b,t,u,s,n,m)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&D_(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=WF(t.events,n))}return e}function dc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},vo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=vo(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=vo(t.events,n[2]),p=vo(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,A=n[3]-n[2]-1;e.add(_,A,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},vo(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function D_(e,t,n,r,s){const a=[],u=vo(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function vo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const JF={name:"tasklistCheck",tokenize:e9};function ZF(){return{text:{91:JF}}}function e9(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return ft(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Be(d)?t(d):Ze(d)?e.check({tokenize:t9},t,n)(d):n(d)}}function t9(e,t,n){return nt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function n9(e){return uE([vF(),FF(),qF(e),XF(),ZF()])}const r9={};function i9(e){const t=this,n=e||r9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(n9(n)),a.push(xF()),u.push(wF(n))}const fc=()=>x.jsx("span",{className:`${z}-blinking-cursor`,children:x.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),yp=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>x.jsx(ZE,{remarkPlugins:[i9],rehypePlugins:[eT],components:{h1:({children:s})=>x.jsx("h1",{className:G(e,`${z}-header h1`),children:s}),h2:({children:s})=>x.jsx("h2",{className:G(e,`${z}-header h2`),children:s}),h3:({children:s})=>x.jsx("h3",{className:G(e,`${z}-header h3`),children:s}),ul:({children:s})=>x.jsx("ul",{className:G(e,`${z}-ul`),children:s}),ol:({children:s})=>x.jsx("ol",{className:G(e,`${z}-ol`),children:s}),li:({children:s})=>x.jsx("li",{className:G(e,`${z}-li`),children:s}),a:({href:s,children:a})=>x.jsx(aT,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>x.jsx("div",{className:G(e,`${z}-table-container`),children:x.jsx("table",{className:G(e,`${z}-table`),children:s})}),thead:({children:s})=>x.jsx("thead",{className:G(e,`${z}-thead`),children:s}),tbody:({children:s})=>x.jsx("tbody",{className:G(e,`${z}-tbody`),children:s}),tr:({children:s})=>x.jsx("tr",{className:G(e,`${z}-tr`),children:s}),th:({children:s})=>x.jsx("th",{className:G(e,`${z}-th`),children:s}),td:({children:s})=>x.jsx("td",{className:G(e,`${z}-td`),children:s}),span:({className:s,children:a})=>s===`${z}-blinking-cursor`?x.jsx(fc,{}):x.jsx("span",{children:a})},children:r+(n?`<span className='${z}-blinking-cursor'></span>`:"")}),s9=({globalClassName:e,message:t})=>{const[n,r]=B.useState(!1),s=t.tool_name||t.toolName,a=!!t.thought,u=!!s,c=()=>{r(d=>!d)};return x.jsxs("div",{children:[x.jsxs("div",{className:G(e,`${z}-progress-message`,"standalone"),children:[x.jsx("span",{className:G(e,`${z}-message-icon`,"progress-icon","standalone"),children:x.jsx(v1,{})}),x.jsx("p",{className:G(e,`${z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&x.jsxs(x.Fragment,{children:[x.jsx(ml,{className:G(e,`${z}-thought-context-button`),onClick:c,children:n?x.jsxs(x.Fragment,{children:["Hide ",x.jsx(MN,{})]}):x.jsxs(x.Fragment,{children:["Context ",x.jsx(FN,{})]})}),n&&x.jsx("div",{className:G(e,`${z}-thought-container`),children:a&&x.jsx("p",{className:G(e,`${z}-progress-thought`),children:t.thought})})]})]})},o9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?x.jsx(s9,{globalClassName:e,message:t}):x.jsxs("div",{className:G(e,`${z}-progress-message`,"embedded"),title:t.message,children:[x.jsx("span",{className:G(e,`${z}-message-icon`,"progress-icon","embedded"),children:x.jsx(v1,{})}),x.jsx("i",{className:G(e,`${z}-progress-text`,"embedded"),children:t.message})]}),a9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var s;const r=(s=t.searchParams)==null?void 0:s.query;return x.jsxs("div",{className:G(e,`${z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&x.jsxs("div",{className:G(e,`${z}-refined-event-query`,{embedded:!n,standalone:n}),children:[x.jsx("span",{className:G(e,`${z}-message-icon`,`${z}-refined-event-icon`,{embedded:!n,standalone:n}),children:x.jsx(Qs,{role:"img"})}),x.jsx("p",{className:G(e,`${z}-text`,`${z}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),x.jsx(yp,{text:t.message})]})},M_=e=>{var d,f;const{configModule:t}=tt(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:s={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(s).filter(([p])=>!r.includes(p))),u=Object.keys(a),c=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:c}},hc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>x.jsx("span",{className:G(t,`${z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),F_=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),s=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=s[c])==null?void 0:f.join(", "))||"";return x.jsxs("div",{className:G(e,`${z}-facets`),children:[x.jsx("p",{className:G(e,`${z}-facet-category`),children:c}),x.jsx("p",{className:G(e,`${z}-facet-values`),children:d})]},c)})},eu=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>x.jsx("span",{className:G(e,`${z}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),u9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:s}=t,{facetFiltersList:a,filterCount:u}=M_(t),c=new Date(s).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?x.jsxs("div",{className:G(e,`${z}-user-message standalone`),children:[x.jsxs("div",{className:G(e,`${z}-user-message-row standalone`),children:[d?x.jsx("img",{className:G(e,`${z}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):x.jsx("span",{className:G(e,`${z}-message-icon user-message-icon standalone`),children:x.jsx(k1,{})}),x.jsx("p",{className:G(e,`${z}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&x.jsx(hc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),x.jsx(F_,{globalClassName:e,facetFiltersList:a,message:t}),x.jsx(eu,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):x.jsxs("div",{className:G(e,`${z}-user-message embedded`),children:[x.jsxs("div",{className:G(e,`${z}-user-message-row embedded`),children:[d?x.jsx("img",{className:G(e,`${z}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):x.jsx("span",{className:G(e,`${z}-message-icon user-message-icon embedded`),children:x.jsx(k1,{})}),x.jsx("p",{className:G(e,`${z}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&x.jsx(hc,{isWidgetStandalone:!1,filterCount:u})]}),x.jsx(eu,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},l9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:s,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>x.jsxs("div",{className:G(e,`${z}-user-search standalone`),children:[x.jsxs("div",{children:[x.jsxs("div",{className:G(e,`${z}-user-search-query standalone`),children:[d?x.jsx("img",{className:G(e,`${z}-user-search-image standalone`),src:d,alt:s||r,loading:"lazy"}):x.jsx("span",{className:G(e,`${z}-message-icon user-search-icon standalone`),children:x.jsx(Qs,{})}),x.jsx("p",{className:G(e,`${z}-text bold`),children:`${n}: ${s||r}`}),u.length>0&&x.jsx(hc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),x.jsx(F_,{globalClassName:e,facetFiltersList:u,message:a})]}),x.jsx(eu,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),c9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:s,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=M_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:m,queryLabel:b}=B.useMemo(()=>{var A,v,w;const _=typeof((A=r==null?void 0:r.clientContext)==null?void 0:A.cimLabel)=="string"?(v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel:r==null?void 0:r.label;switch(s){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(w=r==null?void 0:r.browseParams)==null?void 0:w.categoryId,queryLabel:_||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:_||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[s,r]);return m?n?x.jsx(l9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:b,facetFiltersList:u,filterCount:c}):x.jsxs("div",{className:G(e,`${z}-user-search embedded`),children:[x.jsxs("div",{className:G(e,`${z}-user-search-query embedded`),children:[f?x.jsx("img",{className:G(e,`${z}-user-search-image embedded`),src:f,alt:b||m,loading:"lazy"}):x.jsx("span",{className:G(e,`${z}-message-icon user-search-icon embedded`),children:x.jsx(Qs,{})}),x.jsx("p",{className:G(e,`${z}-text bold embedded`),children:b||m}),u.length>0&&x.jsx(hc,{isWidgetStandalone:!1,filterCount:c})]}),x.jsx(eu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},B_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:s,isWidgetStandalone:a,handleSuggestionClick:u})=>{var b;const{isLoading:c,isResponseLoading:d}=Ir(),f=c&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const p=e.name,m=!!((b=e.request)!=null&&b.userPrompt);switch(p){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return m?x.jsx(u9,{globalClassName:t,isWidgetStandalone:a,message:e}):x.jsx(c9,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return x.jsx(a9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return x.jsx(X8,{globalClassName:t,entryType:s,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return x.jsx(yp,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return x.jsx(W8,{message:e,isWidgetStandalone:a});case"display_products":return x.jsx(G8,{message:e,isWidgetStandalone:a});case"progress":return x.jsx(o9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return s==="ask_cim"?null:x.jsxs(x.Fragment,{children:[x.jsx("p",{className:G(t,`${z}-reset-message`),children:"This conversation has been reset."}),x.jsx("p",{className:G(t,`${z}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},d9=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:s}=tt(),{groupedMessages:a}=tr(),{entryType:u}=er();return x.jsxs(x.Fragment,{children:[u==="ask_cim"&&x.jsx(q8,{isWidgetStandalone:e}),a.map(c=>{if(c.messages&&c.type==="group"){let d=new Date(c.createdAt).toLocaleString();const f=c.messages[c.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),x.jsxs("div",{className:G(n,`${z}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>x.jsx("div",{className:`${z}-message-group-child`,children:x.jsx(B_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),x.jsx(eu,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return x.jsx("div",{className:G(n,`${z}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:x.jsx(B_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},f9=({isOpen:e}={})=>{const{messages:t}=Ir(),{autoScroll:n}=tt(),r=B.useRef(null);return B.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),B.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},h9={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Tp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:s})=>{const a=f9({isOpen:e});return x.jsxs(x.Fragment,{children:[x.jsx(d9,{isWidgetStandalone:t,handleSuggestionClick:r}),n&&x.jsx("div",{style:F(F({},h9),s),children:x.jsx(fc,{})}),x.jsx("div",{ref:a})]})},U_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{copilot:r,isLoading:s,handleUserInput:a,handleSuggestion:u,resetConversation:c}=Ir();return up()?r?x.jsxs("div",{className:G(e,`${z}-container`,`${z}-embedded-chat`),style:t,children:[x.jsx("div",{className:G(e,`${z}-message-container`,`container-${n}`,"embedded"),children:x.jsx(Tp,{isWidgetStandalone:!1,isLoading:s,handleSuggestionClick:u})}),x.jsx(Th,{componentType:"chat",className:"embedded-chat",isLoading:s,onSubmit:a}),x.jsx("div",{className:G(`${z}-embedded-chat-menu`),children:x.jsxs(t8,{componentType:"chat",children:[x.jsx(s_,{componentType:"chat"}),x.jsx(cT,{componentType:"chat",onClearChat:c})]})})]}):x.jsx("div",{children:"Loading Copilot..."}):null},H_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=B.useState((d=e.container)==null?void 0:d.current),a=B.useSyncExternalStore(m9,()=>!1,()=>!0),{getRootNode:u}=ac();if(B.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return x.jsx(x.Fragment,{children:t});const c=r!=null?r:p9(u);return x.jsx(x.Fragment,{children:B.Children.map(t,f=>Ks.createPortal(f,c))})},p9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ps(n)?n:Mr(t).body},m9=()=>()=>{},z_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=er(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:b}=Ir(),y=up(),{isOpen:_}=s||{},A=r==="standalone",v=()=>{ti(!1)};return y?d?x.jsx(e_,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,children:x.jsx(H_,{children:x.jsx(ip,{className:G(e,`${z}-container`,`${z}-dialog`,a,u&&"full-height"),style:F(F({},t),c&&{width:c}),children:x.jsxs(np,{className:G(e,`${z}-dialog-content`,{standalone:A,embedded:!A}),children:[x.jsx(i_,{componentType:"dialog",onClearChat:b,onClose:v}),x.jsx(rp,{className:G(e,`${z}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:x.jsx(Tp,{isWidgetStandalone:A,isLoading:f,isOpen:_,handleSuggestionClick:m})}),x.jsx(Th,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):x.jsx("div",{children:"Loading Copilot..."}):null},j_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{mode:r,status:s,isModalFullscreen:a}=er(),{copilot:u,isLoading:c,handleUserInput:d,handleSuggestion:f,resetConversation:p}=Ir(),{isOpen:m}=s||{},b=r==="standalone",y=up(),_=({open:v})=>{ti(v)},A=()=>{ti(!1)};return y?u?x.jsx(e_,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:_,children:x.jsx(H_,{children:x.jsxs("div",{className:G(e,`${z}-modal-container`),style:t,children:[x.jsx(Xb,{className:G(e,`${z}-modal-backdrop`)}),x.jsx(ip,{className:G(e,`${z}-container`,`${z}-modal`,{fullscreen:a,standalone:b,embedded:!b}),children:x.jsxs(np,{className:G(e,`${z}-modal-content`,{standalone:b,embedded:!b}),children:[x.jsx(i_,{componentType:"modal",onClearChat:p,onClose:A}),x.jsx(rp,{className:G(e,`${z}-message-container`,`container-${n}`,{standalone:b,embedded:!b}),children:x.jsx(Tp,{isWidgetStandalone:b,isLoading:c,isOpen:m,handleSuggestionClick:f,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),x.jsx(Th,{componentType:"modal",isLoading:c,onSubmit:d})]})})]})})}):x.jsx("div",{children:"Loading Copilot..."}):null},g9=()=>{const e=er(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?x.jsx(LN,{}):t==="dialog"?x.jsx(z_,{}):t==="modal"?x.jsx(j_,{}):x.jsx(U_,{})},E9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=Sf();B.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&s(d))};return $v(a),()=>{Vv(a)}},[e,t,n,r,s])},y9=()=>{const{copilot:e}=tr(),{entryType:t,activePromptsId:n,params:r}=ni(),{setIsInitialized:s,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:c,setIsResponseLoading:d}=Sf(),{getCopilotSuggestions:f}=m1();E9();const p=B.useCallback(_=>{if(!t||!_)return;f(_,t,v=>{a(v.id)})},[t,f,a]);B.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=B.useCallback(_=>{_.eventSourceId===n&&(u(_),a(_.id),s(!0))},[n,u,a,s]),b=B.useCallback(_=>{(_==null?void 0:_.eventSourceId)===n&&(c(_),d(!1))},[n,c,d]),y=B.useCallback(()=>{s(!0),d(!1)},[s,d]);return B.useEffect(()=>{if(e)return e.on("follow_up",m),e.on("inquiry",b),e.on("error",y),()=>{e.off("follow_up",m),e.off("inquiry",b),e.off("error",y)}},[e,m,b,y]),null},$_={copilot:"Ask Copilot",messaging:"Ask a question"},T9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=tt(),{placeholder:s,isResponseLoading:a}=ni(),u=s||$_[r],[c,d]=B.useState(""),f=t||a,p=m=>{const b=c.trim();b&&(m.preventDefault(),e(b),d(""))};return x.jsxs("form",{className:G(n,`${z}-prompts-input-container`),name:`${z}-prompts-form`,onSubmit:p,children:[x.jsx("label",{htmlFor:`${z}-prompts-input`,"aria-label":u,children:x.jsx(tp,{className:G(n,`${z}-prompts-input-icon`)})}),x.jsx("input",{id:`${z}-prompts-input`,className:G(n,`${z}-prompts-input`),name:`${z}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),x.jsx(ri,{className:G(n,`${z}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:x.jsx(Qs,{}),disabled:f})]})},b9=()=>{const{globalClassName:e,mode:t}=tt(),{placeholder:n}=ni(),r=n||$_[t];return x.jsxs("div",{className:G(e,`${z}-prompts-header`),children:[x.jsx(tp,{className:G(e,`${z}-prompts-input-icon`),"aria-hidden":"true"}),x.jsx("span",{className:G(e,`${z}-prompts-header-text`),children:r})]})},V_=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:s}=tt(),a=s==null?void 0:s.icon,u=(c=s==null?void 0:s.iconPosition)!=null?c:"left";return x.jsxs("button",{className:G(r,`${z}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&x.jsx(lp,{icon:a,className:`${z}-suggestion-button-icon`}),x.jsx("span",{children:e})]})},_9="Ask me something else",S9=({label:e,disabled:t=!1})=>x.jsx(V_,{label:e||_9,disabled:t,onClick:()=>ti(!0)}),x9=({sendCopilotPrompt:e})=>{var k,C;const{globalClassName:t}=tt(),{promptsMessage:n,isResponseLoading:r,isInitialized:s,isInline:a,askElseButtonLabel:u,staticQuestions:c,staticQuestionsStrategy:d,disableAskElseButton:f}=ni(),p=d==="override"&&c.length>0,m=s?(C=(k=n==null?void 0:n.suggestions)==null?void 0:k.map(H=>H.displayText.trim()).filter(Boolean))!=null?C:[]:[];let b;p?b=c:d==="prepend"?b=[...c,...m]:b=[...m,...c];const y=s?Array.from(new Set(b)):[],_=!s,v=y.length>0&&!a&&!f,w=H=>()=>{const Y=H.trim();Y&&e(Y)};return x.jsxs("div",{className:G(t,`${z}-prompts-button-group`),children:[_&&x.jsx(fc,{}),y.map(H=>x.jsx(V_,{label:H,disabled:r,onClick:w(H)},H)),v&&x.jsx(S9,{label:u,disabled:r})]})},w9=()=>{const{globalClassName:e}=tt(),{isInline:t,userPrompt:n}=ni();return!n||!t?null:x.jsx("div",{className:G(e,`${z}-prompts-user-message-container`),children:x.jsx("p",{className:G(e,`${z}-prompts-user-message`),children:n})})},A9=()=>{const{globalClassName:e,openLinksInNewTab:t}=tt(),{isInline:n,responseMessage:r,isResponseLoading:s}=ni();return!n||!r&&!s?null:s?x.jsx(fc,{}):r?x.jsx("div",{className:G(e,`${z}-prompts-response-container`,`${z}-message-container`),children:x.jsx(yp,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},C9=()=>{const{globalClassName:e,themeVariables:t}=tt(),{connected:n,copilot:r}=tr(),{handleCopilotRequestAck:s}=Xs(),{status:{isOpen:a}}=er(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p,promptsDisplay:m}=ni(),b=m!=="buttons",y=m!=="input",{setActivePromptsId:_,setUserPrompt:A,setResponseMessage:v,setIsResponseLoading:w}=Sf(),[k,C]=B.useState(null);B.useEffect(()=>{if(!d||k)return;const Y=document.getElementById(d);Y&&C(Y)},[d,k]);const H=B.useCallback(Y=>{if(!r||!f||!p)return;const L=ne=>{c?(v(null),A(Y),_(ne.id),w(!0)):(a||ti(!0),s(ne))},q={userPrompt:Y,clientContext:F({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(q,L);break;case"search":r.search(F({searchParams:p},q),L);break;case"browse":r.browse(F({browseParams:p},q),L);break;case"pdp":r.productView(F(F({},p),q),L);break}},[r,c,f,p,a,_,v,A,w,s]);return!n||!u||!k||!f?null:Ks.createPortal(x.jsxs("div",{className:G(e,`${z}-prompts-extension-container`),style:t,children:[b&&x.jsx(T9,{onSubmit:H}),!b&&x.jsx(b9,{}),y&&x.jsx(x9,{sendCopilotPrompt:H}),x.jsxs("div",{className:G(e,`${z}-prompts-extension-messages-container`),children:[x.jsx(w9,{}),x.jsx(A9,{})]})]}),k)},v9=()=>x.jsxs(x.Fragment,{children:[x.jsx(y9,{}),x.jsx(C9,{})]}),bp=e=>x.jsxs(g1,fe(F({},e),{children:[x.jsx(g9,{}),x.jsx(v9,{})]}));var pc={},q_;function N9(){if(q_)return pc;q_=1;var e=_1();return pc.createRoot=e.createRoot,pc.hydrateRoot=e.hydrateRoot,pc}var Y_=N9();const k9=r=>{var s=r,{elementId:e,timeout:t=5e3}=s,n=dn(s,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const m of d)if(m.type==="childList"&&m.addedNodes.length)for(const b of m.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(Ws(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=Y_.createRoot(b))==null||p.render(x.jsx(bp,F({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ws(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},P9=r=>{var s=r,{timeout:e,elementId:t}=s,n=dn(s,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ws(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Ws(!0,"warn","Container element not found for id:",t),Ws(!0,"warn","Beginning observation for element"),k9(F({elementId:t,timeout:e},n));return}Y_.createRoot(a).render(x.jsx(bp,F({},n)))},O9={search:nN,browse:Bv,pdp:{setPdpContext:e1,updatePdpProductId:Hv,updatePdpLink:zv},components:{setEntryType:pa,toggleWidgetOpen:ti,toggleWidgetMinimized:ma,toggleModalFullscreen:Tf,setWidgetType:dl,setWidgetDialogPosition:bf,togglePromptsExtensionOpen:n1,togglePromptsExtensionInline:r1,loadPromptsComponent:Xv,getAskCimPrompts:qv,getSearchPrompts:Yv,getBrowsePrompts:Gv,getProductViewPrompts:Wv},session:Kv},I9=()=>Object.freeze({search:Object.freeze(Tt.state),browse:Object.freeze(at.state),pdp:Object.freeze(mr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType});De.CopilotDialog=z_,De.CopilotEmbed=U_,De.CopilotModal=j_,De.CopilotWidget=bp,De.CopilotWidgetProvider=g1,De.eventHandlers=O9,De.injectCopilotWidget=P9,De.state=I9,De.useCopilot=Ir,Object.defineProperty(De,Symbol.toStringTag,{value:"Module"})}));