@cimulate/copilot-widget 1.26.1 → 1.27.0

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,52 +1,52 @@
1
- (function(Le,He){typeof exports=="object"&&typeof module!="undefined"?He(exports):typeof define=="function"&&define.amd?define(["exports"],He):(Le=typeof globalThis!="undefined"?globalThis:Le||self,He(Le.CimulateMessaging={}))})(this,(function(Le){"use strict";var K7=Object.defineProperty,J7=Object.defineProperties;var Z7=Object.getOwnPropertyDescriptors;var od=Object.getOwnPropertySymbols;var e2=Object.prototype.hasOwnProperty,t2=Object.prototype.propertyIsEnumerable;var Mo=(Le,He)=>(He=Symbol[Le])?He:Symbol.for("Symbol."+Le),eB=Le=>{throw TypeError(Le)},ad=Math.pow,Jm=(Le,He,Qe)=>He in Le?K7(Le,He,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Le[He]=Qe,U=(Le,He)=>{for(var Qe in He||(He={}))e2.call(He,Qe)&&Jm(Le,Qe,He[Qe]);if(od)for(var Qe of od(He))t2.call(He,Qe)&&Jm(Le,Qe,He[Qe]);return Le},le=(Le,He)=>J7(Le,Z7(He));var pn=(Le,He)=>{var Qe={};for(var at in Le)e2.call(Le,at)&&He.indexOf(at)<0&&(Qe[at]=Le[at]);if(Le!=null&&od)for(var at of od(Le))He.indexOf(at)<0&&t2.call(Le,at)&&(Qe[at]=Le[at]);return Qe};var We=(Le,He,Qe)=>Jm(Le,typeof He!="symbol"?He+"":He,Qe);var je=(Le,He,Qe)=>new Promise((at,xt)=>{var ht=pt=>{try{Vt(Qe.next(pt))}catch(un){xt(un)}},Me=pt=>{try{Vt(Qe.throw(pt))}catch(un){xt(un)}},Vt=pt=>pt.done?at(pt.value):Promise.resolve(pt.value).then(ht,Me);Vt((Qe=Qe.apply(Le,He)).next())}),ws=function(Le,He){this[0]=Le,this[1]=He},Zm=(Le,He,Qe)=>{var at=(Vt,pt,un,Kn)=>{try{var Di=Qe[Vt](pt),Ss=(pt=Di.value)instanceof ws,vs=Di.done;Promise.resolve(Ss?pt[0]:pt).then(mn=>Ss?at(Vt==="return"?Vt:"next",pt[1]?{done:mn.done,value:mn.value}:mn,un,Kn):un({value:mn,done:vs})).catch(mn=>at("throw",mn,un,Kn))}catch(mn){Kn(mn)}},xt=(Vt,pt,un,Kn)=>Me[Vt]=Di=>(pt=new Promise((Ss,vs,mn)=>(mn=()=>at(Vt,Di,Ss,vs),ht?ht.then(mn):mn())),Kn=()=>ht===un&&(ht=0),ht=un=pt.then(Kn,Kn),pt),ht,Me={};return Qe=Qe.apply(Le,He),Me[Mo("asyncIterator")]=()=>Me,xt("next"),xt("throw"),xt("return"),Me},e0=Le=>{var He=Le[Mo("asyncIterator")],Qe=!1,at,xt={};return He==null?(He=Le[Mo("iterator")](),at=ht=>xt[ht]=Me=>He[ht](Me)):(He=He.call(Le),at=ht=>xt[ht]=Me=>{if(Qe){if(Qe=!1,ht==="throw")throw Me;return Me}return Qe=!0,{done:!1,value:new ws(new Promise(Vt=>{var pt=He[ht](Me);pt instanceof Object||eB("Object expected"),Vt(pt)}),1)}}),xt[Mo("iterator")]=()=>xt,at("next"),"throw"in He?at("throw"):xt.throw=ht=>{throw ht},"return"in He&&at("return"),xt},n2=(Le,He,Qe)=>(He=Le[Mo("asyncIterator")])?He.call(Le):(Le=Le[Mo("iterator")](),He={},Qe=(at,xt)=>(xt=Le[at])&&(He[at]=ht=>new Promise((Me,Vt,pt)=>(ht=xt.call(Le,ht),pt=ht.done,Promise.resolve(ht.value).then(un=>Me({value:un,done:pt}),Vt)))),Qe("next"),Qe("return"),He);var He=document.createElement("style");He.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-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-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;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-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-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-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.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-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.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-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease}.cim-widget-msg-product-card:hover{box-shadow:0 2px 8px #0000001f}.cim-widget-msg-product-card__image-wrapper{position:relative;width:100%;height:100%;aspect-ratio:1 / 1;overflow:hidden}.cim-widget-msg-product-card__image{width:100%;height:100%;object-fit:contain;display:block}.cim-widget-msg-product-card__image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-border-color, #d1d5db)}.cim-widget-msg-product-card__image-placeholder svg{width:40%;height:40%}button.cim-widget-msg-product-card__image-button{width:100%;height:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;display:block}button.cim-widget-msg-product-card__image-button:disabled{cursor:default}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:50%}.cim-widget-msg-product-card__content-header{display:grid;gap:8px}.cim-widget-msg-product-card__title,.cim-widget-msg-product-card__title-link{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cim-widget-msg-product-card__title-link{text-decoration:none;cursor:pointer}button.cim-widget-msg-product-card__title-link{padding:0;border:none;background:none;text-align:left;width:100%}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}button.cim-widget-msg-product-card__title-link:disabled{cursor:default;text-decoration:none}.cim-widget-msg-product-card__description{font-size:12px}@media(min-width:576px){.cim-widget-msg-product-card__description{display:-webkit-box;line-clamp:4;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-msg-product-card__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-product-carousel-item{display:flex;flex-direction:column;p.cim-widget-product-carousel-caption{font-size:11px;line-height:1.3;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);margin:.25rem .5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart-express:not(.cim-widget-cart-express-ready) .cim-widget-cart-express-frame{visibility:hidden;pointer-events:none}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:1rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}@media(min-width:768px){.cim-widget-cart-expanded-standalone{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-cart-expanded-standalone .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-cart-expanded-standalone .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px}.cim-widget-cart-expanded-standalone .cim-widget-cart-total-row{gap:12px}}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:1rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.875rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:1rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:1rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.cim-widget-cart-qty-heading{font-size:.9375rem;font-weight:400;margin-bottom:0}.cim-widget-cart-qty-input-wrapper{display:flex;align-items:center;justify-content:flex-start}.cim-widget-cart-qty-input{width:45px;height:36px;padding:6px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:var(--cim-widget-bg-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);font-family:inherit;font-size:.9375rem;font-weight:400;text-align:center;transition:border-color .15s ease;box-sizing:border-box}.cim-widget-cart-qty-input:hover:not(:disabled){border-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 40%,var(--cim-widget-border-color, #d1d5db))}.cim-widget-cart-qty-input:focus{outline:none;border-color:var(--cim-widget-primary-color, #2563eb);box-shadow:0 0 0 2px color-mix(in srgb,var(--cim-widget-primary-color, #2563eb) 20%,transparent)}.cim-widget-cart-qty-input:disabled{opacity:.5;cursor:not-allowed}.cim-widget-cart-qty-spinner{width:18px;height:18px;animation:cim-widget-spin 1s linear infinite}@keyframes cim-widget-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cim-widget-cart-item-remove{padding:0;border:none;background:transparent;font-family:inherit;font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap;cursor:pointer;transition:opacity .15s ease;text-decoration:underline}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:4px;animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1.125rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-font-color, #141415);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-font-color, #141415);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-font-color, #141415) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;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 #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__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-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-product-comparison__footer{display:contents}.cim-widget-product-comparison__footer-cell{padding:12px 8px;border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__add-to-cart{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;white-space:nowrap;background-color:transparent;color:var(--cim-widget-primary-color, #3182ce)}.cim-widget-product-comparison__add-to-cart:hover{background-color:transparent}.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}.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-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-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.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}.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}.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%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
2
- /*$vite$:1*/`,document.head.appendChild(He);function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var at={exports:{}},xt={},ht={exports:{}},Me={};var Vt;function pt(){if(Vt)return Me;Vt=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"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(M){return M===null||typeof M!="object"?null:(M=m&&M[m]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function A(M,J,P){this.props=M,this.context=J,this.refs=v,this.updater=P||y}A.prototype.isReactComponent={},A.prototype.setState=function(M,J){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,J,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function S(){}S.prototype=A.prototype;function C(M,J,P){this.props=M,this.context=J,this.refs=v,this.updater=P||y}var I=C.prototype=new S;I.constructor=C,x(I,A.prototype),I.isPureReactComponent=!0;var j=Array.isArray,Y=Object.prototype.hasOwnProperty,R={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function se(M,J,P){var Se,De={},xe=null,ne=null;if(J!=null)for(Se in J.ref!==void 0&&(ne=J.ref),J.key!==void 0&&(xe=""+J.key),J)Y.call(J,Se)&&!W.hasOwnProperty(Se)&&(De[Se]=J[Se]);var ye=arguments.length-2;if(ye===1)De.children=P;else if(1<ye){for(var ie=Array(ye),re=0;re<ye;re++)ie[re]=arguments[re+2];De.children=ie}if(M&&M.defaultProps)for(Se in ye=M.defaultProps,ye)De[Se]===void 0&&(De[Se]=ye[Se]);return{$$typeof:e,type:M,key:xe,ref:ne,props:De,_owner:R.current}}function he(M,J){return{$$typeof:e,type:M.type,key:J,ref:M.ref,props:M.props,_owner:M._owner}}function $(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function oe(M){var J={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(P){return J[P]})}var ee=/\/+/g;function we(M,J){return typeof M=="object"&&M!==null&&M.key!=null?oe(""+M.key):J.toString(36)}function fe(M,J,P,Se,De){var xe=typeof M;(xe==="undefined"||xe==="boolean")&&(M=null);var ne=!1;if(M===null)ne=!0;else switch(xe){case"string":case"number":ne=!0;break;case"object":switch(M.$$typeof){case e:case t:ne=!0}}if(ne)return ne=M,De=De(ne),M=Se===""?"."+we(ne,0):Se,j(De)?(P="",M!=null&&(P=M.replace(ee,"$&/")+"/"),fe(De,J,P,"",function(re){return re})):De!=null&&($(De)&&(De=he(De,P+(!De.key||ne&&ne.key===De.key?"":(""+De.key).replace(ee,"$&/")+"/")+M)),J.push(De)),1;if(ne=0,Se=Se===""?".":Se+":",j(M))for(var ye=0;ye<M.length;ye++){xe=M[ye];var ie=Se+we(xe,ye);ne+=fe(xe,J,P,ie,De)}else if(ie=T(M),typeof ie=="function")for(M=ie.call(M),ye=0;!(xe=M.next()).done;)xe=xe.value,ie=Se+we(xe,ye++),ne+=fe(xe,J,P,ie,De);else if(xe==="object")throw J=String(M),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return ne}function de(M,J,P){if(M==null)return M;var Se=[],De=0;return fe(M,Se,"","",function(xe){return J.call(P,xe,De++)}),Se}function pe(M){if(M._status===-1){var J=M._result;J=J(),J.then(function(P){(M._status===0||M._status===-1)&&(M._status=1,M._result=P)},function(P){(M._status===0||M._status===-1)&&(M._status=2,M._result=P)}),M._status===-1&&(M._status=0,M._result=J)}if(M._status===1)return M._result.default;throw M._result}var ce={current:null},K={transition:null},ue={ReactCurrentDispatcher:ce,ReactCurrentBatchConfig:K,ReactCurrentOwner:R};function N(){throw Error("act(...) is not supported in production builds of React.")}return Me.Children={map:de,forEach:function(M,J,P){de(M,function(){J.apply(this,arguments)},P)},count:function(M){var J=0;return de(M,function(){J++}),J},toArray:function(M){return de(M,function(J){return J})||[]},only:function(M){if(!$(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Me.Component=A,Me.Fragment=n,Me.Profiler=s,Me.PureComponent=C,Me.StrictMode=r,Me.Suspense=d,Me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ue,Me.act=N,Me.cloneElement=function(M,J,P){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var Se=x({},M.props),De=M.key,xe=M.ref,ne=M._owner;if(J!=null){if(J.ref!==void 0&&(xe=J.ref,ne=R.current),J.key!==void 0&&(De=""+J.key),M.type&&M.type.defaultProps)var ye=M.type.defaultProps;for(ie in J)Y.call(J,ie)&&!W.hasOwnProperty(ie)&&(Se[ie]=J[ie]===void 0&&ye!==void 0?ye[ie]:J[ie])}var ie=arguments.length-2;if(ie===1)Se.children=P;else if(1<ie){ye=Array(ie);for(var re=0;re<ie;re++)ye[re]=arguments[re+2];Se.children=ye}return{$$typeof:e,type:M.type,key:De,ref:xe,props:Se,_owner:ne}},Me.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:a,_context:M},M.Consumer=M},Me.createElement=se,Me.createFactory=function(M){var J=se.bind(null,M);return J.type=M,J},Me.createRef=function(){return{current:null}},Me.forwardRef=function(M){return{$$typeof:l,render:M}},Me.isValidElement=$,Me.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:pe}},Me.memo=function(M,J){return{$$typeof:f,type:M,compare:J===void 0?null:J}},Me.startTransition=function(M){var J=K.transition;K.transition={};try{M()}finally{K.transition=J}},Me.unstable_act=N,Me.useCallback=function(M,J){return ce.current.useCallback(M,J)},Me.useContext=function(M){return ce.current.useContext(M)},Me.useDebugValue=function(){},Me.useDeferredValue=function(M){return ce.current.useDeferredValue(M)},Me.useEffect=function(M,J){return ce.current.useEffect(M,J)},Me.useId=function(){return ce.current.useId()},Me.useImperativeHandle=function(M,J,P){return ce.current.useImperativeHandle(M,J,P)},Me.useInsertionEffect=function(M,J){return ce.current.useInsertionEffect(M,J)},Me.useLayoutEffect=function(M,J){return ce.current.useLayoutEffect(M,J)},Me.useMemo=function(M,J){return ce.current.useMemo(M,J)},Me.useReducer=function(M,J,P){return ce.current.useReducer(M,J,P)},Me.useRef=function(M){return ce.current.useRef(M)},Me.useState=function(M){return ce.current.useState(M)},Me.useSyncExternalStore=function(M,J,P){return ce.current.useSyncExternalStore(M,J,P)},Me.useTransition=function(){return ce.current.useTransition()},Me.version="18.3.1",Me}var un;function Kn(){return un||(un=1,ht.exports=pt()),ht.exports}var Di;function Ss(){if(Di)return xt;Di=1;var e=Kn(),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(l,d,f){var p,m={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+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(l&&l.defaultProps)for(p in d=l.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:l,key:T,ref:y,props:m,_owner:s.current}}return xt.Fragment=n,xt.jsx=u,xt.jsxs=u,xt}var vs;function mn(){return vs||(vs=1,at.exports=Ss()),at.exports}var _=mn();const gr=Object.create(null);gr.open="0",gr.close="1",gr.ping="2",gr.pong="3",gr.message="4",gr.upgrade="5",gr.noop="6";const pu=Object.create(null);Object.keys(gr).forEach(e=>{pu[gr[e]]=e});const ud={type:"error",data:"parser error"},t0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n0=typeof ArrayBuffer=="function",r0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ld=({type:e,data:t},n,r)=>t0&&t instanceof Blob?n?r(t):i0(t,r):n0&&(t instanceof ArrayBuffer||r0(t))?n?r(t):i0(new Blob([t]),r):r(gr[e]+(t||"")),i0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function s0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let cd;function o2(e,t){if(t0&&e.data instanceof Blob)return e.data.arrayBuffer().then(s0).then(t);if(n0&&(e.data instanceof ArrayBuffer||r0(e.data)))return t(s0(e.data));ld(e,!1,n=>{cd||(cd=new TextEncoder),t(cd.encode(n))})}const o0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<o0.length;e++)Fo[o0.charCodeAt(e)]=e;const a2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,l,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=Fo[e.charCodeAt(r)],u=Fo[e.charCodeAt(r+1)],l=Fo[e.charCodeAt(r+2)],d=Fo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|l>>2,p[s++]=(l&3)<<6|d&63;return f},u2=typeof ArrayBuffer=="function",dd=(e,t)=>{if(typeof e!="string")return{type:"message",data:a0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:l2(e.substring(1),t)}:pu[n]?e.length>1?{type:pu[n],data:e.substring(1)}:{type:pu[n]}:ud},l2=(e,t)=>{if(u2){const n=a2(e);return a0(n,t)}else return{base64:!0,data:e}},a0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,u0="",c2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{ld(a,!1,l=>{r[u]=l,++s===n&&t(r.join(u0))})})},d2=(e,t)=>{const n=e.split(u0),r=[];for(let s=0;s<n.length;s++){const a=dd(n[s],t);if(r.push(a),a.type==="error")break}return r};function f2(){return new TransformStream({transform(e,t){o2(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 fd;function mu(e){return e.reduce((t,n)=>t+n.length,0)}function gu(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 h2(e,t){fd||(fd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,l){for(n.push(u);;){if(r===0){if(mu(n)<1)break;const d=gu(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(mu(n)<2)break;const d=gu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(mu(n)<8)break;const d=gu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(ud);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(mu(n)<s)break;const d=gu(n,s);l.enqueue(dd(a?d:fd.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(ud);break}}}})}const l0=4;function Ct(e){if(e)return p2(e)}function p2(e){for(var t in Ct.prototype)e[t]=Ct.prototype[t];return e}Ct.prototype.on=Ct.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ct.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ct.prototype.off=Ct.prototype.removeListener=Ct.prototype.removeAllListeners=Ct.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},Ct.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},Ct.prototype.emitReserved=Ct.prototype.emit,Ct.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ct.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Eu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Hn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),m2="arraybuffer";function tB(){}function c0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const g2=Hn.setTimeout,E2=Hn.clearTimeout;function yu(e,t){t.useNativeTimers?(e.setTimeoutFn=g2.bind(Hn),e.clearTimeoutFn=E2.bind(Hn)):(e.setTimeoutFn=Hn.setTimeout.bind(Hn),e.clearTimeoutFn=Hn.clearTimeout.bind(Hn))}const y2=1.33;function T2(e){return typeof e=="string"?b2(e):Math.ceil((e.byteLength||e.size)*y2)}function b2(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 d0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function _2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function x2(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 w2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class hd extends Ct{constructor(t){super(),this.writable=!1,yu(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 w2(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=dd(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=_2(t);return n.length?"?"+n:""}}class S2 extends hd{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)};d2(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,c2(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]=d0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let f0=!1;try{f0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const v2=f0;function A2(){}class N2 extends S2{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 Er extends Ct{constructor(t,n,r){super(),this.createRequest=t,yu(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=c0(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=Er.requestsCount++,Er.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=A2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Er.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(Er.requestsCount=0,Er.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",h0);else if(typeof addEventListener=="function"){const e="onpagehide"in Hn?"pagehide":"unload";addEventListener(e,h0,!1)}}function h0(){for(let e in Er.requests)Er.requests.hasOwnProperty(e)&&Er.requests[e].abort()}const C2=(function(){const e=p0({xdomain:!1});return e&&e.responseType!==null})();class k2 extends N2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=C2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Er(p0,this.uri(),t)}}function p0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||v2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Hn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const m0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class O2 extends hd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=m0?{}:c0(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;ld(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Eu(()=>{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]=d0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const pd=Hn.WebSocket||Hn.MozWebSocket;class I2 extends O2{createSocket(t,n,r){return m0?new pd(t,n,r):n?new pd(t,n):new pd(t)}doWrite(t,n){this.ws.send(n)}}class P2 extends hd{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=h2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=f2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:l,value:d})=>{l||(this.onPacket(d),a())}).catch(l=>{})};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&&Eu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const R2={websocket:I2,webtransport:P2,polling:k2},L2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,D2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function md(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=L2.exec(e||""),a={},u=14;for(;u--;)a[D2[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=M2(a,a.path),a.queryKey=F2(a,a.query),a}function M2(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 F2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const gd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Tu=[];gd&&addEventListener("offline",()=>{Tu.forEach(e=>e())},!1);class ei extends Ct{constructor(t,n){if(super(),this.binaryType=m2,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=md(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=md(n.host).host);yu(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=x2(this.opts.query)),gd&&(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"})},Tu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=l0,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&&ei.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",ei.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+=T2(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,Eu(()=>{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(ei.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(),gd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Tu.indexOf(this._offlineEventListener);r!==-1&&Tu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ei.protocol=l0;class B2 extends ei{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;ei.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;ei.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 T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function l(){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",l),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",l),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 U2=class extends B2{constructor(t,n={}){const r=typeof t=="object",s=r?U({},t):U({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>R2[a]).filter(a=>!!a)),super(r?s:t,s)}};function H2(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=md(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 j2=typeof ArrayBuffer=="function",z2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,g0=Object.prototype.toString,$2=typeof Blob=="function"||typeof Blob!="undefined"&&g0.call(Blob)==="[object BlobConstructor]",V2=typeof File=="function"||typeof File!="undefined"&&g0.call(File)==="[object FileConstructor]";function Ed(e){return j2&&(e instanceof ArrayBuffer||z2(e))||$2&&e instanceof Blob||V2&&e instanceof File}function bu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(bu(e[n]))return!0;return!1}if(Ed(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return bu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&bu(e[n]))return!0;return!1}function q2(e){const t=[],n=e.data,r=e;return r.data=_u(n,t),r.attachments=t.length,{packet:r,buffers:t}}function _u(e,t,n){if(!e)return e;if(Ed(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]=_u(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return _u(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=_u(e[s],t));return r}return e}function Y2(e,t){return e.data=yd(e.data,t),delete e.attachments,e}function yd(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]=yd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=yd(e[n],t));return e}const W2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Je;(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"})(Je||(Je={}));class G2{constructor(t){this.replacer=t}encode(t){return(t.type===Je.EVENT||t.type===Je.ACK)&&bu(t)?this.encodeAsBinary({type:t.type===Je.EVENT?Je.BINARY_EVENT:Je.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Je.BINARY_EVENT||t.type===Je.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=q2(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Td extends Ct{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===Je.BINARY_EVENT;r||n.type===Je.BINARY_ACK?(n.type=r?Je.EVENT:Je.ACK,this.reconstructor=new X2(n)):super.emitReserved("decoded",n)}else if(Ed(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(Je[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Je.BINARY_EVENT||r.type===Je.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 l=Number(u);if(!Q2(l)||l<1)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}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(Td.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 Je.CONNECT:return E0(n);case Je.DISCONNECT:return n===void 0;case Je.CONNECT_ERROR:return typeof n=="string"||E0(n);case Je.EVENT:case Je.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&W2.indexOf(n[0])===-1);case Je.ACK:case Je.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class X2{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=Y2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Q2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function E0(e){return Object.prototype.toString.call(e)==="[object Object]"}const K2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Td,Encoder:G2,get PacketType(){return Je}},Symbol.toStringTag,{value:"Module"}));function Jn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const J2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class y0 extends Ct{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=[Jn(t,"open",this.onopen.bind(this)),Jn(t,"packet",this.onpacket.bind(this)),Jn(t,"error",this.onerror.bind(this)),Jn(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(J2.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:Je.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 l=(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&&!l||(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 l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},s),u=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,l)=>u?s(u):r(l);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:Je.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 Je.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 Je.EVENT:case Je.BINARY_EVENT:this.onevent(t);break;case Je.ACK:case Je.BINARY_ACK:this.onack(t);break;case Je.DISCONNECT:this.ondisconnect();break;case Je.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:Je.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:Je.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 As(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}As.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},As.prototype.reset=function(){this.attempts=0},As.prototype.setMin=function(e){this.ms=e},As.prototype.setMax=function(e){this.max=e},As.prototype.setJitter=function(e){this.jitter=e};class bd extends Ct{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,yu(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 As({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||K2;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 U2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=Jn(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=Jn(n,"error",a);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},l);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(Jn(t,"ping",this.onping.bind(this)),Jn(t,"data",this.ondata.bind(this)),Jn(t,"error",this.onerror.bind(this)),Jn(t,"close",this.onclose.bind(this)),Jn(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){Eu(()=>{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 y0(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 Bo={};function _d(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=H2(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Bo[s]&&a in Bo[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new bd(r,t):(Bo[s]||(Bo[s]=new bd(r,t)),d=Bo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(_d,{Manager:bd,Socket:y0,io:_d,connect:_d});const T0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&T0.call(Blob),typeof File=="function"||typeof File!="undefined"&&T0.call(File);var b0;(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"})(b0||(b0={}));var H=Kn();const Mi=Qe(H);let Z2=class{constructor(){this.listeners=new Map,this.onceListeners=new Map}on(t,n){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n)}once(t,n){this.onceListeners.has(t)||this.onceListeners.set(t,new Set),this.onceListeners.get(t).add(n)}off(t,n){var r,s;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((s=this.onceListeners.get(t))==null?void 0:s.delete(n))):(this.listeners.delete(t),void this.onceListeners.delete(t)):(this.listeners.clear(),void this.onceListeners.clear())}emit(t,...n){const r=this.listeners.get(t);if(r)for(const a of r)try{a(...n)}catch(u){}const s=this.onceListeners.get(t);if(s){for(const a of s)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}};class eS{constructor(t,n,r,s,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=s,this.logger=a,this.controller=null,this.reading=!1}connect(){return je(this,null,function*(){if(this.reading)return void this.logger.warn("SSE already connected, ignoring duplicate connect()");this.controller=new AbortController,this.reading=!0;const t=yield fetch(this.url,{method:"GET",headers:le(U({},this.headers),{Accept:"text/event-stream","Cache-Control":"no-cache"}),signal:this.controller.signal});if(!t.ok){this.reading=!1;const n=yield t.text().catch(()=>t.statusText);throw new Error(`SSE connection failed (${t.status}): ${n}`)}if(!t.body)throw this.reading=!1,new Error("SSE response has no body stream");this.readStream(t.body)})}disconnect(){this.reading=!1,this.controller&&(this.controller.abort(),this.controller=null)}get isConnected(){return this.reading}readStream(t){return je(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let s="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let l;for(s+=r.decode(a,{stream:!0}),s=s.replace(/\r\n/g,`
1
+ (function(De,je){typeof exports=="object"&&typeof module!="undefined"?je(exports):typeof define=="function"&&define.amd?define(["exports"],je):(De=typeof globalThis!="undefined"?globalThis:De||self,je(De.CimulateMessaging={}))})(this,(function(De){"use strict";var n7=Object.defineProperty,r7=Object.defineProperties;var i7=Object.getOwnPropertyDescriptors;var ad=Object.getOwnPropertySymbols;var n2=Object.prototype.hasOwnProperty,r2=Object.prototype.propertyIsEnumerable;var Fo=(De,je)=>(je=Symbol[De])?je:Symbol.for("Symbol."+De),s7=De=>{throw TypeError(De)},ud=Math.pow,Jm=(De,je,Ke)=>je in De?n7(De,je,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):De[je]=Ke,U=(De,je)=>{for(var Ke in je||(je={}))n2.call(je,Ke)&&Jm(De,Ke,je[Ke]);if(ad)for(var Ke of ad(je))r2.call(je,Ke)&&Jm(De,Ke,je[Ke]);return De},ue=(De,je)=>r7(De,i7(je));var pn=(De,je)=>{var Ke={};for(var lt in De)n2.call(De,lt)&&je.indexOf(lt)<0&&(Ke[lt]=De[lt]);if(De!=null&&ad)for(var lt of ad(De))je.indexOf(lt)<0&&r2.call(De,lt)&&(Ke[lt]=De[lt]);return Ke};var Ge=(De,je,Ke)=>Jm(De,typeof je!="symbol"?je+"":je,Ke);var ze=(De,je,Ke)=>new Promise((lt,vt)=>{var pt=mt=>{try{Yt(Ke.next(mt))}catch(ln){vt(ln)}},Fe=mt=>{try{Yt(Ke.throw(mt))}catch(ln){vt(ln)}},Yt=mt=>mt.done?lt(mt.value):Promise.resolve(mt.value).then(pt,Fe);Yt((Ke=Ke.apply(De,je)).next())}),ws=function(De,je){this[0]=De,this[1]=je},Zm=(De,je,Ke)=>{var lt=(Yt,mt,ln,Kn)=>{try{var Di=Ke[Yt](mt),Ss=(mt=Di.value)instanceof ws,vs=Di.done;Promise.resolve(Ss?mt[0]:mt).then(mn=>Ss?lt(Yt==="return"?Yt:"next",mt[1]?{done:mn.done,value:mn.value}:mn,ln,Kn):ln({value:mn,done:vs})).catch(mn=>lt("throw",mn,ln,Kn))}catch(mn){Kn(mn)}},vt=(Yt,mt,ln,Kn)=>Fe[Yt]=Di=>(mt=new Promise((Ss,vs,mn)=>(mn=()=>lt(Yt,Di,Ss,vs),pt?pt.then(mn):mn())),Kn=()=>pt===ln&&(pt=0),pt=ln=mt.then(Kn,Kn),mt),pt,Fe={};return Ke=Ke.apply(De,je),Fe[Fo("asyncIterator")]=()=>Fe,vt("next"),vt("throw"),vt("return"),Fe},e0=De=>{var je=De[Fo("asyncIterator")],Ke=!1,lt,vt={};return je==null?(je=De[Fo("iterator")](),lt=pt=>vt[pt]=Fe=>je[pt](Fe)):(je=je.call(De),lt=pt=>vt[pt]=Fe=>{if(Ke){if(Ke=!1,pt==="throw")throw Fe;return Fe}return Ke=!0,{done:!1,value:new ws(new Promise(Yt=>{var mt=je[pt](Fe);mt instanceof Object||s7("Object expected"),Yt(mt)}),1)}}),vt[Fo("iterator")]=()=>vt,lt("next"),"throw"in je?lt("throw"):vt.throw=pt=>{throw pt},"return"in je&&lt("return"),vt},i2=(De,je,Ke)=>(je=De[Fo("asyncIterator")])?je.call(De):(De=De[Fo("iterator")](),je={},Ke=(lt,vt)=>(vt=De[lt])&&(je[lt]=pt=>new Promise((Fe,Yt,mt)=>(pt=vt.call(De,pt),mt=pt.done,Promise.resolve(pt.value).then(ln=>Fe({value:ln,done:mt}),Yt)))),Ke("next"),Ke("return"),je);var je=document.createElement("style");je.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-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-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-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-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-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.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-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.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-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease}.cim-widget-msg-product-card:hover{box-shadow:0 2px 8px #0000001f}.cim-widget-msg-product-card__image-wrapper{position:relative;width:100%;height:100%;aspect-ratio:1 / 1;overflow:hidden}.cim-widget-msg-product-card__image{width:100%;height:100%;object-fit:contain;display:block}.cim-widget-msg-product-card__image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-border-color, #d1d5db)}.cim-widget-msg-product-card__image-placeholder svg{width:40%;height:40%}button.cim-widget-msg-product-card__image-button{width:100%;height:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;display:block}button.cim-widget-msg-product-card__image-button:disabled{cursor:default}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:50%}.cim-widget-msg-product-card__content-header{display:grid;gap:8px}.cim-widget-msg-product-card__title,.cim-widget-msg-product-card__title-link{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cim-widget-msg-product-card__title-link{text-decoration:none;cursor:pointer}button.cim-widget-msg-product-card__title-link{padding:0;border:none;background:none;text-align:left;width:100%}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}button.cim-widget-msg-product-card__title-link:disabled{cursor:default;text-decoration:none}.cim-widget-msg-product-card__description{font-size:12px}@media(min-width:576px){.cim-widget-msg-product-card__description{display:-webkit-box;line-clamp:4;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-msg-product-card__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-product-carousel-item{display:flex;flex-direction:column;p.cim-widget-product-carousel-caption{font-size:11px;line-height:1.3;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);margin:.25rem .5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart-express:not(.cim-widget-cart-express-ready) .cim-widget-cart-express-frame{visibility:hidden;pointer-events:none}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:1rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}@media(min-width:768px){.cim-widget-cart-expanded-standalone{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-cart-expanded-standalone .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-cart-expanded-standalone .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px}.cim-widget-cart-expanded-standalone .cim-widget-cart-total-row{gap:12px}}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:1rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.875rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:1rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:1rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.cim-widget-cart-qty-heading{font-size:.9375rem;font-weight:400;margin-bottom:0}.cim-widget-cart-qty-input-wrapper{display:flex;align-items:center;justify-content:flex-start}.cim-widget-cart-qty-input{width:45px;height:36px;padding:6px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:var(--cim-widget-bg-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);font-family:inherit;font-size:.9375rem;font-weight:400;text-align:center;transition:border-color .15s ease;box-sizing:border-box}.cim-widget-cart-qty-input:hover:not(:disabled){border-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 40%,var(--cim-widget-border-color, #d1d5db))}.cim-widget-cart-qty-input:focus{outline:none;border-color:var(--cim-widget-primary-color, #2563eb);box-shadow:0 0 0 2px color-mix(in srgb,var(--cim-widget-primary-color, #2563eb) 20%,transparent)}.cim-widget-cart-qty-input:disabled{opacity:.5;cursor:not-allowed}.cim-widget-cart-qty-spinner{width:18px;height:18px;animation:cim-widget-spin 1s linear infinite}@keyframes cim-widget-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cim-widget-cart-item-remove{padding:0;border:none;background:transparent;font-family:inherit;font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap;cursor:pointer;transition:opacity .15s ease;text-decoration:underline}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:4px;animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1.125rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-font-color, #141415);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-font-color, #141415);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-font-color, #141415) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;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 #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__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-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-product-comparison__footer{display:contents}.cim-widget-product-comparison__footer-cell{padding:12px 8px;border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__add-to-cart{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;white-space:nowrap;background-color:transparent;color:var(--cim-widget-primary-color, #3182ce)}.cim-widget-product-comparison__add-to-cart:hover{background-color:transparent}.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}.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-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-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.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%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
2
+ /*$vite$:1*/`,document.head.appendChild(je);function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt={exports:{}},vt={},pt={exports:{}},Fe={};var Yt;function mt(){if(Yt)return Fe;Yt=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"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(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(){}},x=Object.assign,v={};function A(D,J,P){this.props=D,this.context=J,this.refs=v,this.updater=P||y}A.prototype.isReactComponent={},A.prototype.setState=function(D,J){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,J,"setState")},A.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function S(){}S.prototype=A.prototype;function k(D,J,P){this.props=D,this.context=J,this.refs=v,this.updater=P||y}var I=k.prototype=new S;I.constructor=k,x(I,A.prototype),I.isPureReactComponent=!0;var j=Array.isArray,Y=Object.prototype.hasOwnProperty,R={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function ie(D,J,P){var Se,Me={},_e=null,ne=null;if(J!=null)for(Se in J.ref!==void 0&&(ne=J.ref),J.key!==void 0&&(_e=""+J.key),J)Y.call(J,Se)&&!W.hasOwnProperty(Se)&&(Me[Se]=J[Se]);var Ee=arguments.length-2;if(Ee===1)Me.children=P;else if(1<Ee){for(var re=Array(Ee),ve=0;ve<Ee;ve++)re[ve]=arguments[ve+2];Me.children=re}if(D&&D.defaultProps)for(Se in Ee=D.defaultProps,Ee)Me[Se]===void 0&&(Me[Se]=Ee[Se]);return{$$typeof:e,type:D,key:_e,ref:ne,props:Me,_owner:R.current}}function de(D,J){return{$$typeof:e,type:D.type,key:J,ref:D.ref,props:D.props,_owner:D._owner}}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function se(D){var J={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(P){return J[P]})}var ee=/\/+/g;function xe(D,J){return typeof D=="object"&&D!==null&&D.key!=null?se(""+D.key):J.toString(36)}function fe(D,J,P,Se,Me){var _e=typeof D;(_e==="undefined"||_e==="boolean")&&(D=null);var ne=!1;if(D===null)ne=!0;else switch(_e){case"string":case"number":ne=!0;break;case"object":switch(D.$$typeof){case e:case t:ne=!0}}if(ne)return ne=D,Me=Me(ne),D=Se===""?"."+xe(ne,0):Se,j(Me)?(P="",D!=null&&(P=D.replace(ee,"$&/")+"/"),fe(Me,J,P,"",function(ve){return ve})):Me!=null&&($(Me)&&(Me=de(Me,P+(!Me.key||ne&&ne.key===Me.key?"":(""+Me.key).replace(ee,"$&/")+"/")+D)),J.push(Me)),1;if(ne=0,Se=Se===""?".":Se+":",j(D))for(var Ee=0;Ee<D.length;Ee++){_e=D[Ee];var re=Se+xe(_e,Ee);ne+=fe(_e,J,P,re,Me)}else if(re=T(D),typeof re=="function")for(D=re.call(D),Ee=0;!(_e=D.next()).done;)_e=_e.value,re=Se+xe(_e,Ee++),ne+=fe(_e,J,P,re,Me);else if(_e==="object")throw J=String(D),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return ne}function ce(D,J,P){if(D==null)return D;var Se=[],Me=0;return fe(D,Se,"","",function(_e){return J.call(P,_e,Me++)}),Se}function he(D){if(D._status===-1){var J=D._result;J=J(),J.then(function(P){(D._status===0||D._status===-1)&&(D._status=1,D._result=P)},function(P){(D._status===0||D._status===-1)&&(D._status=2,D._result=P)}),D._status===-1&&(D._status=0,D._result=J)}if(D._status===1)return D._result.default;throw D._result}var le={current:null},K={transition:null},ae={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:K,ReactCurrentOwner:R};function N(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:ce,forEach:function(D,J,P){ce(D,function(){J.apply(this,arguments)},P)},count:function(D){var J=0;return ce(D,function(){J++}),J},toArray:function(D){return ce(D,function(J){return J})||[]},only:function(D){if(!$(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Fe.Component=A,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=ae,Fe.act=N,Fe.cloneElement=function(D,J,P){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var Se=x({},D.props),Me=D.key,_e=D.ref,ne=D._owner;if(J!=null){if(J.ref!==void 0&&(_e=J.ref,ne=R.current),J.key!==void 0&&(Me=""+J.key),D.type&&D.type.defaultProps)var Ee=D.type.defaultProps;for(re in J)Y.call(J,re)&&!W.hasOwnProperty(re)&&(Se[re]=J[re]===void 0&&Ee!==void 0?Ee[re]:J[re])}var re=arguments.length-2;if(re===1)Se.children=P;else if(1<re){Ee=Array(re);for(var ve=0;ve<re;ve++)Ee[ve]=arguments[ve+2];Se.children=Ee}return{$$typeof:e,type:D.type,key:Me,ref:_e,props:Se,_owner:ne}},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=ie,Fe.createFactory=function(D){var J=ie.bind(null,D);return J.type=D,J},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(D){return{$$typeof:l,render:D}},Fe.isValidElement=$,Fe.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:he}},Fe.memo=function(D,J){return{$$typeof:f,type:D,compare:J===void 0?null:J}},Fe.startTransition=function(D){var J=K.transition;K.transition={};try{D()}finally{K.transition=J}},Fe.unstable_act=N,Fe.useCallback=function(D,J){return le.current.useCallback(D,J)},Fe.useContext=function(D){return le.current.useContext(D)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(D){return le.current.useDeferredValue(D)},Fe.useEffect=function(D,J){return le.current.useEffect(D,J)},Fe.useId=function(){return le.current.useId()},Fe.useImperativeHandle=function(D,J,P){return le.current.useImperativeHandle(D,J,P)},Fe.useInsertionEffect=function(D,J){return le.current.useInsertionEffect(D,J)},Fe.useLayoutEffect=function(D,J){return le.current.useLayoutEffect(D,J)},Fe.useMemo=function(D,J){return le.current.useMemo(D,J)},Fe.useReducer=function(D,J,P){return le.current.useReducer(D,J,P)},Fe.useRef=function(D){return le.current.useRef(D)},Fe.useState=function(D){return le.current.useState(D)},Fe.useSyncExternalStore=function(D,J,P){return le.current.useSyncExternalStore(D,J,P)},Fe.useTransition=function(){return le.current.useTransition()},Fe.version="18.3.1",Fe}var ln;function Kn(){return ln||(ln=1,pt.exports=mt()),pt.exports}var Di;function Ss(){if(Di)return vt;Di=1;var e=Kn(),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(l,d,f){var p,m={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+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(l&&l.defaultProps)for(p in d=l.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:l,key:T,ref:y,props:m,_owner:s.current}}return vt.Fragment=n,vt.jsx=u,vt.jsxs=u,vt}var vs;function mn(){return vs||(vs=1,lt.exports=Ss()),lt.exports}var _=mn();const gr=Object.create(null);gr.open="0",gr.close="1",gr.ping="2",gr.pong="3",gr.message="4",gr.upgrade="5",gr.noop="6";const pu=Object.create(null);Object.keys(gr).forEach(e=>{pu[gr[e]]=e});const ld={type:"error",data:"parser error"},t0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n0=typeof ArrayBuffer=="function",r0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cd=({type:e,data:t},n,r)=>t0&&t instanceof Blob?n?r(t):i0(t,r):n0&&(t instanceof ArrayBuffer||r0(t))?n?r(t):i0(new Blob([t]),r):r(gr[e]+(t||"")),i0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function s0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let dd;function u2(e,t){if(t0&&e.data instanceof Blob)return e.data.arrayBuffer().then(s0).then(t);if(n0&&(e.data instanceof ArrayBuffer||r0(e.data)))return t(s0(e.data));cd(e,!1,n=>{dd||(dd=new TextEncoder),t(dd.encode(n))})}const o0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<o0.length;e++)Bo[o0.charCodeAt(e)]=e;const l2=e=>{let t=e.length*.75,n=e.length,r,s=0,a,u,l,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=Bo[e.charCodeAt(r)],u=Bo[e.charCodeAt(r+1)],l=Bo[e.charCodeAt(r+2)],d=Bo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|l>>2,p[s++]=(l&3)<<6|d&63;return f},c2=typeof ArrayBuffer=="function",fd=(e,t)=>{if(typeof e!="string")return{type:"message",data:a0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:d2(e.substring(1),t)}:pu[n]?e.length>1?{type:pu[n],data:e.substring(1)}:{type:pu[n]}:ld},d2=(e,t)=>{if(c2){const n=l2(e);return a0(n,t)}else return{base64:!0,data:e}},a0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,u0="",f2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{cd(a,!1,l=>{r[u]=l,++s===n&&t(r.join(u0))})})},h2=(e,t)=>{const n=e.split(u0),r=[];for(let s=0;s<n.length;s++){const a=fd(n[s],t);if(r.push(a),a.type==="error")break}return r};function p2(){return new TransformStream({transform(e,t){u2(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 hd;function mu(e){return e.reduce((t,n)=>t+n.length,0)}function gu(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 m2(e,t){hd||(hd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,l){for(n.push(u);;){if(r===0){if(mu(n)<1)break;const d=gu(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(mu(n)<2)break;const d=gu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(mu(n)<8)break;const d=gu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(ld);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(mu(n)<s)break;const d=gu(n,s);l.enqueue(fd(a?d:hd.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(ld);break}}}})}const l0=4;function It(e){if(e)return g2(e)}function g2(e){for(var t in It.prototype)e[t]=It.prototype[t];return e}It.prototype.on=It.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},It.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},It.prototype.off=It.prototype.removeListener=It.prototype.removeAllListeners=It.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},It.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},It.prototype.emitReserved=It.prototype.emit,It.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},It.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Eu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Hn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),E2="arraybuffer";function o7(){}function c0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const y2=Hn.setTimeout,T2=Hn.clearTimeout;function yu(e,t){t.useNativeTimers?(e.setTimeoutFn=y2.bind(Hn),e.clearTimeoutFn=T2.bind(Hn)):(e.setTimeoutFn=Hn.setTimeout.bind(Hn),e.clearTimeoutFn=Hn.clearTimeout.bind(Hn))}const b2=1.33;function _2(e){return typeof e=="string"?x2(e):Math.ceil((e.byteLength||e.size)*b2)}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 d0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function w2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function S2(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 v2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class pd extends It{constructor(t){super(),this.writable=!1,yu(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 v2(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=fd(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=w2(t);return n.length?"?"+n:""}}class A2 extends pd{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,f2(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]=d0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let f0=!1;try{f0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const N2=f0;function k2(){}class C2 extends A2{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 Er extends It{constructor(t,n,r){super(),this.createRequest=t,yu(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=c0(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=Er.requestsCount++,Er.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=k2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Er.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(Er.requestsCount=0,Er.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",h0);else if(typeof addEventListener=="function"){const e="onpagehide"in Hn?"pagehide":"unload";addEventListener(e,h0,!1)}}function h0(){for(let e in Er.requests)Er.requests.hasOwnProperty(e)&&Er.requests[e].abort()}const O2=(function(){const e=p0({xdomain:!1});return e&&e.responseType!==null})();class I2 extends C2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=O2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Er(p0,this.uri(),t)}}function p0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||N2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Hn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const m0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class P2 extends pd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=m0?{}:c0(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;cd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Eu(()=>{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]=d0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const md=Hn.WebSocket||Hn.MozWebSocket;class R2 extends P2{createSocket(t,n,r){return m0?new md(t,n,r):n?new md(t,n):new md(t)}doWrite(t,n){this.ws.send(n)}}class L2 extends pd{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=m2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=p2();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{r.read().then(({done:l,value:d})=>{l||(this.onPacket(d),a())}).catch(l=>{})};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&&Eu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const D2={websocket:R2,webtransport:L2,polling:I2},M2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,F2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gd(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=M2.exec(e||""),a={},u=14;for(;u--;)a[F2[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=B2(a,a.path),a.queryKey=U2(a,a.query),a}function B2(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 U2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Ed=typeof addEventListener=="function"&&typeof removeEventListener=="function",Tu=[];Ed&&addEventListener("offline",()=>{Tu.forEach(e=>e())},!1);class ti extends It{constructor(t,n){if(super(),this.binaryType=E2,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=gd(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=gd(n.host).host);yu(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=S2(this.opts.query)),Ed&&(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"})},Tu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=l0,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&&ti.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",ti.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+=_2(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,Eu(()=>{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(ti.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(),Ed&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Tu.indexOf(this._offlineEventListener);r!==-1&&Tu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ti.protocol=l0;class H2 extends ti{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;ti.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;ti.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 T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function l(){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",l),this.off("close",d),this.off("upgrading",f)};n.once("open",s),n.once("error",u),n.once("close",l),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 j2=class extends H2{constructor(t,n={}){const r=typeof t=="object",s=r?U({},t):U({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>D2[a]).filter(a=>!!a)),super(r?s:t,s)}};function z2(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=gd(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 $2=typeof ArrayBuffer=="function",V2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,g0=Object.prototype.toString,q2=typeof Blob=="function"||typeof Blob!="undefined"&&g0.call(Blob)==="[object BlobConstructor]",Y2=typeof File=="function"||typeof File!="undefined"&&g0.call(File)==="[object FileConstructor]";function yd(e){return $2&&(e instanceof ArrayBuffer||V2(e))||q2&&e instanceof Blob||Y2&&e instanceof File}function bu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(bu(e[n]))return!0;return!1}if(yd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return bu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&bu(e[n]))return!0;return!1}function W2(e){const t=[],n=e.data,r=e;return r.data=_u(n,t),r.attachments=t.length,{packet:r,buffers:t}}function _u(e,t,n){if(!e)return e;if(yd(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]=_u(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return _u(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=_u(e[s],t));return r}return e}function G2(e,t){return e.data=Td(e.data,t),delete e.attachments,e}function Td(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]=Td(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Td(e[n],t));return e}const X2=["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 Q2{constructor(t){this.replacer=t}encode(t){return(t.type===et.EVENT||t.type===et.ACK)&&bu(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=W2(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class bd extends It{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 K2(n)):super.emitReserved("decoded",n)}else if(yd(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 l=Number(u);if(!J2(l)||l<1)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}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(bd.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 E0(n);case et.DISCONNECT:return n===void 0;case et.CONNECT_ERROR:return typeof n=="string"||E0(n);case et.EVENT:case et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&X2.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 K2{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=G2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const J2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function E0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Z2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:bd,Encoder:Q2,get PacketType(){return et}},Symbol.toStringTag,{value:"Module"}));function Jn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const eS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class y0 extends It{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=[Jn(t,"open",this.onopen.bind(this)),Jn(t,"packet",this.onpacket.bind(this)),Jn(t,"error",this.onerror.bind(this)),Jn(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(eS.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 l=(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&&!l||(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 l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},s),u=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,l)=>u?s(u):r(l);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 As(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}As.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},As.prototype.reset=function(){this.attempts=0},As.prototype.setMin=function(e){this.ms=e},As.prototype.setMax=function(e){this.max=e},As.prototype.setJitter=function(e){this.jitter=e};class _d extends It{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,yu(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 As({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||Z2;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 j2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=Jn(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=Jn(n,"error",a);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},l);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(Jn(t,"ping",this.onping.bind(this)),Jn(t,"data",this.ondata.bind(this)),Jn(t,"error",this.onerror.bind(this)),Jn(t,"close",this.onclose.bind(this)),Jn(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){Eu(()=>{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 y0(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 Uo={};function xd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=z2(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Uo[s]&&a in Uo[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new _d(r,t):(Uo[s]||(Uo[s]=new _d(r,t)),d=Uo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(xd,{Manager:_d,Socket:y0,io:xd,connect:xd});const T0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&T0.call(Blob),typeof File=="function"||typeof File!="undefined"&&T0.call(File);var b0;(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"})(b0||(b0={}));var H=Kn();const Mi=Ke(H);let tS=class{constructor(){this.listeners=new Map,this.onceListeners=new Map}on(t,n){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n)}once(t,n){this.onceListeners.has(t)||this.onceListeners.set(t,new Set),this.onceListeners.get(t).add(n)}off(t,n){var r,s;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((s=this.onceListeners.get(t))==null?void 0:s.delete(n))):(this.listeners.delete(t),void this.onceListeners.delete(t)):(this.listeners.clear(),void this.onceListeners.clear())}emit(t,...n){const r=this.listeners.get(t);if(r)for(const a of r)try{a(...n)}catch(u){}const s=this.onceListeners.get(t);if(s){for(const a of s)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}};class nS{constructor(t,n,r,s,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=s,this.logger=a,this.controller=null,this.reading=!1}connect(){return ze(this,null,function*(){if(this.reading)return void this.logger.warn("SSE already connected, ignoring duplicate connect()");this.controller=new AbortController,this.reading=!0;const t=yield fetch(this.url,{method:"GET",headers:ue(U({},this.headers),{Accept:"text/event-stream","Cache-Control":"no-cache"}),signal:this.controller.signal});if(!t.ok){this.reading=!1;const n=yield t.text().catch(()=>t.statusText);throw new Error(`SSE connection failed (${t.status}): ${n}`)}if(!t.body)throw this.reading=!1,new Error("SSE response has no body stream");this.readStream(t.body)})}disconnect(){this.reading=!1,this.controller&&(this.controller.abort(),this.controller=null)}get isConnected(){return this.reading}readStream(t){return ze(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let s="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let l;for(s+=r.decode(a,{stream:!0}),s=s.replace(/\r\n/g,`
3
3
  `).replace(/\r/g,`
4
4
  `);(l=s.indexOf(`
5
5
 
6
6
  `))>=0;){const d=s.slice(0,l);s=s.slice(l+2),this.parseFrame(d)}}}catch(a){return a instanceof DOMException&&a.name==="AbortError"?void this.logger.debug("SSE stream aborted (intentional disconnect)"):(this.logger.error("SSE stream error:",a),this.reading=!1,void this.onClose(a instanceof Error?a.message:"Unknown stream error"))}finally{n.releaseLock()}this.reading=!1,this.logger.info("SSE stream ended"),this.onClose("stream_ended")})}parseFrame(t){let n="message";const r=[];for(const a of t.split(`
7
7
  `))if(a.startsWith("event:"))n=a.slice(6).trim();else if(a.startsWith("data:")){const u=a.slice(5);r.push(u.startsWith(" ")?u.slice(1):u)}else a.startsWith(":");if(r.length===0)return;const s=r.join(`
8
- `);this.logger.debug(`SSE event: ${n}`,s.slice(0,200)),this.onEvent(n,s)}}class Fr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let tS=class extends Fr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class _0 extends Fr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let xd=class extends Fr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class nS{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}class rS extends Z2{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,l,d,f,p,m,T;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=s.maxRetries)!=null?u:3,timeout:(l=s.timeout)!=null?l:15e3,maxReconnectAttempts:(d=s.maxReconnectAttempts)!=null?d:5,reconnectDelay:(f=s.reconnectDelay)!=null?f:2e3,enableLogging:(p=s.enableLogging)!=null?p:!1,platform:(m=s.platform)!=null?m:"Web",capabilitiesVersion:(T=s.capabilitiesVersion)!=null?T:"1"};this.maxRetries=a.maxRetries,this.timeout=a.timeout,this.maxReconnectAttempts=a.maxReconnectAttempts,this.reconnectDelay=a.reconnectDelay,this.platform=a.platform,this.capabilitiesVersion=a.capabilitiesVersion,this.logger=new nS(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return je(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return je(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return je(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Fr("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return je(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return je(this,null,function*(){var u,l,d;this.assertConnected();const n=new URLSearchParams;(t==null?void 0:t.inclClosedConvs)!=null&&n.set("inclClosedConvs",String(t.inclClosedConvs)),(t==null?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),t!=null&&t.conversationId&&n.set("conversationId",t.conversationId),(t==null?void 0:t.startTimestamp)!=null&&n.set("startTimestamp",String(t.startTimestamp)),(t==null?void 0:t.endTimestamp)!=null&&n.set("endTimestamp",String(t.endTimestamp));const r=n.toString(),s="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",s);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(l=a.openConversationsFound)!=null?l:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return je(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const s=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${s?`?${s}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}retrieveConversationTranscript(t){return je(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new Fr("No active conversation. Call createConversation() first or pass a conversationId.","unknown");const r=`/iamessage/api/v2/conversation/${n}/transcript?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`;return this.executeRequest("GET",r,void 0,{responseType:"blob"})})}resumeConversation(t){if(this.assertConnected(),!t)throw new Fr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return je(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}openSSE(t){return je(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new eS(n,r,(s,a)=>this.handleSSEEvent(s,a),s=>this.handleSSEClose(s),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>je(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const s=r instanceof Error?r.message:String(r);if(s.includes("(401)"))return this.logger.error("SSE rejected token (401) — session expired"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);this.logger.error(`Reconnect attempt ${this.reconnectAttempts} failed: ${s}`),this.attemptReconnect()}}),n)}clearReconnectTimer(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null)}handleSSEEvent(t,n){if(t==="ping")return;let r;try{r=JSON.parse(n)}catch(s){return void this.logger.debug(`Non-JSON SSE event (${t}): ${n.slice(0,100)}`)}switch(t){case"CONVERSATION_ROUTING_RESULT":this.handleRoutingResult(r);break;case"CONVERSATION_MESSAGE":this.handleConversationMessage(r);break;case"CONVERSATION_STREAMING_TOKEN":this.handleStreamingToken(r);break;case"CONVERSATION_TYPING_STARTED_INDICATOR":this.handleTypingStarted(r);break;case"CONVERSATION_TYPING_STOPPED_INDICATOR":this.handleTypingStopped(r);break;case"CONVERSATION_PROGRESS_INDICATOR":this.handleProgressIndicator(r);break;case"CONVERSATION_PARTICIPANT_CHANGED":this.handleParticipantChanged(r);break;case"CONVERSATION_CLOSE_CONVERSATION":this.handleConversationClosed(r);break;default:this.logger.debug(`Unhandled SSE event type: ${t}`)}}handleRoutingResult(t){let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.failureType||n.routingFailureType||"",s=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:s,failureType:s?void 0:r,raw:n}),s||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var l;const n=t.conversationEntry;if(!n)return;const r=((l=n.sender)==null?void 0:l.role)||"";if(r==="EndUser"||r==="Customer")return;const s=this.parseEntryPayload(n),a=this.getNestedValue(s,"abstractMessage"),u=this.getNestedString(a,"staticContent","text")||this.getNestedString(a,"content","text")||"";u&&this.emit("message",{conversationId:this._conversationId||"",messageId:n.identifier||"",content:u,sender:{role:r,name:n.senderDisplayName},timestamp:n.transcriptedTimestamp||new Date().toISOString(),raw:s})}handleStreamingToken(t){let n,r,s,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),l=this.getNestedValue(u,"streamingToken");a=this.getNestedString(l,"token","text")||this.getNestedString(l,"token","content")||"";const d=this.getNestedValue(l,"sequenceNumber");typeof d=="number"&&(n=d);const f=this.getNestedString(l,"targetMessageIdentifier");f&&(r=f);const p=this.getNestedString(l,"tokenType");p&&(s=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",U(U(U({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),s?{tokenType:s}:{})):this.logger.warn("STREAMING_TOKEN received but no token text could be extracted — payload shape may have changed")}handleTypingStarted(t){var n;this.emit("typing_started",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleTypingStopped(t){var n;this.emit("typing_stopped",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleProgressIndicator(t){const n=t.conversationEntry;if(!n)return;const r=this.parseEntryPayload(n),s=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(s,"progressMessage","text")||this.getNestedString(s,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(s,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var a,u,l,d,f;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries,s=(a=t.conversationEntry)==null?void 0:a.identifier;if(r&&r.length>0)r.forEach((p,m)=>{var A,S,C;const T=p.participant,y=p.displayName||(T==null?void 0:T.displayName)||((A=t.conversationEntry)==null?void 0:A.senderDisplayName)||"Agent",x=(T==null?void 0:T.role)||((C=(S=t.conversationEntry)==null?void 0:S.sender)==null?void 0:C.role)||"",v=p.operation||p.event||"";this.emit("participant_changed",U({conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(v)},s?{entryId:r.length>1?`${s}:${m}`:s}:{}))});else{const p=((u=t.conversationEntry)==null?void 0:u.senderDisplayName)||n.participantName||((l=n.participant)==null?void 0:l.displayName)||"Agent",m=n.operation||n.event||"";this.emit("participant_changed",U({conversationId:this._conversationId||"",participant:{role:((f=(d=t.conversationEntry)==null?void 0:d.sender)==null?void 0:f.role)||"",name:p},action:this.normalizeParticipantAction(m)},s?{entryId:s}:{}))}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return je(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new xd("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,s){return je(this,null,function*(){const a=(s==null?void 0:s.useAuth)!==!1;let u=0;for(;;){let l;try{const d=new AbortController;l=setTimeout(()=>d.abort(),(s==null?void 0:s.timeout)||this.timeout);const f=U({"Content-Type":"application/json"},s==null?void 0:s.headers);a&&this._accessToken&&(f.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const m=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(l),!m.ok){const T=yield m.text().catch(()=>m.statusText);if(m.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new xd(`Request ${t} ${n} failed (401): continuation token expired or invalid. Reconnect without a continuation token to create a new session.`);if(this._conversationId)throw this.logger.warn("Got 401 with active conversation — cannot auto-refresh (would orphan conversation)"),new xd(`Request ${t} ${n} failed (401): session expired. Call connect() to start a new session.`);this.logger.info("Got 401 — refreshing token and retrying..."),this._accessToken=yield this.fetchAccessToken(),u++;continue}throw new tS(`Request ${t} ${n} failed (${m.status}): ${T}`,m.status,T)}return m.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield m.blob():m.text().then(T=>T?JSON.parse(T):null)}catch(d){if(clearTimeout(l),d instanceof Fr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new _0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),p=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(m=>setTimeout(m,p));continue}throw new _0(`Network error: ${d.message}`,u,{cause:d})}throw new Fr(`Unexpected error: ${d instanceof Error?d.message:String(d)}`,"unknown",{cause:d instanceof Error?d:void 0})}}})}assertConnected(){if(!this._isConnected||!this._accessToken)throw new Fr("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const s of n){if(r==null||typeof r!="object")return;r=r[s]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}}const k="cim-widget",kn=`--${k}`,ti={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},iS=(e=ti)=>({[`${kn}-primary-color`]:e.primaryColor||ti.primaryColor,[`${kn}-secondary-color`]:e.secondaryColor||ti.secondaryColor,[`${kn}-font-color`]:e.fontColor||ti.fontColor,[`${kn}-font-family`]:e.fontFamily||ti.fontFamily,[`${kn}-background-color`]:e.backgroundColor||ti.backgroundColor,[`${kn}-border-color`]:e.borderColor||ti.borderColor,[`${kn}-border-radius`]:e.borderRadius||ti.borderRadius});function x0(e,t){return function(){return e.apply(t,arguments)}}const{toString:sS}=Object.prototype,{getPrototypeOf:Ns}=Object,{iterator:Uo,toStringTag:w0}=Symbol,xu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ho=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),xu(n,t))return!0;n=Ns(n)}return!1},oS=(e,t)=>e!=null&&Ho(e,t)?e[t]:void 0,wd=(e=>t=>{const n=sS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zn=e=>(e=e.toLowerCase(),t=>wd(t)===e),wu=e=>t=>typeof t===e,{isArray:Fi}=Array,Cs=wu("undefined");function ks(e){return e!==null&&!Cs(e)&&e.constructor!==null&&!Cs(e.constructor)&&gn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const S0=Zn("ArrayBuffer");function aS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&S0(e.buffer),t}const uS=wu("string"),gn=wu("function"),v0=wu("number"),Os=e=>e!==null&&typeof e=="object",lS=e=>e===!0||e===!1,Su=e=>{if(!Os(e))return!1;const t=Ns(e);return(t===null||t===Object.prototype||Ns(t)===null)&&!Ho(e,w0)&&!Ho(e,Uo)},cS=e=>{if(!Os(e)||ks(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},dS=Zn("Date"),fS=Zn("File"),hS=e=>!!(e&&typeof e.uri!="undefined"),pS=e=>e&&typeof e.getParts!="undefined",mS=Zn("Blob"),gS=Zn("FileList"),ES=e=>Os(e)&&gn(e.pipe);function yS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const A0=yS(),N0=typeof A0.FormData!="undefined"?A0.FormData:void 0,TS=e=>{if(!e)return!1;if(N0&&e instanceof N0)return!0;const t=Ns(e);if(!t||t===Object.prototype||!gn(e.append))return!1;const n=wd(e);return n==="formdata"||n==="object"&&gn(e.toString)&&e.toString()==="[object FormData]"},bS=Zn("URLSearchParams"),[_S,xS,wS,SS]=["ReadableStream","Request","Response","Headers"].map(Zn),vS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Fi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(ks(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let l;for(r=0;r<u;r++)l=a[r],t.call(null,e[l],l,e)}}function C0(e,t){if(ks(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 Bi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,k0=e=>!Cs(e)&&e!==Bi;function Sd(...e){const{caseless:t,skipUndefined:n}=k0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&C0(r,u)||u,d=xu(r,l)?r[l]:void 0;Su(d)&&Su(a)?r[l]=Sd(d,a):Su(a)?r[l]=Sd({},a):Fi(a)?r[l]=a.slice():(!n||!Cs(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||ks(l)||(jo(l,s),typeof l!="object"||Fi(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];FS.call(l,p)&&s(l[p],p)}}return r}const AS=(e,t,n,{allOwnKeys:r}={})=>(jo(t,(s,a)=>{n&&gn(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),NS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),CS=(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)},kS=(e,t,n,r)=>{let s,a,u;const l={};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))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=n!==!1&&Ns(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},OS=(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},IS=e=>{if(!e)return null;if(Fi(e))return e;let t=e.length;if(!v0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},PS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ns(Uint8Array)),RS=(e,t)=>{const r=(e&&e[Uo]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},LS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},DS=Zn("HTMLFormElement"),MS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:FS}=Object.prototype,BS=Zn("RegExp"),O0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};jo(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},US=e=>{O0(e,(t,n)=>{if(gn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(gn(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+"'")})}})},HS=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Fi(e)?r(e):r(String(e).split(t)),n},jS=()=>{},zS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function $S(e){return!!(e&&gn(e.append)&&e[w0]==="FormData"&&e[Uo])}const VS=e=>{const t=new WeakSet,n=r=>{if(Os(r)){if(t.has(r))return;if(ks(r))return r;if(!("toJSON"in r)){t.add(r);const s=Fi(r)?[]:{};return jo(r,(a,u)=>{const l=n(a);!Cs(l)&&(s[u]=l)}),t.delete(r),s}}return r};return n(e)},qS=Zn("AsyncFunction"),YS=e=>e&&(Os(e)||gn(e))&&gn(e.then)&&gn(e.catch),I0=((e,t)=>e?setImmediate:t?((n,r)=>(Bi.addEventListener("message",({source:s,data:a})=>{s===Bi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Bi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",gn(Bi.postMessage)),WS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Bi):typeof process!="undefined"&&process.nextTick||I0,P0=e=>e!=null&&gn(e[Uo]),q={isArray:Fi,isArrayBuffer:S0,isBuffer:ks,isFormData:TS,isArrayBufferView:aS,isString:uS,isNumber:v0,isBoolean:lS,isObject:Os,isPlainObject:Su,isEmptyObject:cS,isReadableStream:_S,isRequest:xS,isResponse:wS,isHeaders:SS,isUndefined:Cs,isDate:dS,isFile:fS,isReactNativeBlob:hS,isReactNative:pS,isBlob:mS,isRegExp:BS,isFunction:gn,isStream:ES,isURLSearchParams:bS,isTypedArray:PS,isFileList:gS,forEach:jo,merge:Sd,extend:AS,trim:vS,stripBOM:NS,inherits:CS,toFlatObject:kS,kindOf:wd,kindOfTest:Zn,endsWith:OS,toArray:IS,forEachEntry:RS,matchAll:LS,isHTMLForm:DS,hasOwnProperty:xu,hasOwnProp:xu,hasOwnInPrototypeChain:Ho,getSafeProp:oS,reduceDescriptors:O0,freezeMethods:US,toObjectSet:HS,toCamelCase:MS,noop:jS,toFiniteNumber:zS,findKey:C0,global:Bi,isContextDefined:k0,isSpecCompliantForm:$S,toJSONObject:VS,isAsyncFn:qS,isThenable:YS,setImmediate:I0,asap:WS,isIterable:P0,isSafeIterable:e=>e!=null&&Ho(e,Uo)&&P0(e)},GS=q.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"]),XS=e=>{const t={};let n,r,s;return e&&e.split(`
9
- `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&GS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function QS(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 KS=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),JS=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function vd(e,t){return q.isArray(e)?e.map(n=>vd(n,t)):QS(String(e).replace(t,""))}const ZS=e=>vd(e,KS),ev=e=>vd(e,JS);function R0(e){const t=Object.create(null);return q.forEach(e.toJSON(),(n,r)=>{t[r]=ev(n)}),t}const L0=Symbol("internals");function zo(e){return e&&String(e).trim().toLowerCase()}function vu(e){return e===!1||e==null?e:q.isArray(e)?e.map(vu):ZS(String(e))}function tv(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 nv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ad(e,t,n,r,s){if(q.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function rv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function iv(e,t){const n=q.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 Qt=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(l,d,f){const p=zo(d);if(!p)return;const m=q.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=vu(l))}const u=(l,d)=>q.forEach(l,(f,p)=>a(f,p,d));if(q.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(q.isString(t)&&(t=t.trim())&&!nv(t))u(XS(t),n);else if(q.isObject(t)&&q.isSafeIterable(t)){let l=Object.create(null),d,f;for(const p of t){if(!q.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],q.hasOwnProp(l,f)?(d=l[f],l[f]=q.isArray(d)?[...d,p[1]]:[d,p[1]]):l[f]=p[1]}u(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=zo(t),t){const r=q.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return tv(s);if(q.isFunction(n))return n.call(this,s,r);if(q.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=zo(t),t){const r=q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ad(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=zo(u),u){const l=q.findKey(r,u);l&&(!n||Ad(r,r[l],l,n))&&(delete r[l],s=!0)}}return q.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||Ad(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return q.forEach(this,(s,a)=>{const u=q.findKey(r,a);if(u){n[u]=vu(s),delete n[a];return}const l=t?rv(a):String(a).trim();l!==a&&delete n[a],n[l]=vu(s),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return q.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&q.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(`
10
- `)}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[L0]=this[L0]={accessors:{}}).accessors,s=this.prototype;function a(u){const l=zo(u);r[l]||(iv(s,u),r[l]=!0)}return q.isArray(t)?t.forEach(a):a(t),this}};Qt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(Qt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),q.freezeMethods(Qt);const sv="[REDACTED ****]";function ov(e){if(q.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(q.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function av(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||q.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof Qt&&(a=a.toJSON()),r.push(a);let u;if(q.isArray(a))u=[],a.forEach((l,d)=>{const f=s(l);q.isUndefined(f)||(u[d]=f)});else{if(!q.isPlainObject(a)&&ov(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?sv:s(d);q.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return s(e)}let Ce=class r2 extends Error{static from(t,n,r,s,a,u){const l=new r2(t.message,n||t.code,r,s,a);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),u&&Object.assign(l,u),l}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&&q.hasOwnProp(t,"redact")?t.redact:void 0,r=q.isArray(n)&&n.length>0?av(t,n):q.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}}};Ce.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ce.ERR_BAD_OPTION="ERR_BAD_OPTION",Ce.ECONNABORTED="ECONNABORTED",Ce.ETIMEDOUT="ETIMEDOUT",Ce.ECONNREFUSED="ECONNREFUSED",Ce.ERR_NETWORK="ERR_NETWORK",Ce.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ce.ERR_DEPRECATED="ERR_DEPRECATED",Ce.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ce.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ce.ERR_CANCELED="ERR_CANCELED",Ce.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ce.ERR_INVALID_URL="ERR_INVALID_URL",Ce.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const uv=null,D0=100;function Nd(e){return q.isPlainObject(e)||q.isArray(e)}function M0(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function Cd(e,t,n){return e?e.concat(t).map(function(s,a){return s=M0(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function lv(e){return q.isArray(e)&&!e.some(Nd)}const cv=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Au(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,I){return!q.isUndefined(I[C])});const r=n.metaTokens,s=n.visitor||x,a=n.dots,u=n.indexes,l=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?D0:n.maxDepth,f=l&&q.isSpecCompliantForm(t),p=[];if(!q.isFunction(s))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(q.isDate(S))return S.toISOString();if(q.isBoolean(S))return S.toString();if(!f&&q.isBlob(S))throw new Ce("Blob is not supported. Use a Buffer instead.");if(q.isArrayBuffer(S)||q.isTypedArray(S)){if(f&&typeof l=="function")return new l([S]);if(typeof Buffer!="undefined")return Buffer.from(S);throw new Ce("Blob is not supported. Use a Buffer instead.",Ce.ERR_NOT_SUPPORT)}return S}function T(S){if(S>d)throw new Ce("Object is too deeply nested ("+S+" levels). Max depth: "+d,Ce.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(S,C){if(d===1/0)return JSON.stringify(S);const I=[];return JSON.stringify(S,function(Y,R){if(!q.isObject(R))return R;for(;I.length&&I[I.length-1]!==this;)I.pop();return I.push(R),T(C+I.length-1),R})}function x(S,C,I){let j=S;if(q.isReactNative(t)&&q.isReactNativeBlob(S))return t.append(Cd(I,C,a),m(S)),!1;if(S&&!I&&typeof S=="object"){if(q.endsWith(C,"{}"))C=r?C:C.slice(0,-2),S=y(S,1);else if(q.isArray(S)&&lv(S)||(q.isFileList(S)||q.endsWith(C,"[]"))&&(j=q.toArray(S)))return C=M0(C),j.forEach(function(R,W){!(q.isUndefined(R)||R===null)&&t.append(u===!0?Cd([C],W,a):u===null?C:C+"[]",m(R))}),!1}return Nd(S)?!0:(t.append(Cd(I,C,a),m(S)),!1)}const v=Object.assign(cv,{defaultVisitor:x,convertValue:m,isVisitable:Nd});function A(S,C,I=0){if(!q.isUndefined(S)){if(T(I),p.indexOf(S)!==-1)throw new Error("Circular reference detected in "+C.join("."));p.push(S),q.forEach(S,function(Y,R){(!(q.isUndefined(Y)||Y===null)&&s.call(t,Y,q.isString(R)?R.trim():R,C,v))===!0&&A(Y,C?C.concat(R):[R],I+1)}),p.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return A(e),t}function F0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function kd(e,t){this._pairs=[],e&&Au(e,this,t)}const B0=kd.prototype;B0.append=function(t,n){this._pairs.push([t,n])},B0.toString=function(t){const n=t?r=>t.call(this,r,F0):F0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function dv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function U0(e,t,n){if(!t)return e;e=e||"";const r=q.isFunction(n)?{serialize:n}:n,s=q.getSafeProp(r,"encode")||dv,a=q.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=q.isURLSearchParams(t)?t.toString():new kd(t,r).toString(s),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class H0{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){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Od={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},fv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:kd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Id=typeof window!="undefined"&&typeof document!="undefined",Pd=typeof navigator=="object"&&navigator||void 0,hv=Id&&(!Pd||["ReactNative","NativeScript","NS"].indexOf(Pd.product)<0),pv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mv=Id&&window.location.href||"http://localhost",qt=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Id,hasStandardBrowserEnv:hv,hasStandardBrowserWebWorkerEnv:pv,navigator:Pd,origin:mv},Symbol.toStringTag,{value:"Module"}))),fv);function gv(e,t){return Au(e,new qt.classes.URLSearchParams,U({visitor:function(n,r,s,a){return qt.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const j0=D0;function z0(e){if(e>j0)throw new Ce("FormData field is too deeply nested ("+e+" levels). Max depth: "+j0,Ce.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Ev(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)z0(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function yv(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 $0(e){function t(n,r,s,a){z0(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&q.isArray(s)?s.length:u,d?(q.hasOwnProp(s,u)?s[u]=q.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!l):((!q.hasOwnProp(s,u)||!q.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&q.isArray(s[u])&&(s[u]=yv(s[u])),!l)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,s)=>{t(Ev(r),s,n,0)}),n}return null}const Is=(e,t)=>e!=null&&q.hasOwnProp(e,t)?e[t]:void 0;function Tv(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const $o={transitional:Od,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=q.isObject(t);if(a&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return s?JSON.stringify($0(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Is(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return gv(t,d).toString();if((l=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Is(this,"env"),p=f&&f.FormData;return Au(l?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),Tv(t)):t}],transformResponse:[function(t){const n=Is(this,"transitional")||$o.transitional,r=n&&n.forcedJSONParsing,s=Is(this,"responseType"),a=s==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!s||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Is(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Ce.from(d,Ce.ERR_BAD_RESPONSE,this,null,Is(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qt.classes.FormData,Blob:qt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch","query"],e=>{$o.headers[e]={}});function Rd(e,t){const n=this||$o,r=t||n,s=Qt.from(r.headers);let a=r.data;return q.forEach(e,function(l){a=l.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function V0(e){return!!(e&&e.__CANCEL__)}let Vo=class extends Ce{constructor(t,n,r){super(t==null?"canceled":t,Ce.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function q0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ce("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ce.ERR_BAD_REQUEST:Ce.ERR_BAD_RESPONSE,n.config,n.request,n))}function bv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function _v(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,T=0;for(;m!==s;)T+=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(T*1e3/y):void 0}}function xv(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 Nu=(e,t,n=3)=>{let r=0;const s=_v(50,250);return xv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,l=a.lengthComputable?a.total:void 0,d=l!=null?Math.min(u,l):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-d)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},Y0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},W0=e=>(...t)=>q.asap(()=>e(...t)),wv=qt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,qt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(qt.origin),qt.navigator&&/(msie|trident)/i.test(qt.navigator.userAgent)):()=>!0,Sv=qt.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];q.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),q.isString(r)&&l.push(`path=${r}`),q.isString(s)&&l.push(`domain=${s}`),a===!0&&l.push("secure"),q.isString(u)&&l.push(`SameSite=${u}`),document.cookie=l.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 vv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Av(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Nv=/^https?:(?!\/\/)/i,Cv=/[\t\n\r]/g;function kv(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Ov(e){return kv(e).replace(Cv,"")}function G0(e,t){if(typeof e=="string"&&Nv.test(Ov(e)))throw new Ce('Invalid URL: missing "//" after protocol',Ce.ERR_INVALID_URL,t)}function X0(e,t,n,r){G0(t,r);let s=!vv(t);return e&&(s||n===!1)?(G0(e,r),Av(e,t)):t}const Q0=e=>e instanceof Qt?U({},e):e;function Ui(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,T,y){return q.isPlainObject(p)&&q.isPlainObject(m)?q.merge.call({caseless:y},p,m):q.isPlainObject(m)?q.merge({},m):q.isArray(m)?m.slice():m}function s(p,m,T,y){if(q.isUndefined(m)){if(!q.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!q.isUndefined(m))return r(void 0,m)}function u(p,m){if(q.isUndefined(m)){if(!q.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=q.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!q.isUndefined(m))if(q.isPlainObject(m)){if(q.hasOwnProp(m,p))return m[p]}else return;const T=q.hasOwnProp(e,"transitional")?e.transitional:void 0;if(q.isPlainObject(T)&&q.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(q.hasOwnProp(t,T))return r(p,m);if(q.hasOwnProp(e,T))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,T)=>s(Q0(p),Q0(m),T,!0)};return q.forEach(Object.keys(U(U({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=q.hasOwnProp(f,m)?f[m]:s,y=q.hasOwnProp(e,m)?e[m]:void 0,x=q.hasOwnProp(t,m)?t[m]:void 0,v=T(y,x,m);q.isUndefined(v)&&T!==d||(n[m]=v)}),q.hasOwnProp(t,"validateStatus")&&q.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(q.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const Iv=["content-type","content-length"];function Pv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{Iv.includes(r.toLowerCase())&&e.set(r,s)})}const Rv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function K0(e){const t=Ui({},e),n=T=>q.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=Qt.from(l),t.url=U0(X0(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=q.getSafeProp(d,"username")||"",y=q.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(T+":"+(y?Rv(y):"")))}catch(x){throw Ce.from(x,Ce.ERR_BAD_OPTION_VALUE,e)}}if(q.isFormData(r)&&(qt.hasStandardBrowserEnv||qt.hasStandardBrowserWebWorkerEnv||q.isReactNative(r)?l.setContentType(void 0):q.isFunction(r.getHeaders)&&Pv(l,r.getHeaders(),n("formDataHeaderPolicy"))),qt.hasStandardBrowserEnv&&(q.isFunction(s)&&(s=s(t)),s===!0||s==null&&wv(t.url))){const y=a&&u&&Sv.read(u);y&&l.set(a,y)}return t}const Lv=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=K0(e);let a=s.data;const u=Qt.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=s,p,m,T,y,x;function v(){y&&y(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function S(){if(!A)return;const I=Qt.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),Y={data:!l||l==="text"||l==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:I,config:e,request:A};q0(function(W){n(W),v()},function(W){r(W),v()},Y),A=null}"onloadend"in A?A.onloadend=S:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(S)},A.onabort=function(){A&&(r(new Ce("Request aborted",Ce.ECONNABORTED,e,A)),v(),A=null)},A.onerror=function(j){const Y=j&&j.message?j.message:"Network Error",R=new Ce(Y,Ce.ERR_NETWORK,e,A);R.event=j||null,r(R),v(),A=null},A.ontimeout=function(){let j=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const Y=s.transitional||Od;s.timeoutErrorMessage&&(j=s.timeoutErrorMessage),r(new Ce(j,Y.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,A)),v(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&q.forEach(R0(u),function(j,Y){A.setRequestHeader(Y,j)}),q.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),l&&l!=="json"&&(A.responseType=s.responseType),f&&([T,x]=Nu(f,!0),A.addEventListener("progress",T)),d&&A.upload&&([m,y]=Nu(d),A.upload.addEventListener("progress",m),A.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=I=>{A&&(r(!I||I.type?new Vo(null,e,A):I),A.abort(),v(),A=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const C=bv(s.url);if(C&&!qt.protocols.includes(C)){r(new Ce("Unsupported protocol "+C+":",Ce.ERR_BAD_REQUEST,e)),v();return}A.send(a||null)})},Dv=(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 Ce?f:new Vo(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ce(`timeout of ${t}ms exceeded`,Ce.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:l}=n;return l.unsubscribe=()=>q.asap(u),l},Mv=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},Fv=function(e,t){return Zm(this,null,function*(){try{for(var n=n2(Bv(e)),r,s,a;r=!(s=yield new ws(n.next())).done;r=!1){const u=s.value;yield*e0(Mv(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new ws(s.call(n)))}finally{if(a)throw a[0]}}})},Bv=function(e){return Zm(this,null,function*(){if(e[Symbol.asyncIterator]){yield*e0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new ws(t.read());if(n)break;yield r}}finally{yield new ws(t.cancel())}})},J0=(e,t,n,r)=>{const s=Fv(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return je(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){l(),f.close();return}let T=m.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw l(p),p}})},cancel(f){return l(f),s.return()}},{highWaterMark:2})},Cu=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Uv=(e,t,n)=>t+2<n&&Cu(e.charCodeAt(t+1))&&Cu(e.charCodeAt(t+2));function Hv(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 l=r.length;for(let y=0;y<l;y++)if(r.charCodeAt(y)===37&&y+2<l){const x=r.charCodeAt(y+1),v=r.charCodeAt(y+2);Cu(x)&&Cu(v)&&(u-=2,y+=2)}let d=0,f=l-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 T=Math.floor(u/4)*3-(d||0);return T>0?T:0}let a=0;for(let u=0,l=r.length;u<l;u++){const d=r.charCodeAt(u);if(d===37&&Uv(r,u,l))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<l){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Ld="1.18.1",Z0=64*1024,{isFunction:ku}=q,jv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),eg=e=>{if(!q.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},tg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},zv=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},$v=e=>{const t=q.global!==void 0&&q.global!==null?q.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=q.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,l=s?ku(s):typeof fetch=="function",d=ku(a),f=ku(u);if(!l)return!1;const p=l&&ku(n),m=l&&(typeof r=="function"?(S=>C=>S.encode(C))(new r):S=>je(null,null,function*(){return new Uint8Array(yield new a(S).arrayBuffer())})),T=d&&p&&tg(()=>{let S=!1;const C=new a(qt.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),I=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),S&&!I}),y=f&&p&&tg(()=>q.isReadableStream(new u("").body)),x={stream:y&&(S=>S.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!x[S]&&(x[S]=(C,I)=>{let j=C&&C[S];if(j)return j.call(C);throw new Ce(`Response type '${S}' is not supported`,Ce.ERR_NOT_SUPPORT,I)})});const v=S=>je(null,null,function*(){if(S==null)return 0;if(q.isBlob(S))return S.size;if(q.isSpecCompliantForm(S))return(yield new a(qt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(q.isArrayBufferView(S)||q.isArrayBuffer(S))return S.byteLength;if(q.isURLSearchParams(S)&&(S=S+""),q.isString(S))return(yield m(S)).byteLength}),A=(S,C)=>je(null,null,function*(){const I=q.toFiniteNumber(S.getContentLength());return I==null?v(C):I});return S=>je(null,null,function*(){let{url:C,method:I,data:j,signal:Y,cancelToken:R,timeout:W,onDownloadProgress:se,onUploadProgress:he,responseType:$,headers:oe,withCredentials:ee="same-origin",fetchOptions:we,maxContentLength:fe,maxBodyLength:de}=K0(S);const pe=q.isNumber(fe)&&fe>-1,ce=q.isNumber(de)&&de>-1,K=xe=>q.hasOwnProp(S,xe)?S[xe]:void 0;let ue=s||fetch;$=$?($+"").toLowerCase():"text";let N=Dv([Y,R&&R.toAbortSignal()],W),M=null;const J=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let P,Se=null;const De=()=>new Ce("Request body larger than maxBodyLength limit",Ce.ERR_BAD_REQUEST,S,M);try{let xe;const ne=K("auth");if(ne){const $e=q.getSafeProp(ne,"username")||"",It=q.getSafeProp(ne,"password")||"";xe={username:$e,password:It}}if(zv(C)){const $e=new URL(C,qt.origin);if(!xe&&($e.username||$e.password)){const It=eg($e.username),Ln=eg($e.password);xe={username:It,password:Ln}}($e.username||$e.password)&&($e.username="",$e.password="",C=$e.href)}if(xe&&(oe.delete("authorization"),oe.set("Authorization","Basic "+btoa(jv((xe.username||"")+":"+(xe.password||""))))),pe&&typeof C=="string"&&C.startsWith("data:")&&Hv(C)>fe)throw new Ce("maxContentLength size of "+fe+" exceeded",Ce.ERR_BAD_RESPONSE,S,M);if(ce&&I!=="get"&&I!=="head"){const $e=yield v(j);if(typeof $e=="number"&&isFinite($e)&&(P=$e,$e>de))throw De()}const ye=ce&&(q.isReadableStream(j)||q.isStream(j)),ie=($e,It,Ln)=>J0($e,Z0,wn=>{if(ce&&wn>de)throw Se=De();It&&It(wn)},Ln);if(T&&I!=="get"&&I!=="head"&&(he||ye)){if(P=P==null?yield A(oe,j):P,P!==0||ye){let $e=new a(C,{method:"POST",body:j,duplex:"half"}),It;if(q.isFormData(j)&&(It=$e.headers.get("content-type"))&&oe.setContentType(It),$e.body){const[Ln,wn]=he&&Y0(P,Nu(W0(he)))||[];j=ie($e.body,Ln,wn)}}}else if(ye&&!d&&p&&I!=="get"&&I!=="head")j=ie(j);else if(ye&&d&&!T&&I!=="get"&&I!=="head")throw new Ce("Stream request bodies are not supported by the current fetch implementation",Ce.ERR_NOT_SUPPORT,S,M);q.isString(ee)||(ee=ee?"include":"omit");const re=d&&"credentials"in a.prototype;if(q.isFormData(j)){const $e=oe.getContentType();$e&&/^multipart\/form-data/i.test($e)&&!/boundary=/i.test($e)&&oe.delete("content-type")}oe.set("User-Agent","axios/"+Ld,!1);const Ne=le(U({},we),{signal:N,method:I.toUpperCase(),headers:R0(oe.normalize()),body:j,duplex:"half",credentials:re?ee:void 0});M=d&&new a(C,Ne);let Ye=yield d?ue(M,we):ue(C,Ne);const et=Qt.from(Ye.headers);if(pe){const $e=q.toFiniteNumber(et.getContentLength());if($e!=null&&$e>fe)throw new Ce("maxContentLength size of "+fe+" exceeded",Ce.ERR_BAD_RESPONSE,S,M)}const nn=y&&($==="stream"||$==="response");if(y&&Ye.body&&(se||pe||nn&&J)){const $e={};["status","statusText","headers"].forEach(ur=>{$e[ur]=Ye[ur]});const It=q.toFiniteNumber(et.getContentLength()),[Ln,wn]=se&&Y0(It,Nu(W0(se),!0))||[];let ar=0;const Or=ur=>{if(pe&&(ar=ur,ar>fe))throw new Ce("maxContentLength size of "+fe+" exceeded",Ce.ERR_BAD_RESPONSE,S,M);Ln&&Ln(ur)};Ye=new u(J0(Ye.body,Z0,Or,()=>{wn&&wn(),J&&J()}),$e)}$=$||"text";let dn=yield x[q.findKey(x,$)||"text"](Ye,S);if(pe&&!y&&!nn){let $e;if(dn!=null&&(typeof dn.byteLength=="number"?$e=dn.byteLength:typeof dn.size=="number"?$e=dn.size:typeof dn=="string"&&($e=typeof r=="function"?new r().encode(dn).byteLength:dn.length)),typeof $e=="number"&&$e>fe)throw new Ce("maxContentLength size of "+fe+" exceeded",Ce.ERR_BAD_RESPONSE,S,M)}return!nn&&J&&J(),yield new Promise(($e,It)=>{q0($e,It,{data:dn,headers:Qt.from(Ye.headers),status:Ye.status,statusText:Ye.statusText,config:S,request:M})})}catch(xe){if(J&&J(),N&&N.aborted&&N.reason instanceof Ce){const ne=N.reason;throw ne.config=S,M&&(ne.request=M),xe!==ne&&Object.defineProperty(ne,"cause",{__proto__:null,value:xe,writable:!0,enumerable:!1,configurable:!0}),ne}if(Se)throw M&&!Se.request&&(Se.request=M),Se;if(xe instanceof Ce)throw M&&!xe.request&&(xe.request=M),xe;if(xe&&xe.name==="TypeError"&&/Load failed|fetch/i.test(xe.message)){const ne=new Ce("Network Error",Ce.ERR_NETWORK,S,M,xe&&xe.response);throw Object.defineProperty(ne,"cause",{__proto__:null,value:xe.cause||xe,writable:!0,enumerable:!1,configurable:!0}),ne}throw Ce.from(xe,xe&&xe.code,S,M,xe&&xe.response)}})},Vv=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,l=u,d,f,p=Vv;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:$v(t)),p=f;return f};ng();const Dd={http:uv,xhr:Lv,fetch:{get:ng}};q.forEach(Dd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const rg=e=>`- ${e}`,qv=e=>q.isFunction(e)||e===null||e===!1;function Yv(e,t){e=q.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(s=r,!qv(r)&&(s=Dd[(l=String(r)).toLowerCase()],s===void 0))throw new Ce(`Unknown adapter '${l}'`);if(s&&(q.isFunction(s)||(s=s.get(t))))break;a[l||"#"+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 l=n?u.length>1?`since :
8
+ `);this.logger.debug(`SSE event: ${n}`,s.slice(0,200)),this.onEvent(n,s)}}class Fr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let rS=class extends Fr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class _0 extends Fr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let wd=class extends Fr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class iS{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}class sS extends tS{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,l,d,f,p,m,T;super(),this._accessToken=null,this._tokenExpiresAt=0,this._conversationId=null,this._isConnected=!1,this._usingContinuationToken=!1,this.sseReader=null,this.reconnectAttempts=0,this.reconnectTimeout=null,this.intentionalDisconnect=!1,this.baseURL=t.replace(/\/+$/,""),this.orgId=n,this.esDeveloperName=r;const a={maxRetries:(u=s.maxRetries)!=null?u:3,timeout:(l=s.timeout)!=null?l:15e3,maxReconnectAttempts:(d=s.maxReconnectAttempts)!=null?d:5,reconnectDelay:(f=s.reconnectDelay)!=null?f:2e3,enableLogging:(p=s.enableLogging)!=null?p:!1,platform:(m=s.platform)!=null?m:"Web",capabilitiesVersion:(T=s.capabilitiesVersion)!=null?T:"1"};this.maxRetries=a.maxRetries,this.timeout=a.timeout,this.maxReconnectAttempts=a.maxReconnectAttempts,this.reconnectDelay=a.reconnectDelay,this.platform=a.platform,this.capabilitiesVersion=a.capabilitiesVersion,this.logger=new iS(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return ze(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return ze(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return ze(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Fr("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return ze(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return ze(this,null,function*(){var u,l,d;this.assertConnected();const n=new URLSearchParams;(t==null?void 0:t.inclClosedConvs)!=null&&n.set("inclClosedConvs",String(t.inclClosedConvs)),(t==null?void 0:t.limit)!=null&&n.set("limit",String(t.limit)),t!=null&&t.conversationId&&n.set("conversationId",t.conversationId),(t==null?void 0:t.startTimestamp)!=null&&n.set("startTimestamp",String(t.startTimestamp)),(t==null?void 0:t.endTimestamp)!=null&&n.set("endTimestamp",String(t.endTimestamp));const r=n.toString(),s="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",s);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(l=a.openConversationsFound)!=null?l:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return ze(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const s=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${s?`?${s}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}retrieveConversationTranscript(t){return ze(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new Fr("No active conversation. Call createConversation() first or pass a conversationId.","unknown");const r=`/iamessage/api/v2/conversation/${n}/transcript?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`;return this.executeRequest("GET",r,void 0,{responseType:"blob"})})}resumeConversation(t){if(this.assertConnected(),!t)throw new Fr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return ze(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}openSSE(t){return ze(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new nS(n,r,(s,a)=>this.handleSSEEvent(s,a),s=>this.handleSSEClose(s),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>ze(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const s=r instanceof Error?r.message:String(r);if(s.includes("(401)"))return this.logger.error("SSE rejected token (401) — session expired"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);this.logger.error(`Reconnect attempt ${this.reconnectAttempts} failed: ${s}`),this.attemptReconnect()}}),n)}clearReconnectTimer(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null)}handleSSEEvent(t,n){if(t==="ping")return;let r;try{r=JSON.parse(n)}catch(s){return void this.logger.debug(`Non-JSON SSE event (${t}): ${n.slice(0,100)}`)}switch(t){case"CONVERSATION_ROUTING_RESULT":this.handleRoutingResult(r);break;case"CONVERSATION_MESSAGE":this.handleConversationMessage(r);break;case"CONVERSATION_STREAMING_TOKEN":this.handleStreamingToken(r);break;case"CONVERSATION_TYPING_STARTED_INDICATOR":this.handleTypingStarted(r);break;case"CONVERSATION_TYPING_STOPPED_INDICATOR":this.handleTypingStopped(r);break;case"CONVERSATION_PROGRESS_INDICATOR":this.handleProgressIndicator(r);break;case"CONVERSATION_PARTICIPANT_CHANGED":this.handleParticipantChanged(r);break;case"CONVERSATION_CLOSE_CONVERSATION":this.handleConversationClosed(r);break;default:this.logger.debug(`Unhandled SSE event type: ${t}`)}}handleRoutingResult(t){let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.failureType||n.routingFailureType||"",s=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:s,failureType:s?void 0:r,raw:n}),s||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var l;const n=t.conversationEntry;if(!n)return;const r=((l=n.sender)==null?void 0:l.role)||"";if(r==="EndUser"||r==="Customer")return;const s=this.parseEntryPayload(n),a=this.getNestedValue(s,"abstractMessage"),u=this.getNestedString(a,"staticContent","text")||this.getNestedString(a,"content","text")||"";u&&this.emit("message",{conversationId:this._conversationId||"",messageId:n.identifier||"",content:u,sender:{role:r,name:n.senderDisplayName},timestamp:n.transcriptedTimestamp||new Date().toISOString(),raw:s})}handleStreamingToken(t){let n,r,s,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),l=this.getNestedValue(u,"streamingToken");a=this.getNestedString(l,"token","text")||this.getNestedString(l,"token","content")||"";const d=this.getNestedValue(l,"sequenceNumber");typeof d=="number"&&(n=d);const f=this.getNestedString(l,"targetMessageIdentifier");f&&(r=f);const p=this.getNestedString(l,"tokenType");p&&(s=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",U(U(U({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),s?{tokenType:s}:{})):this.logger.warn("STREAMING_TOKEN received but no token text could be extracted — payload shape may have changed")}handleTypingStarted(t){var n;this.emit("typing_started",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleTypingStopped(t){var n;this.emit("typing_stopped",{conversationId:this._conversationId||"",participant:(n=t.conversationEntry)!=null&&n.sender?{role:t.conversationEntry.sender.role||"",name:t.conversationEntry.senderDisplayName}:void 0})}handleProgressIndicator(t){const n=t.conversationEntry;if(!n)return;const r=this.parseEntryPayload(n),s=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(s,"progressMessage","text")||this.getNestedString(s,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(s,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var a,u,l,d,f;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries,s=(a=t.conversationEntry)==null?void 0:a.identifier;if(r&&r.length>0)r.forEach((p,m)=>{var A,S,k;const T=p.participant,y=p.displayName||(T==null?void 0:T.displayName)||((A=t.conversationEntry)==null?void 0:A.senderDisplayName)||"Agent",x=(T==null?void 0:T.role)||((k=(S=t.conversationEntry)==null?void 0:S.sender)==null?void 0:k.role)||"",v=p.operation||p.event||"";this.emit("participant_changed",U({conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(v)},s?{entryId:r.length>1?`${s}:${m}`:s}:{}))});else{const p=((u=t.conversationEntry)==null?void 0:u.senderDisplayName)||n.participantName||((l=n.participant)==null?void 0:l.displayName)||"Agent",m=n.operation||n.event||"";this.emit("participant_changed",U({conversationId:this._conversationId||"",participant:{role:((f=(d=t.conversationEntry)==null?void 0:d.sender)==null?void 0:f.role)||"",name:p},action:this.normalizeParticipantAction(m)},s?{entryId:s}:{}))}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return ze(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new wd("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,s){return ze(this,null,function*(){const a=(s==null?void 0:s.useAuth)!==!1;let u=0;for(;;){let l;try{const d=new AbortController;l=setTimeout(()=>d.abort(),(s==null?void 0:s.timeout)||this.timeout);const f=U({"Content-Type":"application/json"},s==null?void 0:s.headers);a&&this._accessToken&&(f.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const m=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(l),!m.ok){const T=yield m.text().catch(()=>m.statusText);if(m.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new wd(`Request ${t} ${n} failed (401): continuation token expired or invalid. Reconnect without a continuation token to create a new session.`);if(this._conversationId)throw this.logger.warn("Got 401 with active conversation — cannot auto-refresh (would orphan conversation)"),new wd(`Request ${t} ${n} failed (401): session expired. Call connect() to start a new session.`);this.logger.info("Got 401 — refreshing token and retrying..."),this._accessToken=yield this.fetchAccessToken(),u++;continue}throw new rS(`Request ${t} ${n} failed (${m.status}): ${T}`,m.status,T)}return m.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield m.blob():m.text().then(T=>T?JSON.parse(T):null)}catch(d){if(clearTimeout(l),d instanceof Fr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new _0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),p=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(m=>setTimeout(m,p));continue}throw new _0(`Network error: ${d.message}`,u,{cause:d})}throw new Fr(`Unexpected error: ${d instanceof Error?d.message:String(d)}`,"unknown",{cause:d instanceof Error?d:void 0})}}})}assertConnected(){if(!this._isConnected||!this._accessToken)throw new Fr("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const s of n){if(r==null||typeof r!="object")return;r=r[s]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}}const C="cim-widget",Cn=`--${C}`,ni={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},oS=(e=ni)=>({[`${Cn}-primary-color`]:e.primaryColor||ni.primaryColor,[`${Cn}-secondary-color`]:e.secondaryColor||ni.secondaryColor,[`${Cn}-font-color`]:e.fontColor||ni.fontColor,[`${Cn}-font-family`]:e.fontFamily||ni.fontFamily,[`${Cn}-background-color`]:e.backgroundColor||ni.backgroundColor,[`${Cn}-border-color`]:e.borderColor||ni.borderColor,[`${Cn}-border-radius`]:e.borderRadius||ni.borderRadius});function x0(e,t){return function(){return e.apply(t,arguments)}}const{toString:aS}=Object.prototype,{getPrototypeOf:Ns}=Object,{iterator:Ho,toStringTag:w0}=Symbol,xu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),jo=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),xu(n,t))return!0;n=Ns(n)}return!1},uS=(e,t)=>e!=null&&jo(e,t)?e[t]:void 0,Sd=(e=>t=>{const n=aS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zn=e=>(e=e.toLowerCase(),t=>Sd(t)===e),wu=e=>t=>typeof t===e,{isArray:Fi}=Array,ks=wu("undefined");function Cs(e){return e!==null&&!ks(e)&&e.constructor!==null&&!ks(e.constructor)&&gn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const S0=Zn("ArrayBuffer");function lS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&S0(e.buffer),t}const cS=wu("string"),gn=wu("function"),v0=wu("number"),Os=e=>e!==null&&typeof e=="object",dS=e=>e===!0||e===!1,Su=e=>{if(!Os(e))return!1;const t=Ns(e);return(t===null||t===Object.prototype||Ns(t)===null)&&!jo(e,w0)&&!jo(e,Ho)},fS=e=>{if(!Os(e)||Cs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},hS=Zn("Date"),pS=Zn("File"),mS=e=>!!(e&&typeof e.uri!="undefined"),gS=e=>e&&typeof e.getParts!="undefined",ES=Zn("Blob"),yS=Zn("FileList"),TS=e=>Os(e)&&gn(e.pipe);function bS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const A0=bS(),N0=typeof A0.FormData!="undefined"?A0.FormData:void 0,_S=e=>{if(!e)return!1;if(N0&&e instanceof N0)return!0;const t=Ns(e);if(!t||t===Object.prototype||!gn(e.append))return!1;const n=Sd(e);return n==="formdata"||n==="object"&&gn(e.toString)&&e.toString()==="[object FormData]"},xS=Zn("URLSearchParams"),[wS,SS,vS,AS]=["ReadableStream","Request","Response","Headers"].map(Zn),NS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Fi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Cs(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let l;for(r=0;r<u;r++)l=a[r],t.call(null,e[l],l,e)}}function k0(e,t){if(Cs(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 Bi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,C0=e=>!ks(e)&&e!==Bi;function vd(...e){const{caseless:t,skipUndefined:n}=C0(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&k0(r,u)||u,d=xu(r,l)?r[l]:void 0;Su(d)&&Su(a)?r[l]=vd(d,a):Su(a)?r[l]=vd({},a):Fi(a)?r[l]=a.slice():(!n||!ks(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||Cs(l)||(zo(l,s),typeof l!="object"||Fi(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];US.call(l,p)&&s(l[p],p)}}return r}const kS=(e,t,n,{allOwnKeys:r}={})=>(zo(t,(s,a)=>{n&&gn(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),CS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),OS=(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)},IS=(e,t,n,r)=>{let s,a,u;const l={};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))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=n!==!1&&Ns(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},PS=(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},RS=e=>{if(!e)return null;if(Fi(e))return e;let t=e.length;if(!v0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},LS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ns(Uint8Array)),DS=(e,t)=>{const r=(e&&e[Ho]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},MS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},FS=Zn("HTMLFormElement"),BS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:US}=Object.prototype,HS=Zn("RegExp"),O0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};zo(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},jS=e=>{O0(e,(t,n)=>{if(gn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(gn(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+"'")})}})},zS=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Fi(e)?r(e):r(String(e).split(t)),n},$S=()=>{},VS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function qS(e){return!!(e&&gn(e.append)&&e[w0]==="FormData"&&e[Ho])}const YS=e=>{const t=new WeakSet,n=r=>{if(Os(r)){if(t.has(r))return;if(Cs(r))return r;if(!("toJSON"in r)){t.add(r);const s=Fi(r)?[]:{};return zo(r,(a,u)=>{const l=n(a);!ks(l)&&(s[u]=l)}),t.delete(r),s}}return r};return n(e)},WS=Zn("AsyncFunction"),GS=e=>e&&(Os(e)||gn(e))&&gn(e.then)&&gn(e.catch),I0=((e,t)=>e?setImmediate:t?((n,r)=>(Bi.addEventListener("message",({source:s,data:a})=>{s===Bi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Bi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",gn(Bi.postMessage)),XS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Bi):typeof process!="undefined"&&process.nextTick||I0,P0=e=>e!=null&&gn(e[Ho]),q={isArray:Fi,isArrayBuffer:S0,isBuffer:Cs,isFormData:_S,isArrayBufferView:lS,isString:cS,isNumber:v0,isBoolean:dS,isObject:Os,isPlainObject:Su,isEmptyObject:fS,isReadableStream:wS,isRequest:SS,isResponse:vS,isHeaders:AS,isUndefined:ks,isDate:hS,isFile:pS,isReactNativeBlob:mS,isReactNative:gS,isBlob:ES,isRegExp:HS,isFunction:gn,isStream:TS,isURLSearchParams:xS,isTypedArray:LS,isFileList:yS,forEach:zo,merge:vd,extend:kS,trim:NS,stripBOM:CS,inherits:OS,toFlatObject:IS,kindOf:Sd,kindOfTest:Zn,endsWith:PS,toArray:RS,forEachEntry:DS,matchAll:MS,isHTMLForm:FS,hasOwnProperty:xu,hasOwnProp:xu,hasOwnInPrototypeChain:jo,getSafeProp:uS,reduceDescriptors:O0,freezeMethods:jS,toObjectSet:zS,toCamelCase:BS,noop:$S,toFiniteNumber:VS,findKey:k0,global:Bi,isContextDefined:C0,isSpecCompliantForm:qS,toJSONObject:YS,isAsyncFn:WS,isThenable:GS,setImmediate:I0,asap:XS,isIterable:P0,isSafeIterable:e=>e!=null&&jo(e,Ho)&&P0(e)},QS=q.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"]),KS=e=>{const t={};let n,r,s;return e&&e.split(`
9
+ `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&QS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function JS(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 ZS=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ev=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ad(e,t){return q.isArray(e)?e.map(n=>Ad(n,t)):JS(String(e).replace(t,""))}const tv=e=>Ad(e,ZS),nv=e=>Ad(e,ev);function R0(e){const t=Object.create(null);return q.forEach(e.toJSON(),(n,r)=>{t[r]=nv(n)}),t}const L0=Symbol("internals");function $o(e){return e&&String(e).trim().toLowerCase()}function vu(e){return e===!1||e==null?e:q.isArray(e)?e.map(vu):tv(String(e))}function rv(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 iv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Nd(e,t,n,r,s){if(q.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function sv(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ov(e,t){const n=q.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 Jt=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(l,d,f){const p=$o(d);if(!p)return;const m=q.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=vu(l))}const u=(l,d)=>q.forEach(l,(f,p)=>a(f,p,d));if(q.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(q.isString(t)&&(t=t.trim())&&!iv(t))u(KS(t),n);else if(q.isObject(t)&&q.isSafeIterable(t)){let l=Object.create(null),d,f;for(const p of t){if(!q.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],q.hasOwnProp(l,f)?(d=l[f],l[f]=q.isArray(d)?[...d,p[1]]:[d,p[1]]):l[f]=p[1]}u(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=$o(t),t){const r=q.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return rv(s);if(q.isFunction(n))return n.call(this,s,r);if(q.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=$o(t),t){const r=q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Nd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=$o(u),u){const l=q.findKey(r,u);l&&(!n||Nd(r,r[l],l,n))&&(delete r[l],s=!0)}}return q.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||Nd(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return q.forEach(this,(s,a)=>{const u=q.findKey(r,a);if(u){n[u]=vu(s),delete n[a];return}const l=t?sv(a):String(a).trim();l!==a&&delete n[a],n[l]=vu(s),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return q.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&q.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(`
10
+ `)}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[L0]=this[L0]={accessors:{}}).accessors,s=this.prototype;function a(u){const l=$o(u);r[l]||(ov(s,u),r[l]=!0)}return q.isArray(t)?t.forEach(a):a(t),this}};Jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(Jt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),q.freezeMethods(Jt);const av="[REDACTED ****]";function uv(e){if(q.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(q.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function lv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||q.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof Jt&&(a=a.toJSON()),r.push(a);let u;if(q.isArray(a))u=[],a.forEach((l,d)=>{const f=s(l);q.isUndefined(f)||(u[d]=f)});else{if(!q.isPlainObject(a)&&uv(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?av:s(d);q.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return s(e)}let Ne=class s2 extends Error{static from(t,n,r,s,a,u){const l=new s2(t.message,n||t.code,r,s,a);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),u&&Object.assign(l,u),l}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&&q.hasOwnProp(t,"redact")?t.redact:void 0,r=q.isArray(n)&&n.length>0?lv(t,n):q.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}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ne.ERR_BAD_OPTION="ERR_BAD_OPTION",Ne.ECONNABORTED="ECONNABORTED",Ne.ETIMEDOUT="ETIMEDOUT",Ne.ECONNREFUSED="ECONNREFUSED",Ne.ERR_NETWORK="ERR_NETWORK",Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ne.ERR_DEPRECATED="ERR_DEPRECATED",Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ne.ERR_CANCELED="ERR_CANCELED",Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ne.ERR_INVALID_URL="ERR_INVALID_URL",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const cv=null,D0=100;function kd(e){return q.isPlainObject(e)||q.isArray(e)}function M0(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function Cd(e,t,n){return e?e.concat(t).map(function(s,a){return s=M0(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function dv(e){return q.isArray(e)&&!e.some(kd)}const fv=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Au(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,I){return!q.isUndefined(I[k])});const r=n.metaTokens,s=n.visitor||x,a=n.dots,u=n.indexes,l=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?D0:n.maxDepth,f=l&&q.isSpecCompliantForm(t),p=[];if(!q.isFunction(s))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(q.isDate(S))return S.toISOString();if(q.isBoolean(S))return S.toString();if(!f&&q.isBlob(S))throw new Ne("Blob is not supported. Use a Buffer instead.");if(q.isArrayBuffer(S)||q.isTypedArray(S)){if(f&&typeof l=="function")return new l([S]);if(typeof Buffer!="undefined")return Buffer.from(S);throw new Ne("Blob is not supported. Use a Buffer instead.",Ne.ERR_NOT_SUPPORT)}return S}function T(S){if(S>d)throw new Ne("Object is too deeply nested ("+S+" levels). Max depth: "+d,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(S,k){if(d===1/0)return JSON.stringify(S);const I=[];return JSON.stringify(S,function(Y,R){if(!q.isObject(R))return R;for(;I.length&&I[I.length-1]!==this;)I.pop();return I.push(R),T(k+I.length-1),R})}function x(S,k,I){let j=S;if(q.isReactNative(t)&&q.isReactNativeBlob(S))return t.append(Cd(I,k,a),m(S)),!1;if(S&&!I&&typeof S=="object"){if(q.endsWith(k,"{}"))k=r?k:k.slice(0,-2),S=y(S,1);else if(q.isArray(S)&&dv(S)||(q.isFileList(S)||q.endsWith(k,"[]"))&&(j=q.toArray(S)))return k=M0(k),j.forEach(function(R,W){!(q.isUndefined(R)||R===null)&&t.append(u===!0?Cd([k],W,a):u===null?k:k+"[]",m(R))}),!1}return kd(S)?!0:(t.append(Cd(I,k,a),m(S)),!1)}const v=Object.assign(fv,{defaultVisitor:x,convertValue:m,isVisitable:kd});function A(S,k,I=0){if(!q.isUndefined(S)){if(T(I),p.indexOf(S)!==-1)throw new Error("Circular reference detected in "+k.join("."));p.push(S),q.forEach(S,function(Y,R){(!(q.isUndefined(Y)||Y===null)&&s.call(t,Y,q.isString(R)?R.trim():R,k,v))===!0&&A(Y,k?k.concat(R):[R],I+1)}),p.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return A(e),t}function F0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Od(e,t){this._pairs=[],e&&Au(e,this,t)}const B0=Od.prototype;B0.append=function(t,n){this._pairs.push([t,n])},B0.toString=function(t){const n=t?r=>t.call(this,r,F0):F0;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function hv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function U0(e,t,n){if(!t)return e;e=e||"";const r=q.isFunction(n)?{serialize:n}:n,s=q.getSafeProp(r,"encode")||hv,a=q.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=q.isURLSearchParams(t)?t.toString():new Od(t,r).toString(s),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class H0{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){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Id={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},pv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Od,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Pd=typeof window!="undefined"&&typeof document!="undefined",Rd=typeof navigator=="object"&&navigator||void 0,mv=Pd&&(!Rd||["ReactNative","NativeScript","NS"].indexOf(Rd.product)<0),gv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ev=Pd&&window.location.href||"http://localhost",Wt=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pd,hasStandardBrowserEnv:mv,hasStandardBrowserWebWorkerEnv:gv,navigator:Rd,origin:Ev},Symbol.toStringTag,{value:"Module"}))),pv);function yv(e,t){return Au(e,new Wt.classes.URLSearchParams,U({visitor:function(n,r,s,a){return Wt.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const j0=D0;function z0(e){if(e>j0)throw new Ne("FormData field is too deeply nested ("+e+" levels). Max depth: "+j0,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Tv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)z0(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function bv(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 $0(e){function t(n,r,s,a){z0(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&q.isArray(s)?s.length:u,d?(q.hasOwnProp(s,u)?s[u]=q.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!l):((!q.hasOwnProp(s,u)||!q.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&q.isArray(s[u])&&(s[u]=bv(s[u])),!l)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,s)=>{t(Tv(r),s,n,0)}),n}return null}const Is=(e,t)=>e!=null&&q.hasOwnProp(e,t)?e[t]:void 0;function _v(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Vo={transitional:Id,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=q.isObject(t);if(a&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return s?JSON.stringify($0(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Is(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return yv(t,d).toString();if((l=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Is(this,"env"),p=f&&f.FormData;return Au(l?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),_v(t)):t}],transformResponse:[function(t){const n=Is(this,"transitional")||Vo.transitional,r=n&&n.forcedJSONParsing,s=Is(this,"responseType"),a=s==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!s||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Is(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Ne.from(d,Ne.ERR_BAD_RESPONSE,this,null,Is(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wt.classes.FormData,Blob:Wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch","query"],e=>{Vo.headers[e]={}});function Ld(e,t){const n=this||Vo,r=t||n,s=Jt.from(r.headers);let a=r.data;return q.forEach(e,function(l){a=l.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function V0(e){return!!(e&&e.__CANCEL__)}let qo=class extends Ne{constructor(t,n,r){super(t==null?"canceled":t,Ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function q0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function xv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function wv(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,T=0;for(;m!==s;)T+=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(T*1e3/y):void 0}}function Sv(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 Nu=(e,t,n=3)=>{let r=0;const s=wv(50,250);return Sv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,l=a.lengthComputable?a.total:void 0,d=l!=null?Math.min(u,l):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-d)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},Y0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},W0=e=>(...t)=>q.asap(()=>e(...t)),vv=Wt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Wt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Wt.origin),Wt.navigator&&/(msie|trident)/i.test(Wt.navigator.userAgent)):()=>!0,Av=Wt.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];q.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),q.isString(r)&&l.push(`path=${r}`),q.isString(s)&&l.push(`domain=${s}`),a===!0&&l.push("secure"),q.isString(u)&&l.push(`SameSite=${u}`),document.cookie=l.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 Nv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function kv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Cv=/^https?:(?!\/\/)/i,Ov=/[\t\n\r]/g;function Iv(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Pv(e){return Iv(e).replace(Ov,"")}function G0(e,t){if(typeof e=="string"&&Cv.test(Pv(e)))throw new Ne('Invalid URL: missing "//" after protocol',Ne.ERR_INVALID_URL,t)}function X0(e,t,n,r){G0(t,r);let s=!Nv(t);return e&&(s||n===!1)?(G0(e,r),kv(e,t)):t}const Q0=e=>e instanceof Jt?U({},e):e;function Ui(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,T,y){return q.isPlainObject(p)&&q.isPlainObject(m)?q.merge.call({caseless:y},p,m):q.isPlainObject(m)?q.merge({},m):q.isArray(m)?m.slice():m}function s(p,m,T,y){if(q.isUndefined(m)){if(!q.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!q.isUndefined(m))return r(void 0,m)}function u(p,m){if(q.isUndefined(m)){if(!q.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=q.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!q.isUndefined(m))if(q.isPlainObject(m)){if(q.hasOwnProp(m,p))return m[p]}else return;const T=q.hasOwnProp(e,"transitional")?e.transitional:void 0;if(q.isPlainObject(T)&&q.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(q.hasOwnProp(t,T))return r(p,m);if(q.hasOwnProp(e,T))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,T)=>s(Q0(p),Q0(m),T,!0)};return q.forEach(Object.keys(U(U({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=q.hasOwnProp(f,m)?f[m]:s,y=q.hasOwnProp(e,m)?e[m]:void 0,x=q.hasOwnProp(t,m)?t[m]:void 0,v=T(y,x,m);q.isUndefined(v)&&T!==d||(n[m]=v)}),q.hasOwnProp(t,"validateStatus")&&q.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(q.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const Rv=["content-type","content-length"];function Lv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{Rv.includes(r.toLowerCase())&&e.set(r,s)})}const Dv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function K0(e){const t=Ui({},e),n=T=>q.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=Jt.from(l),t.url=U0(X0(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=q.getSafeProp(d,"username")||"",y=q.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(T+":"+(y?Dv(y):"")))}catch(x){throw Ne.from(x,Ne.ERR_BAD_OPTION_VALUE,e)}}if(q.isFormData(r)&&(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv||q.isReactNative(r)?l.setContentType(void 0):q.isFunction(r.getHeaders)&&Lv(l,r.getHeaders(),n("formDataHeaderPolicy"))),Wt.hasStandardBrowserEnv&&(q.isFunction(s)&&(s=s(t)),s===!0||s==null&&vv(t.url))){const y=a&&u&&Av.read(u);y&&l.set(a,y)}return t}const Mv=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=K0(e);let a=s.data;const u=Jt.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=s,p,m,T,y,x;function v(){y&&y(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function S(){if(!A)return;const I=Jt.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),Y={data:!l||l==="text"||l==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:I,config:e,request:A};q0(function(W){n(W),v()},function(W){r(W),v()},Y),A=null}"onloadend"in A?A.onloadend=S:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(S)},A.onabort=function(){A&&(r(new Ne("Request aborted",Ne.ECONNABORTED,e,A)),v(),A=null)},A.onerror=function(j){const Y=j&&j.message?j.message:"Network Error",R=new Ne(Y,Ne.ERR_NETWORK,e,A);R.event=j||null,r(R),v(),A=null},A.ontimeout=function(){let j=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const Y=s.transitional||Id;s.timeoutErrorMessage&&(j=s.timeoutErrorMessage),r(new Ne(j,Y.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,A)),v(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&q.forEach(R0(u),function(j,Y){A.setRequestHeader(Y,j)}),q.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),l&&l!=="json"&&(A.responseType=s.responseType),f&&([T,x]=Nu(f,!0),A.addEventListener("progress",T)),d&&A.upload&&([m,y]=Nu(d),A.upload.addEventListener("progress",m),A.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=I=>{A&&(r(!I||I.type?new qo(null,e,A):I),A.abort(),v(),A=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const k=xv(s.url);if(k&&!Wt.protocols.includes(k)){r(new Ne("Unsupported protocol "+k+":",Ne.ERR_BAD_REQUEST,e)),v();return}A.send(a||null)})},Fv=(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 Ne?f:new qo(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ne(`timeout of ${t}ms exceeded`,Ne.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:l}=n;return l.unsubscribe=()=>q.asap(u),l},Bv=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},Uv=function(e,t){return Zm(this,null,function*(){try{for(var n=i2(Hv(e)),r,s,a;r=!(s=yield new ws(n.next())).done;r=!1){const u=s.value;yield*e0(Bv(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new ws(s.call(n)))}finally{if(a)throw a[0]}}})},Hv=function(e){return Zm(this,null,function*(){if(e[Symbol.asyncIterator]){yield*e0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new ws(t.read());if(n)break;yield r}}finally{yield new ws(t.cancel())}})},J0=(e,t,n,r)=>{const s=Uv(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return ze(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){l(),f.close();return}let T=m.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw l(p),p}})},cancel(f){return l(f),s.return()}},{highWaterMark:2})},ku=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,jv=(e,t,n)=>t+2<n&&ku(e.charCodeAt(t+1))&&ku(e.charCodeAt(t+2));function zv(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 l=r.length;for(let y=0;y<l;y++)if(r.charCodeAt(y)===37&&y+2<l){const x=r.charCodeAt(y+1),v=r.charCodeAt(y+2);ku(x)&&ku(v)&&(u-=2,y+=2)}let d=0,f=l-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 T=Math.floor(u/4)*3-(d||0);return T>0?T:0}let a=0;for(let u=0,l=r.length;u<l;u++){const d=r.charCodeAt(u);if(d===37&&jv(r,u,l))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<l){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Dd="1.18.1",Z0=64*1024,{isFunction:Cu}=q,$v=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),eg=e=>{if(!q.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},tg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Vv=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},qv=e=>{const t=q.global!==void 0&&q.global!==null?q.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=q.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,l=s?Cu(s):typeof fetch=="function",d=Cu(a),f=Cu(u);if(!l)return!1;const p=l&&Cu(n),m=l&&(typeof r=="function"?(S=>k=>S.encode(k))(new r):S=>ze(null,null,function*(){return new Uint8Array(yield new a(S).arrayBuffer())})),T=d&&p&&tg(()=>{let S=!1;const k=new a(Wt.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),I=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),S&&!I}),y=f&&p&&tg(()=>q.isReadableStream(new u("").body)),x={stream:y&&(S=>S.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!x[S]&&(x[S]=(k,I)=>{let j=k&&k[S];if(j)return j.call(k);throw new Ne(`Response type '${S}' is not supported`,Ne.ERR_NOT_SUPPORT,I)})});const v=S=>ze(null,null,function*(){if(S==null)return 0;if(q.isBlob(S))return S.size;if(q.isSpecCompliantForm(S))return(yield new a(Wt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(q.isArrayBufferView(S)||q.isArrayBuffer(S))return S.byteLength;if(q.isURLSearchParams(S)&&(S=S+""),q.isString(S))return(yield m(S)).byteLength}),A=(S,k)=>ze(null,null,function*(){const I=q.toFiniteNumber(S.getContentLength());return I==null?v(k):I});return S=>ze(null,null,function*(){let{url:k,method:I,data:j,signal:Y,cancelToken:R,timeout:W,onDownloadProgress:ie,onUploadProgress:de,responseType:$,headers:se,withCredentials:ee="same-origin",fetchOptions:xe,maxContentLength:fe,maxBodyLength:ce}=K0(S);const he=q.isNumber(fe)&&fe>-1,le=q.isNumber(ce)&&ce>-1,K=_e=>q.hasOwnProp(S,_e)?S[_e]:void 0;let ae=s||fetch;$=$?($+"").toLowerCase():"text";let N=Fv([Y,R&&R.toAbortSignal()],W),D=null;const J=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let P,Se=null;const Me=()=>new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,S,D);try{let _e;const ne=K("auth");if(ne){const Pe=q.getSafeProp(ne,"username")||"",Et=q.getSafeProp(ne,"password")||"";_e={username:Pe,password:Et}}if(Vv(k)){const Pe=new URL(k,Wt.origin);if(!_e&&(Pe.username||Pe.password)){const Et=eg(Pe.username),Ln=eg(Pe.password);_e={username:Et,password:Ln}}(Pe.username||Pe.password)&&(Pe.username="",Pe.password="",k=Pe.href)}if(_e&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa($v((_e.username||"")+":"+(_e.password||""))))),he&&typeof k=="string"&&k.startsWith("data:")&&zv(k)>fe)throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,D);if(le&&I!=="get"&&I!=="head"){const Pe=yield v(j);if(typeof Pe=="number"&&isFinite(Pe)&&(P=Pe,Pe>ce))throw Me()}const Ee=le&&(q.isReadableStream(j)||q.isStream(j)),re=(Pe,Et,Ln)=>J0(Pe,Z0,wn=>{if(le&&wn>ce)throw Se=Me();Et&&Et(wn)},Ln);if(T&&I!=="get"&&I!=="head"&&(de||Ee)){if(P=P==null?yield A(se,j):P,P!==0||Ee){let Pe=new a(k,{method:"POST",body:j,duplex:"half"}),Et;if(q.isFormData(j)&&(Et=Pe.headers.get("content-type"))&&se.setContentType(Et),Pe.body){const[Ln,wn]=de&&Y0(P,Nu(W0(de)))||[];j=re(Pe.body,Ln,wn)}}}else if(Ee&&!d&&p&&I!=="get"&&I!=="head")j=re(j);else if(Ee&&d&&!T&&I!=="get"&&I!=="head")throw new Ne("Stream request bodies are not supported by the current fetch implementation",Ne.ERR_NOT_SUPPORT,S,D);q.isString(ee)||(ee=ee?"include":"omit");const ve=d&&"credentials"in a.prototype;if(q.isFormData(j)){const Pe=se.getContentType();Pe&&/^multipart\/form-data/i.test(Pe)&&!/boundary=/i.test(Pe)&&se.delete("content-type")}se.set("User-Agent","axios/"+Dd,!1);const $e=ue(U({},xe),{signal:N,method:I.toUpperCase(),headers:R0(se.normalize()),body:j,duplex:"half",credentials:ve?ee:void 0});D=d&&new a(k,$e);let gt=yield d?ae(D,xe):ae(k,$e);const Ce=Jt.from(gt.headers);if(he){const Pe=q.toFiniteNumber(Ce.getContentLength());if(Pe!=null&&Pe>fe)throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,D)}const We=y&&($==="stream"||$==="response");if(y&&gt.body&&(ie||he||We&&J)){const Pe={};["status","statusText","headers"].forEach(ur=>{Pe[ur]=gt[ur]});const Et=q.toFiniteNumber(Ce.getContentLength()),[Ln,wn]=ie&&Y0(Et,Nu(W0(ie),!0))||[];let ar=0;const Or=ur=>{if(he&&(ar=ur,ar>fe))throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,D);Ln&&Ln(ur)};gt=new u(J0(gt.body,Z0,Or,()=>{wn&&wn(),J&&J()}),Pe)}$=$||"text";let Ze=yield x[q.findKey(x,$)||"text"](gt,S);if(he&&!y&&!We){let Pe;if(Ze!=null&&(typeof Ze.byteLength=="number"?Pe=Ze.byteLength:typeof Ze.size=="number"?Pe=Ze.size:typeof Ze=="string"&&(Pe=typeof r=="function"?new r().encode(Ze).byteLength:Ze.length)),typeof Pe=="number"&&Pe>fe)throw new Ne("maxContentLength size of "+fe+" exceeded",Ne.ERR_BAD_RESPONSE,S,D)}return!We&&J&&J(),yield new Promise((Pe,Et)=>{q0(Pe,Et,{data:Ze,headers:Jt.from(gt.headers),status:gt.status,statusText:gt.statusText,config:S,request:D})})}catch(_e){if(J&&J(),N&&N.aborted&&N.reason instanceof Ne){const ne=N.reason;throw ne.config=S,D&&(ne.request=D),_e!==ne&&Object.defineProperty(ne,"cause",{__proto__:null,value:_e,writable:!0,enumerable:!1,configurable:!0}),ne}if(Se)throw D&&!Se.request&&(Se.request=D),Se;if(_e instanceof Ne)throw D&&!_e.request&&(_e.request=D),_e;if(_e&&_e.name==="TypeError"&&/Load failed|fetch/i.test(_e.message)){const ne=new Ne("Network Error",Ne.ERR_NETWORK,S,D,_e&&_e.response);throw Object.defineProperty(ne,"cause",{__proto__:null,value:_e.cause||_e,writable:!0,enumerable:!1,configurable:!0}),ne}throw Ne.from(_e,_e&&_e.code,S,D,_e&&_e.response)}})},Yv=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,l=u,d,f,p=Yv;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:qv(t)),p=f;return f};ng();const Md={http:cv,xhr:Mv,fetch:{get:ng}};q.forEach(Md,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const rg=e=>`- ${e}`,Wv=e=>q.isFunction(e)||e===null||e===!1;function Gv(e,t){e=q.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(s=r,!Wv(r)&&(s=Md[(l=String(r)).toLowerCase()],s===void 0))throw new Ne(`Unknown adapter '${l}'`);if(s&&(q.isFunction(s)||(s=s.get(t))))break;a[l||"#"+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 l=n?u.length>1?`since :
11
11
  `+u.map(rg).join(`
12
- `):" "+rg(u[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+l,Ce.ERR_NOT_SUPPORT)}return s}const ig={getAdapter:Yv,adapters:Dd};function Md(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vo(null,e)}function sg(e){return Md(e),e.headers=Qt.from(e.headers),e.data=Rd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ig.getAdapter(e.adapter||$o.adapter,e)(e).then(function(r){Md(e),e.response=r;try{r.data=Rd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Qt.from(r.headers),r},function(r){if(!V0(r)&&(Md(e),r&&r.response)){e.response=r.response;try{r.response.data=Rd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Qt.from(r.response.headers)}return Promise.reject(r)})}const Ou={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ou[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const og={};Ou.transitional=function(t,n,r){function s(a,u){return"[Axios v"+Ld+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new Ce(s(u," has been removed"+(n?" in "+n:"")),Ce.ERR_DEPRECATED);return n&&!og[u]&&(og[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,l):!0}},Ou.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Wv(e,t,n){if(typeof e!="object"||e===null)throw new Ce("options must be an object",Ce.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 l=e[a],d=l===void 0||u(l,a,e);if(d!==!0)throw new Ce("option "+a+" must be "+d,Ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ce("Unknown option "+a,Ce.ERR_BAD_OPTION)}}const Iu={assertOptions:Wv,validators:Ou},Kt=Iu.validators;let Hi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new H0,response:new H0}}request(t,n){return je(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(`
12
+ `):" "+rg(u[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+l,Ne.ERR_NOT_SUPPORT)}return s}const ig={getAdapter:Gv,adapters:Md};function Fd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qo(null,e)}function sg(e){return Fd(e),e.headers=Jt.from(e.headers),e.data=Ld.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ig.getAdapter(e.adapter||Vo.adapter,e)(e).then(function(r){Fd(e),e.response=r;try{r.data=Ld.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Jt.from(r.headers),r},function(r){if(!V0(r)&&(Fd(e),r&&r.response)){e.response=r.response;try{r.response.data=Ld.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Jt.from(r.response.headers)}return Promise.reject(r)})}const Ou={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ou[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const og={};Ou.transitional=function(t,n,r){function s(a,u){return"[Axios v"+Dd+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new Ne(s(u," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!og[u]&&(og[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,l):!0}},Ou.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Xv(e,t,n){if(typeof e!="object"||e===null)throw new Ne("options must be an object",Ne.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 l=e[a],d=l===void 0||u(l,a,e);if(d!==!0)throw new Ne("option "+a+" must be "+d,Ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const Iu={assertOptions:Xv,validators:Ou},Zt=Iu.validators;let Hi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new H0,response:new H0}}request(t,n){return ze(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(`
13
13
  `);return u===-1?"":s.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
14
14
  `),l=u===-1?-1:a.indexOf(`
15
15
  `,u+1),d=l===-1?"":a.slice(l+1);String(r.stack).endsWith(d)||(r.stack+=`
16
- `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ui(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Iu.assertOptions(r,{silentJSONParsing:Kt.transitional(Kt.boolean),forcedJSONParsing:Kt.transitional(Kt.boolean),clarifyTimeoutError:Kt.transitional(Kt.boolean),legacyInterceptorReqResOrdering:Kt.transitional(Kt.boolean),advertiseZstdAcceptEncoding:Kt.transitional(Kt.boolean),validateStatusUndefinedResolves:Kt.transitional(Kt.boolean)},!1),s!=null&&(q.isFunction(s)?n.paramsSerializer={serialize:s}:Iu.assertOptions(s,{encode:Kt.function,serialize:Kt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Iu.assertOptions(n,{baseUrl:Kt.spelling("baseURL"),withXsrfToken:Kt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&q.merge(a.common,a[n.method]);a&&q.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=Qt.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;d=d&&v.synchronous;const A=n.transitional||Od;A&&A.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const f=[];this.interceptors.response.forEach(function(v){f.push(v.fulfilled,v.rejected)});let p,m=0,T;if(!d){const x=[sg.bind(this),void 0];for(x.unshift(...l),x.push(...f),T=x.length,p=Promise.resolve(n);m<T;)p=p.then(x[m++],x[m++]);return p}T=l.length;let y=n;for(;m<T;){const x=l[m++],v=l[m++];try{y=x(y)}catch(A){v.call(this,A);break}}try{p=sg.call(this,y)}catch(x){return Promise.reject(x)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=Ui(this.defaults,t);const n=X0(t.baseURL,t.url,t.allowAbsoluteUrls,t);return U0(n,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(n,r){return this.request(Ui(r||{},{method:t,url:n,data:r&&q.hasOwnProp(r,"data")?r.data:void 0}))}}),q.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(Ui(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Hi.prototype[t]=n(),t!=="query"&&(Hi.prototype[t+"Form"]=n(!0))});let Gv=class i2{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(l=>{r.subscribe(l),a=l}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,l){r.reason||(r.reason=new Vo(a,u,l),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 i2(function(s){t=s}),cancel:t}}};function Xv(e){return function(n){return e.apply(null,n)}}function Qv(e){return q.isObject(e)&&e.isAxiosError===!0}const Fd={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(Fd).forEach(([e,t])=>{Fd[t]=e});function ag(e){const t=new Hi(e),n=x0(Hi.prototype.request,t);return q.extend(n,Hi.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ag(Ui(e,s))},n}const St=ag($o);St.Axios=Hi,St.CanceledError=Vo,St.CancelToken=Gv,St.isCancel=V0,St.VERSION=Ld,St.toFormData=Au,St.AxiosError=Ce,St.Cancel=St.CanceledError,St.all=function(t){return Promise.all(t)},St.spread=Xv,St.isAxiosError=Qv,St.mergeConfig=Ui,St.AxiosHeaders=Qt,St.formToJSON=e=>$0(q.isHTMLForm(e)?new FormData(e):e),St.getAdapter=ig.getAdapter,St.HttpStatusCode=Fd,St.default=St;const{Axios:uB,AxiosError:lB,CanceledError:cB,isCancel:dB,CancelToken:fB,VERSION:hB,all:pB,Cancel:mB,isAxiosError:gB,spread:EB,toFormData:yB,AxiosHeaders:TB,HttpStatusCode:bB,formToJSON:_B,getAdapter:xB,mergeConfig:wB,create:SB}=St;class Kv{constructor(t,n,r,s=!1,a,u){We(this,"CIMULATE_API_HEADER","x-cimulate-api-key");We(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");We(this,"CIMULATE_SEARCH_API_PATH","api/v1");We(this,"baseApiUrl");We(this,"headers",{});We(this,"fetchConfig",()=>je(this,null,function*(){try{const t=yield St.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}}));We(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 Jv{constructor(t,n,r,s=!1,a,u){We(this,"apiService");We(this,"config",null);We(this,"getConfig",()=>je(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}}));We(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));We(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));We(this,"getDescription",t=>this.getProductFieldValue(t,"description"));We(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));We(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));We(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));We(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));We(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));We(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});We(this,"getProductField",t=>this.config?this.config[t]:"");We(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Kv(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 kt=(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 Zv{constructor(t=!1){We(this,"isDevelopment");We(this,"_log",(t,n,...r)=>{kt(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 eA={copilot:"Your Search Assistant",messaging:"Commerce Client"},ug=H.createContext(null),tA=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:T,searchConfig:y,suggestionButtonConfig:x,progressStepsLimit:v=3,messageAlignment:A="start",autoScroll:S=!0,showProductDescription:C=!1,componentConfig:I,conversationHistory:j,resetConversationMessage:Y="",apiKey:R,apiToken:W,baseUrl:se,customerId:he,tenantId:$,theme:oe,isDevelopment:ee,__features:we,routingAttributes:fe,enableDownloadTranscript:de=!0,enableEscalationToAgent:pe=!1,showProductCaptions:ce=!1,children:K})=>{const ue=e==="messaging",N=H.useMemo(()=>{const ne=fe==null?void 0:fe.isCartMgmtSupported;return ne===!0||ne==="true"},[fe]),M=H.useMemo(()=>ue?{config:null}:new Jv(se,R,W,ee,he,$),[ue,se,R,W,ee,he,$]),J=H.useMemo(()=>new Zv(ee),[ee]);H.useEffect(()=>{ue||!M||M.config||M.getConfig()},[M,ue]);const P=H.useMemo(()=>iS(oe),[oe]),Se=H.useMemo(()=>{const ne=(y==null?void 0:y.placeholder)||m,ye=(y==null?void 0:y.buttonLabel)||T;let ie="icon";return y!=null&&y.buttonType?ie=y.buttonType:T&&(ie="text"),le(U({},y||{}),{placeholder:ne,buttonLabel:ye,buttonType:ie})},[y,m,T]),De=H.useMemo(()=>le(U({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||eA[e!=null?e:"copilot"]}),[r,t,n,e]),xe=H.useMemo(()=>({configModule:M,mode:e!=null?e:"copilot",headerConfig:De,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:P,logger:J,searchConfig:Se,suggestionButtonConfig:x,progressStepsLimit:v,messageAlignment:A,autoScroll:S,showProductDescription:!!C,enableMinimize:!!(I!=null&&I.enableMinimize),enableDownloadTranscript:de,enableEscalationToAgent:pe,showProductCaptions:!!ce,resetConversationMessage:Y,conversationHistory:{sinceHours:typeof(j==null?void 0:j.sinceHours)=="number"?j.sinceHours:1,limit:j==null?void 0:j.limit},features:we,isCartMgmtSupported:N}),[M,e,De,a,s,f,p,l,d,u,Se,x,A,S,C,I,de,pe,ce,Y,J,P,j,we,N]);return _.jsx(ug.Provider,{value:xe,children:K})},ut=()=>{const e=H.useContext(ug);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},lg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],ji=-1;function cg(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.type=="string"&&typeof t.index=="number")return lg.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:ji,data:{content:e}}}function dg(e){let t;try{t=JSON.parse(e)}catch(s){return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.type!="string"||!lg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return le(U({},n),{type:n.type,index:r})}function fg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function nA(e){return e.type==="markdown"&&e.index===ji?!fg(e.data.content):!0}function rA(e,t){if(t.index===ji){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===ji&&t.type==="markdown"){const a={type:"markdown",index:ji,data:{content:s.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(s=>s.index===t.index);return[...n>=0?e.map((s,a)=>a===n?t:s):[...e,t]].sort((s,a)=>s.index-a.index)}function hg(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const pg={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1,isSilentRequest:!1};function iA(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return U(le(U({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return le(U({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return le(U({},e),{conversationId:t.id});case"ADD_MESSAGE":return hg(e.messages,t.message)?e:le(U({},e),{messages:[...e.messages,le(U({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{if(e.isSilentRequest)return e;const n=cg(t.token);return n?le(U({},e),{streamingBlocks:rA(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null,isSilentRequest:!1};if(hg(e.messages,t.message))return U(U({},e),n);const r=le(U({},t.message),{type:"FLUSH_STREAMING"}),s=[...e.messages].reverse().find(l=>l.role==="user"),a=(s==null?void 0:s.silent)===!0;let u=!1;try{const l=JSON.parse(r.content);if(typeof l=="object"&&l!==null&&"response"in l){const{response:d}=l;u=Array.isArray(d)&&d.some(f=>typeof f=="object"&&f!==null&&"type"in f&&f.type==="cart")}}catch(l){}if(u&&a){let l=-1;for(let d=e.messages.length-1;d>=0;d--)try{const f=JSON.parse(e.messages[d].content);if(typeof f!="object"||f===null||!("response"in f))continue;const{response:p}=f;if(Array.isArray(p)&&p.some(m=>typeof m=="object"&&m!==null&&"type"in m&&m.type==="cart")){l=d;break}}catch(f){}if(l!==-1){const d=[...e.messages];return d[l]=le(U({},r),{id:e.messages[l].id}),U(le(U({},e),{messages:d}),n)}}return U(le(U({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return le(U({},e),{isAgentTyping:e.isSilentRequest?!1:t.isTyping,loading:e.isSilentRequest?e.loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return U(le(U({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.isSilentRequest||e.progressSteps[e.progressSteps.length-1]===t.message?e:le(U({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return le(U({},e),{routingResult:t.result});case"SET_ERROR":return le(U({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return le(U({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return le(U({},e),{sendError:null});case"LOAD_HISTORY":return le(U({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return le(U({},e),{sessionExpired:t.expired});case"SET_SILENT_REQUEST":return le(U({},e),{isSilentRequest:t.isSilent});case"RESET":return le(U({},pg),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const mg=H.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,sendMessage:()=>{},addToCart:()=>{},resetConversation:()=>{},retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>je(null,null,function*(){})}),sA=4320*60*1e3;function Bd(e,t){return`cim_af_conv_${e}_${t}`}function Ud(e,t){return Date.now()-e>t}function oA(e,t,n){try{const r=Bd(e,t),s=sessionStorage.getItem(r);if(!s)return null;const a=JSON.parse(s);if(!a||typeof a!="object"||!("conversationId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.conversationId!="string"||!u.conversationId?null:typeof u.storedAt!="number"||Ud(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Pu(e,t,n){try{const r=Bd(e,t),s={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(s))}catch(r){}}function Hd(e,t){try{const n=Bd(e,t);sessionStorage.removeItem(n)}catch(n){}}function jd(e,t){return`cim_af_ct_${e}_${t}`}function aA(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(lA(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function uA(e){const t=aA(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function lA(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function gg(e,t){try{const n=jd(e,t),r=sessionStorage.getItem(n);if(!r)return null;const s=JSON.parse(r);if(!s||typeof s!="object"||!("accessToken"in s)||!("lastEventId"in s)||!("storedAt"in s))return null;const a=s;return typeof a.accessToken!="string"||!a.accessToken||typeof a.lastEventId!="string"||!a.lastEventId||typeof a.storedAt!="number"?null:uA(a.accessToken)==="expired"?(sessionStorage.removeItem(n),null):a}catch(n){return null}}function cA(e,t,n,r){try{const s=jd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(s,JSON.stringify(a))}catch(s){}}function dA(e,t){try{const n=jd(e,t);sessionStorage.removeItem(n)}catch(n){}}function fA(e,t){return`cim_af_conv_${e}_${t}`}function hA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=fA(e,t);return new BroadcastChannel(n)}catch(n){return null}}function pA(e,t=500){return e?new Promise(n=>{let r=!1;const s=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var l;r||((l=u.data)==null?void 0:l.type)==="conversation_response"&&(r=!0,clearTimeout(s),e.removeEventListener("message",a),n({conversationId:u.data.conversationId,storedAt:u.data.storedAt,continuationToken:u.data.continuationToken,lastEventId:u.data.lastEventId}))}e.addEventListener("message",a);try{e.postMessage({type:"request_conversation"})}catch(u){r||(r=!0,clearTimeout(s),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function mA(e,t,n){if(!e)return()=>{};function r(s){var a;if((a=s.data)!=null&&a.type)switch(s.data.type){case"request_conversation":{const u=t();if(u!=null&&u.conversationId)try{e.postMessage({type:"conversation_response",conversationId:u.conversationId,storedAt:Date.now(),continuationToken:u.continuationToken,lastEventId:u.lastEventId})}catch(l){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function gA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function EA(e){if(e)try{e.close()}catch(t){}}function yA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function TA(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Eg(e,...t){let n=e;for(const r of t){if(n==null||typeof n!="object")return"";n=n[r]}return typeof n=="string"?n:""}function bA(e){if(e.entryType!=="Message")return null;const n=TA(e.entryPayload).abstractMessage;if(!n)return null;const r=Eg(n,"staticContent","text")||Eg(n,"content","text")||"";if(!r)return null;const s=yA(e.sender.role);return{id:e.identifier,serverId:e.identifier,role:s,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function _A(e){const t=[];for(const n of e){const r=bA(n);r&&t.push(r)}return t}const yg="onCimulateWidgetReady",xA=5e3;function Ru(e={}){const{routingAttributes:t,timeoutMs:n=xA}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=U({},t!=null?t:{});return new Promise(s=>{const a={settled:!1},u=()=>{if(a.settled)return;a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer);const p=Object.keys(r).length>0;s(p?r:t)},l={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(yg,{detail:l,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function wA(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=H.useRef(null),u=H.useRef(null),l=H.useRef(null),d=s.sinceHours*60*60*1e3,f=sA,p=H.useCallback(()=>(l.current||(l.current=pA(a.current)),l.current),[]);H.useEffect(()=>{const S=hA(t,n);a.current=S,l.current=null;const C=mA(S,()=>{const I=u.current;if(!I)return null;const j=gg(t,n);return{conversationId:I,continuationToken:j==null?void 0:j.accessToken,lastEventId:j==null?void 0:j.lastEventId}},()=>{Hd(t,n),u.current=null});return()=>{C(),EA(S),a.current=null}},[t,n]);const m=H.useCallback((S,C)=>je(null,null,function*(){var Y;const I=(Y=C==null?void 0:C.createIfMissing)!=null?Y:!0;let j=oA(t,n,f);if(!j){const R=yield p();R&&!Ud(R.storedAt,f)&&(j=R)}if(!j){if(!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const R=yield S.createConversation(yield Ru({routingAttributes:r}));return Pu(t,n,R),u.current=R,{conversationId:R,restoredMessages:[],resumed:!1,outcome:"created"}}try{const W=(yield S.listConversations({conversationId:j.conversationId,startTimestamp:Date.now()-f})).conversations.find(he=>he.conversationId===j.conversationId&&!he.isConversationClosed);if(!W){if(Hd(t,n),!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const he=yield S.createConversation(yield Ru({routingAttributes:r}));return Pu(t,n,he),u.current=he,{conversationId:he,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}}S.resumeConversation(W.conversationId),u.current=W.conversationId,Pu(t,n,W.conversationId);let se=[];try{const he=yield S.listConversationEntries(W.conversationId,{limit:s.limit,startTimestamp:Date.now()-d,direction:"FromStart"});se=_A(he.conversationEntries)}catch(he){}return{conversationId:W.conversationId,restoredMessages:se,resumed:!0,outcome:"resumed"}}catch(R){return{conversationId:j.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:R}}}),[t,n,r,s,d,f,p]),T=H.useCallback(S=>{Pu(t,n,S),u.current=S},[t,n]),y=H.useCallback(()=>{Hd(t,n),dA(t,n),gA(a.current),u.current=null},[t,n]),x=H.useCallback(()=>{const S=gg(t,n);return S?{continuationToken:S.accessToken,lastEventId:S.lastEventId}:null},[t,n]),v=H.useCallback(()=>je(null,null,function*(){const S=yield p();return!(S!=null&&S.continuationToken)||Ud(S.storedAt,f)?null:{continuationToken:S.continuationToken,lastEventId:S.lastEventId}}),[f,p]),A=H.useCallback(S=>je(null,null,function*(){try{const{accessToken:C,lastEventId:I}=yield S.generateContinuationToken();cA(t,n,C,I)}catch(C){}}),[t,n]);return{initializeConversation:m,persistConversationId:T,clearPersistedConversation:y,getStoredConnectOptions:x,getPeerConnectOptions:v,persistContinuationToken:A}}const yr={default:"Something went wrong. Please try again.",server:"Something went wrong. Please try again.",rateLimit:"We are getting a lot of requests right now. Please try again in a moment.",network:"You are offline or we couldn't reach the assistant. Check connection and try again.",interrupted:"Something went wrong. Please try again.",connect:"You are offline or we couldn't reach the assistant. Check connection and try again.",lost:"You are offline or we couldn't reach the assistant. Check connection and try again.",routing:"Something went wrong. Please try again."};function SA(e){if(!e||typeof e!="object")return{};const t=e;return{type:typeof t.type=="string"?t.type:void 0,statusCode:typeof t.statusCode=="number"?t.statusCode:void 0}}function Ps(e){const{type:t,statusCode:n}=SA(e);if(t==="api"&&typeof n=="number")return n===429?yr.rateLimit:n>=500?yr.server:yr.default;switch(t){case"network":return yr.network;case"sse":return yr.interrupted;case"auth":return yr.connect;default:return yr.default}}function Tg(e){switch(e.code){case"MAX_RECONNECT":return yr.lost;case"ROUTING_FAILED":return yr.routing;default:return yr.connect}}const vA="Your session ended due to inactivity. Starting a new session…",AA=300*1e3,NA=2e3;function bg(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="auth"?!0:t.type==="api"&&(t.statusCode===401||t.statusCode===403)}function _g(e){if(bg(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function CA(e){var T;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((T=e.variants)!=null?T:[]).filter(y=>y.value),s=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=s?` (${s})`:"",l=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",f=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${l}`;return{prompt:p,display:m}}const xg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,children:f})=>{const{logger:p,conversationHistory:m}=ut(),[T,y]=H.useReducer(iA,pg),x=H.useRef(T);x.current=T;const v=wA({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:m}),A=H.useRef(null),S=H.useRef(l),C=H.useRef(d),I=H.useRef(u),j=H.useRef(!1),Y=H.useRef(!1),R=H.useRef(0),W=H.useRef(0),se=H.useRef(0),he=H.useRef(null),$=H.useRef(null);S.current=l,C.current=d,I.current=u,H.useEffect(()=>{const ne=new rS({baseURL:e,orgId:t,esDeveloperName:n,options:U({enableLogging:a},s?{capabilitiesVersion:s}:{})});A.current=ne,ne.on("connected",()=>{var ie;y({type:"SET_CONNECTION_STATUS",status:"connected"}),(ie=I.current)==null||ie.call(I)}),ne.on("disconnected",()=>{y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),ne.on("reconnecting",()=>{y({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),ne.on("message",ie=>{var Ne;const re=le(U({id:ie.messageId||crypto.randomUUID()},ie.messageId?{serverId:ie.messageId}:{}),{role:"agent",content:ie.content,timestamp:ie.timestamp,sender:ie.sender,raw:ie});p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:re.id,tokensBeforeFlush:R.current,streamedFinalOnly:R.current===0}),R.current=0,y({type:"FLUSH_STREAMING",message:re}),(Ne=S.current)==null||Ne.call(S,re)}),ne.on("streaming_token",ie=>{if(R.current+=1,p!=null&&p.isDevelopment){const re=cg(ie.token);re?re.index===ji?p.debug("🦜 streaming_token fragment (reassembled downstream)",{token:ie.token}):p.debug("🦜 streaming_token parsed",{type:re.type,index:re.index,outputName:re.type==="tool_results"?re.output_name:void 0}):p.debug("🦜 streaming_token empty",{token:ie.token})}y({type:"APPEND_STREAMING_TOKEN",token:ie.token})}),ne.on("typing_started",()=>{y({type:"SET_AGENT_TYPING",isTyping:!0})}),ne.on("typing_stopped",()=>{y({type:"SET_AGENT_TYPING",isTyping:!1})}),ne.on("progress_indicator",ie=>{y({type:"ADD_PROGRESS_STEP",message:ie.message})}),ne.on("routing_result",ie=>{var re;if(y({type:"SET_ROUTING_RESULT",result:ie}),!ie.isSuccessful){const Ne=`Routing failed: ${ie.failureType||"unknown"}`;y({type:"SET_ERROR",error:Tg({code:"ROUTING_FAILED"})}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(re=C.current)==null||re.call(C,Ne)}}),ne.on("participant_changed",ie=>{if(ie.participant.name==="Automated Process")return;const re=le(U({id:crypto.randomUUID()},ie.entryId?{serverId:ie.entryId}:{}),{role:"system",content:ie.action==="add"?`${ie.participant.name||"Agent"} joined the conversation`:`${ie.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:ie}),y({type:"ADD_MESSAGE",message:re})}),ne.on("conversation_closed",()=>{const ie={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};y({type:"ADD_MESSAGE",message:ie}),y({type:"SET_CONVERSATION_ID",id:null}),v.clearPersistedConversation()}),ne.on("error",ie=>{var re;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:ie}),ie.code==="SESSION_EXPIRED"){Y.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}),y({type:"SET_LOADING",isLoading:!1});return}y({type:"SET_ERROR",error:Tg(ie)}),ie.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(re=C.current)==null||re.call(C,ie.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"});const ye=()=>je(null,null,function*(){let ie=v.getStoredConnectOptions(),re=!1;ie||(ie=yield v.getPeerConnectOptions(),re=!!ie);try{yield ne.connect(ie!=null?ie:void 0)}catch(Ye){if(ie&&_g(Ye))p==null||p.log("Stored token expired on connect — falling back to fresh connect"),re||v.clearPersistedConversation(),yield ne.connect();else throw Ye}yield v.persistContinuationToken(ne);const Ne=yield v.initializeConversation(ne);if(p==null||p.log("🦜 initial connect complete",{conversationId:Ne.conversationId,resumed:Ne.resumed,outcome:Ne.outcome,restoredMessages:Ne.restoredMessages.length}),Ne.outcome==="unverified-error"){Ne.conversationId&&(ne.resumeConversation(Ne.conversationId),y({type:"SET_CONVERSATION_ID",id:Ne.conversationId}));return}y({type:"SET_CONVERSATION_ID",id:Ne.conversationId}),Ne.resumed&&Ne.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:Ne.restoredMessages})});return $.current=ye,ye().catch(ie=>{var re;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:Ps(ie)}),(re=C.current)==null||re.call(C,ie.message)}),()=>{ne.disconnect(),ne.off(),A.current=null,$.current=null}},[e,t,n,s]);const oe=H.useCallback(()=>je(null,null,function*(){const ne=A.current;if(!ne)return!1;const ye=v.getStoredConnectOptions();if(!ye)return p==null||p.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;p==null||p.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{ne.disconnect(),yield ne.connect(ye)}catch(re){if(_g(re))return p==null||p.log("🦜 attemptResume: token expired (401) — will start fresh",{error:re instanceof Error?re.message:String(re)}),!1;throw p==null||p.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:re instanceof Error?re.message:String(re)}),re}yield v.persistContinuationToken(ne);const ie=yield v.initializeConversation(ne,{createIfMissing:!1});return ie.outcome==="not-found-or-closed"||!ie.conversationId?(p==null||p.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(ie.outcome==="unverified-error"&&(p==null||p.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:ie.conversationId}),ne.resumeConversation(ie.conversationId)),p==null||p.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:ie.conversationId}),y({type:"SET_CONVERSATION_ID",id:ie.conversationId}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(ie.conversationId),Y.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[v,p]),ee=H.useCallback(ne=>je(null,null,function*(){var ie;const ye=A.current;if(ye){y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""});try{yield ye.sendMessage(ne)}catch(re){y({type:"SET_SEND_ERROR",error:{text:ne,message:Ps(re)}}),(ie=C.current)==null||ie.call(C,re instanceof Error?re.message:String(re))}}}),[]),we=H.useCallback(ne=>je(null,null,function*(){var ie;const ye=A.current;if(!(!ye||j.current)){j.current=!0;try{if(yield oe()){ne&&(yield ee(ne));return}p==null||p.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),Y.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:vA,timestamp:new Date().toISOString()}}),v.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),ye.disconnect(),yield ye.connect(),yield v.persistContinuationToken(ye);const re=yield ye.createConversation(yield Ru({routingAttributes:r}));p==null||p.log("🦜 recoverExpiredSession: new conversation created",{conversationId:re}),y({type:"SET_CONVERSATION_ID",id:re}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(re),ne&&(yield ee(ne))}catch(re){const Ne=re instanceof Error?re.message:String(re);y({type:"SET_ERROR",error:Ps(re)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(ie=C.current)==null||ie.call(C,Ne)}finally{j.current=!1}}}),[r,v,oe,ee,p]),fe=H.useRef(we);fe.current=we;const de=H.useCallback(()=>je(null,null,function*(){const ne=A.current;if(!ne||j.current)return;if(!x.current.conversationId&&!Y.current){ne.reconnect();return}j.current=!0;const ye=je(null,null,function*(){try{(yield oe())||(Y.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(ie){Y.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{j.current=!1,he.current=null}});he.current=ye,yield ye}),[oe]),pe=H.useRef(de);pe.current=de,H.useEffect(()=>{const ne=()=>{const et=Date.now();et-se.current<NA||(se.current=et,pe.current())},ye=()=>{if(document.visibilityState==="hidden"){W.current=Date.now();return}const et=A.current;if(!et)return;const nn=W.current?Date.now()-W.current:0;W.current=0,(Y.current||!et.isConnected||nn>AA)&&ne()},ie=et=>{et.persisted&&ne()},re=()=>{W.current=Date.now()},Ne=()=>ne(),Ye=()=>ne();return document.addEventListener("visibilitychange",ye),window.addEventListener("pageshow",ie),window.addEventListener("pagehide",re),document.addEventListener("resume",Ne),window.addEventListener("online",Ye),()=>{document.removeEventListener("visibilitychange",ye),window.removeEventListener("pageshow",ie),window.removeEventListener("pagehide",re),document.removeEventListener("resume",Ne),window.removeEventListener("online",Ye)}},[]);const ce=H.useCallback((ne,ye)=>{const ie=A.current;if(ie){if(Y.current){fe.current(ne);return}ie.sendMessage(ne).catch(re=>{var Ne;if(bg(re)){fe.current(ne);return}y({type:"SET_SEND_ERROR",error:ye(Ps(re))}),(Ne=C.current)==null||Ne.call(C,re.message)})}},[]),K=H.useCallback(ne=>{const ye=he.current;if(ye){ye.then(ne);return}ne()},[]),ue=H.useCallback((ne,ye,ie)=>{if(!A.current)return;const Ne={id:crypto.randomUUID(),role:"user",content:ye!=null?ye:ne,timestamp:new Date().toISOString(),silent:ie==null?void 0:ie.silent};y({type:"CLEAR_SEND_ERROR"}),y({type:"ADD_MESSAGE",message:Ne}),ie!=null&&ie.silent?y({type:"SET_SILENT_REQUEST",isSilent:!0}):(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""})),K(()=>ce(ne,Ye=>({text:ne,displayContent:ye,message:Ye})))},[ce,K]),N=H.useCallback((ne,ye)=>{ne.trim()&&ue(ne,void 0,ye)},[ue]),M=H.useCallback(ne=>{if(!A.current)return;const{prompt:ye,display:ie}=CA(ne);ue(ye,ie)},[ue]),J=H.useCallback(()=>{const ne=A.current,ye=x.current.sendError;!ne||!ye||K(()=>{j.current||(y({type:"CLEAR_SEND_ERROR"}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),ce(ye.text,ie=>le(U({},ye),{message:ie})))})},[ce,K]),P=H.useCallback(()=>{const ne=A.current,ye=$.current;!ne||!ye||(Y.current=!1,ne.disconnect(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),ye().catch(ie=>{var re;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:Ps(ie)}),(re=C.current)==null||re.call(C,ie.message)}))},[]),Se=H.useCallback(()=>{const ne=A.current;ne&&(Y.current=!1,v.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),ne.endConversation().then(()=>(ne.disconnect(),ne.connect())).then(()=>je(null,null,function*(){return yield v.persistContinuationToken(ne),ne.createConversation(yield Ru({routingAttributes:r}))})).then(ye=>{y({type:"SET_CONVERSATION_ID",id:ye}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(ye)}).catch(ye=>{var ie;y({type:"SET_ERROR",error:Ps(ye)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(ie=C.current)==null||ie.call(C,ye.message)}))},[r,v]),De=H.useCallback(()=>je(null,null,function*(){var re;const ne=A.current;if(!ne)return;const ye=yield ne.retrieveConversationTranscript(),ie=URL.createObjectURL(ye);try{const Ne=document.createElement("a");Ne.href=ie,Ne.download=`transcript-${(re=ne.conversationId)!=null?re:"conversation"}.pdf`,document.body.appendChild(Ne),Ne.click(),Ne.remove()}finally{URL.revokeObjectURL(ie)}}),[]),xe=H.useMemo(()=>({connectionStatus:T.connectionStatus,isConnected:T.connectionStatus==="connected"&&T.conversationId!==null,isAgentTyping:T.isAgentTyping,conversationId:T.conversationId,messages:T.messages,streamingBlocks:T.streamingBlocks,progressMessage:T.progressMessage,progressSteps:T.progressSteps,error:T.error,sendError:T.sendError,loading:T.loading,sessionExpired:T.sessionExpired,sendMessage:N,addToCart:M,resetConversation:Se,retryLastMessage:J,retryConnection:P,downloadTranscript:De}),[T,N,M,Se,J,P,De]);return _.jsx(mg.Provider,{value:xe,children:f})};var wg=Symbol.for("immer-nothing"),Sg=Symbol.for("immer-draftable"),On=Symbol.for("immer-state");function er(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Rs=Object.getPrototypeOf;function Ls(e){return!!e&&!!e[On]}function zi(e){var t;return e?vg(e)||Array.isArray(e)||!!e[Sg]||!!((t=e.constructor)!=null&&t[Sg])||qo(e)||Mu(e):!1}var kA=Object.prototype.constructor.toString();function vg(e){if(!e||typeof e!="object")return!1;const t=Rs(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)===kA}function Lu(e,t){Du(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Du(e){const t=e[On];return t?t.type_:Array.isArray(e)?1:qo(e)?2:Mu(e)?3:0}function zd(e,t){return Du(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ag(e,t,n){const r=Du(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function OA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function qo(e){return e instanceof Map}function Mu(e){return e instanceof Set}function $i(e){return e.copy_||e.base_}function $d(e,t){if(qo(e))return new Map(e);if(Mu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=vg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[On];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],l=r[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(Rs(e),r)}else{const r=Rs(e);if(r!==null&&n)return U({},e);const s=Object.create(r);return Object.assign(s,e)}}function Vd(e,t=!1){return Bu(e)||Ls(e)||!zi(e)||(Du(e)>1&&Object.defineProperties(e,{set:{value:Fu},add:{value:Fu},clear:{value:Fu},delete:{value:Fu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>Vd(n,!0))),e}function Fu(){er(2)}function Bu(e){return Object.isFrozen(e)}var IA={};function Vi(e){const t=IA[e];return t||er(0,e),t}var Yo;function Ng(){return Yo}function PA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Cg(e,t){t&&(Vi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qd(e){Yd(e),e.drafts_.forEach(RA),e.drafts_=null}function Yd(e){e===Yo&&(Yo=e.parent_)}function kg(e){return Yo=PA(Yo,e)}function RA(e){const t=e[On];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Og(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[On].modified_&&(qd(t),er(4)),zi(e)&&(e=Uu(t,e),t.parent_||Hu(t,e)),t.patches_&&Vi("Patches").generateReplacementPatches_(n[On].base_,e,t.patches_,t.inversePatches_)):e=Uu(t,n,[]),qd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wg?e:void 0}function Uu(e,t,n){if(Bu(t))return t;const r=t[On];if(!r)return Lu(t,(s,a)=>Ig(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Hu(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),Lu(a,(l,d)=>Ig(e,r,s,l,d,n,u)),Hu(e,s,!1),n&&e.patches_&&Vi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Ig(e,t,n,r,s,a,u){if(Ls(s)){const l=a&&t&&t.type_!==3&&!zd(t.assigned_,r)?a.concat(r):void 0,d=Uu(e,s,l);if(Ag(n,r,d),Ls(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(zi(s)&&!Bu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Uu(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(qo(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Hu(e,s)}}function Hu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Vd(t,n)}function LA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Ng(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Wd;n&&(s=[r],a=Wo);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var Wd={get(e,t){if(t===On)return e;const n=$i(e);if(!zd(n,t))return DA(e,n,t);const r=n[t];return e.finalized_||!zi(r)?r:r===Gd(e.base_,t)?(Qd(e),e.copy_[t]=Kd(r,e)):r},has(e,t){return t in $i(e)},ownKeys(e){return Reflect.ownKeys($i(e))},set(e,t,n){const r=Pg($i(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Gd($i(e),t),a=s==null?void 0:s[On];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(OA(n,s)&&(n!==void 0||zd(e.base_,t)))return!0;Qd(e),Xd(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 Gd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Qd(e),Xd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=$i(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){er(11)},getPrototypeOf(e){return Rs(e.base_)},setPrototypeOf(){er(12)}},Wo={};Lu(Wd,(e,t)=>{Wo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Wo.deleteProperty=function(e,t){return Wo.set.call(this,e,t,void 0)},Wo.set=function(e,t,n){return Wd.set.call(this,e[0],t,n,e[0])};function Gd(e,t){const n=e[On];return(n?$i(n):e)[t]}function DA(e,t,n){var s;const r=Pg(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Pg(e,t){if(!(t in e))return;let n=Rs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Rs(n)}}function Xd(e){e.modified_||(e.modified_=!0,e.parent_&&Xd(e.parent_))}function Qd(e){e.copy_||(e.copy_=$d(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var MA=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"&&er(6),r!==void 0&&typeof r!="function"&&er(7);let s;if(zi(t)){const a=kg(this),u=Kd(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?qd(a):Yd(a)}return Cg(a,r),Og(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===wg&&(s=void 0),this.autoFreeze_&&Vd(s,!0),r){const a=[],u=[];Vi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else er(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,d=>t(d,...l));let r,s;return[this.produce(t,n,(u,l)=>{r=u,s=l}),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){zi(e)||er(8),Ls(e)&&(e=FA(e));const t=kg(this),n=Kd(e,void 0);return n[On].isManual_=!0,Yd(t),n}finishDraft(e,t){const n=e&&e[On];(!n||!n.isManual_)&&er(9);const{scope_:r}=n;return Cg(r,t),Og(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=Vi("Patches").applyPatches_;return Ls(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Kd(e,t){const n=qo(e)?Vi("MapSet").proxyMap_(e,t):Mu(e)?Vi("MapSet").proxySet_(e,t):LA(e,t);return(t?t.scope_:Ng()).drafts_.push(n),n}function FA(e){return Ls(e)||er(10,e),Rg(e)}function Rg(e){if(!zi(e)||Bu(e))return e;const t=e[On];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=$d(e,t.scope_.immer_.useStrictShallowCopy_)}else n=$d(e,!0);return Lu(n,(r,s)=>{Ag(n,r,Rg(s))}),t&&(t.finalized_=!1),n}var BA=new MA,UA=BA.produce;function HA(e,t,n){var r=H.useMemo(function(){return UA(e)},[e]);return H.useReducer(r,t,n)}const dt={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"},Lg={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",disableAskElseButton:!1},Dg=H.createContext(null),Mg=H.createContext(null),jA=({children:e,dispatch:t})=>{const n=H.useCallback(x=>{t({type:dt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=H.useCallback(x=>{t({type:dt.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),s=H.useCallback(x=>{t({type:dt.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=H.useCallback(x=>{t({type:dt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=H.useCallback(x=>{t({type:dt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),l=H.useCallback(x=>{t({type:dt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=H.useCallback(x=>{t({type:dt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),f=H.useCallback(x=>{t({type:dt.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),p=H.useCallback(x=>{t({type:dt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),m=H.useCallback(x=>{t({type:dt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),T=H.useCallback(x=>{t({type:dt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=H.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,s,a,u,l,d,f,p,m,T]);return _.jsx(Mg.Provider,{value:y,children:e})},zA=(e,t)=>{const{type:n,payload:r}=t;switch(n){case dt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case dt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case dt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case dt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case dt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case dt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case dt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case dt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case dt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case dt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case dt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case dt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case dt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case dt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case dt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},$A=({promptsConfig:e,children:t})=>{const[n,r]=HA(zA,U(U({},Lg),e||{}));return _.jsx(Dg.Provider,{value:n,children:_.jsx(jA,{dispatch:r,children:t})})};function VA(){var e=H.useRef(!0);return e.current?(e.current=!1,!0):e.current}function qA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function YA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Jd=typeof window!="undefined",ju=function(e){H.useEffect(e,[])},WA=function(e){var t=H.useRef(e);t.current=e,ju(function(){return function(){return t.current()}})},GA=function(e){var t=H.useRef(0),n=H.useState(e),r=n[0],s=n[1],a=H.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return WA(function(){cancelAnimationFrame(t.current)}),[r,a]},XA=function(e,t){return e===t};function QA(e,t){t===void 0&&(t=XA);var n=H.useRef(),r=H.useRef(e),s=VA();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var KA=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,l=GA({width:Jd?window.innerWidth:r,height:Jd?window.innerHeight:a}),d=l[0],f=l[1];return H.useEffect(function(){if(Jd){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return qA(window,"resize",p),function(){YA(window,"resize",p)}}},[]),d};const Fg="cimulate",Zd=`${Fg}:ui-state-update`,ef=`${Fg}:prompts-state-update`,JA=e=>{window.addEventListener(Zd,e)},ZA=e=>{window.removeEventListener(Zd,e)},eN=(e,t)=>{const n=new CustomEvent(Zd,{detail:{property:e,value:t}});window.dispatchEvent(n)},Bg=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);it.entryTypeProxy.entryType=e},ni=e=>{const t=it.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;it.statusProxy.isOpen=n,n&&(it.statusProxy.isMinimized=!1)},zu=e=>{const t=it.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;it.statusProxy.isMinimized=n,n&&(it.statusProxy.isOpen=!1)},tf=e=>{it.modalProxy.isFullscreen=e},$u=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);it.statusProxy.type=e,e==="dialog"||e==="chat"?it.modeProxy.mode="embedded":it.modeProxy.mode="standalone"},nf=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(", ")}.`);it.dialogProxy.position=e},tN=e=>{const t=it.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;it.dialogProxy.isFullHeight=n};class nN{constructor(){We(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}});We(this,"connectedProxy");We(this,"modeProxy");We(this,"entryTypeProxy");We(this,"statusProxy");We(this,"dialogProxy");We(this,"modalProxy",{isFullscreen:!1});We(this,"_fullGet",(t,n)=>Reflect.get(t,n));We(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return eN(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 it=new nN,Ug=H.createContext({mode:it.modeProxy.mode,entryType:it.entryType,status:it.statusProxy,dialogPosition:it.dialogProxy.position,isDialogFullHeight:it.dialogProxy.isFullHeight,dialogWidth:it.dialogProxy.width,isModalFullscreen:it.modalProxy.isFullscreen,previousComponentType:it.statusProxy.type}),rN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=H.useState(e!=null?e:it.entryTypeProxy.entryType),[u,l]=H.useState(it.modeProxy.mode),[d,f]=H.useState({type:n||it.statusProxy.type,isOpen:it.statusProxy.isOpen,isMinimized:it.statusProxy.isMinimized}),[p,m]=H.useState(it.dialogProxy.position),[T,y]=H.useState(it.dialogProxy.isFullHeight),[x,v]=H.useState(it.dialogProxy.width),[A,S]=H.useState(it.modalProxy.isFullscreen),C=QA(d.type);H.useEffect(()=>{const j=Y=>{const{property:R,value:W}=Y.detail||{};if(!(!R||W===void 0)){if(R==="mode"){l(W);return}if(R==="entryType"){a(W);return}if(R==="isMinimized"){f(se=>le(U({},se),{isMinimized:W}));return}if(R==="isOpen"){f(se=>le(U({},se),{isOpen:W}));return}if(R==="type"){f(se=>le(U({},se),{type:W}));return}if(R==="position"){m(W);return}if(R==="isFullHeight"){y(W);return}if(R==="width"){v(W);return}if(R==="isFullscreen"){S(W);return}}};return JA(j),()=>{ZA(j)}},[]),ju(()=>{e&&Bg(e)}),ju(()=>{const j=n||(t==null?void 0:t.type);j&&$u(j),t&&"isOpen"in t&&ni(!!t.isOpen),t&&"isMinimized"in t&&zu(!!t.isMinimized)}),ju(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:j}=t.options;j&&nf(j),"dialogFullHeight"in t.options&&tN(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&tf(!!t.options.isModalFullscreen)});const I=H.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:C||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:x,isModalFullscreen:A}),[u,s,d,C,p,T,x,A]);return _.jsx(Ug.Provider,{value:I,children:r})},iN=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){kt(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){kt(!0,"error",`[CimulateOverrides] Override URL must use HTTPS, got ${r.protocol}. Using default components.`),t({});return}const s=document.createElement("script");s.src=e,s.async=!0,s.crossOrigin="anonymous";let a=!1;const u=()=>{a=!0,clearTimeout(l)};s.onload=()=>{if(a)return;u();const d=window.CimulateOverrides;d&&typeof d=="object"?(kt(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(kt(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),kt(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,kt(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),Hg=H.createContext({overrides:{},isInitialized:!1}),sN=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=H.useState({}),[a,u]=H.useState(!1);H.useEffect(()=>{je(null,null,function*(){let f={};e?(kt(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield iN(e)):t&&typeof t=="object"?(kt(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(kt(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=H.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return _.jsx(Hg.Provider,{value:l,children:n})},jg=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:l,openLinksInNewTab:d,globalClassName:f,isDevelopment:p=!1,componentType:m,componentConfig:T,entryType:y,entryMessage:x,disclaimerText:v,disclaimerMarkdown:A,clientContext:S,searchPlaceholder:C,searchButtonLabel:I,searchConfig:j,suggestionButtonConfig:Y,messageAlignment:R,autoScroll:W,promptsConfig:se,showProductDescription:he,resetConversationMessage:$,conversationHistory:oe,messagingConfig:ee,overrides:we,overridesUrl:fe,inlineOverrides:de,__features:pe,children:ce})=>_.jsx(tA,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:x,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:C,searchButtonLabel:I,searchConfig:j,suggestionButtonConfig:Y,messageAlignment:R,autoScroll:W,showProductDescription:he,componentConfig:T,clientContext:S,disclaimerMarkdown:A,disclaimerText:v,resetConversationMessage:$,conversationHistory:oe,isDevelopment:p,__features:pe,progressStepsLimit:ee==null?void 0:ee.progressStepsLimit,routingAttributes:ee==null?void 0:ee.routingAttributes,enableDownloadTranscript:ee==null?void 0:ee.enableDownloadTranscript,enableEscalationToAgent:ee==null?void 0:ee.enableEscalationToAgent,showProductCaptions:ee==null?void 0:ee.showProductCaptions,children:_.jsx(rN,{entryType:y,componentConfig:T,componentType:m,children:_.jsx($A,{promptsConfig:se,children:_.jsx(sN,{overridesUrl:fe,inlineOverrides:de||we,children:_.jsx(xg,{scrt2Url:(ee==null?void 0:ee.scrt2Url)||"",orgId:(ee==null?void 0:ee.orgId)||"",esDeveloperName:(ee==null?void 0:ee.esDeveloperName)||"",routingAttributes:(ee==null?void 0:ee.routingAttributes)||{},capabilitiesVersion:ee==null?void 0:ee.capabilitiesVersion,enableLogging:p,children:ce})})})})}),ri=()=>{const e=H.useContext(Ug);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var rf={exports:{}},En={},sf={exports:{}},of={};var zg;function oN(){return zg||(zg=1,(function(e){function t(K,ue){var N=K.length;K.push(ue);e:for(;0<N;){var M=N-1>>>1,J=K[M];if(0<s(J,ue))K[M]=ue,K[N]=J,N=M;else break e}}function n(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var ue=K[0],N=K.pop();if(N!==ue){K[0]=N;e:for(var M=0,J=K.length,P=J>>>1;M<P;){var Se=2*(M+1)-1,De=K[Se],xe=Se+1,ne=K[xe];if(0>s(De,N))xe<J&&0>s(ne,De)?(K[M]=ne,K[xe]=N,M=xe):(K[M]=De,K[Se]=N,M=Se);else if(xe<J&&0>s(ne,N))K[M]=ne,K[xe]=N,M=xe;else break e}}return ue}function s(K,ue){var N=K.sortIndex-ue.sortIndex;return N!==0?N:K.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var d=[],f=[],p=1,m=null,T=3,y=!1,x=!1,v=!1,A=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(K){for(var ue=n(f);ue!==null;){if(ue.callback===null)r(f);else if(ue.startTime<=K)r(f),ue.sortIndex=ue.expirationTime,t(d,ue);else break;ue=n(f)}}function j(K){if(v=!1,I(K),!x)if(n(d)!==null)x=!0,pe(Y);else{var ue=n(f);ue!==null&&ce(j,ue.startTime-K)}}function Y(K,ue){x=!1,v&&(v=!1,S(se),se=-1),y=!0;var N=T;try{for(I(ue),m=n(d);m!==null&&(!(m.expirationTime>ue)||K&&!oe());){var M=m.callback;if(typeof M=="function"){m.callback=null,T=m.priorityLevel;var J=M(m.expirationTime<=ue);ue=e.unstable_now(),typeof J=="function"?m.callback=J:m===n(d)&&r(d),I(ue)}else r(d);m=n(d)}if(m!==null)var P=!0;else{var Se=n(f);Se!==null&&ce(j,Se.startTime-ue),P=!1}return P}finally{m=null,T=N,y=!1}}var R=!1,W=null,se=-1,he=5,$=-1;function oe(){return!(e.unstable_now()-$<he)}function ee(){if(W!==null){var K=e.unstable_now();$=K;var ue=!0;try{ue=W(!0,K)}finally{ue?we():(R=!1,W=null)}}else R=!1}var we;if(typeof C=="function")we=function(){C(ee)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,de=fe.port2;fe.port1.onmessage=ee,we=function(){de.postMessage(null)}}else we=function(){A(ee,0)};function pe(K){W=K,R||(R=!0,we())}function ce(K,ue){se=A(function(){K(e.unstable_now())},ue)}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(K){K.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,pe(Y))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):he=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(K){switch(T){case 1:case 2:case 3:var ue=3;break;default:ue=T}var N=T;T=ue;try{return K()}finally{T=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,ue){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var N=T;T=K;try{return ue()}finally{T=N}},e.unstable_scheduleCallback=function(K,ue,N){var M=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?M+N:M):N=M,K){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=N+J,K={id:p++,callback:ue,priorityLevel:K,startTime:N,expirationTime:J,sortIndex:-1},N>M?(K.sortIndex=N,t(f,K),n(d)===null&&K===n(f)&&(v?(S(se),se=-1):v=!0,ce(j,N-M))):(K.sortIndex=J,t(d,K),x||y||(x=!0,pe(Y))),K},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(K){var ue=T;return function(){var N=T;T=ue;try{return K.apply(this,arguments)}finally{T=N}}}})(of)),of}var $g;function aN(){return $g||($g=1,sf.exports=oN()),sf.exports}var Vg;function uN(){if(Vg)return En;Vg=1;var e=Kn(),t=aN();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c]);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 l=!(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 T(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,c,h){if(c!==null&&c.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,o,c,h){if(o===null||typeof o=="undefined"||y(i,o,c,h))return!0;if(h)return!1;if(c!==null)switch(c.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 v(i,o,c,h,E,b,w){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=c,this.propertyName=i,this.type=o,this.sanitizeURL=b,this.removeEmptyString=w}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];A[o]=new v(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new v(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){A[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function C(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(S,C);A[o]=new v(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(S,C);A[o]=new v(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(S,C);A[o]=new v(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function I(i,o,c,h){var E=A.hasOwnProperty(o)?A[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(x(o,c,E,h)&&(c=null),h||E===null?T(o)&&(c===null?i.removeAttribute(o):i.setAttribute(o,""+c)):E.mustUseProperty?i[E.propertyName]=c===null?E.type===3?!1:"":c:(o=E.attributeName,h=E.attributeNamespace,c===null?i.removeAttribute(o):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,h?i.setAttributeNS(h,o,c):i.setAttribute(o,c))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),R=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),se=Symbol.for("react.strict_mode"),he=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),oe=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),we=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),de=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),ce=Symbol.for("react.offscreen"),K=Symbol.iterator;function ue(i){return i===null||typeof i!="object"?null:(i=K&&i[K]||i["@@iterator"],typeof i=="function"?i:null)}var N=Object.assign,M;function J(i){if(M===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);M=o&&o[1]||""}return`
17
- `+M+i}var P=!1;function Se(i,o){if(!i||P)return"";P=!0;var c=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(`
16
+ `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ui(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Iu.assertOptions(r,{silentJSONParsing:Zt.transitional(Zt.boolean),forcedJSONParsing:Zt.transitional(Zt.boolean),clarifyTimeoutError:Zt.transitional(Zt.boolean),legacyInterceptorReqResOrdering:Zt.transitional(Zt.boolean),advertiseZstdAcceptEncoding:Zt.transitional(Zt.boolean),validateStatusUndefinedResolves:Zt.transitional(Zt.boolean)},!1),s!=null&&(q.isFunction(s)?n.paramsSerializer={serialize:s}:Iu.assertOptions(s,{encode:Zt.function,serialize:Zt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Iu.assertOptions(n,{baseUrl:Zt.spelling("baseURL"),withXsrfToken:Zt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&q.merge(a.common,a[n.method]);a&&q.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=Jt.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;d=d&&v.synchronous;const A=n.transitional||Id;A&&A.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const f=[];this.interceptors.response.forEach(function(v){f.push(v.fulfilled,v.rejected)});let p,m=0,T;if(!d){const x=[sg.bind(this),void 0];for(x.unshift(...l),x.push(...f),T=x.length,p=Promise.resolve(n);m<T;)p=p.then(x[m++],x[m++]);return p}T=l.length;let y=n;for(;m<T;){const x=l[m++],v=l[m++];try{y=x(y)}catch(A){v.call(this,A);break}}try{p=sg.call(this,y)}catch(x){return Promise.reject(x)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=Ui(this.defaults,t);const n=X0(t.baseURL,t.url,t.allowAbsoluteUrls,t);return U0(n,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(n,r){return this.request(Ui(r||{},{method:t,url:n,data:r&&q.hasOwnProp(r,"data")?r.data:void 0}))}}),q.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(Ui(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Hi.prototype[t]=n(),t!=="query"&&(Hi.prototype[t+"Form"]=n(!0))});let Qv=class o2{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(l=>{r.subscribe(l),a=l}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,l){r.reason||(r.reason=new qo(a,u,l),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 o2(function(s){t=s}),cancel:t}}};function Kv(e){return function(n){return e.apply(null,n)}}function Jv(e){return q.isObject(e)&&e.isAxiosError===!0}const Bd={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(Bd).forEach(([e,t])=>{Bd[t]=e});function ag(e){const t=new Hi(e),n=x0(Hi.prototype.request,t);return q.extend(n,Hi.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ag(Ui(e,s))},n}const Nt=ag(Vo);Nt.Axios=Hi,Nt.CanceledError=qo,Nt.CancelToken=Qv,Nt.isCancel=V0,Nt.VERSION=Dd,Nt.toFormData=Au,Nt.AxiosError=Ne,Nt.Cancel=Nt.CanceledError,Nt.all=function(t){return Promise.all(t)},Nt.spread=Kv,Nt.isAxiosError=Jv,Nt.mergeConfig=Ui,Nt.AxiosHeaders=Jt,Nt.formToJSON=e=>$0(q.isHTMLForm(e)?new FormData(e):e),Nt.getAdapter=ig.getAdapter,Nt.HttpStatusCode=Bd,Nt.default=Nt;const{Axios:h7,AxiosError:p7,CanceledError:m7,isCancel:g7,CancelToken:E7,VERSION:y7,all:T7,Cancel:b7,isAxiosError:_7,spread:x7,toFormData:w7,AxiosHeaders:S7,HttpStatusCode:v7,formToJSON:A7,getAdapter:N7,mergeConfig:k7,create:C7}=Nt;class Zv{constructor(t,n,r,s=!1,a,u){Ge(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ge(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ge(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ge(this,"baseApiUrl");Ge(this,"headers",{});Ge(this,"fetchConfig",()=>ze(this,null,function*(){try{const t=yield Nt.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}}));Ge(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 eA{constructor(t,n,r,s=!1,a,u){Ge(this,"apiService");Ge(this,"config",null);Ge(this,"getConfig",()=>ze(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}}));Ge(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ge(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ge(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ge(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ge(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ge(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ge(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ge(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ge(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ge(this,"getProductField",t=>this.config?this.config[t]:"");Ge(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Zv(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 Pt=(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 tA{constructor(t=!1){Ge(this,"isDevelopment");Ge(this,"_log",(t,n,...r)=>{Pt(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 nA={copilot:"Your Search Assistant",messaging:"Commerce Client"},ug=H.createContext(null),rA=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:T,searchConfig:y,suggestionButtonConfig:x,progressStepsLimit:v=3,messageAlignment:A="start",autoScroll:S=!0,showProductDescription:k=!1,componentConfig:I,conversationHistory:j,resetConversationMessage:Y="",apiKey:R,apiToken:W,baseUrl:ie,customerId:de,tenantId:$,theme:se,isDevelopment:ee,__features:xe,routingAttributes:fe,enableDownloadTranscript:ce=!0,enableEscalationToAgent:he=!1,showProductCaptions:le=!1,children:K})=>{const ae=e==="messaging",N=H.useMemo(()=>{const ne=fe==null?void 0:fe.isCartMgmtSupported;return ne===!0||ne==="true"},[fe]),D=H.useMemo(()=>ae?{config:null}:new eA(ie,R,W,ee,de,$),[ae,ie,R,W,ee,de,$]),J=H.useMemo(()=>new tA(ee),[ee]);H.useEffect(()=>{ae||!D||D.config||D.getConfig()},[D,ae]);const P=H.useMemo(()=>oS(se),[se]),Se=H.useMemo(()=>{const ne=(y==null?void 0:y.placeholder)||m,Ee=(y==null?void 0:y.buttonLabel)||T;let re="icon";return y!=null&&y.buttonType?re=y.buttonType:T&&(re="text"),ue(U({},y||{}),{placeholder:ne,buttonLabel:Ee,buttonType:re})},[y,m,T]),Me=H.useMemo(()=>ue(U({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||nA[e!=null?e:"copilot"]}),[r,t,n,e]),_e=H.useMemo(()=>({configModule:D,mode:e!=null?e:"copilot",headerConfig:Me,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:P,logger:J,searchConfig:Se,suggestionButtonConfig:x,progressStepsLimit:v,messageAlignment:A,autoScroll:S,showProductDescription:!!k,enableMinimize:!!(I!=null&&I.enableMinimize),enableDownloadTranscript:ce,enableEscalationToAgent:he,showProductCaptions:!!le,resetConversationMessage:Y,conversationHistory:{sinceHours:typeof(j==null?void 0:j.sinceHours)=="number"?j.sinceHours:1,limit:j==null?void 0:j.limit},features:xe,isCartMgmtSupported:N}),[D,e,Me,a,s,f,p,l,d,u,Se,x,A,S,k,I,ce,he,le,Y,J,P,j,xe,N]);return _.jsx(ug.Provider,{value:_e,children:K})},at=()=>{const e=H.useContext(ug);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},lg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],ji=-1;function cg(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.type=="string"&&typeof t.index=="number")return lg.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:ji,data:{content:e}}}function dg(e){let t;try{t=JSON.parse(e)}catch(s){return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.type!="string"||!lg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return ue(U({},n),{type:n.type,index:r})}function fg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function iA(e){return e.type==="markdown"&&e.index===ji?!fg(e.data.content):!0}function sA(e,t){if(t.index===ji){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===ji&&t.type==="markdown"){const a={type:"markdown",index:ji,data:{content:s.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(s=>s.index===t.index);return[...n>=0?e.map((s,a)=>a===n?t:s):[...e,t]].sort((s,a)=>s.index-a.index)}function hg(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const pg={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1,isSilentRequest:!1};function oA(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return U(ue(U({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ue(U({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return ue(U({},e),{conversationId:t.id});case"ADD_MESSAGE":return hg(e.messages,t.message)?e:ue(U({},e),{messages:[...e.messages,ue(U({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{if(e.isSilentRequest)return e;const n=cg(t.token);return n?ue(U({},e),{streamingBlocks:sA(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null,isSilentRequest:!1};if(hg(e.messages,t.message))return U(U({},e),n);const r=ue(U({},t.message),{type:"FLUSH_STREAMING"}),s=[...e.messages].reverse().find(l=>l.role==="user"),a=(s==null?void 0:s.silent)===!0;let u=!1;try{const l=JSON.parse(r.content);if(typeof l=="object"&&l!==null&&"response"in l){const{response:d}=l;u=Array.isArray(d)&&d.some(f=>typeof f=="object"&&f!==null&&"type"in f&&f.type==="cart")}}catch(l){}if(u&&a){let l=-1;for(let d=e.messages.length-1;d>=0;d--)try{const f=JSON.parse(e.messages[d].content);if(typeof f!="object"||f===null||!("response"in f))continue;const{response:p}=f;if(Array.isArray(p)&&p.some(m=>typeof m=="object"&&m!==null&&"type"in m&&m.type==="cart")){l=d;break}}catch(f){}if(l!==-1){const d=[...e.messages];return d[l]=ue(U({},r),{id:e.messages[l].id}),U(ue(U({},e),{messages:d}),n)}}return U(ue(U({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return ue(U({},e),{isAgentTyping:e.isSilentRequest?!1:t.isTyping,loading:e.isSilentRequest?e.loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return U(ue(U({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.isSilentRequest||e.progressSteps[e.progressSteps.length-1]===t.message?e:ue(U({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return ue(U({},e),{routingResult:t.result});case"SET_ERROR":return ue(U({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return ue(U({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return ue(U({},e),{sendError:null});case"LOAD_HISTORY":return ue(U({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return ue(U({},e),{sessionExpired:t.expired});case"SET_SILENT_REQUEST":return ue(U({},e),{isSilentRequest:t.isSilent});case"RESET":return ue(U({},pg),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const mg=H.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,sendMessage:()=>{},addToCart:()=>{},resetConversation:()=>{},retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>ze(null,null,function*(){})}),aA=4320*60*1e3;function Ud(e,t){return`cim_af_conv_${e}_${t}`}function Hd(e,t){return Date.now()-e>t}function uA(e,t,n){try{const r=Ud(e,t),s=sessionStorage.getItem(r);if(!s)return null;const a=JSON.parse(s);if(!a||typeof a!="object"||!("conversationId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.conversationId!="string"||!u.conversationId?null:typeof u.storedAt!="number"||Hd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function Pu(e,t,n){try{const r=Ud(e,t),s={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(s))}catch(r){}}function jd(e,t){try{const n=Ud(e,t);sessionStorage.removeItem(n)}catch(n){}}function zd(e,t){return`cim_af_ct_${e}_${t}`}function lA(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(dA(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function cA(e){const t=lA(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function dA(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function gg(e,t){try{const n=zd(e,t),r=sessionStorage.getItem(n);if(!r)return null;const s=JSON.parse(r);if(!s||typeof s!="object"||!("accessToken"in s)||!("lastEventId"in s)||!("storedAt"in s))return null;const a=s;return typeof a.accessToken!="string"||!a.accessToken||typeof a.lastEventId!="string"||!a.lastEventId||typeof a.storedAt!="number"?null:cA(a.accessToken)==="expired"?(sessionStorage.removeItem(n),null):a}catch(n){return null}}function fA(e,t,n,r){try{const s=zd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(s,JSON.stringify(a))}catch(s){}}function hA(e,t){try{const n=zd(e,t);sessionStorage.removeItem(n)}catch(n){}}function pA(e,t){return`cim_af_conv_${e}_${t}`}function mA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=pA(e,t);return new BroadcastChannel(n)}catch(n){return null}}function gA(e,t=500){return e?new Promise(n=>{let r=!1;const s=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var l;r||((l=u.data)==null?void 0:l.type)==="conversation_response"&&(r=!0,clearTimeout(s),e.removeEventListener("message",a),n({conversationId:u.data.conversationId,storedAt:u.data.storedAt,continuationToken:u.data.continuationToken,lastEventId:u.data.lastEventId}))}e.addEventListener("message",a);try{e.postMessage({type:"request_conversation"})}catch(u){r||(r=!0,clearTimeout(s),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function EA(e,t,n){if(!e)return()=>{};function r(s){var a;if((a=s.data)!=null&&a.type)switch(s.data.type){case"request_conversation":{const u=t();if(u!=null&&u.conversationId)try{e.postMessage({type:"conversation_response",conversationId:u.conversationId,storedAt:Date.now(),continuationToken:u.continuationToken,lastEventId:u.lastEventId})}catch(l){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function yA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function TA(e){if(e)try{e.close()}catch(t){}}function bA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function _A(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Eg(e,...t){let n=e;for(const r of t){if(n==null||typeof n!="object")return"";n=n[r]}return typeof n=="string"?n:""}function xA(e){if(e.entryType!=="Message")return null;const n=_A(e.entryPayload).abstractMessage;if(!n)return null;const r=Eg(n,"staticContent","text")||Eg(n,"content","text")||"";if(!r)return null;const s=bA(e.sender.role);return{id:e.identifier,serverId:e.identifier,role:s,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function wA(e){const t=[];for(const n of e){const r=xA(n);r&&t.push(r)}return t}const yg="onCimulateWidgetReady",SA=5e3;function Ru(e={}){const{routingAttributes:t,timeoutMs:n=SA}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=U({},t!=null?t:{});return new Promise(s=>{const a={settled:!1},u=()=>{if(a.settled)return;a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer);const p=Object.keys(r).length>0;s(p?r:t)},l={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(yg,{detail:l,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function vA(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=H.useRef(null),u=H.useRef(null),l=H.useRef(null),d=s.sinceHours*60*60*1e3,f=aA,p=H.useCallback(()=>(l.current||(l.current=gA(a.current)),l.current),[]);H.useEffect(()=>{const S=mA(t,n);a.current=S,l.current=null;const k=EA(S,()=>{const I=u.current;if(!I)return null;const j=gg(t,n);return{conversationId:I,continuationToken:j==null?void 0:j.accessToken,lastEventId:j==null?void 0:j.lastEventId}},()=>{jd(t,n),u.current=null});return()=>{k(),TA(S),a.current=null}},[t,n]);const m=H.useCallback((S,k)=>ze(null,null,function*(){var Y;const I=(Y=k==null?void 0:k.createIfMissing)!=null?Y:!0;let j=uA(t,n,f);if(!j){const R=yield p();R&&!Hd(R.storedAt,f)&&(j=R)}if(!j){if(!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const R=yield S.createConversation(yield Ru({routingAttributes:r}));return Pu(t,n,R),u.current=R,{conversationId:R,restoredMessages:[],resumed:!1,outcome:"created"}}try{const W=(yield S.listConversations({conversationId:j.conversationId,startTimestamp:Date.now()-f})).conversations.find(de=>de.conversationId===j.conversationId&&!de.isConversationClosed);if(!W){if(jd(t,n),!I)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const de=yield S.createConversation(yield Ru({routingAttributes:r}));return Pu(t,n,de),u.current=de,{conversationId:de,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}}S.resumeConversation(W.conversationId),u.current=W.conversationId,Pu(t,n,W.conversationId);let ie=[];try{const de=yield S.listConversationEntries(W.conversationId,{limit:s.limit,startTimestamp:Date.now()-d,direction:"FromStart"});ie=wA(de.conversationEntries)}catch(de){}return{conversationId:W.conversationId,restoredMessages:ie,resumed:!0,outcome:"resumed"}}catch(R){return{conversationId:j.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:R}}}),[t,n,r,s,d,f,p]),T=H.useCallback(S=>{Pu(t,n,S),u.current=S},[t,n]),y=H.useCallback(()=>{jd(t,n),hA(t,n),yA(a.current),u.current=null},[t,n]),x=H.useCallback(()=>{const S=gg(t,n);return S?{continuationToken:S.accessToken,lastEventId:S.lastEventId}:null},[t,n]),v=H.useCallback(()=>ze(null,null,function*(){const S=yield p();return!(S!=null&&S.continuationToken)||Hd(S.storedAt,f)?null:{continuationToken:S.continuationToken,lastEventId:S.lastEventId}}),[f,p]),A=H.useCallback(S=>ze(null,null,function*(){try{const{accessToken:k,lastEventId:I}=yield S.generateContinuationToken();fA(t,n,k,I)}catch(k){}}),[t,n]);return{initializeConversation:m,persistConversationId:T,clearPersistedConversation:y,getStoredConnectOptions:x,getPeerConnectOptions:v,persistContinuationToken:A}}const yr={default:"Something went wrong. Please try again.",server:"Something went wrong. Please try again.",rateLimit:"We are getting a lot of requests right now. Please try again in a moment.",network:"You are offline or we couldn't reach the assistant. Check connection and try again.",interrupted:"Something went wrong. Please try again.",connect:"You are offline or we couldn't reach the assistant. Check connection and try again.",lost:"You are offline or we couldn't reach the assistant. Check connection and try again.",routing:"Something went wrong. Please try again."};function AA(e){if(!e||typeof e!="object")return{};const t=e;return{type:typeof t.type=="string"?t.type:void 0,statusCode:typeof t.statusCode=="number"?t.statusCode:void 0}}function Ps(e){const{type:t,statusCode:n}=AA(e);if(t==="api"&&typeof n=="number")return n===429?yr.rateLimit:n>=500?yr.server:yr.default;switch(t){case"network":return yr.network;case"sse":return yr.interrupted;case"auth":return yr.connect;default:return yr.default}}function Tg(e){switch(e.code){case"MAX_RECONNECT":return yr.lost;case"ROUTING_FAILED":return yr.routing;default:return yr.connect}}const NA="Your session ended due to inactivity. Starting a new session…",kA=300*1e3,CA=2e3;function bg(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="auth"?!0:t.type==="api"&&(t.statusCode===401||t.statusCode===403)}function _g(e){if(bg(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function OA(e){var T;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((T=e.variants)!=null?T:[]).filter(y=>y.value),s=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=s?` (${s})`:"",l=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",f=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${l}`;return{prompt:p,display:m}}const xg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,children:f})=>{const{logger:p,conversationHistory:m}=at(),[T,y]=H.useReducer(oA,pg),x=H.useRef(T);x.current=T;const v=vA({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:m}),A=H.useRef(null),S=H.useRef(l),k=H.useRef(d),I=H.useRef(u),j=H.useRef(!1),Y=H.useRef(!1),R=H.useRef(0),W=H.useRef(0),ie=H.useRef(0),de=H.useRef(null),$=H.useRef(null);S.current=l,k.current=d,I.current=u,H.useEffect(()=>{const ne=new sS({baseURL:e,orgId:t,esDeveloperName:n,options:U({enableLogging:a},s?{capabilitiesVersion:s}:{})});A.current=ne,ne.on("connected",()=>{var re;y({type:"SET_CONNECTION_STATUS",status:"connected"}),(re=I.current)==null||re.call(I)}),ne.on("disconnected",()=>{y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),ne.on("reconnecting",()=>{y({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),ne.on("message",re=>{var $e;const ve=ue(U({id:re.messageId||crypto.randomUUID()},re.messageId?{serverId:re.messageId}:{}),{role:"agent",content:re.content,timestamp:re.timestamp,sender:re.sender,raw:re});p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:ve.id,tokensBeforeFlush:R.current,streamedFinalOnly:R.current===0}),R.current=0,y({type:"FLUSH_STREAMING",message:ve}),($e=S.current)==null||$e.call(S,ve)}),ne.on("streaming_token",re=>{if(R.current+=1,p!=null&&p.isDevelopment){const ve=cg(re.token);ve?ve.index===ji?p.debug("🦜 streaming_token fragment (reassembled downstream)",{token:re.token}):p.debug("🦜 streaming_token parsed",{type:ve.type,index:ve.index,outputName:ve.type==="tool_results"?ve.output_name:void 0}):p.debug("🦜 streaming_token empty",{token:re.token})}y({type:"APPEND_STREAMING_TOKEN",token:re.token})}),ne.on("typing_started",()=>{y({type:"SET_AGENT_TYPING",isTyping:!0})}),ne.on("typing_stopped",()=>{y({type:"SET_AGENT_TYPING",isTyping:!1})}),ne.on("progress_indicator",re=>{y({type:"ADD_PROGRESS_STEP",message:re.message})}),ne.on("routing_result",re=>{var ve;if(y({type:"SET_ROUTING_RESULT",result:re}),!re.isSuccessful){const $e=`Routing failed: ${re.failureType||"unknown"}`;y({type:"SET_ERROR",error:Tg({code:"ROUTING_FAILED"})}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(ve=k.current)==null||ve.call(k,$e)}}),ne.on("participant_changed",re=>{if(re.participant.name==="Automated Process")return;const ve=ue(U({id:crypto.randomUUID()},re.entryId?{serverId:re.entryId}:{}),{role:"system",content:re.action==="add"?`${re.participant.name||"Agent"} joined the conversation`:`${re.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:re}),y({type:"ADD_MESSAGE",message:ve})}),ne.on("conversation_closed",()=>{const re={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};y({type:"ADD_MESSAGE",message:re}),y({type:"SET_CONVERSATION_ID",id:null}),v.clearPersistedConversation()}),ne.on("error",re=>{var ve;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:re}),re.code==="SESSION_EXPIRED"){Y.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}),y({type:"SET_LOADING",isLoading:!1});return}y({type:"SET_ERROR",error:Tg(re)}),re.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(ve=k.current)==null||ve.call(k,re.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"});const Ee=()=>ze(null,null,function*(){let re=v.getStoredConnectOptions(),ve=!1;re||(re=yield v.getPeerConnectOptions(),ve=!!re);try{yield ne.connect(re!=null?re:void 0)}catch(gt){if(re&&_g(gt))p==null||p.log("Stored token expired on connect — falling back to fresh connect"),ve||v.clearPersistedConversation(),yield ne.connect();else throw gt}yield v.persistContinuationToken(ne);const $e=yield v.initializeConversation(ne);if(p==null||p.log("🦜 initial connect complete",{conversationId:$e.conversationId,resumed:$e.resumed,outcome:$e.outcome,restoredMessages:$e.restoredMessages.length}),$e.outcome==="unverified-error"){$e.conversationId&&(ne.resumeConversation($e.conversationId),y({type:"SET_CONVERSATION_ID",id:$e.conversationId}));return}y({type:"SET_CONVERSATION_ID",id:$e.conversationId}),$e.resumed&&$e.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:$e.restoredMessages})});return $.current=Ee,Ee().catch(re=>{var ve;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:Ps(re)}),(ve=k.current)==null||ve.call(k,re.message)}),()=>{ne.disconnect(),ne.off(),A.current=null,$.current=null}},[e,t,n,s]);const se=H.useCallback(()=>ze(null,null,function*(){const ne=A.current;if(!ne)return!1;const Ee=v.getStoredConnectOptions();if(!Ee)return p==null||p.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;p==null||p.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{ne.disconnect(),yield ne.connect(Ee)}catch(ve){if(_g(ve))return p==null||p.log("🦜 attemptResume: token expired (401) — will start fresh",{error:ve instanceof Error?ve.message:String(ve)}),!1;throw p==null||p.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:ve instanceof Error?ve.message:String(ve)}),ve}yield v.persistContinuationToken(ne);const re=yield v.initializeConversation(ne,{createIfMissing:!1});return re.outcome==="not-found-or-closed"||!re.conversationId?(p==null||p.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(re.outcome==="unverified-error"&&(p==null||p.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:re.conversationId}),ne.resumeConversation(re.conversationId)),p==null||p.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:re.conversationId}),y({type:"SET_CONVERSATION_ID",id:re.conversationId}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(re.conversationId),Y.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[v,p]),ee=H.useCallback(ne=>ze(null,null,function*(){var re;const Ee=A.current;if(Ee){y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""});try{yield Ee.sendMessage(ne)}catch(ve){y({type:"SET_SEND_ERROR",error:{text:ne,message:Ps(ve)}}),(re=k.current)==null||re.call(k,ve instanceof Error?ve.message:String(ve))}}}),[]),xe=H.useCallback(ne=>ze(null,null,function*(){var re;const Ee=A.current;if(!(!Ee||j.current)){j.current=!0;try{if(yield se()){ne&&(yield ee(ne));return}p==null||p.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),Y.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:NA,timestamp:new Date().toISOString()}}),v.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),Ee.disconnect(),yield Ee.connect(),yield v.persistContinuationToken(Ee);const ve=yield Ee.createConversation(yield Ru({routingAttributes:r}));p==null||p.log("🦜 recoverExpiredSession: new conversation created",{conversationId:ve}),y({type:"SET_CONVERSATION_ID",id:ve}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(ve),ne&&(yield ee(ne))}catch(ve){const $e=ve instanceof Error?ve.message:String(ve);y({type:"SET_ERROR",error:Ps(ve)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(re=k.current)==null||re.call(k,$e)}finally{j.current=!1}}}),[r,v,se,ee,p]),fe=H.useRef(xe);fe.current=xe;const ce=H.useCallback(()=>ze(null,null,function*(){const ne=A.current;if(!ne||j.current)return;if(!x.current.conversationId&&!Y.current){ne.reconnect();return}j.current=!0;const Ee=ze(null,null,function*(){try{(yield se())||(Y.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(re){Y.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{j.current=!1,de.current=null}});de.current=Ee,yield Ee}),[se]),he=H.useRef(ce);he.current=ce,H.useEffect(()=>{const ne=()=>{const Ce=Date.now();Ce-ie.current<CA||(ie.current=Ce,he.current())},Ee=()=>{if(document.visibilityState==="hidden"){W.current=Date.now();return}const Ce=A.current;if(!Ce)return;const We=W.current?Date.now()-W.current:0;W.current=0,(Y.current||!Ce.isConnected||We>kA)&&ne()},re=Ce=>{Ce.persisted&&ne()},ve=()=>{W.current=Date.now()},$e=()=>ne(),gt=()=>ne();return document.addEventListener("visibilitychange",Ee),window.addEventListener("pageshow",re),window.addEventListener("pagehide",ve),document.addEventListener("resume",$e),window.addEventListener("online",gt),()=>{document.removeEventListener("visibilitychange",Ee),window.removeEventListener("pageshow",re),window.removeEventListener("pagehide",ve),document.removeEventListener("resume",$e),window.removeEventListener("online",gt)}},[]);const le=H.useCallback((ne,Ee)=>{const re=A.current;if(re){if(Y.current){fe.current(ne);return}re.sendMessage(ne).catch(ve=>{var $e;if(bg(ve)){fe.current(ne);return}y({type:"SET_SEND_ERROR",error:Ee(Ps(ve))}),($e=k.current)==null||$e.call(k,ve.message)})}},[]),K=H.useCallback(ne=>{const Ee=de.current;if(Ee){Ee.then(ne);return}ne()},[]),ae=H.useCallback((ne,Ee,re)=>{if(!A.current)return;const $e={id:crypto.randomUUID(),role:"user",content:Ee!=null?Ee:ne,timestamp:new Date().toISOString(),silent:re==null?void 0:re.silent};y({type:"CLEAR_SEND_ERROR"}),y({type:"ADD_MESSAGE",message:$e}),re!=null&&re.silent?y({type:"SET_SILENT_REQUEST",isSilent:!0}):(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""})),K(()=>le(ne,gt=>({text:ne,displayContent:Ee,message:gt})))},[le,K]),N=H.useCallback((ne,Ee)=>{ne.trim()&&ae(ne,void 0,Ee)},[ae]),D=H.useCallback(ne=>{if(!A.current)return;const{prompt:Ee,display:re}=OA(ne);ae(Ee,re)},[ae]),J=H.useCallback(()=>{const ne=A.current,Ee=x.current.sendError;!ne||!Ee||K(()=>{j.current||(y({type:"CLEAR_SEND_ERROR"}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),le(Ee.text,re=>ue(U({},Ee),{message:re})))})},[le,K]),P=H.useCallback(()=>{const ne=A.current,Ee=$.current;!ne||!Ee||(Y.current=!1,ne.disconnect(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),Ee().catch(re=>{var ve;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:Ps(re)}),(ve=k.current)==null||ve.call(k,re.message)}))},[]),Se=H.useCallback(()=>{const ne=A.current;ne&&(Y.current=!1,v.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),ne.endConversation().then(()=>(ne.disconnect(),ne.connect())).then(()=>ze(null,null,function*(){return yield v.persistContinuationToken(ne),ne.createConversation(yield Ru({routingAttributes:r}))})).then(Ee=>{y({type:"SET_CONVERSATION_ID",id:Ee}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(Ee)}).catch(Ee=>{var re;y({type:"SET_ERROR",error:Ps(Ee)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(re=k.current)==null||re.call(k,Ee.message)}))},[r,v]),Me=H.useCallback(()=>ze(null,null,function*(){var ve;const ne=A.current;if(!ne)return;const Ee=yield ne.retrieveConversationTranscript(),re=URL.createObjectURL(Ee);try{const $e=document.createElement("a");$e.href=re,$e.download=`transcript-${(ve=ne.conversationId)!=null?ve:"conversation"}.pdf`,document.body.appendChild($e),$e.click(),$e.remove()}finally{URL.revokeObjectURL(re)}}),[]),_e=H.useMemo(()=>({connectionStatus:T.connectionStatus,isConnected:T.connectionStatus==="connected"&&T.conversationId!==null,isAgentTyping:T.isAgentTyping,conversationId:T.conversationId,messages:T.messages,streamingBlocks:T.streamingBlocks,progressMessage:T.progressMessage,progressSteps:T.progressSteps,error:T.error,sendError:T.sendError,loading:T.loading,sessionExpired:T.sessionExpired,sendMessage:N,addToCart:D,resetConversation:Se,retryLastMessage:J,retryConnection:P,downloadTranscript:Me}),[T,N,D,Se,J,P,Me]);return _.jsx(mg.Provider,{value:_e,children:f})};var wg=Symbol.for("immer-nothing"),Sg=Symbol.for("immer-draftable"),On=Symbol.for("immer-state");function er(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Rs=Object.getPrototypeOf;function Ls(e){return!!e&&!!e[On]}function zi(e){var t;return e?vg(e)||Array.isArray(e)||!!e[Sg]||!!((t=e.constructor)!=null&&t[Sg])||Yo(e)||Mu(e):!1}var IA=Object.prototype.constructor.toString();function vg(e){if(!e||typeof e!="object")return!1;const t=Rs(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)===IA}function Lu(e,t){Du(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Du(e){const t=e[On];return t?t.type_:Array.isArray(e)?1:Yo(e)?2:Mu(e)?3:0}function $d(e,t){return Du(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ag(e,t,n){const r=Du(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function PA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Yo(e){return e instanceof Map}function Mu(e){return e instanceof Set}function $i(e){return e.copy_||e.base_}function Vd(e,t){if(Yo(e))return new Map(e);if(Mu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=vg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[On];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[a],l=r[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(Rs(e),r)}else{const r=Rs(e);if(r!==null&&n)return U({},e);const s=Object.create(r);return Object.assign(s,e)}}function qd(e,t=!1){return Bu(e)||Ls(e)||!zi(e)||(Du(e)>1&&Object.defineProperties(e,{set:{value:Fu},add:{value:Fu},clear:{value:Fu},delete:{value:Fu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>qd(n,!0))),e}function Fu(){er(2)}function Bu(e){return Object.isFrozen(e)}var RA={};function Vi(e){const t=RA[e];return t||er(0,e),t}var Wo;function Ng(){return Wo}function LA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function kg(e,t){t&&(Vi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yd(e){Wd(e),e.drafts_.forEach(DA),e.drafts_=null}function Wd(e){e===Wo&&(Wo=e.parent_)}function Cg(e){return Wo=LA(Wo,e)}function DA(e){const t=e[On];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Og(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[On].modified_&&(Yd(t),er(4)),zi(e)&&(e=Uu(t,e),t.parent_||Hu(t,e)),t.patches_&&Vi("Patches").generateReplacementPatches_(n[On].base_,e,t.patches_,t.inversePatches_)):e=Uu(t,n,[]),Yd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wg?e:void 0}function Uu(e,t,n){if(Bu(t))return t;const r=t[On];if(!r)return Lu(t,(s,a)=>Ig(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Hu(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),Lu(a,(l,d)=>Ig(e,r,s,l,d,n,u)),Hu(e,s,!1),n&&e.patches_&&Vi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Ig(e,t,n,r,s,a,u){if(Ls(s)){const l=a&&t&&t.type_!==3&&!$d(t.assigned_,r)?a.concat(r):void 0,d=Uu(e,s,l);if(Ag(n,r,d),Ls(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(zi(s)&&!Bu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Uu(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Yo(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Hu(e,s)}}function Hu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qd(t,n)}function MA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Ng(),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=Go);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var Gd={get(e,t){if(t===On)return e;const n=$i(e);if(!$d(n,t))return FA(e,n,t);const r=n[t];return e.finalized_||!zi(r)?r:r===Xd(e.base_,t)?(Kd(e),e.copy_[t]=Jd(r,e)):r},has(e,t){return t in $i(e)},ownKeys(e){return Reflect.ownKeys($i(e))},set(e,t,n){const r=Pg($i(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Xd($i(e),t),a=s==null?void 0:s[On];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(PA(n,s)&&(n!==void 0||$d(e.base_,t)))return!0;Kd(e),Qd(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 Xd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Kd(e),Qd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=$i(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){er(11)},getPrototypeOf(e){return Rs(e.base_)},setPrototypeOf(){er(12)}},Go={};Lu(Gd,(e,t)=>{Go[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Go.deleteProperty=function(e,t){return Go.set.call(this,e,t,void 0)},Go.set=function(e,t,n){return Gd.set.call(this,e[0],t,n,e[0])};function Xd(e,t){const n=e[On];return(n?$i(n):e)[t]}function FA(e,t,n){var s;const r=Pg(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Pg(e,t){if(!(t in e))return;let n=Rs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Rs(n)}}function Qd(e){e.modified_||(e.modified_=!0,e.parent_&&Qd(e.parent_))}function Kd(e){e.copy_||(e.copy_=Vd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var BA=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"&&er(6),r!==void 0&&typeof r!="function"&&er(7);let s;if(zi(t)){const a=Cg(this),u=Jd(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?Yd(a):Wd(a)}return kg(a,r),Og(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===wg&&(s=void 0),this.autoFreeze_&&qd(s,!0),r){const a=[],u=[];Vi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else er(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,d=>t(d,...l));let r,s;return[this.produce(t,n,(u,l)=>{r=u,s=l}),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){zi(e)||er(8),Ls(e)&&(e=UA(e));const t=Cg(this),n=Jd(e,void 0);return n[On].isManual_=!0,Wd(t),n}finishDraft(e,t){const n=e&&e[On];(!n||!n.isManual_)&&er(9);const{scope_:r}=n;return kg(r,t),Og(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=Vi("Patches").applyPatches_;return Ls(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Jd(e,t){const n=Yo(e)?Vi("MapSet").proxyMap_(e,t):Mu(e)?Vi("MapSet").proxySet_(e,t):MA(e,t);return(t?t.scope_:Ng()).drafts_.push(n),n}function UA(e){return Ls(e)||er(10,e),Rg(e)}function Rg(e){if(!zi(e)||Bu(e))return e;const t=e[On];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Vd(e,!0);return Lu(n,(r,s)=>{Ag(n,r,Rg(s))}),t&&(t.finalized_=!1),n}var HA=new BA,jA=HA.produce;function zA(e,t,n){var r=H.useMemo(function(){return jA(e)},[e]);return H.useReducer(r,t,n)}const ft={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"},Lg={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},Dg=H.createContext(null),Mg=H.createContext(null),$A=({children:e,dispatch:t})=>{const n=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),s=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),l=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),f=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),p=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),m=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),T=H.useCallback(x=>{t({type:ft.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=H.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,s,a,u,l,d,f,p,m,T]);return _.jsx(Mg.Provider,{value:y,children:e})},VA=(e,t)=>{const{type:n,payload:r}=t;switch(n){case ft.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case ft.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case ft.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case ft.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case ft.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case ft.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case ft.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case ft.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case ft.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case ft.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case ft.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case ft.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case ft.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case ft.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case ft.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},qA=({promptsConfig:e,children:t})=>{const[n,r]=zA(VA,U(U({},Lg),e||{}));return _.jsx(Dg.Provider,{value:n,children:_.jsx($A,{dispatch:r,children:t})})};function YA(){var e=H.useRef(!0);return e.current?(e.current=!1,!0):e.current}function WA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function GA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Zd=typeof window!="undefined",ju=function(e){H.useEffect(e,[])},XA=function(e){var t=H.useRef(e);t.current=e,ju(function(){return function(){return t.current()}})},QA=function(e){var t=H.useRef(0),n=H.useState(e),r=n[0],s=n[1],a=H.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return XA(function(){cancelAnimationFrame(t.current)}),[r,a]},KA=function(e,t){return e===t};function JA(e,t){t===void 0&&(t=KA);var n=H.useRef(),r=H.useRef(e),s=YA();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var ZA=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,l=QA({width:Zd?window.innerWidth:r,height:Zd?window.innerHeight:a}),d=l[0],f=l[1];return H.useEffect(function(){if(Zd){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return WA(window,"resize",p),function(){GA(window,"resize",p)}}},[]),d};const Fg="cimulate",ef=`${Fg}:ui-state-update`,tf=`${Fg}:prompts-state-update`,eN=e=>{window.addEventListener(ef,e)},tN=e=>{window.removeEventListener(ef,e)},nN=(e,t)=>{const n=new CustomEvent(ef,{detail:{property:e,value:t}});window.dispatchEvent(n)},Bg=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);st.entryTypeProxy.entryType=e},Br=e=>{const t=st.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;st.statusProxy.isOpen=n,n&&(st.statusProxy.isMinimized=!1)},zu=e=>{const t=st.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;st.statusProxy.isMinimized=n,n&&(st.statusProxy.isOpen=!1)},nf=e=>{st.modalProxy.isFullscreen=e},$u=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);st.statusProxy.type=e,e==="dialog"||e==="chat"?st.modeProxy.mode="embedded":st.modeProxy.mode="standalone"},rf=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(", ")}.`);st.dialogProxy.position=e},rN=e=>{const t=st.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;st.dialogProxy.isFullHeight=n};class iN{constructor(){Ge(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}});Ge(this,"connectedProxy");Ge(this,"modeProxy");Ge(this,"entryTypeProxy");Ge(this,"statusProxy");Ge(this,"dialogProxy");Ge(this,"modalProxy",{isFullscreen:!1});Ge(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ge(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return nN(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 st=new iN,Ug=H.createContext({mode:st.modeProxy.mode,entryType:st.entryType,status:st.statusProxy,dialogPosition:st.dialogProxy.position,isDialogFullHeight:st.dialogProxy.isFullHeight,dialogWidth:st.dialogProxy.width,isModalFullscreen:st.modalProxy.isFullscreen,previousComponentType:st.statusProxy.type}),sN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=H.useState(e!=null?e:st.entryTypeProxy.entryType),[u,l]=H.useState(st.modeProxy.mode),[d,f]=H.useState({type:n||st.statusProxy.type,isOpen:st.statusProxy.isOpen,isMinimized:st.statusProxy.isMinimized}),[p,m]=H.useState(st.dialogProxy.position),[T,y]=H.useState(st.dialogProxy.isFullHeight),[x,v]=H.useState(st.dialogProxy.width),[A,S]=H.useState(st.modalProxy.isFullscreen),k=JA(d.type);H.useEffect(()=>{const j=Y=>{const{property:R,value:W}=Y.detail||{};if(!(!R||W===void 0)){if(R==="mode"){l(W);return}if(R==="entryType"){a(W);return}if(R==="isMinimized"){f(ie=>ue(U({},ie),{isMinimized:W}));return}if(R==="isOpen"){f(ie=>ue(U({},ie),{isOpen:W}));return}if(R==="type"){f(ie=>ue(U({},ie),{type:W}));return}if(R==="position"){m(W);return}if(R==="isFullHeight"){y(W);return}if(R==="width"){v(W);return}if(R==="isFullscreen"){S(W);return}}};return eN(j),()=>{tN(j)}},[]),ju(()=>{e&&Bg(e)}),ju(()=>{const j=n||(t==null?void 0:t.type);j&&$u(j),t&&"isOpen"in t&&Br(!!t.isOpen),t&&"isMinimized"in t&&zu(!!t.isMinimized)}),ju(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:j}=t.options;j&&rf(j),"dialogFullHeight"in t.options&&rN(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&nf(!!t.options.isModalFullscreen)});const I=H.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:k||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:x,isModalFullscreen:A}),[u,s,d,k,p,T,x,A]);return _.jsx(Ug.Provider,{value:I,children:r})},oN=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){Pt(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){Pt(!0,"error",`[CimulateOverrides] Override URL must use HTTPS, got ${r.protocol}. Using default components.`),t({});return}const s=document.createElement("script");s.src=e,s.async=!0,s.crossOrigin="anonymous";let a=!1;const u=()=>{a=!0,clearTimeout(l)};s.onload=()=>{if(a)return;u();const d=window.CimulateOverrides;d&&typeof d=="object"?(Pt(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(Pt(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),Pt(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,Pt(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),Hg=H.createContext({overrides:{},isInitialized:!1}),aN=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=H.useState({}),[a,u]=H.useState(!1);H.useEffect(()=>{ze(null,null,function*(){let f={};e?(Pt(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield oN(e)):t&&typeof t=="object"?(Pt(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(Pt(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=H.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return _.jsx(Hg.Provider,{value:l,children:n})},jg=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:l,openLinksInNewTab:d,globalClassName:f,isDevelopment:p=!1,componentType:m,componentConfig:T,entryType:y,entryMessage:x,disclaimerText:v,disclaimerMarkdown:A,clientContext:S,searchPlaceholder:k,searchButtonLabel:I,searchConfig:j,suggestionButtonConfig:Y,messageAlignment:R,autoScroll:W,promptsConfig:ie,showProductDescription:de,resetConversationMessage:$,conversationHistory:se,messagingConfig:ee,overrides:xe,overridesUrl:fe,inlineOverrides:ce,__features:he,children:le})=>_.jsx(rA,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:x,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:k,searchButtonLabel:I,searchConfig:j,suggestionButtonConfig:Y,messageAlignment:R,autoScroll:W,showProductDescription:de,componentConfig:T,clientContext:S,disclaimerMarkdown:A,disclaimerText:v,resetConversationMessage:$,conversationHistory:se,isDevelopment:p,__features:he,progressStepsLimit:ee==null?void 0:ee.progressStepsLimit,routingAttributes:ee==null?void 0:ee.routingAttributes,enableDownloadTranscript:ee==null?void 0:ee.enableDownloadTranscript,enableEscalationToAgent:ee==null?void 0:ee.enableEscalationToAgent,showProductCaptions:ee==null?void 0:ee.showProductCaptions,children:_.jsx(sN,{entryType:y,componentConfig:T,componentType:m,children:_.jsx(qA,{promptsConfig:ie,children:_.jsx(aN,{overridesUrl:fe,inlineOverrides:ce||xe,children:_.jsx(xg,{scrt2Url:(ee==null?void 0:ee.scrt2Url)||"",orgId:(ee==null?void 0:ee.orgId)||"",esDeveloperName:(ee==null?void 0:ee.esDeveloperName)||"",routingAttributes:(ee==null?void 0:ee.routingAttributes)||{},capabilitiesVersion:ee==null?void 0:ee.capabilitiesVersion,enableLogging:p,children:le})})})})}),ri=()=>{const e=H.useContext(Ug);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var sf={exports:{}},En={},of={exports:{}},af={};var zg;function uN(){return zg||(zg=1,(function(e){function t(K,ae){var N=K.length;K.push(ae);e:for(;0<N;){var D=N-1>>>1,J=K[D];if(0<s(J,ae))K[D]=ae,K[N]=J,N=D;else break e}}function n(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var ae=K[0],N=K.pop();if(N!==ae){K[0]=N;e:for(var D=0,J=K.length,P=J>>>1;D<P;){var Se=2*(D+1)-1,Me=K[Se],_e=Se+1,ne=K[_e];if(0>s(Me,N))_e<J&&0>s(ne,Me)?(K[D]=ne,K[_e]=N,D=_e):(K[D]=Me,K[Se]=N,D=Se);else if(_e<J&&0>s(ne,N))K[D]=ne,K[_e]=N,D=_e;else break e}}return ae}function s(K,ae){var N=K.sortIndex-ae.sortIndex;return N!==0?N:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var d=[],f=[],p=1,m=null,T=3,y=!1,x=!1,v=!1,A=typeof setTimeout=="function"?setTimeout:null,S=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 I(K){for(var ae=n(f);ae!==null;){if(ae.callback===null)r(f);else if(ae.startTime<=K)r(f),ae.sortIndex=ae.expirationTime,t(d,ae);else break;ae=n(f)}}function j(K){if(v=!1,I(K),!x)if(n(d)!==null)x=!0,he(Y);else{var ae=n(f);ae!==null&&le(j,ae.startTime-K)}}function Y(K,ae){x=!1,v&&(v=!1,S(ie),ie=-1),y=!0;var N=T;try{for(I(ae),m=n(d);m!==null&&(!(m.expirationTime>ae)||K&&!se());){var D=m.callback;if(typeof D=="function"){m.callback=null,T=m.priorityLevel;var J=D(m.expirationTime<=ae);ae=e.unstable_now(),typeof J=="function"?m.callback=J:m===n(d)&&r(d),I(ae)}else r(d);m=n(d)}if(m!==null)var P=!0;else{var Se=n(f);Se!==null&&le(j,Se.startTime-ae),P=!1}return P}finally{m=null,T=N,y=!1}}var R=!1,W=null,ie=-1,de=5,$=-1;function se(){return!(e.unstable_now()-$<de)}function ee(){if(W!==null){var K=e.unstable_now();$=K;var ae=!0;try{ae=W(!0,K)}finally{ae?xe():(R=!1,W=null)}}else R=!1}var xe;if(typeof k=="function")xe=function(){k(ee)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,ce=fe.port2;fe.port1.onmessage=ee,xe=function(){ce.postMessage(null)}}else xe=function(){A(ee,0)};function he(K){W=K,R||(R=!0,xe())}function le(K,ae){ie=A(function(){K(e.unstable_now())},ae)}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(K){K.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,he(Y))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(K){switch(T){case 1:case 2:case 3:var ae=3;break;default:ae=T}var N=T;T=ae;try{return K()}finally{T=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,ae){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var N=T;T=K;try{return ae()}finally{T=N}},e.unstable_scheduleCallback=function(K,ae,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,K){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=N+J,K={id:p++,callback:ae,priorityLevel:K,startTime:N,expirationTime:J,sortIndex:-1},N>D?(K.sortIndex=N,t(f,K),n(d)===null&&K===n(f)&&(v?(S(ie),ie=-1):v=!0,le(j,N-D))):(K.sortIndex=J,t(d,K),x||y||(x=!0,he(Y))),K},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(K){var ae=T;return function(){var N=T;T=ae;try{return K.apply(this,arguments)}finally{T=N}}}})(af)),af}var $g;function lN(){return $g||($g=1,of.exports=uN()),of.exports}var Vg;function cN(){if(Vg)return En;Vg=1;var e=Kn(),t=lN();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c]);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 l=!(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 T(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,c,h){if(c!==null&&c.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,o,c,h){if(o===null||typeof o=="undefined"||y(i,o,c,h))return!0;if(h)return!1;if(c!==null)switch(c.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 v(i,o,c,h,E,b,w){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=c,this.propertyName=i,this.type=o,this.sanitizeURL=b,this.removeEmptyString=w}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];A[o]=new v(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new v(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){A[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var S=/[\-:]([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(S,k);A[o]=new v(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(S,k);A[o]=new v(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(S,k);A[o]=new v(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function I(i,o,c,h){var E=A.hasOwnProperty(o)?A[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(x(o,c,E,h)&&(c=null),h||E===null?T(o)&&(c===null?i.removeAttribute(o):i.setAttribute(o,""+c)):E.mustUseProperty?i[E.propertyName]=c===null?E.type===3?!1:"":c:(o=E.attributeName,h=E.attributeNamespace,c===null?i.removeAttribute(o):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,h?i.setAttributeNS(h,o,c):i.setAttribute(o,c))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),R=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),se=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),xe=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),he=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),K=Symbol.iterator;function ae(i){return i===null||typeof i!="object"?null:(i=K&&i[K]||i["@@iterator"],typeof i=="function"?i:null)}var N=Object.assign,D;function J(i){if(D===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);D=o&&o[1]||""}return`
17
+ `+D+i}var P=!1;function Se(i,o){if(!i||P)return"";P=!0;var c=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(`
18
18
  `),b=h.stack.split(`
19
- `),w=E.length-1,D=b.length-1;1<=w&&0<=D&&E[w]!==b[D];)D--;for(;1<=w&&0<=D;w--,D--)if(E[w]!==b[D]){if(w!==1||D!==1)do if(w--,D--,0>D||E[w]!==b[D]){var z=`
20
- `+E[w].replace(" at new "," at ");return i.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",i.displayName)),z}while(1<=w&&0<=D);break}}}finally{P=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?J(i):""}function De(i){switch(i.tag){case 5:return J(i.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return i=Se(i.type,!1),i;case 11:return i=Se(i.type.render,!1),i;case 1:return i=Se(i.type,!0),i;default:return""}}function xe(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 W:return"Fragment";case R:return"Portal";case he:return"Profiler";case se:return"StrictMode";case we:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case oe:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case ee:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case de:return o=i.displayName||null,o!==null?o:xe(i.type)||"Memo";case pe:o=i._payload,i=i._init;try{return xe(i(o))}catch(c){}}return null}function ne(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 xe(o);case 8:return o===se?"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 ye(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function ie(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function re(i){var o=ie(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof c!="undefined"&&typeof c.get=="function"&&typeof c.set=="function"){var E=c.get,b=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(w){h=""+w,b.call(this,w)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(w){h=""+w},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Ne(i){i._valueTracker||(i._valueTracker=re(i))}function Ye(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=ie(i)?i.checked?"true":"false":i.value),i=h,i!==c?(o.setValue(i),!0):!1}function et(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 nn(i,o){var c=o.checked;return N({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function dn(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=ye(o.value!=null?o.value:c),i._wrapperState={initialChecked:h,initialValue:c,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function $e(i,o){o=o.checked,o!=null&&I(i,"checked",o,!1)}function It(i,o){$e(i,o);var c=ye(o.value),h=o.type;if(c!=null)h==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?wn(i,o.type,c):o.hasOwnProperty("defaultValue")&&wn(i,o.type,ye(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function Ln(i,o,c){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,c||o===i.value||(i.value=o),i.defaultValue=o}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function wn(i,o,c){(o!=="number"||et(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var ar=Array.isArray;function Or(i,o,c,h){if(i=i.options,o){o={};for(var E=0;E<c.length;E++)o["$"+c[E]]=!0;for(c=0;c<i.length;c++)E=o.hasOwnProperty("$"+i[c].value),i[c].selected!==E&&(i[c].selected=E),E&&h&&(i[c].defaultSelected=!0)}else{for(c=""+ye(c),o=null,E=0;E<i.length;E++){if(i[E].value===c){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function ur(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Ql(i,o){var c=o.value;if(c==null){if(c=o.children,o=o.defaultValue,c!=null){if(o!=null)throw Error(n(92));if(ar(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:ye(c)}}function Kl(i,o){var c=ye(o.value),h=ye(o.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),o.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),h!=null&&(i.defaultValue=""+h)}function Jl(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function ae(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 Ae(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?ae(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var ze,Xe=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,c,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,c,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(ze=ze||document.createElement("div"),ze.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=ze.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function tt(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var Yt={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},qr=["Webkit","ms","Moz","O"];Object.keys(Yt).forEach(function(i){qr.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Yt[o]=Yt[i]})});function Vn(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||Yt.hasOwnProperty(i)&&Yt[i]?(""+o).trim():o+"px"}function mi(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=Vn(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var ls=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 Wt(i,o){if(o){if(ls[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 Ir(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 Dn=null;function hp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var pp=null,fo=null,ho=null;function E_(i){if(i=Za(i)){if(typeof pp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=_c(o),pp(i.stateNode,i.type,o))}}function y_(i){fo?ho?ho.push(i):ho=[i]:fo=i}function T_(){if(fo){var i=fo,o=ho;if(ho=fo=null,E_(i),o)for(i=0;i<o.length;i++)E_(o[i])}}function b_(i,o){return i(o)}function __(){}var mp=!1;function x_(i,o,c){if(mp)return i(o,c);mp=!0;try{return b_(i,o,c)}finally{mp=!1,(fo!==null||ho!==null)&&(__(),T_())}}function Pa(i,o){var c=i.stateNode;if(c===null)return null;var h=_c(c);if(h===null)return null;c=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(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var gp=!1;if(l)try{var Ra={};Object.defineProperty(Ra,"passive",{get:function(){gp=!0}}),window.addEventListener("test",Ra,Ra),window.removeEventListener("test",Ra,Ra)}catch(i){gp=!1}function rF(i,o,c,h,E,b,w,D,z){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(c,Z)}catch(Ee){this.onError(Ee)}}var La=!1,Zl=null,ec=!1,Ep=null,iF={onError:function(i){La=!0,Zl=i}};function sF(i,o,c,h,E,b,w,D,z){La=!1,Zl=null,rF.apply(iF,arguments)}function oF(i,o,c,h,E,b,w,D,z){if(sF.apply(this,arguments),La){if(La){var Z=Zl;La=!1,Zl=null}else throw Error(n(198));ec||(ec=!0,Ep=Z)}}function cs(i){var o=i,c=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(c=o.return),i=o.return;while(i)}return o.tag===3?c:null}function w_(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 S_(i){if(cs(i)!==i)throw Error(n(188))}function aF(i){var o=i.alternate;if(!o){if(o=cs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var c=i,h=o;;){var E=c.return;if(E===null)break;var b=E.alternate;if(b===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===c)return S_(E),i;if(b===h)return S_(E),o;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var w=!1,D=E.child;D;){if(D===c){w=!0,c=E,h=b;break}if(D===h){w=!0,h=E,c=b;break}D=D.sibling}if(!w){for(D=b.child;D;){if(D===c){w=!0,c=b,h=E;break}if(D===h){w=!0,h=b,c=E;break}D=D.sibling}if(!w)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:o}function v_(i){return i=aF(i),i!==null?A_(i):null}function A_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=A_(i);if(o!==null)return o;i=i.sibling}return null}var N_=t.unstable_scheduleCallback,C_=t.unstable_cancelCallback,uF=t.unstable_shouldYield,lF=t.unstable_requestPaint,At=t.unstable_now,cF=t.unstable_getCurrentPriorityLevel,yp=t.unstable_ImmediatePriority,k_=t.unstable_UserBlockingPriority,tc=t.unstable_NormalPriority,dF=t.unstable_LowPriority,O_=t.unstable_IdlePriority,nc=null,Pr=null;function fF(i){if(Pr&&typeof Pr.onCommitFiberRoot=="function")try{Pr.onCommitFiberRoot(nc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var lr=Math.clz32?Math.clz32:mF,hF=Math.log,pF=Math.LN2;function mF(i){return i>>>=0,i===0?32:31-(hF(i)/pF|0)|0}var rc=64,ic=4194304;function Da(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 sc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,w=c&268435455;if(w!==0){var D=w&~E;D!==0?h=Da(D):(b&=w,b!==0&&(h=Da(b)))}else w=c&~E,w!==0?h=Da(w):b!==0&&(h=Da(b));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,b=o&-o,E>=b||E===16&&(b&4194240)!==0))return o;if((h&4)!==0&&(h|=c&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)c=31-lr(o),E=1<<c,h|=i[c],o&=~E;return h}function gF(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 EF(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var w=31-lr(b),D=1<<w,z=E[w];z===-1?((D&c)===0||(D&h)!==0)&&(E[w]=gF(D,o)):z<=o&&(i.expiredLanes|=D),b&=~D}}function Tp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function I_(){var i=rc;return rc<<=1,(rc&4194240)===0&&(rc=64),i}function bp(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function Ma(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-lr(o),i[o]=c}function yF(i,o){var c=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<c;){var E=31-lr(c),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function _p(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-lr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var ot=0;function P_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var R_,xp,L_,D_,M_,wp=!1,oc=[],gi=null,Ei=null,yi=null,Fa=new Map,Ba=new Map,Ti=[],TF="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 F_(i,o){switch(i){case"focusin":case"focusout":gi=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":yi=null;break;case"pointerover":case"pointerout":Fa.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ba.delete(o.pointerId)}}function Ua(i,o,c,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},o!==null&&(o=Za(o),o!==null&&xp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function bF(i,o,c,h,E){switch(o){case"focusin":return gi=Ua(gi,i,o,c,h,E),!0;case"dragenter":return Ei=Ua(Ei,i,o,c,h,E),!0;case"mouseover":return yi=Ua(yi,i,o,c,h,E),!0;case"pointerover":var b=E.pointerId;return Fa.set(b,Ua(Fa.get(b)||null,i,o,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,Ba.set(b,Ua(Ba.get(b)||null,i,o,c,h,E)),!0}return!1}function B_(i){var o=ds(i.target);if(o!==null){var c=cs(o);if(c!==null){if(o=c.tag,o===13){if(o=w_(c),o!==null){i.blockedOn=o,M_(i.priority,function(){L_(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function ac(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=vp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Dn=h,c.target.dispatchEvent(h),Dn=null}else return o=Za(c),o!==null&&xp(o),i.blockedOn=c,!1;o.shift()}return!0}function U_(i,o,c){ac(i)&&c.delete(o)}function _F(){wp=!1,gi!==null&&ac(gi)&&(gi=null),Ei!==null&&ac(Ei)&&(Ei=null),yi!==null&&ac(yi)&&(yi=null),Fa.forEach(U_),Ba.forEach(U_)}function Ha(i,o){i.blockedOn===o&&(i.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,_F)))}function ja(i){function o(E){return Ha(E,i)}if(0<oc.length){Ha(oc[0],i);for(var c=1;c<oc.length;c++){var h=oc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(gi!==null&&Ha(gi,i),Ei!==null&&Ha(Ei,i),yi!==null&&Ha(yi,i),Fa.forEach(o),Ba.forEach(o),c=0;c<Ti.length;c++)h=Ti[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ti.length&&(c=Ti[0],c.blockedOn===null);)B_(c),c.blockedOn===null&&Ti.shift()}var po=j.ReactCurrentBatchConfig,uc=!0;function xF(i,o,c,h){var E=ot,b=po.transition;po.transition=null;try{ot=1,Sp(i,o,c,h)}finally{ot=E,po.transition=b}}function wF(i,o,c,h){var E=ot,b=po.transition;po.transition=null;try{ot=4,Sp(i,o,c,h)}finally{ot=E,po.transition=b}}function Sp(i,o,c,h){if(uc){var E=vp(i,o,c,h);if(E===null)zp(i,o,h,lc,c),F_(i,h);else if(bF(E,i,o,c,h))h.stopPropagation();else if(F_(i,h),o&4&&-1<TF.indexOf(i)){for(;E!==null;){var b=Za(E);if(b!==null&&R_(b),b=vp(i,o,c,h),b===null&&zp(i,o,h,lc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else zp(i,o,h,null,c)}}var lc=null;function vp(i,o,c,h){if(lc=null,i=hp(h),i=ds(i),i!==null)if(o=cs(i),o===null)i=null;else if(c=o.tag,c===13){if(i=w_(o),i!==null)return i;i=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return lc=i,null}function H_(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(cF()){case yp:return 1;case k_:return 4;case tc:case dF:return 16;case O_:return 536870912;default:return 16}default:return 16}}var bi=null,Ap=null,cc=null;function j_(){if(cc)return cc;var i,o=Ap,c=o.length,h,E="value"in bi?bi.value:bi.textContent,b=E.length;for(i=0;i<c&&o[i]===E[i];i++);var w=c-i;for(h=1;h<=w&&o[c-h]===E[b-h];h++);return cc=E.slice(i,1<h?1-h:void 0)}function dc(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 fc(){return!0}function z_(){return!1}function Mn(i){function o(c,h,E,b,w){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var D in i)i.hasOwnProperty(D)&&(c=i[D],this[D]=c?c(b):b[D]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?fc:z_,this.isPropagationStopped=z_,this}return N(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=fc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=fc)},persist:function(){},isPersistent:fc}),o}var mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Np=Mn(mo),za=N({},mo,{view:0,detail:0}),SF=Mn(za),Cp,kp,$a,hc=N({},za,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ip,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!==$a&&($a&&i.type==="mousemove"?(Cp=i.screenX-$a.screenX,kp=i.screenY-$a.screenY):kp=Cp=0,$a=i),Cp)},movementY:function(i){return"movementY"in i?i.movementY:kp}}),$_=Mn(hc),vF=N({},hc,{dataTransfer:0}),AF=Mn(vF),NF=N({},za,{relatedTarget:0}),Op=Mn(NF),CF=N({},mo,{animationName:0,elapsedTime:0,pseudoElement:0}),kF=Mn(CF),OF=N({},mo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),IF=Mn(OF),PF=N({},mo,{data:0}),V_=Mn(PF),RF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},LF={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"},DF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function MF(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=DF[i])?!!o[i]:!1}function Ip(){return MF}var FF=N({},za,{key:function(i){if(i.key){var o=RF[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=dc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?LF[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ip,charCode:function(i){return i.type==="keypress"?dc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?dc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),BF=Mn(FF),UF=N({},hc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),q_=Mn(UF),HF=N({},za,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ip}),jF=Mn(HF),zF=N({},mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),$F=Mn(zF),VF=N({},hc,{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}),qF=Mn(VF),YF=[9,13,27,32],Pp=l&&"CompositionEvent"in window,Va=null;l&&"documentMode"in document&&(Va=document.documentMode);var WF=l&&"TextEvent"in window&&!Va,Y_=l&&(!Pp||Va&&8<Va&&11>=Va),W_=" ",G_=!1;function X_(i,o){switch(i){case"keyup":return YF.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Q_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var go=!1;function GF(i,o){switch(i){case"compositionend":return Q_(o);case"keypress":return o.which!==32?null:(G_=!0,W_);case"textInput":return i=o.data,i===W_&&G_?null:i;default:return null}}function XF(i,o){if(go)return i==="compositionend"||!Pp&&X_(i,o)?(i=j_(),cc=Ap=bi=null,go=!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 Y_&&o.locale!=="ko"?null:o.data;default:return null}}var QF={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 K_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!QF[i.type]:o==="textarea"}function J_(i,o,c,h){y_(h),o=yc(o,"onChange"),0<o.length&&(c=new Np("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var qa=null,Ya=null;function KF(i){gx(i,0)}function pc(i){var o=_o(i);if(Ye(o))return i}function JF(i,o){if(i==="change")return o}var Z_=!1;if(l){var Rp;if(l){var Lp="oninput"in document;if(!Lp){var ex=document.createElement("div");ex.setAttribute("oninput","return;"),Lp=typeof ex.oninput=="function"}Rp=Lp}else Rp=!1;Z_=Rp&&(!document.documentMode||9<document.documentMode)}function tx(){qa&&(qa.detachEvent("onpropertychange",nx),Ya=qa=null)}function nx(i){if(i.propertyName==="value"&&pc(Ya)){var o=[];J_(o,Ya,i,hp(i)),x_(KF,o)}}function ZF(i,o,c){i==="focusin"?(tx(),qa=o,Ya=c,qa.attachEvent("onpropertychange",nx)):i==="focusout"&&tx()}function e7(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return pc(Ya)}function t7(i,o){if(i==="click")return pc(o)}function n7(i,o){if(i==="input"||i==="change")return pc(o)}function r7(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var cr=typeof Object.is=="function"?Object.is:r7;function Wa(i,o){if(cr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),h=Object.keys(o);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var E=c[h];if(!d.call(o,E)||!cr(i[E],o[E]))return!1}return!0}function rx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ix(i,o){var c=rx(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=o&&h>=o)return{node:c,offset:o-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=rx(c)}}function sx(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?sx(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function ox(){for(var i=window,o=et();o instanceof i.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch(h){c=!1}if(c)i=o.contentWindow;else break;o=et(i.document)}return o}function Dp(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 i7(i){var o=ox(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&sx(c.ownerDocument.documentElement,c)){if(h!==null&&Dp(c)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in c)c.selectionStart=o,c.selectionEnd=Math.min(i,c.value.length);else if(i=(o=c.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=c.textContent.length,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=ix(c,b);var w=ix(c,h);E&&w&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==w.node||i.focusOffset!==w.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(o),i.extend(w.node,w.offset)):(o.setEnd(w.node,w.offset),i.addRange(o)))}}for(o=[],i=c;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<o.length;c++)i=o[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var s7=l&&"documentMode"in document&&11>=document.documentMode,Eo=null,Mp=null,Ga=null,Fp=!1;function ax(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Fp||Eo==null||Eo!==et(h)||(h=Eo,"selectionStart"in h&&Dp(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}),Ga&&Wa(Ga,h)||(Ga=h,h=yc(Mp,"onSelect"),0<h.length&&(o=new Np("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=Eo)))}function mc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var yo={animationend:mc("Animation","AnimationEnd"),animationiteration:mc("Animation","AnimationIteration"),animationstart:mc("Animation","AnimationStart"),transitionend:mc("Transition","TransitionEnd")},Bp={},ux={};l&&(ux=document.createElement("div").style,"AnimationEvent"in window||(delete yo.animationend.animation,delete yo.animationiteration.animation,delete yo.animationstart.animation),"TransitionEvent"in window||delete yo.transitionend.transition);function gc(i){if(Bp[i])return Bp[i];if(!yo[i])return i;var o=yo[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in ux)return Bp[i]=o[c];return i}var lx=gc("animationend"),cx=gc("animationiteration"),dx=gc("animationstart"),fx=gc("transitionend"),hx=new Map,px="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 _i(i,o){hx.set(i,o),a(o,[i])}for(var Up=0;Up<px.length;Up++){var Hp=px[Up],o7=Hp.toLowerCase(),a7=Hp[0].toUpperCase()+Hp.slice(1);_i(o7,"on"+a7)}_i(lx,"onAnimationEnd"),_i(cx,"onAnimationIteration"),_i(dx,"onAnimationStart"),_i("dblclick","onDoubleClick"),_i("focusin","onFocus"),_i("focusout","onBlur"),_i(fx,"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 Xa="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(" "),u7=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xa));function mx(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,oF(h,o,void 0,i),i.currentTarget=null}function gx(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],E=h.event;h=h.listeners;e:{var b=void 0;if(o)for(var w=h.length-1;0<=w;w--){var D=h[w],z=D.instance,Z=D.currentTarget;if(D=D.listener,z!==b&&E.isPropagationStopped())break e;mx(E,D,Z),b=z}else for(w=0;w<h.length;w++){if(D=h[w],z=D.instance,Z=D.currentTarget,D=D.listener,z!==b&&E.isPropagationStopped())break e;mx(E,D,Z),b=z}}}if(ec)throw i=Ep,ec=!1,Ep=null,i}function mt(i,o){var c=o[Gp];c===void 0&&(c=o[Gp]=new Set);var h=i+"__bubble";c.has(h)||(Ex(o,i,2,!1),c.add(h))}function jp(i,o,c){var h=0;o&&(h|=4),Ex(c,i,h,o)}var Ec="_reactListening"+Math.random().toString(36).slice(2);function Qa(i){if(!i[Ec]){i[Ec]=!0,r.forEach(function(c){c!=="selectionchange"&&(u7.has(c)||jp(c,!1,i),jp(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Ec]||(o[Ec]=!0,jp("selectionchange",!1,o))}}function Ex(i,o,c,h){switch(H_(o)){case 1:var E=xF;break;case 4:E=wF;break;default:E=Sp}c=E.bind(null,o,c,i),E=void 0,!gp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,c,{capture:!0,passive:E}):i.addEventListener(o,c,!0):E!==void 0?i.addEventListener(o,c,{passive:E}):i.addEventListener(o,c,!1)}function zp(i,o,c,h,E){var b=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var w=h.tag;if(w===3||w===4){var D=h.stateNode.containerInfo;if(D===E||D.nodeType===8&&D.parentNode===E)break;if(w===4)for(w=h.return;w!==null;){var z=w.tag;if((z===3||z===4)&&(z=w.stateNode.containerInfo,z===E||z.nodeType===8&&z.parentNode===E))return;w=w.return}for(;D!==null;){if(w=ds(D),w===null)return;if(z=w.tag,z===5||z===6){h=b=w;continue e}D=D.parentNode}}h=h.return}x_(function(){var Z=b,Ee=hp(c),be=[];e:{var me=hx.get(i);if(me!==void 0){var ke=Np,Ie=i;switch(i){case"keypress":if(dc(c)===0)break e;case"keydown":case"keyup":ke=BF;break;case"focusin":Ie="focus",ke=Op;break;case"focusout":Ie="blur",ke=Op;break;case"beforeblur":case"afterblur":ke=Op;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ke=$_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=AF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=jF;break;case lx:case cx:case dx:ke=kF;break;case fx:ke=$F;break;case"scroll":ke=SF;break;case"wheel":ke=qF;break;case"copy":case"cut":case"paste":ke=IF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=q_}var Pe=(o&4)!==0,Nt=!Pe&&i==="scroll",G=Pe?me!==null?me+"Capture":null:me;Pe=[];for(var V=Z,Q;V!==null;){Q=V;var ve=Q.stateNode;if(Q.tag===5&&ve!==null&&(Q=ve,G!==null&&(ve=Pa(V,G),ve!=null&&Pe.push(Ka(V,ve,Q)))),Nt)break;V=V.return}0<Pe.length&&(me=new ke(me,Ie,null,c,Ee),be.push({event:me,listeners:Pe}))}}if((o&7)===0){e:{if(me=i==="mouseover"||i==="pointerover",ke=i==="mouseout"||i==="pointerout",me&&c!==Dn&&(Ie=c.relatedTarget||c.fromElement)&&(ds(Ie)||Ie[Yr]))break e;if((ke||me)&&(me=Ee.window===Ee?Ee:(me=Ee.ownerDocument)?me.defaultView||me.parentWindow:window,ke?(Ie=c.relatedTarget||c.toElement,ke=Z,Ie=Ie?ds(Ie):null,Ie!==null&&(Nt=cs(Ie),Ie!==Nt||Ie.tag!==5&&Ie.tag!==6)&&(Ie=null)):(ke=null,Ie=Z),ke!==Ie)){if(Pe=$_,ve="onMouseLeave",G="onMouseEnter",V="mouse",(i==="pointerout"||i==="pointerover")&&(Pe=q_,ve="onPointerLeave",G="onPointerEnter",V="pointer"),Nt=ke==null?me:_o(ke),Q=Ie==null?me:_o(Ie),me=new Pe(ve,V+"leave",ke,c,Ee),me.target=Nt,me.relatedTarget=Q,ve=null,ds(Ee)===Z&&(Pe=new Pe(G,V+"enter",Ie,c,Ee),Pe.target=Q,Pe.relatedTarget=Nt,ve=Pe),Nt=ve,ke&&Ie)t:{for(Pe=ke,G=Ie,V=0,Q=Pe;Q;Q=To(Q))V++;for(Q=0,ve=G;ve;ve=To(ve))Q++;for(;0<V-Q;)Pe=To(Pe),V--;for(;0<Q-V;)G=To(G),Q--;for(;V--;){if(Pe===G||G!==null&&Pe===G.alternate)break t;Pe=To(Pe),G=To(G)}Pe=null}else Pe=null;ke!==null&&yx(be,me,ke,Pe,!1),Ie!==null&&Nt!==null&&yx(be,Nt,Ie,Pe,!0)}}e:{if(me=Z?_o(Z):window,ke=me.nodeName&&me.nodeName.toLowerCase(),ke==="select"||ke==="input"&&me.type==="file")var Re=JF;else if(K_(me))if(Z_)Re=n7;else{Re=e7;var Be=ZF}else(ke=me.nodeName)&&ke.toLowerCase()==="input"&&(me.type==="checkbox"||me.type==="radio")&&(Re=t7);if(Re&&(Re=Re(i,Z))){J_(be,Re,c,Ee);break e}Be&&Be(i,me,Z),i==="focusout"&&(Be=me._wrapperState)&&Be.controlled&&me.type==="number"&&wn(me,"number",me.value)}switch(Be=Z?_o(Z):window,i){case"focusin":(K_(Be)||Be.contentEditable==="true")&&(Eo=Be,Mp=Z,Ga=null);break;case"focusout":Ga=Mp=Eo=null;break;case"mousedown":Fp=!0;break;case"contextmenu":case"mouseup":case"dragend":Fp=!1,ax(be,c,Ee);break;case"selectionchange":if(s7)break;case"keydown":case"keyup":ax(be,c,Ee)}var Ue;if(Pp)e:{switch(i){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else go?X_(i,c)&&(Ve="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ve="onCompositionStart");Ve&&(Y_&&c.locale!=="ko"&&(go||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&go&&(Ue=j_()):(bi=Ee,Ap="value"in bi?bi.value:bi.textContent,go=!0)),Be=yc(Z,Ve),0<Be.length&&(Ve=new V_(Ve,i,null,c,Ee),be.push({event:Ve,listeners:Be}),Ue?Ve.data=Ue:(Ue=Q_(c),Ue!==null&&(Ve.data=Ue)))),(Ue=WF?GF(i,c):XF(i,c))&&(Z=yc(Z,"onBeforeInput"),0<Z.length&&(Ee=new V_("onBeforeInput","beforeinput",null,c,Ee),be.push({event:Ee,listeners:Z}),Ee.data=Ue))}gx(be,o)})}function Ka(i,o,c){return{instance:i,listener:o,currentTarget:c}}function yc(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=Pa(i,c),b!=null&&h.unshift(Ka(i,b,E)),b=Pa(i,o),b!=null&&h.push(Ka(i,b,E))),i=i.return}return h}function To(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function yx(i,o,c,h,E){for(var b=o._reactName,w=[];c!==null&&c!==h;){var D=c,z=D.alternate,Z=D.stateNode;if(z!==null&&z===h)break;D.tag===5&&Z!==null&&(D=Z,E?(z=Pa(c,b),z!=null&&w.unshift(Ka(c,z,D))):E||(z=Pa(c,b),z!=null&&w.push(Ka(c,z,D)))),c=c.return}w.length!==0&&i.push({event:o,listeners:w})}var l7=/\r\n?/g,c7=/\u0000|\uFFFD/g;function Tx(i){return(typeof i=="string"?i:""+i).replace(l7,`
21
- `).replace(c7,"")}function Tc(i,o,c){if(o=Tx(o),Tx(i)!==o&&c)throw Error(n(425))}function bc(){}var $p=null,Vp=null;function qp(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 Yp=typeof setTimeout=="function"?setTimeout:void 0,d7=typeof clearTimeout=="function"?clearTimeout:void 0,bx=typeof Promise=="function"?Promise:void 0,f7=typeof queueMicrotask=="function"?queueMicrotask:typeof bx!="undefined"?function(i){return bx.resolve(null).then(i).catch(h7)}:Yp;function h7(i){setTimeout(function(){throw i})}function Wp(i,o){var c=o,h=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(h===0){i.removeChild(E),ja(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);ja(o)}function xi(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 _x(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(o===0)return i;o--}else c==="/$"&&o++}i=i.previousSibling}return null}var bo=Math.random().toString(36).slice(2),Rr="__reactFiber$"+bo,Ja="__reactProps$"+bo,Yr="__reactContainer$"+bo,Gp="__reactEvents$"+bo,p7="__reactListeners$"+bo,m7="__reactHandles$"+bo;function ds(i){var o=i[Rr];if(o)return o;for(var c=i.parentNode;c;){if(o=c[Yr]||c[Rr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=_x(i);i!==null;){if(c=i[Rr])return c;i=_x(i)}return o}i=c,c=i.parentNode}return null}function Za(i){return i=i[Rr]||i[Yr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function _o(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function _c(i){return i[Ja]||null}var Xp=[],xo=-1;function wi(i){return{current:i}}function gt(i){0>xo||(i.current=Xp[xo],Xp[xo]=null,xo--)}function ft(i,o){xo++,Xp[xo]=i.current,i.current=o}var Si={},rn=wi(Si),Sn=wi(!1),fs=Si;function wo(i,o){var c=i.type.contextTypes;if(!c)return Si;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in c)E[b]=o[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function vn(i){return i=i.childContextTypes,i!=null}function xc(){gt(Sn),gt(rn)}function xx(i,o,c){if(rn.current!==Si)throw Error(n(168));ft(rn,o),ft(Sn,c)}function wx(i,o,c){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,ne(i)||"Unknown",E));return N({},c,h)}function wc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Si,fs=rn.current,ft(rn,i),ft(Sn,Sn.current),!0}function Sx(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=wx(i,o,fs),h.__reactInternalMemoizedMergedChildContext=i,gt(Sn),gt(rn),ft(rn,i)):gt(Sn),ft(Sn,c)}var Wr=null,Sc=!1,Qp=!1;function vx(i){Wr===null?Wr=[i]:Wr.push(i)}function g7(i){Sc=!0,vx(i)}function vi(){if(!Qp&&Wr!==null){Qp=!0;var i=0,o=ot;try{var c=Wr;for(ot=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}Wr=null,Sc=!1}catch(E){throw Wr!==null&&(Wr=Wr.slice(i+1)),N_(yp,vi),E}finally{ot=o,Qp=!1}}return null}var So=[],vo=0,vc=null,Ac=0,qn=[],Yn=0,hs=null,Gr=1,Xr="";function ps(i,o){So[vo++]=Ac,So[vo++]=vc,vc=i,Ac=o}function Ax(i,o,c){qn[Yn++]=Gr,qn[Yn++]=Xr,qn[Yn++]=hs,hs=i;var h=Gr;i=Xr;var E=32-lr(h)-1;h&=~(1<<E),c+=1;var b=32-lr(o)+E;if(30<b){var w=E-E%5;b=(h&(1<<w)-1).toString(32),h>>=w,E-=w,Gr=1<<32-lr(o)+E|c<<E|h,Xr=b+i}else Gr=1<<b|c<<E|h,Xr=i}function Kp(i){i.return!==null&&(ps(i,1),Ax(i,1,0))}function Jp(i){for(;i===vc;)vc=So[--vo],So[vo]=null,Ac=So[--vo],So[vo]=null;for(;i===hs;)hs=qn[--Yn],qn[Yn]=null,Xr=qn[--Yn],qn[Yn]=null,Gr=qn[--Yn],qn[Yn]=null}var Fn=null,Bn=null,Tt=!1,dr=null;function Nx(i,o){var c=Qn(5,null,null,0);c.elementType="DELETED",c.stateNode=o,c.return=i,o=i.deletions,o===null?(i.deletions=[c],i.flags|=16):o.push(c)}function Cx(i,o){switch(i.tag){case 5:var c=i.type;return o=o.nodeType!==1||c.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Fn=i,Bn=xi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Fn=i,Bn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=hs!==null?{id:Gr,overflow:Xr}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=Qn(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,Fn=i,Bn=null,!0):!1;default:return!1}}function Zp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function em(i){if(Tt){var o=Bn;if(o){var c=o;if(!Cx(i,o)){if(Zp(i))throw Error(n(418));o=xi(c.nextSibling);var h=Fn;o&&Cx(i,o)?Nx(h,c):(i.flags=i.flags&-4097|2,Tt=!1,Fn=i)}}else{if(Zp(i))throw Error(n(418));i.flags=i.flags&-4097|2,Tt=!1,Fn=i}}}function kx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Fn=i}function Nc(i){if(i!==Fn)return!1;if(!Tt)return kx(i),Tt=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!qp(i.type,i.memoizedProps)),o&&(o=Bn)){if(Zp(i))throw Ox(),Error(n(418));for(;o;)Nx(i,o),o=xi(o.nextSibling)}if(kx(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 c=i.data;if(c==="/$"){if(o===0){Bn=xi(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Bn=null}}else Bn=Fn?xi(i.stateNode.nextSibling):null;return!0}function Ox(){for(var i=Bn;i;)i=xi(i.nextSibling)}function Ao(){Bn=Fn=null,Tt=!1}function tm(i){dr===null?dr=[i]:dr.push(i)}var E7=j.ReactCurrentBatchConfig;function eu(i,o,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===b?o.ref:(o=function(w){var D=E.refs;w===null?delete D[b]:D[b]=w},o._stringRef=b,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Cc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function Ix(i){var o=i._init;return o(i._payload)}function Px(i){function o(G,V){if(i){var Q=G.deletions;Q===null?(G.deletions=[V],G.flags|=16):Q.push(V)}}function c(G,V){if(!i)return null;for(;V!==null;)o(G,V),V=V.sibling;return null}function h(G,V){for(G=new Map;V!==null;)V.key!==null?G.set(V.key,V):G.set(V.index,V),V=V.sibling;return G}function E(G,V){return G=Ri(G,V),G.index=0,G.sibling=null,G}function b(G,V,Q){return G.index=Q,i?(Q=G.alternate,Q!==null?(Q=Q.index,Q<V?(G.flags|=2,V):Q):(G.flags|=2,V)):(G.flags|=1048576,V)}function w(G){return i&&G.alternate===null&&(G.flags|=2),G}function D(G,V,Q,ve){return V===null||V.tag!==6?(V=Ym(Q,G.mode,ve),V.return=G,V):(V=E(V,Q),V.return=G,V)}function z(G,V,Q,ve){var Re=Q.type;return Re===W?Ee(G,V,Q.props.children,ve,Q.key):V!==null&&(V.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===pe&&Ix(Re)===V.type)?(ve=E(V,Q.props),ve.ref=eu(G,V,Q),ve.return=G,ve):(ve=Jc(Q.type,Q.key,Q.props,null,G.mode,ve),ve.ref=eu(G,V,Q),ve.return=G,ve)}function Z(G,V,Q,ve){return V===null||V.tag!==4||V.stateNode.containerInfo!==Q.containerInfo||V.stateNode.implementation!==Q.implementation?(V=Wm(Q,G.mode,ve),V.return=G,V):(V=E(V,Q.children||[]),V.return=G,V)}function Ee(G,V,Q,ve,Re){return V===null||V.tag!==7?(V=xs(Q,G.mode,ve,Re),V.return=G,V):(V=E(V,Q),V.return=G,V)}function be(G,V,Q){if(typeof V=="string"&&V!==""||typeof V=="number")return V=Ym(""+V,G.mode,Q),V.return=G,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case Y:return Q=Jc(V.type,V.key,V.props,null,G.mode,Q),Q.ref=eu(G,null,V),Q.return=G,Q;case R:return V=Wm(V,G.mode,Q),V.return=G,V;case pe:var ve=V._init;return be(G,ve(V._payload),Q)}if(ar(V)||ue(V))return V=xs(V,G.mode,Q,null),V.return=G,V;Cc(G,V)}return null}function me(G,V,Q,ve){var Re=V!==null?V.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Re!==null?null:D(G,V,""+Q,ve);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:return Q.key===Re?z(G,V,Q,ve):null;case R:return Q.key===Re?Z(G,V,Q,ve):null;case pe:return Re=Q._init,me(G,V,Re(Q._payload),ve)}if(ar(Q)||ue(Q))return Re!==null?null:Ee(G,V,Q,ve,null);Cc(G,Q)}return null}function ke(G,V,Q,ve,Re){if(typeof ve=="string"&&ve!==""||typeof ve=="number")return G=G.get(Q)||null,D(V,G,""+ve,Re);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case Y:return G=G.get(ve.key===null?Q:ve.key)||null,z(V,G,ve,Re);case R:return G=G.get(ve.key===null?Q:ve.key)||null,Z(V,G,ve,Re);case pe:var Be=ve._init;return ke(G,V,Q,Be(ve._payload),Re)}if(ar(ve)||ue(ve))return G=G.get(Q)||null,Ee(V,G,ve,Re,null);Cc(V,ve)}return null}function Ie(G,V,Q,ve){for(var Re=null,Be=null,Ue=V,Ve=V=0,$t=null;Ue!==null&&Ve<Q.length;Ve++){Ue.index>Ve?($t=Ue,Ue=null):$t=Ue.sibling;var rt=me(G,Ue,Q[Ve],ve);if(rt===null){Ue===null&&(Ue=$t);break}i&&Ue&&rt.alternate===null&&o(G,Ue),V=b(rt,V,Ve),Be===null?Re=rt:Be.sibling=rt,Be=rt,Ue=$t}if(Ve===Q.length)return c(G,Ue),Tt&&ps(G,Ve),Re;if(Ue===null){for(;Ve<Q.length;Ve++)Ue=be(G,Q[Ve],ve),Ue!==null&&(V=b(Ue,V,Ve),Be===null?Re=Ue:Be.sibling=Ue,Be=Ue);return Tt&&ps(G,Ve),Re}for(Ue=h(G,Ue);Ve<Q.length;Ve++)$t=ke(Ue,G,Ve,Q[Ve],ve),$t!==null&&(i&&$t.alternate!==null&&Ue.delete($t.key===null?Ve:$t.key),V=b($t,V,Ve),Be===null?Re=$t:Be.sibling=$t,Be=$t);return i&&Ue.forEach(function(Li){return o(G,Li)}),Tt&&ps(G,Ve),Re}function Pe(G,V,Q,ve){var Re=ue(Q);if(typeof Re!="function")throw Error(n(150));if(Q=Re.call(Q),Q==null)throw Error(n(151));for(var Be=Re=null,Ue=V,Ve=V=0,$t=null,rt=Q.next();Ue!==null&&!rt.done;Ve++,rt=Q.next()){Ue.index>Ve?($t=Ue,Ue=null):$t=Ue.sibling;var Li=me(G,Ue,rt.value,ve);if(Li===null){Ue===null&&(Ue=$t);break}i&&Ue&&Li.alternate===null&&o(G,Ue),V=b(Li,V,Ve),Be===null?Re=Li:Be.sibling=Li,Be=Li,Ue=$t}if(rt.done)return c(G,Ue),Tt&&ps(G,Ve),Re;if(Ue===null){for(;!rt.done;Ve++,rt=Q.next())rt=be(G,rt.value,ve),rt!==null&&(V=b(rt,V,Ve),Be===null?Re=rt:Be.sibling=rt,Be=rt);return Tt&&ps(G,Ve),Re}for(Ue=h(G,Ue);!rt.done;Ve++,rt=Q.next())rt=ke(Ue,G,Ve,rt.value,ve),rt!==null&&(i&&rt.alternate!==null&&Ue.delete(rt.key===null?Ve:rt.key),V=b(rt,V,Ve),Be===null?Re=rt:Be.sibling=rt,Be=rt);return i&&Ue.forEach(function(Q7){return o(G,Q7)}),Tt&&ps(G,Ve),Re}function Nt(G,V,Q,ve){if(typeof Q=="object"&&Q!==null&&Q.type===W&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:e:{for(var Re=Q.key,Be=V;Be!==null;){if(Be.key===Re){if(Re=Q.type,Re===W){if(Be.tag===7){c(G,Be.sibling),V=E(Be,Q.props.children),V.return=G,G=V;break e}}else if(Be.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===pe&&Ix(Re)===Be.type){c(G,Be.sibling),V=E(Be,Q.props),V.ref=eu(G,Be,Q),V.return=G,G=V;break e}c(G,Be);break}else o(G,Be);Be=Be.sibling}Q.type===W?(V=xs(Q.props.children,G.mode,ve,Q.key),V.return=G,G=V):(ve=Jc(Q.type,Q.key,Q.props,null,G.mode,ve),ve.ref=eu(G,V,Q),ve.return=G,G=ve)}return w(G);case R:e:{for(Be=Q.key;V!==null;){if(V.key===Be)if(V.tag===4&&V.stateNode.containerInfo===Q.containerInfo&&V.stateNode.implementation===Q.implementation){c(G,V.sibling),V=E(V,Q.children||[]),V.return=G,G=V;break e}else{c(G,V);break}else o(G,V);V=V.sibling}V=Wm(Q,G.mode,ve),V.return=G,G=V}return w(G);case pe:return Be=Q._init,Nt(G,V,Be(Q._payload),ve)}if(ar(Q))return Ie(G,V,Q,ve);if(ue(Q))return Pe(G,V,Q,ve);Cc(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,V!==null&&V.tag===6?(c(G,V.sibling),V=E(V,Q),V.return=G,G=V):(c(G,V),V=Ym(Q,G.mode,ve),V.return=G,G=V),w(G)):c(G,V)}return Nt}var No=Px(!0),Rx=Px(!1),kc=wi(null),Oc=null,Co=null,nm=null;function rm(){nm=Co=Oc=null}function im(i){var o=kc.current;gt(kc),i._currentValue=o}function sm(i,o,c){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===c)break;i=i.return}}function ko(i,o){Oc=i,nm=Co=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(An=!0),i.firstContext=null)}function Wn(i){var o=i._currentValue;if(nm!==i)if(i={context:i,memoizedValue:o,next:null},Co===null){if(Oc===null)throw Error(n(308));Co=i,Oc.dependencies={lanes:0,firstContext:i}}else Co=Co.next=i;return o}var ms=null;function om(i){ms===null?ms=[i]:ms.push(i)}function Lx(i,o,c,h){var E=o.interleaved;return E===null?(c.next=c,om(o)):(c.next=E.next,E.next=c),o.interleaved=c,Qr(i,h)}function Qr(i,o){i.lanes|=o;var c=i.alternate;for(c!==null&&(c.lanes|=o),c=i,i=i.return;i!==null;)i.childLanes|=o,c=i.alternate,c!==null&&(c.childLanes|=o),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Ai=!1;function am(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 Kr(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Ni(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(nt&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,Qr(i,c)}return E=h.interleaved,E===null?(o.next=o,om(h)):(o.next=E.next,E.next=o),h.interleaved=o,Qr(i,c)}function Ic(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,_p(i,c)}}function Mx(i,o){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var w={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=w:b=b.next=w,c=c.next}while(c!==null);b===null?E=b=o:b=b.next=o}else E=b=o;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:h.shared,effects:h.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}function Pc(i,o,c,h){var E=i.updateQueue;Ai=!1;var b=E.firstBaseUpdate,w=E.lastBaseUpdate,D=E.shared.pending;if(D!==null){E.shared.pending=null;var z=D,Z=z.next;z.next=null,w===null?b=Z:w.next=Z,w=z;var Ee=i.alternate;Ee!==null&&(Ee=Ee.updateQueue,D=Ee.lastBaseUpdate,D!==w&&(D===null?Ee.firstBaseUpdate=Z:D.next=Z,Ee.lastBaseUpdate=z))}if(b!==null){var be=E.baseState;w=0,Ee=Z=z=null,D=b;do{var me=D.lane,ke=D.eventTime;if((h&me)===me){Ee!==null&&(Ee=Ee.next={eventTime:ke,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var Ie=i,Pe=D;switch(me=o,ke=c,Pe.tag){case 1:if(Ie=Pe.payload,typeof Ie=="function"){be=Ie.call(ke,be,me);break e}be=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=Pe.payload,me=typeof Ie=="function"?Ie.call(ke,be,me):Ie,me==null)break e;be=N({},be,me);break e;case 2:Ai=!0}}D.callback!==null&&D.lane!==0&&(i.flags|=64,me=E.effects,me===null?E.effects=[D]:me.push(D))}else ke={eventTime:ke,lane:me,tag:D.tag,payload:D.payload,callback:D.callback,next:null},Ee===null?(Z=Ee=ke,z=be):Ee=Ee.next=ke,w|=me;if(D=D.next,D===null){if(D=E.shared.pending,D===null)break;me=D,D=me.next,me.next=null,E.lastBaseUpdate=me,E.shared.pending=null}}while(!0);if(Ee===null&&(z=be),E.baseState=z,E.firstBaseUpdate=Z,E.lastBaseUpdate=Ee,o=E.shared.interleaved,o!==null){E=o;do w|=E.lane,E=E.next;while(E!==o)}else b===null&&(E.shared.lanes=0);ys|=w,i.lanes=w,i.memoizedState=be}}function Fx(i,o,c){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=c,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var tu={},Lr=wi(tu),nu=wi(tu),ru=wi(tu);function gs(i){if(i===tu)throw Error(n(174));return i}function um(i,o){switch(ft(ru,o),ft(nu,i),ft(Lr,tu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:Ae(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=Ae(o,i)}gt(Lr),ft(Lr,o)}function Oo(){gt(Lr),gt(nu),gt(ru)}function Bx(i){gs(ru.current);var o=gs(Lr.current),c=Ae(o,i.type);o!==c&&(ft(nu,i),ft(Lr,c))}function lm(i){nu.current===i&&(gt(Lr),gt(nu))}var bt=wi(0);function Rc(i){for(var o=i;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.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 cm=[];function dm(){for(var i=0;i<cm.length;i++)cm[i]._workInProgressVersionPrimary=null;cm.length=0}var Lc=j.ReactCurrentDispatcher,fm=j.ReactCurrentBatchConfig,Es=0,_t=null,Dt=null,jt=null,Dc=!1,iu=!1,su=0,y7=0;function sn(){throw Error(n(321))}function hm(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!cr(i[c],o[c]))return!1;return!0}function pm(i,o,c,h,E,b){if(Es=b,_t=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Lc.current=i===null||i.memoizedState===null?x7:w7,i=c(h,E),iu){b=0;do{if(iu=!1,su=0,25<=b)throw Error(n(301));b+=1,jt=Dt=null,o.updateQueue=null,Lc.current=S7,i=c(h,E)}while(iu)}if(Lc.current=Bc,o=Dt!==null&&Dt.next!==null,Es=0,jt=Dt=_t=null,Dc=!1,o)throw Error(n(300));return i}function mm(){var i=su!==0;return su=0,i}function Dr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?_t.memoizedState=jt=i:jt=jt.next=i,jt}function Gn(){if(Dt===null){var i=_t.alternate;i=i!==null?i.memoizedState:null}else i=Dt.next;var o=jt===null?_t.memoizedState:jt.next;if(o!==null)jt=o,Dt=i;else{if(i===null)throw Error(n(310));Dt=i,i={memoizedState:Dt.memoizedState,baseState:Dt.baseState,baseQueue:Dt.baseQueue,queue:Dt.queue,next:null},jt===null?_t.memoizedState=jt=i:jt=jt.next=i}return jt}function ou(i,o){return typeof o=="function"?o(i):o}function gm(i){var o=Gn(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Dt,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var w=E.next;E.next=b.next,b.next=w}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var D=w=null,z=null,Z=b;do{var Ee=Z.lane;if((Es&Ee)===Ee)z!==null&&(z=z.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 be={lane:Ee,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};z===null?(D=z=be,w=h):z=z.next=be,_t.lanes|=Ee,ys|=Ee}Z=Z.next}while(Z!==null&&Z!==b);z===null?w=h:z.next=D,cr(h,o.memoizedState)||(An=!0),o.memoizedState=h,o.baseState=w,o.baseQueue=z,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,_t.lanes|=b,ys|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function Em(i){var o=Gn(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,b=o.memoizedState;if(E!==null){c.pending=null;var w=E=E.next;do b=i(b,w.action),w=w.next;while(w!==E);cr(b,o.memoizedState)||(An=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),c.lastRenderedState=b}return[b,h]}function Ux(){}function Hx(i,o){var c=_t,h=Gn(),E=o(),b=!cr(h.memoizedState,E);if(b&&(h.memoizedState=E,An=!0),h=h.queue,ym($x.bind(null,c,h,i),[i]),h.getSnapshot!==o||b||jt!==null&&jt.memoizedState.tag&1){if(c.flags|=2048,au(9,zx.bind(null,c,h,E,o),void 0,null),zt===null)throw Error(n(349));(Es&30)!==0||jx(c,o,E)}return E}function jx(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=_t.updateQueue,o===null?(o={lastEffect:null,stores:null},_t.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function zx(i,o,c,h){o.value=c,o.getSnapshot=h,Vx(o)&&qx(i)}function $x(i,o,c){return c(function(){Vx(o)&&qx(i)})}function Vx(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!cr(i,c)}catch(h){return!0}}function qx(i){var o=Qr(i,1);o!==null&&mr(o,i,1,-1)}function Yx(i){var o=Dr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ou,lastRenderedState:i},o.queue=i,i=i.dispatch=_7.bind(null,_t,i),[o.memoizedState,i]}function au(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=_t.updateQueue,o===null?(o={lastEffect:null,stores:null},_t.updateQueue=o,o.lastEffect=i.next=i):(c=o.lastEffect,c===null?o.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,o.lastEffect=i)),i}function Wx(){return Gn().memoizedState}function Mc(i,o,c,h){var E=Dr();_t.flags|=i,E.memoizedState=au(1|o,c,void 0,h===void 0?null:h)}function Fc(i,o,c,h){var E=Gn();h=h===void 0?null:h;var b=void 0;if(Dt!==null){var w=Dt.memoizedState;if(b=w.destroy,h!==null&&hm(h,w.deps)){E.memoizedState=au(o,c,b,h);return}}_t.flags|=i,E.memoizedState=au(1|o,c,b,h)}function Gx(i,o){return Mc(8390656,8,i,o)}function ym(i,o){return Fc(2048,8,i,o)}function Xx(i,o){return Fc(4,2,i,o)}function Qx(i,o){return Fc(4,4,i,o)}function Kx(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 Jx(i,o,c){return c=c!=null?c.concat([i]):null,Fc(4,4,Kx.bind(null,o,i),c)}function Tm(){}function Zx(i,o){var c=Gn();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&hm(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function ew(i,o){var c=Gn();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&hm(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function tw(i,o,c){return(Es&21)===0?(i.baseState&&(i.baseState=!1,An=!0),i.memoizedState=c):(cr(c,o)||(c=I_(),_t.lanes|=c,ys|=c,i.baseState=!0),o)}function T7(i,o){var c=ot;ot=c!==0&&4>c?c:4,i(!0);var h=fm.transition;fm.transition={};try{i(!1),o()}finally{ot=c,fm.transition=h}}function nw(){return Gn().memoizedState}function b7(i,o,c){var h=Ii(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},rw(i))iw(o,c);else if(c=Lx(i,o,c,h),c!==null){var E=hn();mr(c,i,h,E),sw(c,o,h)}}function _7(i,o,c){var h=Ii(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(rw(i))iw(o,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var w=o.lastRenderedState,D=b(w,c);if(E.hasEagerState=!0,E.eagerState=D,cr(D,w)){var z=o.interleaved;z===null?(E.next=E,om(o)):(E.next=z.next,z.next=E),o.interleaved=E;return}}catch(Z){}c=Lx(i,o,E,h),c!==null&&(E=hn(),mr(c,i,h,E),sw(c,o,h))}}function rw(i){var o=i.alternate;return i===_t||o!==null&&o===_t}function iw(i,o){iu=Dc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function sw(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,_p(i,c)}}var Bc={readContext:Wn,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useInsertionEffect:sn,useLayoutEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useMutableSource:sn,useSyncExternalStore:sn,useId:sn,unstable_isNewReconciler:!1},x7={readContext:Wn,useCallback:function(i,o){return Dr().memoizedState=[i,o===void 0?null:o],i},useContext:Wn,useEffect:Gx,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,Mc(4194308,4,Kx.bind(null,o,i),c)},useLayoutEffect:function(i,o){return Mc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Mc(4,2,i,o)},useMemo:function(i,o){var c=Dr();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=Dr();return o=c!==void 0?c(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=b7.bind(null,_t,i),[h.memoizedState,i]},useRef:function(i){var o=Dr();return i={current:i},o.memoizedState=i},useState:Yx,useDebugValue:Tm,useDeferredValue:function(i){return Dr().memoizedState=i},useTransition:function(){var i=Yx(!1),o=i[0];return i=T7.bind(null,i[1]),Dr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=_t,E=Dr();if(Tt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),zt===null)throw Error(n(349));(Es&30)!==0||jx(h,o,c)}E.memoizedState=c;var b={value:c,getSnapshot:o};return E.queue=b,Gx($x.bind(null,h,b,i),[i]),h.flags|=2048,au(9,zx.bind(null,h,b,c,o),void 0,null),c},useId:function(){var i=Dr(),o=zt.identifierPrefix;if(Tt){var c=Xr,h=Gr;c=(h&~(1<<32-lr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=su++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=y7++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},w7={readContext:Wn,useCallback:Zx,useContext:Wn,useEffect:ym,useImperativeHandle:Jx,useInsertionEffect:Xx,useLayoutEffect:Qx,useMemo:ew,useReducer:gm,useRef:Wx,useState:function(){return gm(ou)},useDebugValue:Tm,useDeferredValue:function(i){var o=Gn();return tw(o,Dt.memoizedState,i)},useTransition:function(){var i=gm(ou)[0],o=Gn().memoizedState;return[i,o]},useMutableSource:Ux,useSyncExternalStore:Hx,useId:nw,unstable_isNewReconciler:!1},S7={readContext:Wn,useCallback:Zx,useContext:Wn,useEffect:ym,useImperativeHandle:Jx,useInsertionEffect:Xx,useLayoutEffect:Qx,useMemo:ew,useReducer:Em,useRef:Wx,useState:function(){return Em(ou)},useDebugValue:Tm,useDeferredValue:function(i){var o=Gn();return Dt===null?o.memoizedState=i:tw(o,Dt.memoizedState,i)},useTransition:function(){var i=Em(ou)[0],o=Gn().memoizedState;return[i,o]},useMutableSource:Ux,useSyncExternalStore:Hx,useId:nw,unstable_isNewReconciler:!1};function fr(i,o){if(i&&i.defaultProps){o=N({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function bm(i,o,c,h){o=i.memoizedState,c=c(h,o),c=c==null?o:N({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Uc={isMounted:function(i){return(i=i._reactInternals)?cs(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=hn(),E=Ii(i),b=Kr(h,E);b.payload=o,c!=null&&(b.callback=c),o=Ni(i,b,E),o!==null&&(mr(o,i,E,h),Ic(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=hn(),E=Ii(i),b=Kr(h,E);b.tag=1,b.payload=o,c!=null&&(b.callback=c),o=Ni(i,b,E),o!==null&&(mr(o,i,E,h),Ic(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=hn(),h=Ii(i),E=Kr(c,h);E.tag=2,o!=null&&(E.callback=o),o=Ni(i,E,h),o!==null&&(mr(o,i,h,c),Ic(o,i,h))}};function ow(i,o,c,h,E,b,w){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,w):o.prototype&&o.prototype.isPureReactComponent?!Wa(c,h)||!Wa(E,b):!0}function aw(i,o,c){var h=!1,E=Si,b=o.contextType;return typeof b=="object"&&b!==null?b=Wn(b):(E=vn(o)?fs:rn.current,h=o.contextTypes,b=(h=h!=null)?wo(i,E):Si),o=new o(c,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Uc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function uw(i,o,c,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,h),o.state!==i&&Uc.enqueueReplaceState(o,o.state,null)}function _m(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},am(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=Wn(b):(b=vn(o)?fs:rn.current,E.context=wo(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(bm(i,o,b,c),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&&Uc.enqueueReplaceState(E,E.state,null),Pc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Io(i,o){try{var c="",h=o;do c+=De(h),h=h.return;while(h);var E=c}catch(b){E=`
19
+ `),w=E.length-1,M=b.length-1;1<=w&&0<=M&&E[w]!==b[M];)M--;for(;1<=w&&0<=M;w--,M--)if(E[w]!==b[M]){if(w!==1||M!==1)do if(w--,M--,0>M||E[w]!==b[M]){var z=`
20
+ `+E[w].replace(" at new "," at ");return i.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",i.displayName)),z}while(1<=w&&0<=M);break}}}finally{P=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?J(i):""}function Me(i){switch(i.tag){case 5:return J(i.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return i=Se(i.type,!1),i;case 11:return i=Se(i.type.render,!1),i;case 1:return i=Se(i.type,!0),i;default:return""}}function _e(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 W:return"Fragment";case R:return"Portal";case de:return"Profiler";case ie:return"StrictMode";case xe:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case ee:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ce:return o=i.displayName||null,o!==null?o:_e(i.type)||"Memo";case he:o=i._payload,i=i._init;try{return _e(i(o))}catch(c){}}return null}function ne(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 _e(o);case 8:return o===ie?"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 Ee(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function re(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ve(i){var o=re(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof c!="undefined"&&typeof c.get=="function"&&typeof c.set=="function"){var E=c.get,b=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(w){h=""+w,b.call(this,w)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(w){h=""+w},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function $e(i){i._valueTracker||(i._valueTracker=ve(i))}function gt(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=re(i)?i.checked?"true":"false":i.value),i=h,i!==c?(o.setValue(i),!0):!1}function Ce(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 We(i,o){var c=o.checked;return N({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Ze(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=Ee(o.value!=null?o.value:c),i._wrapperState={initialChecked:h,initialValue:c,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Pe(i,o){o=o.checked,o!=null&&I(i,"checked",o,!1)}function Et(i,o){Pe(i,o);var c=Ee(o.value),h=o.type;if(c!=null)h==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?wn(i,o.type,c):o.hasOwnProperty("defaultValue")&&wn(i,o.type,Ee(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function Ln(i,o,c){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,c||o===i.value||(i.value=o),i.defaultValue=o}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function wn(i,o,c){(o!=="number"||Ce(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var ar=Array.isArray;function Or(i,o,c,h){if(i=i.options,o){o={};for(var E=0;E<c.length;E++)o["$"+c[E]]=!0;for(c=0;c<i.length;c++)E=o.hasOwnProperty("$"+i[c].value),i[c].selected!==E&&(i[c].selected=E),E&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Ee(c),o=null,E=0;E<i.length;E++){if(i[E].value===c){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function ur(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Kl(i,o){var c=o.value;if(c==null){if(c=o.children,o=o.defaultValue,c!=null){if(o!=null)throw Error(n(92));if(ar(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:Ee(c)}}function Jl(i,o){var c=Ee(o.value),h=Ee(o.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),o.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),h!=null&&(i.defaultValue=""+h)}function Zl(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function oe(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 Ae(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?oe(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ve,Qe=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,c,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,c,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(Ve=Ve||document.createElement("div"),Ve.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ve.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function nt(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var Gt={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},Yr=["Webkit","ms","Moz","O"];Object.keys(Gt).forEach(function(i){Yr.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Gt[o]=Gt[i]})});function Vn(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||Gt.hasOwnProperty(i)&&Gt[i]?(""+o).trim():o+"px"}function mi(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=Vn(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var ls=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 Xt(i,o){if(o){if(ls[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 Ir(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 Dn=null;function hp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var pp=null,ho=null,po=null;function T_(i){if(i=Za(i)){if(typeof pp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=xc(o),pp(i.stateNode,i.type,o))}}function b_(i){ho?po?po.push(i):po=[i]:ho=i}function __(){if(ho){var i=ho,o=po;if(po=ho=null,T_(i),o)for(i=0;i<o.length;i++)T_(o[i])}}function x_(i,o){return i(o)}function w_(){}var mp=!1;function S_(i,o,c){if(mp)return i(o,c);mp=!0;try{return x_(i,o,c)}finally{mp=!1,(ho!==null||po!==null)&&(w_(),__())}}function Pa(i,o){var c=i.stateNode;if(c===null)return null;var h=xc(c);if(h===null)return null;c=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(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var gp=!1;if(l)try{var Ra={};Object.defineProperty(Ra,"passive",{get:function(){gp=!0}}),window.addEventListener("test",Ra,Ra),window.removeEventListener("test",Ra,Ra)}catch(i){gp=!1}function uF(i,o,c,h,E,b,w,M,z){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(c,Z)}catch(ge){this.onError(ge)}}var La=!1,ec=null,tc=!1,Ep=null,lF={onError:function(i){La=!0,ec=i}};function cF(i,o,c,h,E,b,w,M,z){La=!1,ec=null,uF.apply(lF,arguments)}function dF(i,o,c,h,E,b,w,M,z){if(cF.apply(this,arguments),La){if(La){var Z=ec;La=!1,ec=null}else throw Error(n(198));tc||(tc=!0,Ep=Z)}}function cs(i){var o=i,c=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(c=o.return),i=o.return;while(i)}return o.tag===3?c:null}function v_(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 A_(i){if(cs(i)!==i)throw Error(n(188))}function fF(i){var o=i.alternate;if(!o){if(o=cs(i),o===null)throw Error(n(188));return o!==i?null:i}for(var c=i,h=o;;){var E=c.return;if(E===null)break;var b=E.alternate;if(b===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===c)return A_(E),i;if(b===h)return A_(E),o;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var w=!1,M=E.child;M;){if(M===c){w=!0,c=E,h=b;break}if(M===h){w=!0,h=E,c=b;break}M=M.sibling}if(!w){for(M=b.child;M;){if(M===c){w=!0,c=b,h=E;break}if(M===h){w=!0,h=b,c=E;break}M=M.sibling}if(!w)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:o}function N_(i){return i=fF(i),i!==null?k_(i):null}function k_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=k_(i);if(o!==null)return o;i=i.sibling}return null}var C_=t.unstable_scheduleCallback,O_=t.unstable_cancelCallback,hF=t.unstable_shouldYield,pF=t.unstable_requestPaint,Ct=t.unstable_now,mF=t.unstable_getCurrentPriorityLevel,yp=t.unstable_ImmediatePriority,I_=t.unstable_UserBlockingPriority,nc=t.unstable_NormalPriority,gF=t.unstable_LowPriority,P_=t.unstable_IdlePriority,rc=null,Pr=null;function EF(i){if(Pr&&typeof Pr.onCommitFiberRoot=="function")try{Pr.onCommitFiberRoot(rc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var lr=Math.clz32?Math.clz32:bF,yF=Math.log,TF=Math.LN2;function bF(i){return i>>>=0,i===0?32:31-(yF(i)/TF|0)|0}var ic=64,sc=4194304;function Da(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 oc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,w=c&268435455;if(w!==0){var M=w&~E;M!==0?h=Da(M):(b&=w,b!==0&&(h=Da(b)))}else w=c&~E,w!==0?h=Da(w):b!==0&&(h=Da(b));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,b=o&-o,E>=b||E===16&&(b&4194240)!==0))return o;if((h&4)!==0&&(h|=c&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)c=31-lr(o),E=1<<c,h|=i[c],o&=~E;return h}function _F(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 xF(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var w=31-lr(b),M=1<<w,z=E[w];z===-1?((M&c)===0||(M&h)!==0)&&(E[w]=_F(M,o)):z<=o&&(i.expiredLanes|=M),b&=~M}}function Tp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function R_(){var i=ic;return ic<<=1,(ic&4194240)===0&&(ic=64),i}function bp(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function Ma(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-lr(o),i[o]=c}function wF(i,o){var c=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<c;){var E=31-lr(c),b=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function _p(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-lr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var ut=0;function L_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var D_,xp,M_,F_,B_,wp=!1,ac=[],gi=null,Ei=null,yi=null,Fa=new Map,Ba=new Map,Ti=[],SF="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 U_(i,o){switch(i){case"focusin":case"focusout":gi=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":yi=null;break;case"pointerover":case"pointerout":Fa.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ba.delete(o.pointerId)}}function Ua(i,o,c,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},o!==null&&(o=Za(o),o!==null&&xp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function vF(i,o,c,h,E){switch(o){case"focusin":return gi=Ua(gi,i,o,c,h,E),!0;case"dragenter":return Ei=Ua(Ei,i,o,c,h,E),!0;case"mouseover":return yi=Ua(yi,i,o,c,h,E),!0;case"pointerover":var b=E.pointerId;return Fa.set(b,Ua(Fa.get(b)||null,i,o,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,Ba.set(b,Ua(Ba.get(b)||null,i,o,c,h,E)),!0}return!1}function H_(i){var o=ds(i.target);if(o!==null){var c=cs(o);if(c!==null){if(o=c.tag,o===13){if(o=v_(c),o!==null){i.blockedOn=o,B_(i.priority,function(){M_(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function uc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=vp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Dn=h,c.target.dispatchEvent(h),Dn=null}else return o=Za(c),o!==null&&xp(o),i.blockedOn=c,!1;o.shift()}return!0}function j_(i,o,c){uc(i)&&c.delete(o)}function AF(){wp=!1,gi!==null&&uc(gi)&&(gi=null),Ei!==null&&uc(Ei)&&(Ei=null),yi!==null&&uc(yi)&&(yi=null),Fa.forEach(j_),Ba.forEach(j_)}function Ha(i,o){i.blockedOn===o&&(i.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,AF)))}function ja(i){function o(E){return Ha(E,i)}if(0<ac.length){Ha(ac[0],i);for(var c=1;c<ac.length;c++){var h=ac[c];h.blockedOn===i&&(h.blockedOn=null)}}for(gi!==null&&Ha(gi,i),Ei!==null&&Ha(Ei,i),yi!==null&&Ha(yi,i),Fa.forEach(o),Ba.forEach(o),c=0;c<Ti.length;c++)h=Ti[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ti.length&&(c=Ti[0],c.blockedOn===null);)H_(c),c.blockedOn===null&&Ti.shift()}var mo=j.ReactCurrentBatchConfig,lc=!0;function NF(i,o,c,h){var E=ut,b=mo.transition;mo.transition=null;try{ut=1,Sp(i,o,c,h)}finally{ut=E,mo.transition=b}}function kF(i,o,c,h){var E=ut,b=mo.transition;mo.transition=null;try{ut=4,Sp(i,o,c,h)}finally{ut=E,mo.transition=b}}function Sp(i,o,c,h){if(lc){var E=vp(i,o,c,h);if(E===null)zp(i,o,h,cc,c),U_(i,h);else if(vF(E,i,o,c,h))h.stopPropagation();else if(U_(i,h),o&4&&-1<SF.indexOf(i)){for(;E!==null;){var b=Za(E);if(b!==null&&D_(b),b=vp(i,o,c,h),b===null&&zp(i,o,h,cc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else zp(i,o,h,null,c)}}var cc=null;function vp(i,o,c,h){if(cc=null,i=hp(h),i=ds(i),i!==null)if(o=cs(i),o===null)i=null;else if(c=o.tag,c===13){if(i=v_(o),i!==null)return i;i=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return cc=i,null}function z_(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(mF()){case yp:return 1;case I_:return 4;case nc:case gF:return 16;case P_:return 536870912;default:return 16}default:return 16}}var bi=null,Ap=null,dc=null;function $_(){if(dc)return dc;var i,o=Ap,c=o.length,h,E="value"in bi?bi.value:bi.textContent,b=E.length;for(i=0;i<c&&o[i]===E[i];i++);var w=c-i;for(h=1;h<=w&&o[c-h]===E[b-h];h++);return dc=E.slice(i,1<h?1-h:void 0)}function fc(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 hc(){return!0}function V_(){return!1}function Mn(i){function o(c,h,E,b,w){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var M in i)i.hasOwnProperty(M)&&(c=i[M],this[M]=c?c(b):b[M]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?hc:V_,this.isPropagationStopped=V_,this}return N(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=hc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=hc)},persist:function(){},isPersistent:hc}),o}var go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Np=Mn(go),za=N({},go,{view:0,detail:0}),CF=Mn(za),kp,Cp,$a,pc=N({},za,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ip,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!==$a&&($a&&i.type==="mousemove"?(kp=i.screenX-$a.screenX,Cp=i.screenY-$a.screenY):Cp=kp=0,$a=i),kp)},movementY:function(i){return"movementY"in i?i.movementY:Cp}}),q_=Mn(pc),OF=N({},pc,{dataTransfer:0}),IF=Mn(OF),PF=N({},za,{relatedTarget:0}),Op=Mn(PF),RF=N({},go,{animationName:0,elapsedTime:0,pseudoElement:0}),LF=Mn(RF),DF=N({},go,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),MF=Mn(DF),FF=N({},go,{data:0}),Y_=Mn(FF),BF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},UF={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"},HF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jF(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=HF[i])?!!o[i]:!1}function Ip(){return jF}var zF=N({},za,{key:function(i){if(i.key){var o=BF[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=fc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?UF[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ip,charCode:function(i){return i.type==="keypress"?fc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?fc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),$F=Mn(zF),VF=N({},pc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),W_=Mn(VF),qF=N({},za,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ip}),YF=Mn(qF),WF=N({},go,{propertyName:0,elapsedTime:0,pseudoElement:0}),GF=Mn(WF),XF=N({},pc,{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}),QF=Mn(XF),KF=[9,13,27,32],Pp=l&&"CompositionEvent"in window,Va=null;l&&"documentMode"in document&&(Va=document.documentMode);var JF=l&&"TextEvent"in window&&!Va,G_=l&&(!Pp||Va&&8<Va&&11>=Va),X_=" ",Q_=!1;function K_(i,o){switch(i){case"keyup":return KF.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function J_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Eo=!1;function ZF(i,o){switch(i){case"compositionend":return J_(o);case"keypress":return o.which!==32?null:(Q_=!0,X_);case"textInput":return i=o.data,i===X_&&Q_?null:i;default:return null}}function eB(i,o){if(Eo)return i==="compositionend"||!Pp&&K_(i,o)?(i=$_(),dc=Ap=bi=null,Eo=!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 G_&&o.locale!=="ko"?null:o.data;default:return null}}var tB={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 Z_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!tB[i.type]:o==="textarea"}function ex(i,o,c,h){b_(h),o=Tc(o,"onChange"),0<o.length&&(c=new Np("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var qa=null,Ya=null;function nB(i){yx(i,0)}function mc(i){var o=xo(i);if(gt(o))return i}function rB(i,o){if(i==="change")return o}var tx=!1;if(l){var Rp;if(l){var Lp="oninput"in document;if(!Lp){var nx=document.createElement("div");nx.setAttribute("oninput","return;"),Lp=typeof nx.oninput=="function"}Rp=Lp}else Rp=!1;tx=Rp&&(!document.documentMode||9<document.documentMode)}function rx(){qa&&(qa.detachEvent("onpropertychange",ix),Ya=qa=null)}function ix(i){if(i.propertyName==="value"&&mc(Ya)){var o=[];ex(o,Ya,i,hp(i)),S_(nB,o)}}function iB(i,o,c){i==="focusin"?(rx(),qa=o,Ya=c,qa.attachEvent("onpropertychange",ix)):i==="focusout"&&rx()}function sB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return mc(Ya)}function oB(i,o){if(i==="click")return mc(o)}function aB(i,o){if(i==="input"||i==="change")return mc(o)}function uB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var cr=typeof Object.is=="function"?Object.is:uB;function Wa(i,o){if(cr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),h=Object.keys(o);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var E=c[h];if(!d.call(o,E)||!cr(i[E],o[E]))return!1}return!0}function sx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ox(i,o){var c=sx(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=o&&h>=o)return{node:c,offset:o-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=sx(c)}}function ax(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?ax(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function ux(){for(var i=window,o=Ce();o instanceof i.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch(h){c=!1}if(c)i=o.contentWindow;else break;o=Ce(i.document)}return o}function Dp(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=ux(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&ax(c.ownerDocument.documentElement,c)){if(h!==null&&Dp(c)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in c)c.selectionStart=o,c.selectionEnd=Math.min(i,c.value.length);else if(i=(o=c.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=c.textContent.length,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=ox(c,b);var w=ox(c,h);E&&w&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==w.node||i.focusOffset!==w.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(o),i.extend(w.node,w.offset)):(o.setEnd(w.node,w.offset),i.addRange(o)))}}for(o=[],i=c;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<o.length;c++)i=o[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var cB=l&&"documentMode"in document&&11>=document.documentMode,yo=null,Mp=null,Ga=null,Fp=!1;function lx(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Fp||yo==null||yo!==Ce(h)||(h=yo,"selectionStart"in h&&Dp(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}),Ga&&Wa(Ga,h)||(Ga=h,h=Tc(Mp,"onSelect"),0<h.length&&(o=new Np("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=yo)))}function gc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var To={animationend:gc("Animation","AnimationEnd"),animationiteration:gc("Animation","AnimationIteration"),animationstart:gc("Animation","AnimationStart"),transitionend:gc("Transition","TransitionEnd")},Bp={},cx={};l&&(cx=document.createElement("div").style,"AnimationEvent"in window||(delete To.animationend.animation,delete To.animationiteration.animation,delete To.animationstart.animation),"TransitionEvent"in window||delete To.transitionend.transition);function Ec(i){if(Bp[i])return Bp[i];if(!To[i])return i;var o=To[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in cx)return Bp[i]=o[c];return i}var dx=Ec("animationend"),fx=Ec("animationiteration"),hx=Ec("animationstart"),px=Ec("transitionend"),mx=new Map,gx="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 _i(i,o){mx.set(i,o),a(o,[i])}for(var Up=0;Up<gx.length;Up++){var Hp=gx[Up],dB=Hp.toLowerCase(),fB=Hp[0].toUpperCase()+Hp.slice(1);_i(dB,"on"+fB)}_i(dx,"onAnimationEnd"),_i(fx,"onAnimationIteration"),_i(hx,"onAnimationStart"),_i("dblclick","onDoubleClick"),_i("focusin","onFocus"),_i("focusout","onBlur"),_i(px,"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 Xa="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(" "),hB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xa));function Ex(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,dF(h,o,void 0,i),i.currentTarget=null}function yx(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],E=h.event;h=h.listeners;e:{var b=void 0;if(o)for(var w=h.length-1;0<=w;w--){var M=h[w],z=M.instance,Z=M.currentTarget;if(M=M.listener,z!==b&&E.isPropagationStopped())break e;Ex(E,M,Z),b=z}else for(w=0;w<h.length;w++){if(M=h[w],z=M.instance,Z=M.currentTarget,M=M.listener,z!==b&&E.isPropagationStopped())break e;Ex(E,M,Z),b=z}}}if(tc)throw i=Ep,tc=!1,Ep=null,i}function yt(i,o){var c=o[Gp];c===void 0&&(c=o[Gp]=new Set);var h=i+"__bubble";c.has(h)||(Tx(o,i,2,!1),c.add(h))}function jp(i,o,c){var h=0;o&&(h|=4),Tx(c,i,h,o)}var yc="_reactListening"+Math.random().toString(36).slice(2);function Qa(i){if(!i[yc]){i[yc]=!0,r.forEach(function(c){c!=="selectionchange"&&(hB.has(c)||jp(c,!1,i),jp(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[yc]||(o[yc]=!0,jp("selectionchange",!1,o))}}function Tx(i,o,c,h){switch(z_(o)){case 1:var E=NF;break;case 4:E=kF;break;default:E=Sp}c=E.bind(null,o,c,i),E=void 0,!gp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,c,{capture:!0,passive:E}):i.addEventListener(o,c,!0):E!==void 0?i.addEventListener(o,c,{passive:E}):i.addEventListener(o,c,!1)}function zp(i,o,c,h,E){var b=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var w=h.tag;if(w===3||w===4){var M=h.stateNode.containerInfo;if(M===E||M.nodeType===8&&M.parentNode===E)break;if(w===4)for(w=h.return;w!==null;){var z=w.tag;if((z===3||z===4)&&(z=w.stateNode.containerInfo,z===E||z.nodeType===8&&z.parentNode===E))return;w=w.return}for(;M!==null;){if(w=ds(M),w===null)return;if(z=w.tag,z===5||z===6){h=b=w;continue e}M=M.parentNode}}h=h.return}S_(function(){var Z=b,ge=hp(c),Te=[];e:{var pe=mx.get(i);if(pe!==void 0){var ke=Np,Ie=i;switch(i){case"keypress":if(fc(c)===0)break e;case"keydown":case"keyup":ke=$F;break;case"focusin":Ie="focus",ke=Op;break;case"focusout":Ie="blur",ke=Op;break;case"beforeblur":case"afterblur":ke=Op;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ke=q_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=IF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=YF;break;case dx:case fx:case hx:ke=LF;break;case px:ke=GF;break;case"scroll":ke=CF;break;case"wheel":ke=QF;break;case"copy":case"cut":case"paste":ke=MF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=W_}var Re=(o&4)!==0,Ot=!Re&&i==="scroll",G=Re?pe!==null?pe+"Capture":null:pe;Re=[];for(var V=Z,Q;V!==null;){Q=V;var we=Q.stateNode;if(Q.tag===5&&we!==null&&(Q=we,G!==null&&(we=Pa(V,G),we!=null&&Re.push(Ka(V,we,Q)))),Ot)break;V=V.return}0<Re.length&&(pe=new ke(pe,Ie,null,c,ge),Te.push({event:pe,listeners:Re}))}}if((o&7)===0){e:{if(pe=i==="mouseover"||i==="pointerover",ke=i==="mouseout"||i==="pointerout",pe&&c!==Dn&&(Ie=c.relatedTarget||c.fromElement)&&(ds(Ie)||Ie[Wr]))break e;if((ke||pe)&&(pe=ge.window===ge?ge:(pe=ge.ownerDocument)?pe.defaultView||pe.parentWindow:window,ke?(Ie=c.relatedTarget||c.toElement,ke=Z,Ie=Ie?ds(Ie):null,Ie!==null&&(Ot=cs(Ie),Ie!==Ot||Ie.tag!==5&&Ie.tag!==6)&&(Ie=null)):(ke=null,Ie=Z),ke!==Ie)){if(Re=q_,we="onMouseLeave",G="onMouseEnter",V="mouse",(i==="pointerout"||i==="pointerover")&&(Re=W_,we="onPointerLeave",G="onPointerEnter",V="pointer"),Ot=ke==null?pe:xo(ke),Q=Ie==null?pe:xo(Ie),pe=new Re(we,V+"leave",ke,c,ge),pe.target=Ot,pe.relatedTarget=Q,we=null,ds(ge)===Z&&(Re=new Re(G,V+"enter",Ie,c,ge),Re.target=Q,Re.relatedTarget=Ot,we=Re),Ot=we,ke&&Ie)t:{for(Re=ke,G=Ie,V=0,Q=Re;Q;Q=bo(Q))V++;for(Q=0,we=G;we;we=bo(we))Q++;for(;0<V-Q;)Re=bo(Re),V--;for(;0<Q-V;)G=bo(G),Q--;for(;V--;){if(Re===G||G!==null&&Re===G.alternate)break t;Re=bo(Re),G=bo(G)}Re=null}else Re=null;ke!==null&&bx(Te,pe,ke,Re,!1),Ie!==null&&Ot!==null&&bx(Te,Ot,Ie,Re,!0)}}e:{if(pe=Z?xo(Z):window,ke=pe.nodeName&&pe.nodeName.toLowerCase(),ke==="select"||ke==="input"&&pe.type==="file")var Le=rB;else if(Z_(pe))if(tx)Le=aB;else{Le=sB;var Ue=iB}else(ke=pe.nodeName)&&ke.toLowerCase()==="input"&&(pe.type==="checkbox"||pe.type==="radio")&&(Le=oB);if(Le&&(Le=Le(i,Z))){ex(Te,Le,c,ge);break e}Ue&&Ue(i,pe,Z),i==="focusout"&&(Ue=pe._wrapperState)&&Ue.controlled&&pe.type==="number"&&wn(pe,"number",pe.value)}switch(Ue=Z?xo(Z):window,i){case"focusin":(Z_(Ue)||Ue.contentEditable==="true")&&(yo=Ue,Mp=Z,Ga=null);break;case"focusout":Ga=Mp=yo=null;break;case"mousedown":Fp=!0;break;case"contextmenu":case"mouseup":case"dragend":Fp=!1,lx(Te,c,ge);break;case"selectionchange":if(cB)break;case"keydown":case"keyup":lx(Te,c,ge)}var He;if(Pp)e:{switch(i){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else Eo?K_(i,c)&&(qe="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(qe="onCompositionStart");qe&&(G_&&c.locale!=="ko"&&(Eo||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&Eo&&(He=$_()):(bi=ge,Ap="value"in bi?bi.value:bi.textContent,Eo=!0)),Ue=Tc(Z,qe),0<Ue.length&&(qe=new Y_(qe,i,null,c,ge),Te.push({event:qe,listeners:Ue}),He?qe.data=He:(He=J_(c),He!==null&&(qe.data=He)))),(He=JF?ZF(i,c):eB(i,c))&&(Z=Tc(Z,"onBeforeInput"),0<Z.length&&(ge=new Y_("onBeforeInput","beforeinput",null,c,ge),Te.push({event:ge,listeners:Z}),ge.data=He))}yx(Te,o)})}function Ka(i,o,c){return{instance:i,listener:o,currentTarget:c}}function Tc(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=Pa(i,c),b!=null&&h.unshift(Ka(i,b,E)),b=Pa(i,o),b!=null&&h.push(Ka(i,b,E))),i=i.return}return h}function bo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function bx(i,o,c,h,E){for(var b=o._reactName,w=[];c!==null&&c!==h;){var M=c,z=M.alternate,Z=M.stateNode;if(z!==null&&z===h)break;M.tag===5&&Z!==null&&(M=Z,E?(z=Pa(c,b),z!=null&&w.unshift(Ka(c,z,M))):E||(z=Pa(c,b),z!=null&&w.push(Ka(c,z,M)))),c=c.return}w.length!==0&&i.push({event:o,listeners:w})}var pB=/\r\n?/g,mB=/\u0000|\uFFFD/g;function _x(i){return(typeof i=="string"?i:""+i).replace(pB,`
21
+ `).replace(mB,"")}function bc(i,o,c){if(o=_x(o),_x(i)!==o&&c)throw Error(n(425))}function _c(){}var $p=null,Vp=null;function qp(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 Yp=typeof setTimeout=="function"?setTimeout:void 0,gB=typeof clearTimeout=="function"?clearTimeout:void 0,xx=typeof Promise=="function"?Promise:void 0,EB=typeof queueMicrotask=="function"?queueMicrotask:typeof xx!="undefined"?function(i){return xx.resolve(null).then(i).catch(yB)}:Yp;function yB(i){setTimeout(function(){throw i})}function Wp(i,o){var c=o,h=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(h===0){i.removeChild(E),ja(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);ja(o)}function xi(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 wx(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(o===0)return i;o--}else c==="/$"&&o++}i=i.previousSibling}return null}var _o=Math.random().toString(36).slice(2),Rr="__reactFiber$"+_o,Ja="__reactProps$"+_o,Wr="__reactContainer$"+_o,Gp="__reactEvents$"+_o,TB="__reactListeners$"+_o,bB="__reactHandles$"+_o;function ds(i){var o=i[Rr];if(o)return o;for(var c=i.parentNode;c;){if(o=c[Wr]||c[Rr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=wx(i);i!==null;){if(c=i[Rr])return c;i=wx(i)}return o}i=c,c=i.parentNode}return null}function Za(i){return i=i[Rr]||i[Wr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function xo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function xc(i){return i[Ja]||null}var Xp=[],wo=-1;function wi(i){return{current:i}}function Tt(i){0>wo||(i.current=Xp[wo],Xp[wo]=null,wo--)}function ht(i,o){wo++,Xp[wo]=i.current,i.current=o}var Si={},sn=wi(Si),Sn=wi(!1),fs=Si;function So(i,o){var c=i.type.contextTypes;if(!c)return Si;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in c)E[b]=o[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function vn(i){return i=i.childContextTypes,i!=null}function wc(){Tt(Sn),Tt(sn)}function Sx(i,o,c){if(sn.current!==Si)throw Error(n(168));ht(sn,o),ht(Sn,c)}function vx(i,o,c){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,ne(i)||"Unknown",E));return N({},c,h)}function Sc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Si,fs=sn.current,ht(sn,i),ht(Sn,Sn.current),!0}function Ax(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=vx(i,o,fs),h.__reactInternalMemoizedMergedChildContext=i,Tt(Sn),Tt(sn),ht(sn,i)):Tt(Sn),ht(Sn,c)}var Gr=null,vc=!1,Qp=!1;function Nx(i){Gr===null?Gr=[i]:Gr.push(i)}function _B(i){vc=!0,Nx(i)}function vi(){if(!Qp&&Gr!==null){Qp=!0;var i=0,o=ut;try{var c=Gr;for(ut=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}Gr=null,vc=!1}catch(E){throw Gr!==null&&(Gr=Gr.slice(i+1)),C_(yp,vi),E}finally{ut=o,Qp=!1}}return null}var vo=[],Ao=0,Ac=null,Nc=0,qn=[],Yn=0,hs=null,Xr=1,Qr="";function ps(i,o){vo[Ao++]=Nc,vo[Ao++]=Ac,Ac=i,Nc=o}function kx(i,o,c){qn[Yn++]=Xr,qn[Yn++]=Qr,qn[Yn++]=hs,hs=i;var h=Xr;i=Qr;var E=32-lr(h)-1;h&=~(1<<E),c+=1;var b=32-lr(o)+E;if(30<b){var w=E-E%5;b=(h&(1<<w)-1).toString(32),h>>=w,E-=w,Xr=1<<32-lr(o)+E|c<<E|h,Qr=b+i}else Xr=1<<b|c<<E|h,Qr=i}function Kp(i){i.return!==null&&(ps(i,1),kx(i,1,0))}function Jp(i){for(;i===Ac;)Ac=vo[--Ao],vo[Ao]=null,Nc=vo[--Ao],vo[Ao]=null;for(;i===hs;)hs=qn[--Yn],qn[Yn]=null,Qr=qn[--Yn],qn[Yn]=null,Xr=qn[--Yn],qn[Yn]=null}var Fn=null,Bn=null,xt=!1,dr=null;function Cx(i,o){var c=Qn(5,null,null,0);c.elementType="DELETED",c.stateNode=o,c.return=i,o=i.deletions,o===null?(i.deletions=[c],i.flags|=16):o.push(c)}function Ox(i,o){switch(i.tag){case 5:var c=i.type;return o=o.nodeType!==1||c.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Fn=i,Bn=xi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Fn=i,Bn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=hs!==null?{id:Xr,overflow:Qr}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=Qn(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,Fn=i,Bn=null,!0):!1;default:return!1}}function Zp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function em(i){if(xt){var o=Bn;if(o){var c=o;if(!Ox(i,o)){if(Zp(i))throw Error(n(418));o=xi(c.nextSibling);var h=Fn;o&&Ox(i,o)?Cx(h,c):(i.flags=i.flags&-4097|2,xt=!1,Fn=i)}}else{if(Zp(i))throw Error(n(418));i.flags=i.flags&-4097|2,xt=!1,Fn=i}}}function Ix(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Fn=i}function kc(i){if(i!==Fn)return!1;if(!xt)return Ix(i),xt=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!qp(i.type,i.memoizedProps)),o&&(o=Bn)){if(Zp(i))throw Px(),Error(n(418));for(;o;)Cx(i,o),o=xi(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 c=i.data;if(c==="/$"){if(o===0){Bn=xi(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Bn=null}}else Bn=Fn?xi(i.stateNode.nextSibling):null;return!0}function Px(){for(var i=Bn;i;)i=xi(i.nextSibling)}function No(){Bn=Fn=null,xt=!1}function tm(i){dr===null?dr=[i]:dr.push(i)}var xB=j.ReactCurrentBatchConfig;function eu(i,o,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===b?o.ref:(o=function(w){var M=E.refs;w===null?delete M[b]:M[b]=w},o._stringRef=b,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Cc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function Rx(i){var o=i._init;return o(i._payload)}function Lx(i){function o(G,V){if(i){var Q=G.deletions;Q===null?(G.deletions=[V],G.flags|=16):Q.push(V)}}function c(G,V){if(!i)return null;for(;V!==null;)o(G,V),V=V.sibling;return null}function h(G,V){for(G=new Map;V!==null;)V.key!==null?G.set(V.key,V):G.set(V.index,V),V=V.sibling;return G}function E(G,V){return G=Ri(G,V),G.index=0,G.sibling=null,G}function b(G,V,Q){return G.index=Q,i?(Q=G.alternate,Q!==null?(Q=Q.index,Q<V?(G.flags|=2,V):Q):(G.flags|=2,V)):(G.flags|=1048576,V)}function w(G){return i&&G.alternate===null&&(G.flags|=2),G}function M(G,V,Q,we){return V===null||V.tag!==6?(V=Ym(Q,G.mode,we),V.return=G,V):(V=E(V,Q),V.return=G,V)}function z(G,V,Q,we){var Le=Q.type;return Le===W?ge(G,V,Q.props.children,we,Q.key):V!==null&&(V.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===he&&Rx(Le)===V.type)?(we=E(V,Q.props),we.ref=eu(G,V,Q),we.return=G,we):(we=Zc(Q.type,Q.key,Q.props,null,G.mode,we),we.ref=eu(G,V,Q),we.return=G,we)}function Z(G,V,Q,we){return V===null||V.tag!==4||V.stateNode.containerInfo!==Q.containerInfo||V.stateNode.implementation!==Q.implementation?(V=Wm(Q,G.mode,we),V.return=G,V):(V=E(V,Q.children||[]),V.return=G,V)}function ge(G,V,Q,we,Le){return V===null||V.tag!==7?(V=xs(Q,G.mode,we,Le),V.return=G,V):(V=E(V,Q),V.return=G,V)}function Te(G,V,Q){if(typeof V=="string"&&V!==""||typeof V=="number")return V=Ym(""+V,G.mode,Q),V.return=G,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case Y:return Q=Zc(V.type,V.key,V.props,null,G.mode,Q),Q.ref=eu(G,null,V),Q.return=G,Q;case R:return V=Wm(V,G.mode,Q),V.return=G,V;case he:var we=V._init;return Te(G,we(V._payload),Q)}if(ar(V)||ae(V))return V=xs(V,G.mode,Q,null),V.return=G,V;Cc(G,V)}return null}function pe(G,V,Q,we){var Le=V!==null?V.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Le!==null?null:M(G,V,""+Q,we);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:return Q.key===Le?z(G,V,Q,we):null;case R:return Q.key===Le?Z(G,V,Q,we):null;case he:return Le=Q._init,pe(G,V,Le(Q._payload),we)}if(ar(Q)||ae(Q))return Le!==null?null:ge(G,V,Q,we,null);Cc(G,Q)}return null}function ke(G,V,Q,we,Le){if(typeof we=="string"&&we!==""||typeof we=="number")return G=G.get(Q)||null,M(V,G,""+we,Le);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case Y:return G=G.get(we.key===null?Q:we.key)||null,z(V,G,we,Le);case R:return G=G.get(we.key===null?Q:we.key)||null,Z(V,G,we,Le);case he:var Ue=we._init;return ke(G,V,Q,Ue(we._payload),Le)}if(ar(we)||ae(we))return G=G.get(Q)||null,ge(V,G,we,Le,null);Cc(V,we)}return null}function Ie(G,V,Q,we){for(var Le=null,Ue=null,He=V,qe=V=0,qt=null;He!==null&&qe<Q.length;qe++){He.index>qe?(qt=He,He=null):qt=He.sibling;var it=pe(G,He,Q[qe],we);if(it===null){He===null&&(He=qt);break}i&&He&&it.alternate===null&&o(G,He),V=b(it,V,qe),Ue===null?Le=it:Ue.sibling=it,Ue=it,He=qt}if(qe===Q.length)return c(G,He),xt&&ps(G,qe),Le;if(He===null){for(;qe<Q.length;qe++)He=Te(G,Q[qe],we),He!==null&&(V=b(He,V,qe),Ue===null?Le=He:Ue.sibling=He,Ue=He);return xt&&ps(G,qe),Le}for(He=h(G,He);qe<Q.length;qe++)qt=ke(He,G,qe,Q[qe],we),qt!==null&&(i&&qt.alternate!==null&&He.delete(qt.key===null?qe:qt.key),V=b(qt,V,qe),Ue===null?Le=qt:Ue.sibling=qt,Ue=qt);return i&&He.forEach(function(Li){return o(G,Li)}),xt&&ps(G,qe),Le}function Re(G,V,Q,we){var Le=ae(Q);if(typeof Le!="function")throw Error(n(150));if(Q=Le.call(Q),Q==null)throw Error(n(151));for(var Ue=Le=null,He=V,qe=V=0,qt=null,it=Q.next();He!==null&&!it.done;qe++,it=Q.next()){He.index>qe?(qt=He,He=null):qt=He.sibling;var Li=pe(G,He,it.value,we);if(Li===null){He===null&&(He=qt);break}i&&He&&Li.alternate===null&&o(G,He),V=b(Li,V,qe),Ue===null?Le=Li:Ue.sibling=Li,Ue=Li,He=qt}if(it.done)return c(G,He),xt&&ps(G,qe),Le;if(He===null){for(;!it.done;qe++,it=Q.next())it=Te(G,it.value,we),it!==null&&(V=b(it,V,qe),Ue===null?Le=it:Ue.sibling=it,Ue=it);return xt&&ps(G,qe),Le}for(He=h(G,He);!it.done;qe++,it=Q.next())it=ke(He,G,qe,it.value,we),it!==null&&(i&&it.alternate!==null&&He.delete(it.key===null?qe:it.key),V=b(it,V,qe),Ue===null?Le=it:Ue.sibling=it,Ue=it);return i&&He.forEach(function(t7){return o(G,t7)}),xt&&ps(G,qe),Le}function Ot(G,V,Q,we){if(typeof Q=="object"&&Q!==null&&Q.type===W&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:e:{for(var Le=Q.key,Ue=V;Ue!==null;){if(Ue.key===Le){if(Le=Q.type,Le===W){if(Ue.tag===7){c(G,Ue.sibling),V=E(Ue,Q.props.children),V.return=G,G=V;break e}}else if(Ue.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===he&&Rx(Le)===Ue.type){c(G,Ue.sibling),V=E(Ue,Q.props),V.ref=eu(G,Ue,Q),V.return=G,G=V;break e}c(G,Ue);break}else o(G,Ue);Ue=Ue.sibling}Q.type===W?(V=xs(Q.props.children,G.mode,we,Q.key),V.return=G,G=V):(we=Zc(Q.type,Q.key,Q.props,null,G.mode,we),we.ref=eu(G,V,Q),we.return=G,G=we)}return w(G);case R:e:{for(Ue=Q.key;V!==null;){if(V.key===Ue)if(V.tag===4&&V.stateNode.containerInfo===Q.containerInfo&&V.stateNode.implementation===Q.implementation){c(G,V.sibling),V=E(V,Q.children||[]),V.return=G,G=V;break e}else{c(G,V);break}else o(G,V);V=V.sibling}V=Wm(Q,G.mode,we),V.return=G,G=V}return w(G);case he:return Ue=Q._init,Ot(G,V,Ue(Q._payload),we)}if(ar(Q))return Ie(G,V,Q,we);if(ae(Q))return Re(G,V,Q,we);Cc(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,V!==null&&V.tag===6?(c(G,V.sibling),V=E(V,Q),V.return=G,G=V):(c(G,V),V=Ym(Q,G.mode,we),V.return=G,G=V),w(G)):c(G,V)}return Ot}var ko=Lx(!0),Dx=Lx(!1),Oc=wi(null),Ic=null,Co=null,nm=null;function rm(){nm=Co=Ic=null}function im(i){var o=Oc.current;Tt(Oc),i._currentValue=o}function sm(i,o,c){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===c)break;i=i.return}}function Oo(i,o){Ic=i,nm=Co=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(An=!0),i.firstContext=null)}function Wn(i){var o=i._currentValue;if(nm!==i)if(i={context:i,memoizedValue:o,next:null},Co===null){if(Ic===null)throw Error(n(308));Co=i,Ic.dependencies={lanes:0,firstContext:i}}else Co=Co.next=i;return o}var ms=null;function om(i){ms===null?ms=[i]:ms.push(i)}function Mx(i,o,c,h){var E=o.interleaved;return E===null?(c.next=c,om(o)):(c.next=E.next,E.next=c),o.interleaved=c,Kr(i,h)}function Kr(i,o){i.lanes|=o;var c=i.alternate;for(c!==null&&(c.lanes|=o),c=i,i=i.return;i!==null;)i.childLanes|=o,c=i.alternate,c!==null&&(c.childLanes|=o),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Ai=!1;function am(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fx(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 Jr(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Ni(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(rt&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,Kr(i,c)}return E=h.interleaved,E===null?(o.next=o,om(h)):(o.next=E.next,E.next=o),h.interleaved=o,Kr(i,c)}function Pc(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,_p(i,c)}}function Bx(i,o){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var w={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=w:b=b.next=w,c=c.next}while(c!==null);b===null?E=b=o:b=b.next=o}else E=b=o;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:h.shared,effects:h.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}function Rc(i,o,c,h){var E=i.updateQueue;Ai=!1;var b=E.firstBaseUpdate,w=E.lastBaseUpdate,M=E.shared.pending;if(M!==null){E.shared.pending=null;var z=M,Z=z.next;z.next=null,w===null?b=Z:w.next=Z,w=z;var ge=i.alternate;ge!==null&&(ge=ge.updateQueue,M=ge.lastBaseUpdate,M!==w&&(M===null?ge.firstBaseUpdate=Z:M.next=Z,ge.lastBaseUpdate=z))}if(b!==null){var Te=E.baseState;w=0,ge=Z=z=null,M=b;do{var pe=M.lane,ke=M.eventTime;if((h&pe)===pe){ge!==null&&(ge=ge.next={eventTime:ke,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var Ie=i,Re=M;switch(pe=o,ke=c,Re.tag){case 1:if(Ie=Re.payload,typeof Ie=="function"){Te=Ie.call(ke,Te,pe);break e}Te=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=Re.payload,pe=typeof Ie=="function"?Ie.call(ke,Te,pe):Ie,pe==null)break e;Te=N({},Te,pe);break e;case 2:Ai=!0}}M.callback!==null&&M.lane!==0&&(i.flags|=64,pe=E.effects,pe===null?E.effects=[M]:pe.push(M))}else ke={eventTime:ke,lane:pe,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ge===null?(Z=ge=ke,z=Te):ge=ge.next=ke,w|=pe;if(M=M.next,M===null){if(M=E.shared.pending,M===null)break;pe=M,M=pe.next,pe.next=null,E.lastBaseUpdate=pe,E.shared.pending=null}}while(!0);if(ge===null&&(z=Te),E.baseState=z,E.firstBaseUpdate=Z,E.lastBaseUpdate=ge,o=E.shared.interleaved,o!==null){E=o;do w|=E.lane,E=E.next;while(E!==o)}else b===null&&(E.shared.lanes=0);ys|=w,i.lanes=w,i.memoizedState=Te}}function Ux(i,o,c){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=c,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var tu={},Lr=wi(tu),nu=wi(tu),ru=wi(tu);function gs(i){if(i===tu)throw Error(n(174));return i}function um(i,o){switch(ht(ru,o),ht(nu,i),ht(Lr,tu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:Ae(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=Ae(o,i)}Tt(Lr),ht(Lr,o)}function Io(){Tt(Lr),Tt(nu),Tt(ru)}function Hx(i){gs(ru.current);var o=gs(Lr.current),c=Ae(o,i.type);o!==c&&(ht(nu,i),ht(Lr,c))}function lm(i){nu.current===i&&(Tt(Lr),Tt(nu))}var wt=wi(0);function Lc(i){for(var o=i;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.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 cm=[];function dm(){for(var i=0;i<cm.length;i++)cm[i]._workInProgressVersionPrimary=null;cm.length=0}var Dc=j.ReactCurrentDispatcher,fm=j.ReactCurrentBatchConfig,Es=0,St=null,Ft=null,$t=null,Mc=!1,iu=!1,su=0,wB=0;function on(){throw Error(n(321))}function hm(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!cr(i[c],o[c]))return!1;return!0}function pm(i,o,c,h,E,b){if(Es=b,St=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Dc.current=i===null||i.memoizedState===null?NB:kB,i=c(h,E),iu){b=0;do{if(iu=!1,su=0,25<=b)throw Error(n(301));b+=1,$t=Ft=null,o.updateQueue=null,Dc.current=CB,i=c(h,E)}while(iu)}if(Dc.current=Uc,o=Ft!==null&&Ft.next!==null,Es=0,$t=Ft=St=null,Mc=!1,o)throw Error(n(300));return i}function mm(){var i=su!==0;return su=0,i}function Dr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?St.memoizedState=$t=i:$t=$t.next=i,$t}function Gn(){if(Ft===null){var i=St.alternate;i=i!==null?i.memoizedState:null}else i=Ft.next;var o=$t===null?St.memoizedState:$t.next;if(o!==null)$t=o,Ft=i;else{if(i===null)throw Error(n(310));Ft=i,i={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},$t===null?St.memoizedState=$t=i:$t=$t.next=i}return $t}function ou(i,o){return typeof o=="function"?o(i):o}function gm(i){var o=Gn(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Ft,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var w=E.next;E.next=b.next,b.next=w}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var M=w=null,z=null,Z=b;do{var ge=Z.lane;if((Es&ge)===ge)z!==null&&(z=z.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 Te={lane:ge,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};z===null?(M=z=Te,w=h):z=z.next=Te,St.lanes|=ge,ys|=ge}Z=Z.next}while(Z!==null&&Z!==b);z===null?w=h:z.next=M,cr(h,o.memoizedState)||(An=!0),o.memoizedState=h,o.baseState=w,o.baseQueue=z,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,St.lanes|=b,ys|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function Em(i){var o=Gn(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,b=o.memoizedState;if(E!==null){c.pending=null;var w=E=E.next;do b=i(b,w.action),w=w.next;while(w!==E);cr(b,o.memoizedState)||(An=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),c.lastRenderedState=b}return[b,h]}function jx(){}function zx(i,o){var c=St,h=Gn(),E=o(),b=!cr(h.memoizedState,E);if(b&&(h.memoizedState=E,An=!0),h=h.queue,ym(qx.bind(null,c,h,i),[i]),h.getSnapshot!==o||b||$t!==null&&$t.memoizedState.tag&1){if(c.flags|=2048,au(9,Vx.bind(null,c,h,E,o),void 0,null),Vt===null)throw Error(n(349));(Es&30)!==0||$x(c,o,E)}return E}function $x(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=St.updateQueue,o===null?(o={lastEffect:null,stores:null},St.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function Vx(i,o,c,h){o.value=c,o.getSnapshot=h,Yx(o)&&Wx(i)}function qx(i,o,c){return c(function(){Yx(o)&&Wx(i)})}function Yx(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!cr(i,c)}catch(h){return!0}}function Wx(i){var o=Kr(i,1);o!==null&&mr(o,i,1,-1)}function Gx(i){var o=Dr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ou,lastRenderedState:i},o.queue=i,i=i.dispatch=AB.bind(null,St,i),[o.memoizedState,i]}function au(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=St.updateQueue,o===null?(o={lastEffect:null,stores:null},St.updateQueue=o,o.lastEffect=i.next=i):(c=o.lastEffect,c===null?o.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,o.lastEffect=i)),i}function Xx(){return Gn().memoizedState}function Fc(i,o,c,h){var E=Dr();St.flags|=i,E.memoizedState=au(1|o,c,void 0,h===void 0?null:h)}function Bc(i,o,c,h){var E=Gn();h=h===void 0?null:h;var b=void 0;if(Ft!==null){var w=Ft.memoizedState;if(b=w.destroy,h!==null&&hm(h,w.deps)){E.memoizedState=au(o,c,b,h);return}}St.flags|=i,E.memoizedState=au(1|o,c,b,h)}function Qx(i,o){return Fc(8390656,8,i,o)}function ym(i,o){return Bc(2048,8,i,o)}function Kx(i,o){return Bc(4,2,i,o)}function Jx(i,o){return Bc(4,4,i,o)}function Zx(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 ew(i,o,c){return c=c!=null?c.concat([i]):null,Bc(4,4,Zx.bind(null,o,i),c)}function Tm(){}function tw(i,o){var c=Gn();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&hm(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function nw(i,o){var c=Gn();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&hm(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function rw(i,o,c){return(Es&21)===0?(i.baseState&&(i.baseState=!1,An=!0),i.memoizedState=c):(cr(c,o)||(c=R_(),St.lanes|=c,ys|=c,i.baseState=!0),o)}function SB(i,o){var c=ut;ut=c!==0&&4>c?c:4,i(!0);var h=fm.transition;fm.transition={};try{i(!1),o()}finally{ut=c,fm.transition=h}}function iw(){return Gn().memoizedState}function vB(i,o,c){var h=Ii(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},sw(i))ow(o,c);else if(c=Mx(i,o,c,h),c!==null){var E=hn();mr(c,i,h,E),aw(c,o,h)}}function AB(i,o,c){var h=Ii(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(sw(i))ow(o,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var w=o.lastRenderedState,M=b(w,c);if(E.hasEagerState=!0,E.eagerState=M,cr(M,w)){var z=o.interleaved;z===null?(E.next=E,om(o)):(E.next=z.next,z.next=E),o.interleaved=E;return}}catch(Z){}c=Mx(i,o,E,h),c!==null&&(E=hn(),mr(c,i,h,E),aw(c,o,h))}}function sw(i){var o=i.alternate;return i===St||o!==null&&o===St}function ow(i,o){iu=Mc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function aw(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,_p(i,c)}}var Uc={readContext:Wn,useCallback:on,useContext:on,useEffect:on,useImperativeHandle:on,useInsertionEffect:on,useLayoutEffect:on,useMemo:on,useReducer:on,useRef:on,useState:on,useDebugValue:on,useDeferredValue:on,useTransition:on,useMutableSource:on,useSyncExternalStore:on,useId:on,unstable_isNewReconciler:!1},NB={readContext:Wn,useCallback:function(i,o){return Dr().memoizedState=[i,o===void 0?null:o],i},useContext:Wn,useEffect:Qx,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,Fc(4194308,4,Zx.bind(null,o,i),c)},useLayoutEffect:function(i,o){return Fc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Fc(4,2,i,o)},useMemo:function(i,o){var c=Dr();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=Dr();return o=c!==void 0?c(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=vB.bind(null,St,i),[h.memoizedState,i]},useRef:function(i){var o=Dr();return i={current:i},o.memoizedState=i},useState:Gx,useDebugValue:Tm,useDeferredValue:function(i){return Dr().memoizedState=i},useTransition:function(){var i=Gx(!1),o=i[0];return i=SB.bind(null,i[1]),Dr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=St,E=Dr();if(xt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),Vt===null)throw Error(n(349));(Es&30)!==0||$x(h,o,c)}E.memoizedState=c;var b={value:c,getSnapshot:o};return E.queue=b,Qx(qx.bind(null,h,b,i),[i]),h.flags|=2048,au(9,Vx.bind(null,h,b,c,o),void 0,null),c},useId:function(){var i=Dr(),o=Vt.identifierPrefix;if(xt){var c=Qr,h=Xr;c=(h&~(1<<32-lr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=su++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=wB++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},kB={readContext:Wn,useCallback:tw,useContext:Wn,useEffect:ym,useImperativeHandle:ew,useInsertionEffect:Kx,useLayoutEffect:Jx,useMemo:nw,useReducer:gm,useRef:Xx,useState:function(){return gm(ou)},useDebugValue:Tm,useDeferredValue:function(i){var o=Gn();return rw(o,Ft.memoizedState,i)},useTransition:function(){var i=gm(ou)[0],o=Gn().memoizedState;return[i,o]},useMutableSource:jx,useSyncExternalStore:zx,useId:iw,unstable_isNewReconciler:!1},CB={readContext:Wn,useCallback:tw,useContext:Wn,useEffect:ym,useImperativeHandle:ew,useInsertionEffect:Kx,useLayoutEffect:Jx,useMemo:nw,useReducer:Em,useRef:Xx,useState:function(){return Em(ou)},useDebugValue:Tm,useDeferredValue:function(i){var o=Gn();return Ft===null?o.memoizedState=i:rw(o,Ft.memoizedState,i)},useTransition:function(){var i=Em(ou)[0],o=Gn().memoizedState;return[i,o]},useMutableSource:jx,useSyncExternalStore:zx,useId:iw,unstable_isNewReconciler:!1};function fr(i,o){if(i&&i.defaultProps){o=N({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function bm(i,o,c,h){o=i.memoizedState,c=c(h,o),c=c==null?o:N({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Hc={isMounted:function(i){return(i=i._reactInternals)?cs(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=hn(),E=Ii(i),b=Jr(h,E);b.payload=o,c!=null&&(b.callback=c),o=Ni(i,b,E),o!==null&&(mr(o,i,E,h),Pc(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=hn(),E=Ii(i),b=Jr(h,E);b.tag=1,b.payload=o,c!=null&&(b.callback=c),o=Ni(i,b,E),o!==null&&(mr(o,i,E,h),Pc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=hn(),h=Ii(i),E=Jr(c,h);E.tag=2,o!=null&&(E.callback=o),o=Ni(i,E,h),o!==null&&(mr(o,i,h,c),Pc(o,i,h))}};function uw(i,o,c,h,E,b,w){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,w):o.prototype&&o.prototype.isPureReactComponent?!Wa(c,h)||!Wa(E,b):!0}function lw(i,o,c){var h=!1,E=Si,b=o.contextType;return typeof b=="object"&&b!==null?b=Wn(b):(E=vn(o)?fs:sn.current,h=o.contextTypes,b=(h=h!=null)?So(i,E):Si),o=new o(c,b),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Hc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),o}function cw(i,o,c,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,h),o.state!==i&&Hc.enqueueReplaceState(o,o.state,null)}function _m(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},am(i);var b=o.contextType;typeof b=="object"&&b!==null?E.context=Wn(b):(b=vn(o)?fs:sn.current,E.context=So(i,b)),E.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(bm(i,o,b,c),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&&Hc.enqueueReplaceState(E,E.state,null),Rc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Po(i,o){try{var c="",h=o;do c+=Me(h),h=h.return;while(h);var E=c}catch(b){E=`
22
22
  Error generating stack: `+b.message+`
23
- `+b.stack}return{value:i,source:o,stack:E,digest:null}}function xm(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function wm(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var v7=typeof WeakMap=="function"?WeakMap:Map;function lw(i,o,c){c=Kr(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){Yc||(Yc=!0,Bm=h),wm(i,o)},c}function cw(i,o,c){c=Kr(-1,c),c.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;c.payload=function(){return h(E)},c.callback=function(){wm(i,o)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){wm(i,o),typeof h!="function"&&(ki===null?ki=new Set([this]):ki.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})}),c}function dw(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new v7;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(c)||(E.add(c),i=U7.bind(null,i,o,c),o.then(i,i))}function fw(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 hw(i,o,c,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(o=Kr(-1,1),o.tag=2,Ni(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var A7=j.ReactCurrentOwner,An=!1;function fn(i,o,c,h){o.child=i===null?Rx(o,null,c,h):No(o,i.child,c,h)}function pw(i,o,c,h,E){c=c.render;var b=o.ref;return ko(o,E),h=pm(i,o,c,h,b,E),c=mm(),i!==null&&!An?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Jr(i,o,E)):(Tt&&c&&Kp(o),o.flags|=1,fn(i,o,h,E),o.child)}function mw(i,o,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!qm(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=b,gw(i,o,b,h,E)):(i=Jc(c.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(b=i.child,(i.lanes&E)===0){var w=b.memoizedProps;if(c=c.compare,c=c!==null?c:Wa,c(w,h)&&i.ref===o.ref)return Jr(i,o,E)}return o.flags|=1,i=Ri(b,h),i.ref=o.ref,i.return=o,o.child=i}function gw(i,o,c,h,E){if(i!==null){var b=i.memoizedProps;if(Wa(b,h)&&i.ref===o.ref)if(An=!1,o.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(An=!0);else return o.lanes=i.lanes,Jr(i,o,E)}return Sm(i,o,c,h,E)}function Ew(i,o,c){var h=o.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},ft(Ro,Un),Un|=c;else{if((c&1073741824)===0)return i=b!==null?b.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,ft(Ro,Un),Un|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,ft(Ro,Un),Un|=h}else b!==null?(h=b.baseLanes|c,o.memoizedState=null):h=c,ft(Ro,Un),Un|=h;return fn(i,o,E,c),o.child}function yw(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function Sm(i,o,c,h,E){var b=vn(c)?fs:rn.current;return b=wo(o,b),ko(o,E),c=pm(i,o,c,h,b,E),h=mm(),i!==null&&!An?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Jr(i,o,E)):(Tt&&h&&Kp(o),o.flags|=1,fn(i,o,c,E),o.child)}function Tw(i,o,c,h,E){if(vn(c)){var b=!0;wc(o)}else b=!1;if(ko(o,E),o.stateNode===null)jc(i,o),aw(o,c,h),_m(o,c,h,E),h=!0;else if(i===null){var w=o.stateNode,D=o.memoizedProps;w.props=D;var z=w.context,Z=c.contextType;typeof Z=="object"&&Z!==null?Z=Wn(Z):(Z=vn(c)?fs:rn.current,Z=wo(o,Z));var Ee=c.getDerivedStateFromProps,be=typeof Ee=="function"||typeof w.getSnapshotBeforeUpdate=="function";be||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(D!==h||z!==Z)&&uw(o,w,h,Z),Ai=!1;var me=o.memoizedState;w.state=me,Pc(o,h,w,E),z=o.memoizedState,D!==h||me!==z||Sn.current||Ai?(typeof Ee=="function"&&(bm(o,c,Ee,h),z=o.memoizedState),(D=Ai||ow(o,c,D,h,me,z,Z))?(be||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(o.flags|=4194308)):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=z),w.props=h,w.state=z,w.context=Z,h=D):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{w=o.stateNode,Dx(i,o),D=o.memoizedProps,Z=o.type===o.elementType?D:fr(o.type,D),w.props=Z,be=o.pendingProps,me=w.context,z=c.contextType,typeof z=="object"&&z!==null?z=Wn(z):(z=vn(c)?fs:rn.current,z=wo(o,z));var ke=c.getDerivedStateFromProps;(Ee=typeof ke=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(D!==be||me!==z)&&uw(o,w,h,z),Ai=!1,me=o.memoizedState,w.state=me,Pc(o,h,w,E);var Ie=o.memoizedState;D!==be||me!==Ie||Sn.current||Ai?(typeof ke=="function"&&(bm(o,c,ke,h),Ie=o.memoizedState),(Z=Ai||ow(o,c,Z,h,me,Ie,z)||!1)?(Ee||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(h,Ie,z),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(h,Ie,z)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||D===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Ie),w.props=h,w.state=Ie,w.context=z,h=Z):(typeof w.componentDidUpdate!="function"||D===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),h=!1)}return vm(i,o,c,h,b,E)}function vm(i,o,c,h,E,b){yw(i,o);var w=(o.flags&128)!==0;if(!h&&!w)return E&&Sx(o,c,!1),Jr(i,o,b);h=o.stateNode,A7.current=o;var D=w&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&w?(o.child=No(o,i.child,null,b),o.child=No(o,null,D,b)):fn(i,o,D,b),o.memoizedState=h.state,E&&Sx(o,c,!0),o.child}function bw(i){var o=i.stateNode;o.pendingContext?xx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&xx(i,o.context,!1),um(i,o.containerInfo)}function _w(i,o,c,h,E){return Ao(),tm(E),o.flags|=256,fn(i,o,c,h),o.child}var Am={dehydrated:null,treeContext:null,retryLane:0};function Nm(i){return{baseLanes:i,cachePool:null,transitions:null}}function xw(i,o,c){var h=o.pendingProps,E=bt.current,b=!1,w=(o.flags&128)!==0,D;if((D=w)||(D=i!==null&&i.memoizedState===null?!1:(E&2)!==0),D?(b=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),ft(bt,E&1),i===null)return em(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):(w=h.children,i=h.fallback,b?(h=o.mode,b=o.child,w={mode:"hidden",children:w},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=w):b=Zc(w,h,0,null),i=xs(i,h,c,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=Nm(c),o.memoizedState=Am,i):Cm(o,w));if(E=i.memoizedState,E!==null&&(D=E.dehydrated,D!==null))return N7(i,o,w,h,D,E,c);if(b){b=h.fallback,w=o.mode,E=i.child,D=E.sibling;var z={mode:"hidden",children:h.children};return(w&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=z,o.deletions=null):(h=Ri(E,z),h.subtreeFlags=E.subtreeFlags&14680064),D!==null?b=Ri(D,b):(b=xs(b,w,c,null),b.flags|=2),b.return=o,h.return=o,h.sibling=b,o.child=h,h=b,b=o.child,w=i.child.memoizedState,w=w===null?Nm(c):{baseLanes:w.baseLanes|c,cachePool:null,transitions:w.transitions},b.memoizedState=w,b.childLanes=i.childLanes&~c,o.memoizedState=Am,h}return b=i.child,i=b.sibling,h=Ri(b,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=c),h.return=o,h.sibling=null,i!==null&&(c=o.deletions,c===null?(o.deletions=[i],o.flags|=16):c.push(i)),o.child=h,o.memoizedState=null,h}function Cm(i,o){return o=Zc({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function Hc(i,o,c,h){return h!==null&&tm(h),No(o,i.child,null,c),i=Cm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function N7(i,o,c,h,E,b,w){if(c)return o.flags&256?(o.flags&=-257,h=xm(Error(n(422))),Hc(i,o,w,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(b=h.fallback,E=o.mode,h=Zc({mode:"visible",children:h.children},E,0,null),b=xs(b,E,w,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&No(o,i.child,null,w),o.child.memoizedState=Nm(w),o.memoizedState=Am,b);if((o.mode&1)===0)return Hc(i,o,w,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var D=h.dgst;return h=D,b=Error(n(419)),h=xm(b,h,void 0),Hc(i,o,w,h)}if(D=(w&i.childLanes)!==0,An||D){if(h=zt,h!==null){switch(w&-w){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|w))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,Qr(i,E),mr(h,i,E,-1))}return Vm(),h=xm(Error(n(421))),Hc(i,o,w,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=H7.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Bn=xi(E.nextSibling),Fn=o,Tt=!0,dr=null,i!==null&&(qn[Yn++]=Gr,qn[Yn++]=Xr,qn[Yn++]=hs,Gr=i.id,Xr=i.overflow,hs=o),o=Cm(o,h.children),o.flags|=4096,o)}function ww(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),sm(i.return,o,c)}function km(i,o,c,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(b.isBackwards=o,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=c,b.tailMode=E)}function Sw(i,o,c){var h=o.pendingProps,E=h.revealOrder,b=h.tail;if(fn(i,o,h.children,c),h=bt.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&&ww(i,c,o);else if(i.tag===19)ww(i,c,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(ft(bt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(c=o.child,E=null;c!==null;)i=c.alternate,i!==null&&Rc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),km(o,!1,E,c,b);break;case"backwards":for(c=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Rc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}km(o,!0,c,null,b);break;case"together":km(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function jc(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function Jr(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),ys|=o.lanes,(c&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,c=Ri(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=Ri(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function C7(i,o,c){switch(o.tag){case 3:bw(o),Ao();break;case 5:Bx(o);break;case 1:vn(o.type)&&wc(o);break;case 4:um(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;ft(kc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(ft(bt,bt.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?xw(i,o,c):(ft(bt,bt.current&1),i=Jr(i,o,c),i!==null?i.sibling:null);ft(bt,bt.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return Sw(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ft(bt,bt.current),h)break;return null;case 22:case 23:return o.lanes=0,Ew(i,o,c)}return Jr(i,o,c)}var vw,Om,Aw,Nw;vw=function(i,o){for(var c=o.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Om=function(){},Aw=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,gs(Lr.current);var b=null;switch(c){case"input":E=nn(i,E),h=nn(i,h),b=[];break;case"select":E=N({},E,{value:void 0}),h=N({},h,{value:void 0}),b=[];break;case"textarea":E=ur(i,E),h=ur(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=bc)}Wt(c,h);var w;c=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var D=E[Z];for(w in D)D.hasOwnProperty(w)&&(c||(c={}),c[w]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(s.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in h){var z=h[Z];if(D=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&z!==D&&(z!=null||D!=null))if(Z==="style")if(D){for(w in D)!D.hasOwnProperty(w)||z&&z.hasOwnProperty(w)||(c||(c={}),c[w]="");for(w in z)z.hasOwnProperty(w)&&D[w]!==z[w]&&(c||(c={}),c[w]=z[w])}else c||(b||(b=[]),b.push(Z,c)),c=z;else Z==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,D=D?D.__html:void 0,z!=null&&D!==z&&(b=b||[]).push(Z,z)):Z==="children"?typeof z!="string"&&typeof z!="number"||(b=b||[]).push(Z,""+z):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?(z!=null&&Z==="onScroll"&&mt("scroll",i),b||D===z||(b=[])):(b=b||[]).push(Z,z))}c&&(b=b||[]).push("style",c);var Z=b;(o.updateQueue=Z)&&(o.flags|=4)}},Nw=function(i,o,c,h){c!==h&&(o.flags|=4)};function uu(i,o){if(!Tt)switch(i.tailMode){case"hidden":o=i.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function on(i){var o=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(o)for(var E=i.child;E!==null;)c|=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;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=c,o}function k7(i,o,c){var h=o.pendingProps;switch(Jp(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return on(o),null;case 1:return vn(o.type)&&xc(),on(o),null;case 3:return h=o.stateNode,Oo(),gt(Sn),gt(rn),dm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Nc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,dr!==null&&(jm(dr),dr=null))),Om(i,o),on(o),null;case 5:lm(o);var E=gs(ru.current);if(c=o.type,i!==null&&o.stateNode!=null)Aw(i,o,c,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return on(o),null}if(i=gs(Lr.current),Nc(o)){h=o.stateNode,c=o.type;var b=o.memoizedProps;switch(h[Rr]=o,h[Ja]=b,i=(o.mode&1)!==0,c){case"dialog":mt("cancel",h),mt("close",h);break;case"iframe":case"object":case"embed":mt("load",h);break;case"video":case"audio":for(E=0;E<Xa.length;E++)mt(Xa[E],h);break;case"source":mt("error",h);break;case"img":case"image":case"link":mt("error",h),mt("load",h);break;case"details":mt("toggle",h);break;case"input":dn(h,b),mt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},mt("invalid",h);break;case"textarea":Ql(h,b),mt("invalid",h)}Wt(c,b),E=null;for(var w in b)if(b.hasOwnProperty(w)){var D=b[w];w==="children"?typeof D=="string"?h.textContent!==D&&(b.suppressHydrationWarning!==!0&&Tc(h.textContent,D,i),E=["children",D]):typeof D=="number"&&h.textContent!==""+D&&(b.suppressHydrationWarning!==!0&&Tc(h.textContent,D,i),E=["children",""+D]):s.hasOwnProperty(w)&&D!=null&&w==="onScroll"&&mt("scroll",h)}switch(c){case"input":Ne(h),Ln(h,b,!0);break;case"textarea":Ne(h),Jl(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=bc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{w=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ae(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=w.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=w.createElement(c,{is:h.is}):(i=w.createElement(c),c==="select"&&(w=i,h.multiple?w.multiple=!0:h.size&&(w.size=h.size))):i=w.createElementNS(i,c),i[Rr]=o,i[Ja]=h,vw(i,o,!1,!1),o.stateNode=i;e:{switch(w=Ir(c,h),c){case"dialog":mt("cancel",i),mt("close",i),E=h;break;case"iframe":case"object":case"embed":mt("load",i),E=h;break;case"video":case"audio":for(E=0;E<Xa.length;E++)mt(Xa[E],i);E=h;break;case"source":mt("error",i),E=h;break;case"img":case"image":case"link":mt("error",i),mt("load",i),E=h;break;case"details":mt("toggle",i),E=h;break;case"input":dn(i,h),E=nn(i,h),mt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=N({},h,{value:void 0}),mt("invalid",i);break;case"textarea":Ql(i,h),E=ur(i,h),mt("invalid",i);break;default:E=h}Wt(c,E),D=E;for(b in D)if(D.hasOwnProperty(b)){var z=D[b];b==="style"?mi(i,z):b==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&Xe(i,z)):b==="children"?typeof z=="string"?(c!=="textarea"||z!=="")&&tt(i,z):typeof z=="number"&&tt(i,""+z):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?z!=null&&b==="onScroll"&&mt("scroll",i):z!=null&&I(i,b,z,w))}switch(c){case"input":Ne(i),Ln(i,h,!1);break;case"textarea":Ne(i),Jl(i);break;case"option":h.value!=null&&i.setAttribute("value",""+ye(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?Or(i,!!h.multiple,b,!1):h.defaultValue!=null&&Or(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=bc)}switch(c){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 on(o),null;case 6:if(i&&o.stateNode!=null)Nw(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=gs(ru.current),gs(Lr.current),Nc(o)){if(h=o.stateNode,c=o.memoizedProps,h[Rr]=o,(b=h.nodeValue!==c)&&(i=Fn,i!==null))switch(i.tag){case 3:Tc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Tc(h.nodeValue,c,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Rr]=o,o.stateNode=h}return on(o),null;case 13:if(gt(bt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Tt&&Bn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)Ox(),Ao(),o.flags|=98560,b=!1;else if(b=Nc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Rr]=o}else Ao(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;on(o),b=!1}else dr!==null&&(jm(dr),dr=null),b=!0;if(!b)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=c,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(bt.current&1)!==0?Mt===0&&(Mt=3):Vm())),o.updateQueue!==null&&(o.flags|=4),on(o),null);case 4:return Oo(),Om(i,o),i===null&&Qa(o.stateNode.containerInfo),on(o),null;case 10:return im(o.type._context),on(o),null;case 17:return vn(o.type)&&xc(),on(o),null;case 19:if(gt(bt),b=o.memoizedState,b===null)return on(o),null;if(h=(o.flags&128)!==0,w=b.rendering,w===null)if(h)uu(b,!1);else{if(Mt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(w=Rc(i),w!==null){for(o.flags|=128,uu(b,!1),h=w.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)b=c,i=h,b.flags&=14680066,w=b.alternate,w===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=w.childLanes,b.lanes=w.lanes,b.child=w.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=w.memoizedProps,b.memoizedState=w.memoizedState,b.updateQueue=w.updateQueue,b.type=w.type,i=w.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return ft(bt,bt.current&1|2),o.child}i=i.sibling}b.tail!==null&&At()>Lo&&(o.flags|=128,h=!0,uu(b,!1),o.lanes=4194304)}else{if(!h)if(i=Rc(w),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),uu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!w.alternate&&!Tt)return on(o),null}else 2*At()-b.renderingStartTime>Lo&&c!==1073741824&&(o.flags|=128,h=!0,uu(b,!1),o.lanes=4194304);b.isBackwards?(w.sibling=o.child,o.child=w):(c=b.last,c!==null?c.sibling=w:o.child=w,b.last=w)}return b.tail!==null?(o=b.tail,b.rendering=o,b.tail=o.sibling,b.renderingStartTime=At(),o.sibling=null,c=bt.current,ft(bt,h?c&1|2:c&1),o):(on(o),null);case 22:case 23:return $m(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Un&1073741824)!==0&&(on(o),o.subtreeFlags&6&&(o.flags|=8192)):on(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function O7(i,o){switch(Jp(o),o.tag){case 1:return vn(o.type)&&xc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Oo(),gt(Sn),gt(rn),dm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return lm(o),null;case 13:if(gt(bt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ao()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return gt(bt),null;case 4:return Oo(),null;case 10:return im(o.type._context),null;case 22:case 23:return $m(),null;case 24:return null;default:return null}}var zc=!1,an=!1,I7=typeof WeakSet=="function"?WeakSet:Set,Oe=null;function Po(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){wt(i,o,h)}else c.current=null}function Im(i,o,c){try{c()}catch(h){wt(i,o,h)}}var Cw=!1;function P7(i,o){if($p=uc,i=ox(),Dp(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var E=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{c.nodeType,b.nodeType}catch(ve){c=null;break e}var w=0,D=-1,z=-1,Z=0,Ee=0,be=i,me=null;t:for(;;){for(var ke;be!==c||E!==0&&be.nodeType!==3||(D=w+E),be!==b||h!==0&&be.nodeType!==3||(z=w+h),be.nodeType===3&&(w+=be.nodeValue.length),(ke=be.firstChild)!==null;)me=be,be=ke;for(;;){if(be===i)break t;if(me===c&&++Z===E&&(D=w),me===b&&++Ee===h&&(z=w),(ke=be.nextSibling)!==null)break;be=me,me=be.parentNode}be=ke}c=D===-1||z===-1?null:{start:D,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for(Vp={focusedElem:i,selectionRange:c},uc=!1,Oe=o;Oe!==null;)if(o=Oe,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Oe=i;else for(;Oe!==null;){o=Oe;try{var Ie=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Ie!==null){var Pe=Ie.memoizedProps,Nt=Ie.memoizedState,G=o.stateNode,V=G.getSnapshotBeforeUpdate(o.elementType===o.type?Pe:fr(o.type,Pe),Nt);G.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var Q=o.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ve){wt(o,o.return,ve)}if(i=o.sibling,i!==null){i.return=o.return,Oe=i;break}Oe=o.return}return Ie=Cw,Cw=!1,Ie}function lu(i,o,c){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 b=E.destroy;E.destroy=void 0,b!==void 0&&Im(o,c,b)}E=E.next}while(E!==h)}}function $c(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&i)===i){var h=c.create;c.destroy=h()}c=c.next}while(c!==o)}}function Pm(i){var o=i.ref;if(o!==null){var c=i.stateNode;i.tag,i=c,typeof o=="function"?o(i):o.current=i}}function kw(i){var o=i.alternate;o!==null&&(i.alternate=null,kw(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Rr],delete o[Ja],delete o[Gp],delete o[p7],delete o[m7])),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 Ow(i){return i.tag===5||i.tag===3||i.tag===4}function Iw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Ow(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 Rm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.nodeType===8?c.parentNode.insertBefore(i,o):c.insertBefore(i,o):(c.nodeType===8?(o=c.parentNode,o.insertBefore(i,c)):(o=c,o.appendChild(i)),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=bc));else if(h!==4&&(i=i.child,i!==null))for(Rm(i,o,c),i=i.sibling;i!==null;)Rm(i,o,c),i=i.sibling}function Lm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Lm(i,o,c),i=i.sibling;i!==null;)Lm(i,o,c),i=i.sibling}var Gt=null,hr=!1;function Ci(i,o,c){for(c=c.child;c!==null;)Pw(i,o,c),c=c.sibling}function Pw(i,o,c){if(Pr&&typeof Pr.onCommitFiberUnmount=="function")try{Pr.onCommitFiberUnmount(nc,c)}catch(D){}switch(c.tag){case 5:an||Po(c,o);case 6:var h=Gt,E=hr;Gt=null,Ci(i,o,c),Gt=h,hr=E,Gt!==null&&(hr?(i=Gt,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):Gt.removeChild(c.stateNode));break;case 18:Gt!==null&&(hr?(i=Gt,c=c.stateNode,i.nodeType===8?Wp(i.parentNode,c):i.nodeType===1&&Wp(i,c),ja(i)):Wp(Gt,c.stateNode));break;case 4:h=Gt,E=hr,Gt=c.stateNode.containerInfo,hr=!0,Ci(i,o,c),Gt=h,hr=E;break;case 0:case 11:case 14:case 15:if(!an&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,w=b.destroy;b=b.tag,w!==void 0&&((b&2)!==0||(b&4)!==0)&&Im(c,o,w),E=E.next}while(E!==h)}Ci(i,o,c);break;case 1:if(!an&&(Po(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(D){wt(c,o,D)}Ci(i,o,c);break;case 21:Ci(i,o,c);break;case 22:c.mode&1?(an=(h=an)||c.memoizedState!==null,Ci(i,o,c),an=h):Ci(i,o,c);break;default:Ci(i,o,c)}}function Rw(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new I7),o.forEach(function(h){var E=j7.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function pr(i,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var b=i,w=o,D=w;e:for(;D!==null;){switch(D.tag){case 5:Gt=D.stateNode,hr=!1;break e;case 3:Gt=D.stateNode.containerInfo,hr=!0;break e;case 4:Gt=D.stateNode.containerInfo,hr=!0;break e}D=D.return}if(Gt===null)throw Error(n(160));Pw(b,w,E),Gt=null,hr=!1;var z=E.alternate;z!==null&&(z.return=null),E.return=null}catch(Z){wt(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Lw(o,i),o=o.sibling}function Lw(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(pr(o,i),Mr(i),h&4){try{lu(3,i,i.return),$c(3,i)}catch(Pe){wt(i,i.return,Pe)}try{lu(5,i,i.return)}catch(Pe){wt(i,i.return,Pe)}}break;case 1:pr(o,i),Mr(i),h&512&&c!==null&&Po(c,c.return);break;case 5:if(pr(o,i),Mr(i),h&512&&c!==null&&Po(c,c.return),i.flags&32){var E=i.stateNode;try{tt(E,"")}catch(Pe){wt(i,i.return,Pe)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,w=c!==null?c.memoizedProps:b,D=i.type,z=i.updateQueue;if(i.updateQueue=null,z!==null)try{D==="input"&&b.type==="radio"&&b.name!=null&&$e(E,b),Ir(D,w);var Z=Ir(D,b);for(w=0;w<z.length;w+=2){var Ee=z[w],be=z[w+1];Ee==="style"?mi(E,be):Ee==="dangerouslySetInnerHTML"?Xe(E,be):Ee==="children"?tt(E,be):I(E,Ee,be,Z)}switch(D){case"input":It(E,b);break;case"textarea":Kl(E,b);break;case"select":var me=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var ke=b.value;ke!=null?Or(E,!!b.multiple,ke,!1):me!==!!b.multiple&&(b.defaultValue!=null?Or(E,!!b.multiple,b.defaultValue,!0):Or(E,!!b.multiple,b.multiple?[]:"",!1))}E[Ja]=b}catch(Pe){wt(i,i.return,Pe)}}break;case 6:if(pr(o,i),Mr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Pe){wt(i,i.return,Pe)}}break;case 3:if(pr(o,i),Mr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{ja(o.containerInfo)}catch(Pe){wt(i,i.return,Pe)}break;case 4:pr(o,i),Mr(i);break;case 13:pr(o,i),Mr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(Fm=At())),h&4&&Rw(i);break;case 22:if(Ee=c!==null&&c.memoizedState!==null,i.mode&1?(an=(Z=an)||Ee,pr(o,i),an=Z):pr(o,i),Mr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!Ee&&(i.mode&1)!==0)for(Oe=i,Ee=i.child;Ee!==null;){for(be=Oe=Ee;Oe!==null;){switch(me=Oe,ke=me.child,me.tag){case 0:case 11:case 14:case 15:lu(4,me,me.return);break;case 1:Po(me,me.return);var Ie=me.stateNode;if(typeof Ie.componentWillUnmount=="function"){h=me,c=me.return;try{o=h,Ie.props=o.memoizedProps,Ie.state=o.memoizedState,Ie.componentWillUnmount()}catch(Pe){wt(h,c,Pe)}}break;case 5:Po(me,me.return);break;case 22:if(me.memoizedState!==null){Fw(be);continue}}ke!==null?(ke.return=me,Oe=ke):Fw(be)}Ee=Ee.sibling}e:for(Ee=null,be=i;;){if(be.tag===5){if(Ee===null){Ee=be;try{E=be.stateNode,Z?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(D=be.stateNode,z=be.memoizedProps.style,w=z!=null&&z.hasOwnProperty("display")?z.display:null,D.style.display=Vn("display",w))}catch(Pe){wt(i,i.return,Pe)}}}else if(be.tag===6){if(Ee===null)try{be.stateNode.nodeValue=Z?"":be.memoizedProps}catch(Pe){wt(i,i.return,Pe)}}else if((be.tag!==22&&be.tag!==23||be.memoizedState===null||be===i)&&be.child!==null){be.child.return=be,be=be.child;continue}if(be===i)break e;for(;be.sibling===null;){if(be.return===null||be.return===i)break e;Ee===be&&(Ee=null),be=be.return}Ee===be&&(Ee=null),be.sibling.return=be.return,be=be.sibling}}break;case 19:pr(o,i),Mr(i),h&4&&Rw(i);break;case 21:break;default:pr(o,i),Mr(i)}}function Mr(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(Ow(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(tt(E,""),h.flags&=-33);var b=Iw(i);Lm(i,b,E);break;case 3:case 4:var w=h.stateNode.containerInfo,D=Iw(i);Rm(i,D,w);break;default:throw Error(n(161))}}catch(z){wt(i,i.return,z)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function R7(i,o,c){Oe=i,Dw(i)}function Dw(i,o,c){for(var h=(i.mode&1)!==0;Oe!==null;){var E=Oe,b=E.child;if(E.tag===22&&h){var w=E.memoizedState!==null||zc;if(!w){var D=E.alternate,z=D!==null&&D.memoizedState!==null||an;D=zc;var Z=an;if(zc=w,(an=z)&&!Z)for(Oe=E;Oe!==null;)w=Oe,z=w.child,w.tag===22&&w.memoizedState!==null?Bw(E):z!==null?(z.return=w,Oe=z):Bw(E);for(;b!==null;)Oe=b,Dw(b),b=b.sibling;Oe=E,zc=D,an=Z}Mw(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Oe=b):Mw(i)}}function Mw(i){for(;Oe!==null;){var o=Oe;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:an||$c(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!an)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:fr(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&Fx(o,b,h);break;case 3:var w=o.updateQueue;if(w!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}Fx(o,w,c)}break;case 5:var D=o.stateNode;if(c===null&&o.flags&4){c=D;var z=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&c.focus();break;case"img":z.src&&(c.src=z.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 Ee=Z.memoizedState;if(Ee!==null){var be=Ee.dehydrated;be!==null&&ja(be)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}an||o.flags&512&&Pm(o)}catch(me){wt(o,o.return,me)}}if(o===i){Oe=null;break}if(c=o.sibling,c!==null){c.return=o.return,Oe=c;break}Oe=o.return}}function Fw(i){for(;Oe!==null;){var o=Oe;if(o===i){Oe=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Oe=c;break}Oe=o.return}}function Bw(i){for(;Oe!==null;){var o=Oe;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{$c(4,o)}catch(z){wt(o,c,z)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(z){wt(o,E,z)}}var b=o.return;try{Pm(o)}catch(z){wt(o,b,z)}break;case 5:var w=o.return;try{Pm(o)}catch(z){wt(o,w,z)}}}catch(z){wt(o,o.return,z)}if(o===i){Oe=null;break}var D=o.sibling;if(D!==null){D.return=o.return,Oe=D;break}Oe=o.return}}var L7=Math.ceil,Vc=j.ReactCurrentDispatcher,Dm=j.ReactCurrentOwner,Xn=j.ReactCurrentBatchConfig,nt=0,zt=null,Pt=null,Xt=0,Un=0,Ro=wi(0),Mt=0,cu=null,ys=0,qc=0,Mm=0,du=null,Nn=null,Fm=0,Lo=1/0,Zr=null,Yc=!1,Bm=null,ki=null,Wc=!1,Oi=null,Gc=0,fu=0,Um=null,Xc=-1,Qc=0;function hn(){return(nt&6)!==0?At():Xc!==-1?Xc:Xc=At()}function Ii(i){return(i.mode&1)===0?1:(nt&2)!==0&&Xt!==0?Xt&-Xt:E7.transition!==null?(Qc===0&&(Qc=I_()),Qc):(i=ot,i!==0||(i=window.event,i=i===void 0?16:H_(i.type)),i)}function mr(i,o,c,h){if(50<fu)throw fu=0,Um=null,Error(n(185));Ma(i,c,h),((nt&2)===0||i!==zt)&&(i===zt&&((nt&2)===0&&(qc|=c),Mt===4&&Pi(i,Xt)),Cn(i,h),c===1&&nt===0&&(o.mode&1)===0&&(Lo=At()+500,Sc&&vi()))}function Cn(i,o){var c=i.callbackNode;EF(i,o);var h=sc(i,i===zt?Xt:0);if(h===0)c!==null&&C_(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&C_(c),o===1)i.tag===0?g7(Hw.bind(null,i)):vx(Hw.bind(null,i)),f7(function(){(nt&6)===0&&vi()}),c=null;else{switch(P_(h)){case 1:c=yp;break;case 4:c=k_;break;case 16:c=tc;break;case 536870912:c=O_;break;default:c=tc}c=Gw(c,Uw.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function Uw(i,o){if(Xc=-1,Qc=0,(nt&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Do()&&i.callbackNode!==c)return null;var h=sc(i,i===zt?Xt:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=Kc(i,h);else{o=h;var E=nt;nt|=2;var b=zw();(zt!==i||Xt!==o)&&(Zr=null,Lo=At()+500,bs(i,o));do try{F7();break}catch(D){jw(i,D)}while(!0);rm(),Vc.current=b,nt=E,Pt!==null?o=0:(zt=null,Xt=0,o=Mt)}if(o!==0){if(o===2&&(E=Tp(i),E!==0&&(h=E,o=Hm(i,E))),o===1)throw c=cu,bs(i,0),Pi(i,h),Cn(i,At()),c;if(o===6)Pi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!D7(E)&&(o=Kc(i,h),o===2&&(b=Tp(i),b!==0&&(h=b,o=Hm(i,b))),o===1))throw c=cu,bs(i,0),Pi(i,h),Cn(i,At()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:_s(i,Nn,Zr);break;case 3:if(Pi(i,h),(h&130023424)===h&&(o=Fm+500-At(),10<o)){if(sc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){hn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Yp(_s.bind(null,i,Nn,Zr),o);break}_s(i,Nn,Zr);break;case 4:if(Pi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var w=31-lr(h);b=1<<w,w=o[w],w>E&&(E=w),h&=~b}if(h=E,h=At()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*L7(h/1960))-h,10<h){i.timeoutHandle=Yp(_s.bind(null,i,Nn,Zr),h);break}_s(i,Nn,Zr);break;case 5:_s(i,Nn,Zr);break;default:throw Error(n(329))}}}return Cn(i,At()),i.callbackNode===c?Uw.bind(null,i):null}function Hm(i,o){var c=du;return i.current.memoizedState.isDehydrated&&(bs(i,o).flags|=256),i=Kc(i,o),i!==2&&(o=Nn,Nn=c,o!==null&&jm(o)),i}function jm(i){Nn===null?Nn=i:Nn.push.apply(Nn,i)}function D7(i){for(var o=i;;){if(o.flags&16384){var c=o.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var E=c[h],b=E.getSnapshot;E=E.value;try{if(!cr(b(),E))return!1}catch(w){return!1}}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;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 Pi(i,o){for(o&=~Mm,o&=~qc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-lr(o),h=1<<c;i[c]=-1,o&=~h}}function Hw(i){if((nt&6)!==0)throw Error(n(327));Do();var o=sc(i,0);if((o&1)===0)return Cn(i,At()),null;var c=Kc(i,o);if(i.tag!==0&&c===2){var h=Tp(i);h!==0&&(o=h,c=Hm(i,h))}if(c===1)throw c=cu,bs(i,0),Pi(i,o),Cn(i,At()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,_s(i,Nn,Zr),Cn(i,At()),null}function zm(i,o){var c=nt;nt|=1;try{return i(o)}finally{nt=c,nt===0&&(Lo=At()+500,Sc&&vi())}}function Ts(i){Oi!==null&&Oi.tag===0&&(nt&6)===0&&Do();var o=nt;nt|=1;var c=Xn.transition,h=ot;try{if(Xn.transition=null,ot=1,i)return i()}finally{ot=h,Xn.transition=c,nt=o,(nt&6)===0&&vi()}}function $m(){Un=Ro.current,gt(Ro)}function bs(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,d7(c)),Pt!==null)for(c=Pt.return;c!==null;){var h=c;switch(Jp(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&xc();break;case 3:Oo(),gt(Sn),gt(rn),dm();break;case 5:lm(h);break;case 4:Oo();break;case 13:gt(bt);break;case 19:gt(bt);break;case 10:im(h.type._context);break;case 22:case 23:$m()}c=c.return}if(zt=i,Pt=i=Ri(i.current,null),Xt=Un=o,Mt=0,cu=null,Mm=qc=ys=0,Nn=du=null,ms!==null){for(o=0;o<ms.length;o++)if(c=ms[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var w=b.next;b.next=E,h.next=w}c.pending=h}ms=null}return i}function jw(i,o){do{var c=Pt;try{if(rm(),Lc.current=Bc,Dc){for(var h=_t.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Dc=!1}if(Es=0,jt=Dt=_t=null,iu=!1,su=0,Dm.current=null,c===null||c.return===null){Mt=1,cu=o,Pt=null;break}e:{var b=i,w=c.return,D=c,z=o;if(o=Xt,D.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var Z=z,Ee=D,be=Ee.tag;if((Ee.mode&1)===0&&(be===0||be===11||be===15)){var me=Ee.alternate;me?(Ee.updateQueue=me.updateQueue,Ee.memoizedState=me.memoizedState,Ee.lanes=me.lanes):(Ee.updateQueue=null,Ee.memoizedState=null)}var ke=fw(w);if(ke!==null){ke.flags&=-257,hw(ke,w,D,b,o),ke.mode&1&&dw(b,Z,o),o=ke,z=Z;var Ie=o.updateQueue;if(Ie===null){var Pe=new Set;Pe.add(z),o.updateQueue=Pe}else Ie.add(z);break e}else{if((o&1)===0){dw(b,Z,o),Vm();break e}z=Error(n(426))}}else if(Tt&&D.mode&1){var Nt=fw(w);if(Nt!==null){(Nt.flags&65536)===0&&(Nt.flags|=256),hw(Nt,w,D,b,o),tm(Io(z,D));break e}}b=z=Io(z,D),Mt!==4&&(Mt=2),du===null?du=[b]:du.push(b),b=w;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var G=lw(b,z,o);Mx(b,G);break e;case 1:D=z;var V=b.type,Q=b.stateNode;if((b.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(ki===null||!ki.has(Q)))){b.flags|=65536,o&=-o,b.lanes|=o;var ve=cw(b,D,o);Mx(b,ve);break e}}b=b.return}while(b!==null)}Vw(c)}catch(Re){o=Re,Pt===c&&c!==null&&(Pt=c=c.return);continue}break}while(!0)}function zw(){var i=Vc.current;return Vc.current=Bc,i===null?Bc:i}function Vm(){(Mt===0||Mt===3||Mt===2)&&(Mt=4),zt===null||(ys&268435455)===0&&(qc&268435455)===0||Pi(zt,Xt)}function Kc(i,o){var c=nt;nt|=2;var h=zw();(zt!==i||Xt!==o)&&(Zr=null,bs(i,o));do try{M7();break}catch(E){jw(i,E)}while(!0);if(rm(),nt=c,Vc.current=h,Pt!==null)throw Error(n(261));return zt=null,Xt=0,Mt}function M7(){for(;Pt!==null;)$w(Pt)}function F7(){for(;Pt!==null&&!uF();)$w(Pt)}function $w(i){var o=Ww(i.alternate,i,Un);i.memoizedProps=i.pendingProps,o===null?Vw(i):Pt=o,Dm.current=null}function Vw(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=k7(c,o,Un),c!==null){Pt=c;return}}else{if(c=O7(c,o),c!==null){c.flags&=32767,Pt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Mt=6,Pt=null;return}}if(o=o.sibling,o!==null){Pt=o;return}Pt=o=i}while(o!==null);Mt===0&&(Mt=5)}function _s(i,o,c){var h=ot,E=Xn.transition;try{Xn.transition=null,ot=1,B7(i,o,c,h)}finally{Xn.transition=E,ot=h}return null}function B7(i,o,c,h){do Do();while(Oi!==null);if((nt&6)!==0)throw Error(n(327));c=i.finishedWork;var E=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=c.lanes|c.childLanes;if(yF(i,b),i===zt&&(Pt=zt=null,Xt=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Wc||(Wc=!0,Gw(tc,function(){return Do(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=Xn.transition,Xn.transition=null;var w=ot;ot=1;var D=nt;nt|=4,Dm.current=null,P7(i,c),Lw(c,i),i7(Vp),uc=!!$p,Vp=$p=null,i.current=c,R7(c),lF(),nt=D,ot=w,Xn.transition=b}else i.current=c;if(Wc&&(Wc=!1,Oi=i,Gc=E),b=i.pendingLanes,b===0&&(ki=null),fF(c.stateNode),Cn(i,At()),o!==null)for(h=i.onRecoverableError,c=0;c<o.length;c++)E=o[c],h(E.value,{componentStack:E.stack,digest:E.digest});if(Yc)throw Yc=!1,i=Bm,Bm=null,i;return(Gc&1)!==0&&i.tag!==0&&Do(),b=i.pendingLanes,(b&1)!==0?i===Um?fu++:(fu=0,Um=i):fu=0,vi(),null}function Do(){if(Oi!==null){var i=P_(Gc),o=Xn.transition,c=ot;try{if(Xn.transition=null,ot=16>i?16:i,Oi===null)var h=!1;else{if(i=Oi,Oi=null,Gc=0,(nt&6)!==0)throw Error(n(331));var E=nt;for(nt|=4,Oe=i.current;Oe!==null;){var b=Oe,w=b.child;if((Oe.flags&16)!==0){var D=b.deletions;if(D!==null){for(var z=0;z<D.length;z++){var Z=D[z];for(Oe=Z;Oe!==null;){var Ee=Oe;switch(Ee.tag){case 0:case 11:case 15:lu(8,Ee,b)}var be=Ee.child;if(be!==null)be.return=Ee,Oe=be;else for(;Oe!==null;){Ee=Oe;var me=Ee.sibling,ke=Ee.return;if(kw(Ee),Ee===Z){Oe=null;break}if(me!==null){me.return=ke,Oe=me;break}Oe=ke}}}var Ie=b.alternate;if(Ie!==null){var Pe=Ie.child;if(Pe!==null){Ie.child=null;do{var Nt=Pe.sibling;Pe.sibling=null,Pe=Nt}while(Pe!==null)}}Oe=b}}if((b.subtreeFlags&2064)!==0&&w!==null)w.return=b,Oe=w;else e:for(;Oe!==null;){if(b=Oe,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:lu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Oe=G;break e}Oe=b.return}}var V=i.current;for(Oe=V;Oe!==null;){w=Oe;var Q=w.child;if((w.subtreeFlags&2064)!==0&&Q!==null)Q.return=w,Oe=Q;else e:for(w=V;Oe!==null;){if(D=Oe,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:$c(9,D)}}catch(Re){wt(D,D.return,Re)}if(D===w){Oe=null;break e}var ve=D.sibling;if(ve!==null){ve.return=D.return,Oe=ve;break e}Oe=D.return}}if(nt=E,vi(),Pr&&typeof Pr.onPostCommitFiberRoot=="function")try{Pr.onPostCommitFiberRoot(nc,i)}catch(Re){}h=!0}return h}finally{ot=c,Xn.transition=o}}return!1}function qw(i,o,c){o=Io(c,o),o=lw(i,o,1),i=Ni(i,o,1),o=hn(),i!==null&&(Ma(i,1,o),Cn(i,o))}function wt(i,o,c){if(i.tag===3)qw(i,i,c);else for(;o!==null;){if(o.tag===3){qw(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ki===null||!ki.has(h))){i=Io(c,i),i=cw(o,i,1),o=Ni(o,i,1),i=hn(),o!==null&&(Ma(o,1,i),Cn(o,i));break}}o=o.return}}function U7(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=hn(),i.pingedLanes|=i.suspendedLanes&c,zt===i&&(Xt&c)===c&&(Mt===4||Mt===3&&(Xt&130023424)===Xt&&500>At()-Fm?bs(i,0):Mm|=c),Cn(i,o)}function Yw(i,o){o===0&&((i.mode&1)===0?o=1:(o=ic,ic<<=1,(ic&130023424)===0&&(ic=4194304)));var c=hn();i=Qr(i,o),i!==null&&(Ma(i,o,c),Cn(i,c))}function H7(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),Yw(i,c)}function j7(i,o){var c=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),Yw(i,c)}var Ww;Ww=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||Sn.current)An=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return An=!1,C7(i,o,c);An=(i.flags&131072)!==0}else An=!1,Tt&&(o.flags&1048576)!==0&&Ax(o,Ac,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;jc(i,o),i=o.pendingProps;var E=wo(o,rn.current);ko(o,c),E=pm(null,o,h,i,E,c);var b=mm();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,vn(h)?(b=!0,wc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,am(o),E.updater=Uc,o.stateNode=E,E._reactInternals=o,_m(o,h,i,c),o=vm(null,o,h,!0,b,c)):(o.tag=0,Tt&&b&&Kp(o),fn(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(jc(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=$7(h),i=fr(h,i),E){case 0:o=Sm(null,o,h,i,c);break e;case 1:o=Tw(null,o,h,i,c);break e;case 11:o=pw(null,o,h,i,c);break e;case 14:o=mw(null,o,h,fr(h.type,i),c);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),Sm(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),Tw(i,o,h,E,c);case 3:e:{if(bw(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,Dx(i,o),Pc(o,h,null,c);var w=o.memoizedState;if(h=w.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){E=Io(Error(n(423)),o),o=_w(i,o,h,c,E);break e}else if(h!==E){E=Io(Error(n(424)),o),o=_w(i,o,h,c,E);break e}else for(Bn=xi(o.stateNode.containerInfo.firstChild),Fn=o,Tt=!0,dr=null,c=Rx(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Ao(),h===E){o=Jr(i,o,c);break e}fn(i,o,h,c)}o=o.child}return o;case 5:return Bx(o),i===null&&em(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,w=E.children,qp(h,E)?w=null:b!==null&&qp(h,b)&&(o.flags|=32),yw(i,o),fn(i,o,w,c),o.child;case 6:return i===null&&em(o),null;case 13:return xw(i,o,c);case 4:return um(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=No(o,null,h,c):fn(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),pw(i,o,h,E,c);case 7:return fn(i,o,o.pendingProps,c),o.child;case 8:return fn(i,o,o.pendingProps.children,c),o.child;case 12:return fn(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,b=o.memoizedProps,w=E.value,ft(kc,h._currentValue),h._currentValue=w,b!==null)if(cr(b.value,w)){if(b.children===E.children&&!Sn.current){o=Jr(i,o,c);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var D=b.dependencies;if(D!==null){w=b.child;for(var z=D.firstContext;z!==null;){if(z.context===h){if(b.tag===1){z=Kr(-1,c&-c),z.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var Ee=Z.pending;Ee===null?z.next=z:(z.next=Ee.next,Ee.next=z),Z.pending=z}}b.lanes|=c,z=b.alternate,z!==null&&(z.lanes|=c),sm(b.return,c,o),D.lanes|=c;break}z=z.next}}else if(b.tag===10)w=b.type===o.type?null:b.child;else if(b.tag===18){if(w=b.return,w===null)throw Error(n(341));w.lanes|=c,D=w.alternate,D!==null&&(D.lanes|=c),sm(w,c,o),w=b.sibling}else w=b.child;if(w!==null)w.return=b;else for(w=b;w!==null;){if(w===o){w=null;break}if(b=w.sibling,b!==null){b.return=w.return,w=b;break}w=w.return}b=w}fn(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,ko(o,c),E=Wn(E),h=h(E),o.flags|=1,fn(i,o,h,c),o.child;case 14:return h=o.type,E=fr(h,o.pendingProps),E=fr(h.type,E),mw(i,o,h,E,c);case 15:return gw(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),jc(i,o),o.tag=1,vn(h)?(i=!0,wc(o)):i=!1,ko(o,c),aw(o,h,E),_m(o,h,E,c),vm(null,o,h,!0,i,c);case 19:return Sw(i,o,c);case 22:return Ew(i,o,c)}throw Error(n(156,o.tag))};function Gw(i,o){return N_(i,o)}function z7(i,o,c,h){this.tag=i,this.key=c,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 Qn(i,o,c,h){return new z7(i,o,c,h)}function qm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function $7(i){if(typeof i=="function")return qm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ee)return 11;if(i===de)return 14}return 2}function Ri(i,o){var c=i.alternate;return c===null?(c=Qn(i.tag,o,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=o,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,o=i.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function Jc(i,o,c,h,E,b){var w=2;if(h=i,typeof i=="function")qm(i)&&(w=1);else if(typeof i=="string")w=5;else e:switch(i){case W:return xs(c.children,E,b,o);case se:w=8,E|=8;break;case he:return i=Qn(12,c,o,E|2),i.elementType=he,i.lanes=b,i;case we:return i=Qn(13,c,o,E),i.elementType=we,i.lanes=b,i;case fe:return i=Qn(19,c,o,E),i.elementType=fe,i.lanes=b,i;case ce:return Zc(c,E,b,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:w=10;break e;case oe:w=9;break e;case ee:w=11;break e;case de:w=14;break e;case pe:w=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=Qn(w,c,o,E),o.elementType=i,o.type=h,o.lanes=b,o}function xs(i,o,c,h){return i=Qn(7,i,h,o),i.lanes=c,i}function Zc(i,o,c,h){return i=Qn(22,i,h,o),i.elementType=ce,i.lanes=c,i.stateNode={isHidden:!1},i}function Ym(i,o,c){return i=Qn(6,i,null,o),i.lanes=c,i}function Wm(i,o,c){return o=Qn(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function V7(i,o,c,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=bp(0),this.expirationTimes=bp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function Gm(i,o,c,h,E,b,w,D,z){return i=new V7(i,o,c,D,z),o===1?(o=1,b===!0&&(o|=8)):o=0,b=Qn(3,null,null,o),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},am(b),i}function q7(i,o,c){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:c}}function Xw(i){if(!i)return Si;i=i._reactInternals;e:{if(cs(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(vn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(vn(c))return wx(i,c,o)}return o}function Qw(i,o,c,h,E,b,w,D,z){return i=Gm(c,h,!0,i,E,b,w,D,z),i.context=Xw(null),c=i.current,h=hn(),E=Ii(c),b=Kr(h,E),b.callback=o!=null?o:null,Ni(c,b,E),i.current.lanes=E,Ma(i,E,h),Cn(i,h),i}function ed(i,o,c,h){var E=o.current,b=hn(),w=Ii(E);return c=Xw(c),o.context===null?o.context=c:o.pendingContext=c,o=Kr(b,w),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Ni(E,o,w),i!==null&&(mr(i,E,w,b),Ic(i,E,w)),w}function td(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Kw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function Xm(i,o){Kw(i,o),(i=i.alternate)&&Kw(i,o)}function Y7(){return null}var Jw=typeof reportError=="function"?reportError:function(i){console.error(i)};function Qm(i){this._internalRoot=i}nd.prototype.render=Qm.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));ed(i,o,null,null)},nd.prototype.unmount=Qm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Ts(function(){ed(null,i,null,null)}),o[Yr]=null}};function nd(i){this._internalRoot=i}nd.prototype.unstable_scheduleHydration=function(i){if(i){var o=D_();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Ti.length&&o!==0&&o<Ti[c].priority;c++);Ti.splice(c,0,i),c===0&&B_(i)}};function Km(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function rd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Zw(){}function W7(i,o,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var Z=td(w);b.call(Z)}}var w=Qw(o,h,i,0,null,!1,!1,"",Zw);return i._reactRootContainer=w,i[Yr]=w.current,Qa(i.nodeType===8?i.parentNode:i),Ts(),w}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var D=h;h=function(){var Z=td(z);D.call(Z)}}var z=Gm(i,0,!1,null,null,!1,!1,"",Zw);return i._reactRootContainer=z,i[Yr]=z.current,Qa(i.nodeType===8?i.parentNode:i),Ts(function(){ed(o,z,c,h)}),z}function id(i,o,c,h,E){var b=c._reactRootContainer;if(b){var w=b;if(typeof E=="function"){var D=E;E=function(){var z=td(w);D.call(z)}}ed(o,w,i,E)}else w=W7(c,o,i,E,h);return td(w)}R_=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=Da(o.pendingLanes);c!==0&&(_p(o,c|1),Cn(o,At()),(nt&6)===0&&(Lo=At()+500,vi()))}break;case 13:Ts(function(){var h=Qr(i,1);if(h!==null){var E=hn();mr(h,i,1,E)}}),Xm(i,1)}},xp=function(i){if(i.tag===13){var o=Qr(i,134217728);if(o!==null){var c=hn();mr(o,i,134217728,c)}Xm(i,134217728)}},L_=function(i){if(i.tag===13){var o=Ii(i),c=Qr(i,o);if(c!==null){var h=hn();mr(c,i,o,h)}Xm(i,o)}},D_=function(){return ot},M_=function(i,o){var c=ot;try{return ot=i,o()}finally{ot=c}},pp=function(i,o,c){switch(o){case"input":if(It(i,c),o=c.name,c.type==="radio"&&o!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<c.length;o++){var h=c[o];if(h!==i&&h.form===i.form){var E=_c(h);if(!E)throw Error(n(90));Ye(h),It(h,E)}}}break;case"textarea":Kl(i,c);break;case"select":o=c.value,o!=null&&Or(i,!!c.multiple,o,!1)}},b_=zm,__=Ts;var G7={usingClientEntryPoint:!1,Events:[Za,_o,_c,y_,T_,zm]},hu={findFiberByHostInstance:ds,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},X7={bundleType:hu.bundleType,version:hu.version,rendererPackageName:hu.rendererPackageName,rendererConfig:hu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=v_(i),i===null?null:i.stateNode},findFiberByHostInstance:hu.findFiberByHostInstance||Y7,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 sd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sd.isDisabled&&sd.supportsFiber)try{nc=sd.inject(X7),Pr=sd}catch(i){}}return En.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G7,En.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Km(o))throw Error(n(200));return q7(i,o,null,c)},En.createRoot=function(i,o){if(!Km(i))throw Error(n(299));var c=!1,h="",E=Jw;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=Gm(i,1,!1,null,null,c,!1,h,E),i[Yr]=o.current,Qa(i.nodeType===8?i.parentNode:i),new Qm(o)},En.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=v_(o),i=i===null?null:i.stateNode,i},En.flushSync=function(i){return Ts(i)},En.hydrate=function(i,o,c){if(!rd(o))throw Error(n(200));return id(null,i,o,!0,c)},En.hydrateRoot=function(i,o,c){if(!Km(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",w=Jw;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(w=c.onRecoverableError)),o=Qw(o,null,i,1,c!=null?c:null,E,!1,b,w),i[Yr]=o.current,Qa(i),h)for(i=0;i<h.length;i++)c=h[i],E=c._getVersion,E=E(c._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[c,E]:o.mutableSourceEagerHydrationData.push(c,E);return new nd(o)},En.render=function(i,o,c){if(!rd(o))throw Error(n(200));return id(null,i,o,!1,c)},En.unmountComponentAtNode=function(i){if(!rd(i))throw Error(n(40));return i._reactRootContainer?(Ts(function(){id(null,null,i,!1,function(){i._reactRootContainer=null,i[Yr]=null})}),!0):!1},En.unstable_batchedUpdates=zm,En.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!rd(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return id(i,o,c,!1,h)},En.version="18.3.1-next-f1338f8080-20240426",En}var qg;function Yg(){if(qg)return rf.exports;qg=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(),rf.exports=uN(),rf.exports}var Ds=Yg();function Wg(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=Wg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function F(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Wg(e))&&(r&&(r+=" "),r+=t);return r}var Gg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Xg=Mi.createContext&&Mi.createContext(Gg),lN=["attr","size","title"];function cN(e,t){if(e==null)return{};var n=dN(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 dN(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 Vu(){return Vu=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},Vu.apply(this,arguments)}function Qg(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 qu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qg(Object(n),!0).forEach(function(r){fN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fN(e,t,n){return t=hN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hN(e){var t=pN(e,"string");return typeof t=="symbol"?t:t+""}function pN(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 Kg(e){return e&&e.map((t,n)=>Mi.createElement(t.tag,qu({key:n},t.attr),Kg(t.child)))}function st(e){return t=>Mi.createElement(mN,Vu({attr:qu({},e.attr)},t),Kg(e.child))}function mN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=cN(e,lN),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Mi.createElement("svg",Vu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:qu(qu({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&Mi.createElement("title",null,a),e.children)};return Xg!==void 0?Mi.createElement(Xg.Consumer,null,n=>t(n)):t(Gg)}function gN(e){return st({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function EN(e){return st({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function yN(e){return st({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 tr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:_.jsx("button",{className:F(e,`${k}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?_.jsx("img",{className:F(`${k}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),TN="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",bN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ut(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?_.jsx(yN,{className:F(t,`${k}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||TN,alt:"Copilot",className:F(t,`${k}-minimized-icon-img`)});return _.jsx(tr,{className:F(t,`${k}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},_N=()=>{const{globalClassName:e,themeVariables:t}=ut(),n=()=>{zu(!1),ni(!0)};return Ds.createPortal(_.jsx("div",{className:F(e,`${k}-minimized-container`),style:t,children:_.jsx(bN,{onClick:n})}),document.body)};function xN(e){return st({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function ln(){const e=H.useContext(mg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const wN=e=>({[`${kn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${kn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${kn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${kn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${kn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${kn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function SN(e){return st({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm18.31 6-2.76 5z"},child:[]},{tag:"path",attr:{d:"M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"},child:[]}]})(e)}function vN(e){return st({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8A5.87 5.87 0 0 1 6 12c0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"},child:[]}]})(e)}function Jg(e){return st({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 AN(e){return st({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function af(e){return st({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 NN(e){return st({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 CN(e){return st({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function kN(e){return st({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function Zg(e){return st({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 e1(e){return st({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 ON(e){return st({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 IN(e){return st({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 PN(e){return st({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function t1(e){return st({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}const Yu=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>_.jsx("button",{className:F(`${k}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),RN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?_.jsx("img",{className:F(`${k}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(af,{size:"16px"})},LN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return _.jsx(tr,{className:F(e,n,`cim-${r}-component`,`${k}-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:_.jsx(af,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(Yu,{className:F(e,n,`cim-${r}-component`,`${k}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&_.jsx(RN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function vB(){}function AB(){}function n1(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 r1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const DN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,MN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FN={};function i1(e,t){return(FN.jsx?MN:DN).test(e)}const BN=/[ \t\n\f\r]/g;function UN(e){return typeof e=="object"?e.type==="text"?s1(e.value):!1:s1(e)}function s1(e){return e.replace(BN,"")===""}class Go{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Go.prototype.normal={},Go.prototype.property={},Go.prototype.space=void 0;function o1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Go(n,r,t)}function Xo(e){return e.toLowerCase()}class yn{constructor(t,n){this.attribute=n,this.property=t}}yn.prototype.attribute="",yn.prototype.booleanish=!1,yn.prototype.boolean=!1,yn.prototype.commaOrSpaceSeparated=!1,yn.prototype.commaSeparated=!1,yn.prototype.defined=!1,yn.prototype.mustUseProperty=!1,yn.prototype.number=!1,yn.prototype.overloadedBoolean=!1,yn.prototype.property="",yn.prototype.spaceSeparated=!1,yn.prototype.space=void 0;let HN=0;const qe=Yi(),Ot=Yi(),uf=Yi(),_e=Yi(),lt=Yi(),qi=Yi(),In=Yi();function Yi(){return ad(2,++HN)}const lf=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:Ot,commaOrSpaceSeparated:In,commaSeparated:qi,number:_e,overloadedBoolean:uf,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),cf=Object.keys(lf);class df extends yn{constructor(t,n,r,s){let a=-1;if(super(t,n),a1(this,"space",s),typeof r=="number")for(;++a<cf.length;){const u=cf[a];a1(this,cf[a],(r&lf[u])===lf[u])}}}df.prototype.defined=!0;function a1(e,t,n){n&&(e[t]=n)}function Ms(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new df(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Xo(r)]=r,n[Xo(a.attribute)]=r}return new Go(t,n,e.space)}const u1=Ms({properties:{ariaActiveDescendant:null,ariaAtomic:Ot,ariaAutoComplete:null,ariaBusy:Ot,ariaChecked:Ot,ariaColCount:_e,ariaColIndex:_e,ariaColSpan:_e,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Ot,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Ot,ariaFlowTo:lt,ariaGrabbed:Ot,ariaHasPopup:null,ariaHidden:Ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:_e,ariaLive:null,ariaModal:Ot,ariaMultiLine:Ot,ariaMultiSelectable:Ot,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:_e,ariaPressed:Ot,ariaReadOnly:Ot,ariaRelevant:null,ariaRequired:Ot,ariaRoleDescription:lt,ariaRowCount:_e,ariaRowIndex:_e,ariaRowSpan:_e,ariaSelected:Ot,ariaSetSize:_e,ariaSort:null,ariaValueMax:_e,ariaValueMin:_e,ariaValueNow:_e,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function l1(e,t){return t in e?e[t]:t}function c1(e,t){return l1(e,t.toLowerCase())}const jN=Ms({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qi,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alpha:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:lt,autoFocus:qe,autoPlay:qe,blocking:lt,capture:null,charSet:null,checked:qe,cite:null,className:lt,closedBy:null,colorSpace:null,cols:_e,colSpan:_e,command:null,commandFor:null,content:null,contentEditable:Ot,controls:qe,controlsList:lt,coords:_e|qi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:uf,draggable:Ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:lt,height:_e,hidden:uf,high:_e,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:lt,itemRef:lt,itemScope:qe,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:_e,manifest:null,max:null,maxLength:_e,media:null,method:null,min:null,minLength:_e,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,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:qe,optimum:_e,pattern:null,ping:lt,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:lt,required:qe,reversed:qe,rows:_e,rowSpan:_e,sandbox:lt,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootCustomElementRegistry:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shadowRootSerializable:qe,shape:null,size:_e,sizes:null,slot:null,span:_e,spellCheck:Ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_e,step:null,style:null,tabIndex:_e,target:null,title:null,translate:null,type:null,typeMustMatch:qe,useMap:null,value:Ot,width:_e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:_e,borderColor:null,bottomMargin:_e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:_e,leftMargin:_e,link:null,longDesc:null,lowSrc:null,marginHeight:_e,marginWidth:_e,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:_e,rules:null,scheme:null,scrolling:Ot,standby:null,summary:null,text:null,topMargin:_e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_e,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:qe,disablePictureInPicture:qe,disableRemotePlayback:qe,exportParts:qi,part:lt,prefix:null,property:null,results:_e,security:null,unselectable:null},space:"html",transform:c1}),zN=Ms({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:In,accentHeight:_e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_e,amplitude:_e,arabicForm:null,ascent:_e,attributeName:null,attributeType:null,azimuth:_e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_e,by:null,calcMode:null,capHeight:_e,className:lt,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:_e,diffuseConstant:_e,direction:null,display:null,dur:null,divisor:_e,dominantBaseline:null,download:qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:_e,enableBackground:null,end:null,event:null,exponent:_e,externalResourcesRequired:null,fill:null,fillOpacity:_e,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:qi,g2:qi,glyphName:qi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_e,horizOriginX:_e,horizOriginY:_e,id:null,ideographic:_e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_e,k:_e,k1:_e,k2:_e,k3:_e,k4:_e,kernelMatrix:In,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_e,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:_e,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:_e,overlineThickness:_e,paintOrder:null,panose1:null,path:null,pathLength:_e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_e,pointsAtY:_e,pointsAtZ:_e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:In,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:In,rev:In,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:In,requiredFeatures:In,requiredFonts:In,requiredFormats:In,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:_e,specularExponent:_e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_e,strikethroughThickness:_e,string:null,stroke:null,strokeDashArray:In,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_e,strokeOpacity:_e,strokeWidth:null,style:null,surfaceScale:_e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:In,tabIndex:_e,tableValues:null,target:null,targetX:_e,targetY:_e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:In,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_e,underlineThickness:_e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_e,values:null,vAlphabetic:_e,vMathematical:_e,vectorEffect:null,vHanging:_e,vIdeographic:_e,version:null,vertAdvY:_e,vertOriginX:_e,vertOriginY:_e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:l1}),d1=Ms({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()}}),f1=Ms({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:c1}),h1=Ms({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$N={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"},VN=/[A-Z]/g,p1=/-[a-z]/g,qN=/^data[-\w.:]+$/i;function Wu(e,t){const n=Xo(t);let r=t,s=yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&qN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(p1,WN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!p1.test(a)){let u=a.replace(VN,YN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=df}return new s(r,t)}function YN(e){return"-"+e.toLowerCase()}function WN(e){return e.charAt(1).toUpperCase()}const Qo=o1([u1,jN,d1,f1,h1],"html"),ii=o1([u1,zN,d1,f1,h1],"svg");function m1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function g1(e){return e.join(" ").trim()}var Fs={},ff,E1;function GN(){if(E1)return ff;E1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
24
- `,f="/",p="*",m="",T="comment",y="declaration";function x(A,S){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];S=S||{};var C=1,I=1;function j(fe){var de=fe.match(t);de&&(C+=de.length);var pe=fe.lastIndexOf(d);I=~pe?fe.length-pe:I+fe.length}function Y(){var fe={line:C,column:I};return function(de){return de.position=new R(fe),he(),de}}function R(fe){this.start=fe,this.end={line:C,column:I},this.source=S.source}R.prototype.content=A;function W(fe){var de=new Error(S.source+":"+C+":"+I+": "+fe);if(de.reason=fe,de.filename=S.source,de.line=C,de.column=I,de.source=A,!S.silent)throw de}function se(fe){var de=fe.exec(A);if(de){var pe=de[0];return j(pe),A=A.slice(pe.length),de}}function he(){se(n)}function $(fe){var de;for(fe=fe||[];de=oe();)de!==!1&&fe.push(de);return fe}function oe(){var fe=Y();if(!(f!=A.charAt(0)||p!=A.charAt(1))){for(var de=2;m!=A.charAt(de)&&(p!=A.charAt(de)||f!=A.charAt(de+1));)++de;if(de+=2,m===A.charAt(de-1))return W("End of comment missing");var pe=A.slice(2,de-2);return I+=2,j(pe),A=A.slice(de),I+=2,fe({type:T,comment:pe})}}function ee(){var fe=Y(),de=se(r);if(de){if(oe(),!se(s))return W("property missing ':'");var pe=se(a),ce=fe({type:y,property:v(de[0].replace(e,m)),value:pe?v(pe[0].replace(e,m)):m});return se(u),ce}}function we(){var fe=[];$(fe);for(var de;de=ee();)de!==!1&&(fe.push(de),$(fe));return fe}return he(),we()}function v(A){return A?A.replace(l,m):m}return ff=x,ff}var y1;function XN(){if(y1)return Fs;y1=1;var e=Fs&&Fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.default=n;const t=e(GN());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;l?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Fs}var Ko={},T1;function QN(){if(T1)return Ko;T1=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.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()},l=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,l):f=f.replace(r,l),f.replace(t,u))};return Ko.camelCase=d,Ko}var Jo,b1;function KN(){if(b1)return Jo;b1=1;var e=Jo&&Jo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(XN()),n=QN();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(l,d){l&&d&&(u[(0,n.camelCase)(l,a)]=d)}),u}return r.default=r,Jo=r,Jo}var JN=KN();const ZN=Qe(JN),Gu=_1("end"),Tr=_1("start");function _1(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 x1(e){const t=Tr(e),n=Gu(e);if(t&&n)return{start:t,end:n}}function Zo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?w1(e.position):"start"in e||"end"in e?w1(e):"line"in e||"column"in e?hf(e):""}function hf(e){return S1(e&&e.line)+":"+S1(e&&e.column)}function w1(e){return hf(e&&e.start)+"-"+hf(e&&e.end)}function S1(e){return e&&typeof e=="number"?e:1}class Jt 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=U({},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 l=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=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=Zo(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}}Jt.prototype.file="",Jt.prototype.name="",Jt.prototype.reason="",Jt.prototype.message="",Jt.prototype.stack="",Jt.prototype.column=void 0,Jt.prototype.line=void 0,Jt.prototype.ancestors=void 0,Jt.prototype.cause=void 0,Jt.prototype.fatal=void 0,Jt.prototype.place=void 0,Jt.prototype.ruleId=void 0,Jt.prototype.source=void 0;const pf={}.hasOwnProperty,eC=new Map,tC=/[A-Z]/g,nC=new Set(["table","tbody","thead","tfoot","tr"]),rC=new Set(["td","th"]),v1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function iC(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=fC(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=dC(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"?ii:Qo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=A1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function A1(e,t,n){if(t.type==="element")return sC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return oC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return uC(e,t,n);if(t.type==="mdxjsEsm")return aC(e,t);if(t.type==="root")return lC(e,t,n);if(t.type==="text")return cC(e,t)}function sC(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=C1(e,t.tagName,!1),u=hC(e,t);let l=gf(e,t);return nC.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!UN(d):!0})),N1(e,u,a,t),mf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function oC(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)}ea(e,t.position)}function aC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ea(e,t.position)}function uC(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:C1(e,t.name,!0),u=pC(e,t),l=gf(e,t);return N1(e,u,a,t),mf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function lC(e,t,n){const r={};return mf(r,gf(e,t)),e.create(t,e.Fragment,r,n)}function cC(e,t){return t.value}function N1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function mf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function dC(e,t,n){return r;function r(s,a,u,l){const f=Array.isArray(u.children)?n:t;return l?f(a,u,l):f(a,u)}}function fC(e,t){return n;function n(r,s,a,u){const l=Array.isArray(a.children),d=Tr(r);return t(s,a,u,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function hC(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&pf.call(t.properties,s)){const a=mC(e,s,t.properties[s]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&rC.has(t.tagName)?r=l:n[u]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function pC(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 l=u.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ea(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 l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else ea(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function gf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:eC;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 l=A1(e,a,u);l!==void 0&&n.push(l)}return n}function mC(e,t,n){const r=Wu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?r1(n):g1(n)),r.property==="style"){let s=typeof n=="object"?n:gC(e,String(n));return e.stylePropertyNameCase==="css"&&(s=EC(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?$N[r.property]||r.property:r.attribute,n]}}function gC(e,t){try{return ZN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new Jt("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=v1+"#cannot-parse-style-attribute",s}}function C1(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 l=i1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}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 pf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);ea(e)}function ea(e,t){const n=new Jt("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=v1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function EC(e){const t={};let n;for(n in e)pf.call(e,n)&&(t[yC(n)]=e[n]);return t}function yC(e){let t=e.replace(tC,TC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function TC(e){return"-"+e.toLowerCase()}const Ef={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"]},bC={};function yf(e,t){const n=bC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return k1(e,r,s)}function k1(e,t,n){if(_C(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 O1(e.children,t,n)}return Array.isArray(e)?O1(e,t,n):""}function O1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=k1(e[s],t,n);return r.join("")}function _C(e){return!!(e&&typeof e=="object")}const I1=document.createElement("i");function Tf(e){const t="&"+e+";";I1.innerHTML=t;const n=I1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Pn(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 jn(e,t){return e.length>0?(Pn(e,e.length,0,t),e):t}const P1={}.hasOwnProperty;function R1(e){const t={};let n=-1;for(;++n<e.length;)xC(t,e[n]);return t}function xC(e,t){let n;for(n in t){const s=(P1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){P1.call(s,u)||(s[u]=[]);const l=a[u];wC(s[u],Array.isArray(l)?l:l?[l]:[])}}}function wC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pn(e,0,0,r)}function L1(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 nr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const cn=si(/[A-Za-z]/),Zt=si(/[\dA-Za-z]/),SC=si(/[#-'*+\--9=?A-Z^-~]/);function Xu(e){return e!==null&&(e<32||e===127)}const bf=si(/\d/),vC=si(/[\dA-Fa-f]/),AC=si(/[!-/:-@[-`{-~]/);function Fe(e){return e!==null&&e<-2}function ct(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const Qu=si(new RegExp("\\p{P}|\\p{S}","u")),Wi=si(/\s/);function si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bs(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Zt(e.charCodeAt(n+1))&&Zt(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 l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(u=String.fromCharCode(a,l),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 Ze(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ke(d)?(e.enter(n),l(d)):t(d)}function l(d){return Ke(d)&&a++<s?(e.consume(d),l):(e.exit(n),t(d))}}const NC={tokenize:CC};function CC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ze(e,t,"linePrefix")}function s(l){return e.enter("paragraph"),a(l)}function a(l){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(l)}function u(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Fe(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const kC={tokenize:OC},D1={tokenize:IC};function OC(e){const t=this,n=[];let r=0,s,a,u;return l;function l(I){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,d,f)(I)}return f(I)}function d(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&C();const j=t.events.length;let Y=j,R;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){R=t.events[Y][1].end;break}S(r);let W=j;for(;W<t.events.length;)t.events[W][1].end=U({},R),W++;return Pn(t.events,Y+1,0,t.events.slice(j)),t.events.length=W,f(I)}return l(I)}function f(I){if(r===n.length){if(!s)return T(I);if(s.currentConstruct&&s.currentConstruct.concrete)return x(I);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(D1,p,m)(I)}function p(I){return s&&C(),S(r),T(I)}function m(I){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(I)}function T(I){return t.containerState={},e.attempt(D1,y,x)(I)}function y(I){return r++,n.push([t.currentConstruct,t.containerState]),T(I)}function x(I){if(I===null){s&&C(),S(0),e.consume(I);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),v(I)}function v(I){if(I===null){A(e.exit("chunkFlow"),!0),S(0),e.consume(I);return}return Fe(I)?(e.consume(I),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(I),v)}function A(I,j){const Y=t.sliceStream(I);if(j&&Y.push(null),I.previous=a,a&&(a.next=I),a=I,s.defineSkip(I.start),s.write(Y),t.parser.lazy[I.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 W=t.events.length;let se=W,he,$;for(;se--;)if(t.events[se][0]==="exit"&&t.events[se][1].type==="chunkFlow"){if(he){$=t.events[se][1].end;break}he=!0}for(S(r),R=W;R<t.events.length;)t.events[R][1].end=U({},$),R++;Pn(t.events,se+1,0,t.events.slice(W)),t.events.length=R}}function S(I){let j=n.length;for(;j-- >I;){const Y=n[j];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=I}function C(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function IC(e,t,n){return Ze(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Us(e){if(e===null||ct(e)||Wi(e))return 1;if(Qu(e))return 2}function Ku(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 _f={name:"attention",resolveAll:PC,tokenize:RC};function PC(e,t){let n=-1,r,s,a,u,l,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=U({},e[r][1].end),T=U({},e[n][1].start);M1(m,-d),M1(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:U({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:U({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:U({},e[r][1].end),end:U({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:U({},u.start),end:U({},l.end)},e[r][1].end=U({},u.start),e[n][1].start=U({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=jn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=jn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=jn(f,Ku(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=jn(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=jn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Pn(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 RC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Us(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===a)return e.consume(d),l;const f=e.exit("attentionSequence"),p=Us(d),m=!p||p===2&&s||n.includes(d),T=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function M1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const LC={name:"autolink",tokenize:DC};function DC(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 cn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||Zt(y)?(r=1,l(y)):f(y)}function l(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Zt(y))&&r++<32?(e.consume(y),l):(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||Xu(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):SC(y)?(e.consume(y),f):n(y)}function p(y){return Zt(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):T(y)}function T(y){if((y===45||Zt(y))&&r++<63){const x=y===45?T:m;return e.consume(y),x}return n(y)}}const ta={partial:!0,tokenize:MC};function MC(e,t,n){return r;function r(a){return Ke(a)?Ze(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Fe(a)?t(a):n(a)}}const F1={continuation:{tokenize:BC},exit:UC,name:"blockQuote",tokenize:FC};function FC(e,t,n){const r=this;return s;function s(u){if(u===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ke(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function BC(e,t,n){const r=this;return s;function s(u){return Ke(u)?Ze(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(F1,t,n)(u)}}function UC(e){e.exit("blockQuote")}const B1={name:"characterEscape",tokenize:HC};function HC(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 AC(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const U1={name:"characterReference",tokenize:jC};function jC(e,t,n){const r=this;let s=0,a,u;return l;function l(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=Zt,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=vC,p):(e.enter("characterReferenceValue"),a=7,u=bf,p(m))}function p(m){if(m===59&&s){const T=e.exit("characterReferenceValue");return u===Zt&&!Tf(r.sliceSerialize(T))?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 H1={partial:!0,tokenize:$C},j1={concrete:!0,name:"codeFenced",tokenize:zC};function zC(e,t,n){const r=this,s={partial:!0,tokenize:Y};let a=0,u=0,l;return d;function d(R){return f(R)}function f(R){const W=r.events[r.events.length-1];return a=W&&W[1].type==="linePrefix"?W[2].sliceSerialize(W[1],!0).length:0,l=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===l?(u++,e.consume(R),p):u<3?n(R):(e.exit("codeFencedFenceSequence"),Ke(R)?Ze(e,m,"whitespace")(R):m(R))}function m(R){return R===null||Fe(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(H1,v,j)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(R))}function T(R){return R===null||Fe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):Ke(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ze(e,y,"whitespace")(R)):R===96&&R===l?n(R):(e.consume(R),T)}function y(R){return R===null||Fe(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(R))}function x(R){return R===null||Fe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===l?n(R):(e.consume(R),x)}function v(R){return e.attempt(s,j,A)(R)}function A(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),S}function S(R){return a>0&&Ke(R)?Ze(e,C,"linePrefix",a+1)(R):C(R)}function C(R){return R===null||Fe(R)?e.check(H1,v,j)(R):(e.enter("codeFlowValue"),I(R))}function I(R){return R===null||Fe(R)?(e.exit("codeFlowValue"),C(R)):(e.consume(R),I)}function j(R){return e.exit("codeFenced"),t(R)}function Y(R,W,se){let he=0;return $;function $(de){return R.enter("lineEnding"),R.consume(de),R.exit("lineEnding"),oe}function oe(de){return R.enter("codeFencedFence"),Ke(de)?Ze(R,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(de):ee(de)}function ee(de){return de===l?(R.enter("codeFencedFenceSequence"),we(de)):se(de)}function we(de){return de===l?(he++,R.consume(de),we):he>=u?(R.exit("codeFencedFenceSequence"),Ke(de)?Ze(R,fe,"whitespace")(de):fe(de)):se(de)}function fe(de){return de===null||Fe(de)?(R.exit("codeFencedFence"),W(de)):se(de)}}}function $C(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 xf={name:"codeIndented",tokenize:qC},VC={partial:!0,tokenize:YC};function qC(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),Ze(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):Fe(f)?e.attempt(VC,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||Fe(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function YC(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Fe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):Ze(e,a,"linePrefix",5)(u)}function a(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):Fe(u)?s(u):n(u)}}const WC={name:"codeText",previous:XC,resolve:GC,tokenize:QC};function GC(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 XC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function QC(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(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)):Fe(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||Fe(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 KC{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&&na(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),na(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),na(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);na(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);na(this.left,n.reverse())}}}function na(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 z1(e){const t={};let n=-1,r,s,a,u,l,d,f;const p=new KC(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,JC(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=U({},p.get(s)[1].start),l=p.slice(s,n),l.unshift(r),p.splice(s,n-s+1,l))}}return Pn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function JC(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 l=u.events,d=[],f={};let p,m,T=-1,y=n,x=0,v=0;const A=[v];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;++T<l.length;)l[T][0]==="exit"&&l[T-1][0]==="enter"&&l[T][1].type===l[T-1][1].type&&l[T][1].start.line!==l[T][1].end.line&&(v=T+1,A.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),T=A.length;T--;){const S=l.slice(A[T],A[T+1]),C=a.pop();d.push([C,C+S.length-1]),e.splice(C,2,S)}for(d.reverse(),T=-1;++T<d.length;)f[x+d[T][0]]=x+d[T][1],x+=d[T][1]-d[T][0]-1;return f}const ZC={resolve:tk,tokenize:nk},ek={partial:!0,tokenize:rk};function tk(e){return z1(e),e}function nk(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?a(l):Fe(l)?e.check(ek,u,a)(l):(e.consume(l),s)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function u(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function rk(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ze(e,a,"linePrefix")}function a(u){if(u===null||Fe(u))return n(u);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function $1(e,t,n,r,s,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(S){return S===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(S),e.exit(a),T):S===null||S===32||S===41||Xu(S)?n(S):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(S))}function T(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===62?(e.exit("chunkString"),e.exit(l),T(S)):S===null||S===60||Fe(S)?n(S):(e.consume(S),S===92?x:y)}function x(S){return S===60||S===62||S===92?(e.consume(S),y):y(S)}function v(S){return!p&&(S===null||S===41||ct(S))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(S)):p<f&&S===40?(e.consume(S),p++,v):S===41?(e.consume(S),p--,v):S===null||S===32||S===40||Xu(S)?n(S):(e.consume(S),S===92?A:v)}function A(S){return S===40||S===41||S===92?(e.consume(S),v):v(S)}}function V1(e,t,n,r,s,a){const u=this;let l=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 l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_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):Fe(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||Fe(y)||l++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ke(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function q1(e,t,n,r,s,a){let u;return l;function l(T){return T===34||T===39||T===40?(e.enter(r),e.enter(s),e.consume(T),e.exit(s),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(s),e.consume(T),e.exit(s),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Fe(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Ze(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Fe(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function ra(e,t){let n;return r;function r(s){return Fe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ke(s)?Ze(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const ik={name:"definition",tokenize:ok},sk={partial:!0,tokenize:ak};function ok(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return V1.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return s=nr(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 ct(y)?ra(e,f)(y):f(y)}function f(y){return $1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(sk,m,m)(y)}function m(y){return Ke(y)?Ze(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Fe(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function ak(e,t,n){return r;function r(l){return ct(l)?ra(e,s)(l):n(l)}function s(l){return q1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Ke(l)?Ze(e,u,"whitespace")(l):u(l)}function u(l){return l===null||Fe(l)?t(l):n(l)}}const uk={name:"hardBreakEscape",tokenize:lk};function lk(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Fe(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const ck={name:"headingAtx",resolve:dk,tokenize:fk};function dk(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"},Pn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function fk(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||ct(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Fe(p)?(e.exit("atxHeading"),t(p)):Ke(p)?Ze(e,l,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),l(p))}function f(p){return p===null||p===35||ct(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const hk=["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"],Y1=["pre","script","style","textarea"],pk={concrete:!0,name:"htmlFlow",resolveTo:Ek,tokenize:yk},mk={partial:!0,tokenize:bk},gk={partial:!0,tokenize:Tk};function Ek(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 yk(e,t,n){const r=this;let s,a,u,l,d;return f;function f(P){return p(P)}function p(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),T):P===47?(e.consume(P),a=!0,v):P===63?(e.consume(P),s=3,r.interrupt?t:N):cn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function T(P){return P===45?(e.consume(P),s=2,y):P===91?(e.consume(P),s=5,l=0,x):cn(P)?(e.consume(P),s=4,r.interrupt?t:N):n(P)}function y(P){return P===45?(e.consume(P),r.interrupt?t:N):n(P)}function x(P){const Se="CDATA[";return P===Se.charCodeAt(l++)?(e.consume(P),l===Se.length?r.interrupt?t:ee:x):n(P)}function v(P){return cn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function A(P){if(P===null||P===47||P===62||ct(P)){const Se=P===47,De=u.toLowerCase();return!Se&&!a&&Y1.includes(De)?(s=1,r.interrupt?t(P):ee(P)):hk.includes(u.toLowerCase())?(s=6,Se?(e.consume(P),S):r.interrupt?t(P):ee(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):a?C(P):I(P))}return P===45||Zt(P)?(e.consume(P),u+=String.fromCharCode(P),A):n(P)}function S(P){return P===62?(e.consume(P),r.interrupt?t:ee):n(P)}function C(P){return Ke(P)?(e.consume(P),C):$(P)}function I(P){return P===47?(e.consume(P),$):P===58||P===95||cn(P)?(e.consume(P),j):Ke(P)?(e.consume(P),I):$(P)}function j(P){return P===45||P===46||P===58||P===95||Zt(P)?(e.consume(P),j):Y(P)}function Y(P){return P===61?(e.consume(P),R):Ke(P)?(e.consume(P),Y):I(P)}function R(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),d=P,W):Ke(P)?(e.consume(P),R):se(P)}function W(P){return P===d?(e.consume(P),d=null,he):P===null||Fe(P)?n(P):(e.consume(P),W)}function se(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||ct(P)?Y(P):(e.consume(P),se)}function he(P){return P===47||P===62||Ke(P)?I(P):n(P)}function $(P){return P===62?(e.consume(P),oe):n(P)}function oe(P){return P===null||Fe(P)?ee(P):Ke(P)?(e.consume(P),oe):n(P)}function ee(P){return P===45&&s===2?(e.consume(P),pe):P===60&&s===1?(e.consume(P),ce):P===62&&s===4?(e.consume(P),M):P===63&&s===3?(e.consume(P),N):P===93&&s===5?(e.consume(P),ue):Fe(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(mk,J,we)(P)):P===null||Fe(P)?(e.exit("htmlFlowData"),we(P)):(e.consume(P),ee)}function we(P){return e.check(gk,fe,J)(P)}function fe(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),de}function de(P){return P===null||Fe(P)?we(P):(e.enter("htmlFlowData"),ee(P))}function pe(P){return P===45?(e.consume(P),N):ee(P)}function ce(P){return P===47?(e.consume(P),u="",K):ee(P)}function K(P){if(P===62){const Se=u.toLowerCase();return Y1.includes(Se)?(e.consume(P),M):ee(P)}return cn(P)&&u.length<8?(e.consume(P),u+=String.fromCharCode(P),K):ee(P)}function ue(P){return P===93?(e.consume(P),N):ee(P)}function N(P){return P===62?(e.consume(P),M):P===45&&s===2?(e.consume(P),N):ee(P)}function M(P){return P===null||Fe(P)?(e.exit("htmlFlowData"),J(P)):(e.consume(P),M)}function J(P){return e.exit("htmlFlow"),t(P)}}function Tk(e,t,n){const r=this;return s;function s(u){return Fe(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 bk(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ta,t,n)}}const _k={name:"htmlText",tokenize:xk};function xk(e,t,n){const r=this;let s,a,u;return l;function l(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),I):cn(N)?(e.consume(N),se):n(N)}function f(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),a=0,x):cn(N)?(e.consume(N),C):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),T):Fe(N)?(u=m,ce(N)):(e.consume(N),m)}function T(N){return N===45?(e.consume(N),y):m(N)}function y(N){return N===62?pe(N):N===45?T(N):m(N)}function x(N){const M="CDATA[";return N===M.charCodeAt(a++)?(e.consume(N),a===M.length?v:x):n(N)}function v(N){return N===null?n(N):N===93?(e.consume(N),A):Fe(N)?(u=v,ce(N)):(e.consume(N),v)}function A(N){return N===93?(e.consume(N),S):v(N)}function S(N){return N===62?pe(N):N===93?(e.consume(N),S):v(N)}function C(N){return N===null||N===62?pe(N):Fe(N)?(u=C,ce(N)):(e.consume(N),C)}function I(N){return N===null?n(N):N===63?(e.consume(N),j):Fe(N)?(u=I,ce(N)):(e.consume(N),I)}function j(N){return N===62?pe(N):I(N)}function Y(N){return cn(N)?(e.consume(N),R):n(N)}function R(N){return N===45||Zt(N)?(e.consume(N),R):W(N)}function W(N){return Fe(N)?(u=W,ce(N)):Ke(N)?(e.consume(N),W):pe(N)}function se(N){return N===45||Zt(N)?(e.consume(N),se):N===47||N===62||ct(N)?he(N):n(N)}function he(N){return N===47?(e.consume(N),pe):N===58||N===95||cn(N)?(e.consume(N),$):Fe(N)?(u=he,ce(N)):Ke(N)?(e.consume(N),he):pe(N)}function $(N){return N===45||N===46||N===58||N===95||Zt(N)?(e.consume(N),$):oe(N)}function oe(N){return N===61?(e.consume(N),ee):Fe(N)?(u=oe,ce(N)):Ke(N)?(e.consume(N),oe):he(N)}function ee(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),s=N,we):Fe(N)?(u=ee,ce(N)):Ke(N)?(e.consume(N),ee):(e.consume(N),fe)}function we(N){return N===s?(e.consume(N),s=void 0,de):N===null?n(N):Fe(N)?(u=we,ce(N)):(e.consume(N),we)}function fe(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||ct(N)?he(N):(e.consume(N),fe)}function de(N){return N===47||N===62||ct(N)?he(N):n(N)}function pe(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function ce(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),K}function K(N){return Ke(N)?Ze(e,ue,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ue(N)}function ue(N){return e.enter("htmlTextData"),u(N)}}const wf={name:"labelEnd",resolveAll:Ak,resolveTo:Nk,tokenize:Ck},wk={tokenize:kk},Sk={tokenize:Ok},vk={tokenize:Ik};function Ak(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&&Pn(e,0,e.length,n),e}function Nk(e,t){let n=e.length,r=0,s,a,u,l;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:U({},e[a][1].start),end:U({},e[e.length-1][1].end)},f={type:"label",start:U({},e[a][1].start),end:U({},e[u][1].end)},p={type:"labelText",start:U({},e[a+r+2][1].end),end:U({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=jn(l,e.slice(a+1,a+r+3)),l=jn(l,[["enter",p,t]]),l=jn(l,Ku(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=jn(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=jn(l,e.slice(u+1)),l=jn(l,[["exit",d,t]]),Pn(e,a,e.length,l),e}function Ck(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 l;function l(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(nr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(wk,p,u?p:m)(T):T===91?e.attempt(Sk,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(vk,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function kk(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 ct(m)?ra(e,a)(m):a(m)}function a(m){return m===41?p(m):$1(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ct(m)?ra(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?q1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ct(m)?ra(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 Ok(e,t,n){const r=this;return s;function s(l){return V1.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(nr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function Ik(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 Pk={name:"labelStartImage",resolveAll:wf.resolveAll,tokenize:Rk};function Rk(e,t,n){const r=this;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),u):n(l)}function u(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Lk={name:"labelStartLink",resolveAll:wf.resolveAll,tokenize:Dk};function Dk(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 Sf={name:"lineEnding",tokenize:Mk};function Mk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ze(e,t,"linePrefix")}}const Ju={name:"thematicBreak",tokenize:Fk};function Fk(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,l(f)}function l(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Fe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ke(f)?Ze(e,l,"whitespace")(f):l(f))}}const Tn={continuation:{tokenize:jk},exit:$k,name:"list",tokenize:Hk},Bk={partial:!0,tokenize:Vk},Uk={partial:!0,tokenize:zk};function Hk(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 l;function l(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:bf(y)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Ju,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(ta,r.interrupt?n:p,e.attempt(Bk,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Ke(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),T):n(y)}function T(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function jk(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ta,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ze(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Ke(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Uk,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ze(e,e.attempt(Tn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function zk(e,t,n){const r=this;return Ze(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 $k(e){e.exit(this.containerState.type)}function Vk(e,t,n){const r=this;return Ze(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!Ke(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const W1={name:"setextUnderline",resolveTo:qk,tokenize:Yk};function qk(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:U({},e[r][1].start),end:U({},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=U({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function Yk(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"),l(f)}function l(f){return f===s?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),Ke(f)?Ze(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Fe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const Wk={tokenize:Gk};function Gk(e){const t=this,n=e.attempt(ta,r,e.attempt(this.parser.constructs.flowInitial,s,Ze(e,e.attempt(this.parser.constructs.flow,s,e.attempt(ZC,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 Xk={resolveAll:X1()},Qk=G1("string"),Kk=G1("text");function G1(e){return{resolveAll:X1(e==="text"?Jk:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,l);return u;function u(p){return f(p)?a(p):l(p)}function l(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 T=-1;if(m)for(;++T<m.length;){const y=m[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function X1(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 Jk(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,l=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)l++,u--;if(u)break;u=-1}else if(f===-2)d=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||d||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:U({},r.end)};r.end=U({},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 Zk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:ik},disable:{null:[]},document:{42:Tn,43:Tn,45:Tn,48:Tn,49:Tn,50:Tn,51:Tn,52:Tn,53:Tn,54:Tn,55:Tn,56:Tn,57:Tn,62:F1},flow:{35:ck,42:Ju,45:[W1,Ju],60:pk,61:W1,95:Ju,96:j1,126:j1},flowInitial:{[-2]:xf,[-1]:xf,32:xf},insideSpan:{null:[_f,Xk]},string:{38:U1,92:B1},text:{[-5]:Sf,[-4]:Sf,[-3]:Sf,33:Pk,38:U1,42:_f,60:[LC,_k],91:Lk,92:[uk,B1],93:wf,95:_f,96:WC}},Symbol.toStringTag,{value:"Module"}));function e3(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=[],l=[];const d={attempt:W(Y),check:W(R),consume:C,enter:I,exit:j,interrupt:W(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:x,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(oe){return u=jn(u,oe),A(),u[u.length-1]!==null?[]:(se(t,0),f.events=Ku(a,f.events,f),f.events)}function T(oe,ee){return n3(y(oe),ee)}function y(oe){return t3(u,oe)}function x(){const{_bufferIndex:oe,_index:ee,line:we,column:fe,offset:de}=r;return{_bufferIndex:oe,_index:ee,line:we,column:fe,offset:de}}function v(oe){s[oe.line]=oe.column,$()}function A(){let oe;for(;r._index<u.length;){const ee=u[r._index];if(typeof ee=="string")for(oe=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===oe&&r._bufferIndex<ee.length;)S(ee.charCodeAt(r._bufferIndex));else S(ee)}}function S(oe){p=p(oe)}function C(oe){Fe(oe)?(r.line++,r.column=1,r.offset+=oe===-3?2:1,$()):oe!==-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=oe}function I(oe,ee){const we=ee||{};return we.type=oe,we.start=x(),f.events.push(["enter",we,f]),l.push(we),we}function j(oe){const ee=l.pop();return ee.end=x(),f.events.push(["exit",ee,f]),ee}function Y(oe,ee){se(oe,ee.from)}function R(oe,ee){ee.restore()}function W(oe,ee){return we;function we(fe,de,pe){let ce,K,ue,N;return Array.isArray(fe)?J(fe):"tokenize"in fe?J([fe]):M(fe);function M(xe){return ne;function ne(ye){const ie=ye!==null&&xe[ye],re=ye!==null&&xe.null,Ne=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(re)?re:re?[re]:[]];return J(Ne)(ye)}}function J(xe){return ce=xe,K=0,xe.length===0?pe:P(xe[K])}function P(xe){return ne;function ne(ye){return N=he(),ue=xe,xe.partial||(f.currentConstruct=xe),xe.name&&f.parser.constructs.disable.null.includes(xe.name)?De():xe.tokenize.call(ee?Object.assign(Object.create(f),ee):f,d,Se,De)(ye)}}function Se(xe){return oe(ue,N),de}function De(xe){return N.restore(),++K<ce.length?P(ce[K]):pe}}}function se(oe,ee){oe.resolveAll&&!a.includes(oe)&&a.push(oe),oe.resolve&&Pn(f.events,ee,f.events.length-ee,oe.resolve(f.events.slice(ee),f)),oe.resolveTo&&(f.events=oe.resolveTo(f.events,f))}function he(){const oe=x(),ee=f.previous,we=f.currentConstruct,fe=f.events.length,de=Array.from(l);return{from:fe,restore:pe};function pe(){r=oe,f.previous=ee,f.currentConstruct=we,f.events.length=fe,l=de,$()}}function $(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function t3(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 l=u[0];typeof l=="string"?u[0]=l.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function n3(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=`
23
+ `+b.stack}return{value:i,source:o,stack:E,digest:null}}function xm(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function wm(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var OB=typeof WeakMap=="function"?WeakMap:Map;function dw(i,o,c){c=Jr(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){Wc||(Wc=!0,Bm=h),wm(i,o)},c}function fw(i,o,c){c=Jr(-1,c),c.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;c.payload=function(){return h(E)},c.callback=function(){wm(i,o)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){wm(i,o),typeof h!="function"&&(Ci===null?Ci=new Set([this]):Ci.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})}),c}function hw(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new OB;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(c)||(E.add(c),i=VB.bind(null,i,o,c),o.then(i,i))}function pw(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 mw(i,o,c,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(o=Jr(-1,1),o.tag=2,Ni(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var IB=j.ReactCurrentOwner,An=!1;function fn(i,o,c,h){o.child=i===null?Dx(o,null,c,h):ko(o,i.child,c,h)}function gw(i,o,c,h,E){c=c.render;var b=o.ref;return Oo(o,E),h=pm(i,o,c,h,b,E),c=mm(),i!==null&&!An?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Zr(i,o,E)):(xt&&c&&Kp(o),o.flags|=1,fn(i,o,h,E),o.child)}function Ew(i,o,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!qm(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=b,yw(i,o,b,h,E)):(i=Zc(c.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(b=i.child,(i.lanes&E)===0){var w=b.memoizedProps;if(c=c.compare,c=c!==null?c:Wa,c(w,h)&&i.ref===o.ref)return Zr(i,o,E)}return o.flags|=1,i=Ri(b,h),i.ref=o.ref,i.return=o,o.child=i}function yw(i,o,c,h,E){if(i!==null){var b=i.memoizedProps;if(Wa(b,h)&&i.ref===o.ref)if(An=!1,o.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(An=!0);else return o.lanes=i.lanes,Zr(i,o,E)}return Sm(i,o,c,h,E)}function Tw(i,o,c){var h=o.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},ht(Lo,Un),Un|=c;else{if((c&1073741824)===0)return i=b!==null?b.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,ht(Lo,Un),Un|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,ht(Lo,Un),Un|=h}else b!==null?(h=b.baseLanes|c,o.memoizedState=null):h=c,ht(Lo,Un),Un|=h;return fn(i,o,E,c),o.child}function bw(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function Sm(i,o,c,h,E){var b=vn(c)?fs:sn.current;return b=So(o,b),Oo(o,E),c=pm(i,o,c,h,b,E),h=mm(),i!==null&&!An?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,Zr(i,o,E)):(xt&&h&&Kp(o),o.flags|=1,fn(i,o,c,E),o.child)}function _w(i,o,c,h,E){if(vn(c)){var b=!0;Sc(o)}else b=!1;if(Oo(o,E),o.stateNode===null)zc(i,o),lw(o,c,h),_m(o,c,h,E),h=!0;else if(i===null){var w=o.stateNode,M=o.memoizedProps;w.props=M;var z=w.context,Z=c.contextType;typeof Z=="object"&&Z!==null?Z=Wn(Z):(Z=vn(c)?fs:sn.current,Z=So(o,Z));var ge=c.getDerivedStateFromProps,Te=typeof ge=="function"||typeof w.getSnapshotBeforeUpdate=="function";Te||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==h||z!==Z)&&cw(o,w,h,Z),Ai=!1;var pe=o.memoizedState;w.state=pe,Rc(o,h,w,E),z=o.memoizedState,M!==h||pe!==z||Sn.current||Ai?(typeof ge=="function"&&(bm(o,c,ge,h),z=o.memoizedState),(M=Ai||uw(o,c,M,h,pe,z,Z))?(Te||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(o.flags|=4194308)):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=z),w.props=h,w.state=z,w.context=Z,h=M):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{w=o.stateNode,Fx(i,o),M=o.memoizedProps,Z=o.type===o.elementType?M:fr(o.type,M),w.props=Z,Te=o.pendingProps,pe=w.context,z=c.contextType,typeof z=="object"&&z!==null?z=Wn(z):(z=vn(c)?fs:sn.current,z=So(o,z));var ke=c.getDerivedStateFromProps;(ge=typeof ke=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==Te||pe!==z)&&cw(o,w,h,z),Ai=!1,pe=o.memoizedState,w.state=pe,Rc(o,h,w,E);var Ie=o.memoizedState;M!==Te||pe!==Ie||Sn.current||Ai?(typeof ke=="function"&&(bm(o,c,ke,h),Ie=o.memoizedState),(Z=Ai||uw(o,c,Z,h,pe,Ie,z)||!1)?(ge||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(h,Ie,z),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(h,Ie,z)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Ie),w.props=h,w.state=Ie,w.context=z,h=Z):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),h=!1)}return vm(i,o,c,h,b,E)}function vm(i,o,c,h,E,b){bw(i,o);var w=(o.flags&128)!==0;if(!h&&!w)return E&&Ax(o,c,!1),Zr(i,o,b);h=o.stateNode,IB.current=o;var M=w&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&w?(o.child=ko(o,i.child,null,b),o.child=ko(o,null,M,b)):fn(i,o,M,b),o.memoizedState=h.state,E&&Ax(o,c,!0),o.child}function xw(i){var o=i.stateNode;o.pendingContext?Sx(i,o.pendingContext,o.pendingContext!==o.context):o.context&&Sx(i,o.context,!1),um(i,o.containerInfo)}function ww(i,o,c,h,E){return No(),tm(E),o.flags|=256,fn(i,o,c,h),o.child}var Am={dehydrated:null,treeContext:null,retryLane:0};function Nm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Sw(i,o,c){var h=o.pendingProps,E=wt.current,b=!1,w=(o.flags&128)!==0,M;if((M=w)||(M=i!==null&&i.memoizedState===null?!1:(E&2)!==0),M?(b=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),ht(wt,E&1),i===null)return em(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):(w=h.children,i=h.fallback,b?(h=o.mode,b=o.child,w={mode:"hidden",children:w},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=w):b=ed(w,h,0,null),i=xs(i,h,c,null),b.return=o,i.return=o,b.sibling=i,o.child=b,o.child.memoizedState=Nm(c),o.memoizedState=Am,i):km(o,w));if(E=i.memoizedState,E!==null&&(M=E.dehydrated,M!==null))return PB(i,o,w,h,M,E,c);if(b){b=h.fallback,w=o.mode,E=i.child,M=E.sibling;var z={mode:"hidden",children:h.children};return(w&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=z,o.deletions=null):(h=Ri(E,z),h.subtreeFlags=E.subtreeFlags&14680064),M!==null?b=Ri(M,b):(b=xs(b,w,c,null),b.flags|=2),b.return=o,h.return=o,h.sibling=b,o.child=h,h=b,b=o.child,w=i.child.memoizedState,w=w===null?Nm(c):{baseLanes:w.baseLanes|c,cachePool:null,transitions:w.transitions},b.memoizedState=w,b.childLanes=i.childLanes&~c,o.memoizedState=Am,h}return b=i.child,i=b.sibling,h=Ri(b,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=c),h.return=o,h.sibling=null,i!==null&&(c=o.deletions,c===null?(o.deletions=[i],o.flags|=16):c.push(i)),o.child=h,o.memoizedState=null,h}function km(i,o){return o=ed({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function jc(i,o,c,h){return h!==null&&tm(h),ko(o,i.child,null,c),i=km(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function PB(i,o,c,h,E,b,w){if(c)return o.flags&256?(o.flags&=-257,h=xm(Error(n(422))),jc(i,o,w,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(b=h.fallback,E=o.mode,h=ed({mode:"visible",children:h.children},E,0,null),b=xs(b,E,w,null),b.flags|=2,h.return=o,b.return=o,h.sibling=b,o.child=h,(o.mode&1)!==0&&ko(o,i.child,null,w),o.child.memoizedState=Nm(w),o.memoizedState=Am,b);if((o.mode&1)===0)return jc(i,o,w,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var M=h.dgst;return h=M,b=Error(n(419)),h=xm(b,h,void 0),jc(i,o,w,h)}if(M=(w&i.childLanes)!==0,An||M){if(h=Vt,h!==null){switch(w&-w){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|w))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,Kr(i,E),mr(h,i,E,-1))}return Vm(),h=xm(Error(n(421))),jc(i,o,w,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=qB.bind(null,i),E._reactRetry=o,null):(i=b.treeContext,Bn=xi(E.nextSibling),Fn=o,xt=!0,dr=null,i!==null&&(qn[Yn++]=Xr,qn[Yn++]=Qr,qn[Yn++]=hs,Xr=i.id,Qr=i.overflow,hs=o),o=km(o,h.children),o.flags|=4096,o)}function vw(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),sm(i.return,o,c)}function Cm(i,o,c,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(b.isBackwards=o,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=c,b.tailMode=E)}function Aw(i,o,c){var h=o.pendingProps,E=h.revealOrder,b=h.tail;if(fn(i,o,h.children,c),h=wt.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&&vw(i,c,o);else if(i.tag===19)vw(i,c,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(ht(wt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(c=o.child,E=null;c!==null;)i=c.alternate,i!==null&&Lc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),Cm(o,!1,E,c,b);break;case"backwards":for(c=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Lc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Cm(o,!0,c,null,b);break;case"together":Cm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function zc(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function Zr(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),ys|=o.lanes,(c&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,c=Ri(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=Ri(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function RB(i,o,c){switch(o.tag){case 3:xw(o),No();break;case 5:Hx(o);break;case 1:vn(o.type)&&Sc(o);break;case 4:um(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;ht(Oc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(ht(wt,wt.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?Sw(i,o,c):(ht(wt,wt.current&1),i=Zr(i,o,c),i!==null?i.sibling:null);ht(wt,wt.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return Aw(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ht(wt,wt.current),h)break;return null;case 22:case 23:return o.lanes=0,Tw(i,o,c)}return Zr(i,o,c)}var Nw,Om,kw,Cw;Nw=function(i,o){for(var c=o.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Om=function(){},kw=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,gs(Lr.current);var b=null;switch(c){case"input":E=We(i,E),h=We(i,h),b=[];break;case"select":E=N({},E,{value:void 0}),h=N({},h,{value:void 0}),b=[];break;case"textarea":E=ur(i,E),h=ur(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=_c)}Xt(c,h);var w;c=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var M=E[Z];for(w in M)M.hasOwnProperty(w)&&(c||(c={}),c[w]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(s.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in h){var z=h[Z];if(M=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&z!==M&&(z!=null||M!=null))if(Z==="style")if(M){for(w in M)!M.hasOwnProperty(w)||z&&z.hasOwnProperty(w)||(c||(c={}),c[w]="");for(w in z)z.hasOwnProperty(w)&&M[w]!==z[w]&&(c||(c={}),c[w]=z[w])}else c||(b||(b=[]),b.push(Z,c)),c=z;else Z==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,M=M?M.__html:void 0,z!=null&&M!==z&&(b=b||[]).push(Z,z)):Z==="children"?typeof z!="string"&&typeof z!="number"||(b=b||[]).push(Z,""+z):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?(z!=null&&Z==="onScroll"&&yt("scroll",i),b||M===z||(b=[])):(b=b||[]).push(Z,z))}c&&(b=b||[]).push("style",c);var Z=b;(o.updateQueue=Z)&&(o.flags|=4)}},Cw=function(i,o,c,h){c!==h&&(o.flags|=4)};function uu(i,o){if(!xt)switch(i.tailMode){case"hidden":o=i.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function an(i){var o=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(o)for(var E=i.child;E!==null;)c|=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;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=c,o}function LB(i,o,c){var h=o.pendingProps;switch(Jp(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(o),null;case 1:return vn(o.type)&&wc(),an(o),null;case 3:return h=o.stateNode,Io(),Tt(Sn),Tt(sn),dm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(kc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,dr!==null&&(jm(dr),dr=null))),Om(i,o),an(o),null;case 5:lm(o);var E=gs(ru.current);if(c=o.type,i!==null&&o.stateNode!=null)kw(i,o,c,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return an(o),null}if(i=gs(Lr.current),kc(o)){h=o.stateNode,c=o.type;var b=o.memoizedProps;switch(h[Rr]=o,h[Ja]=b,i=(o.mode&1)!==0,c){case"dialog":yt("cancel",h),yt("close",h);break;case"iframe":case"object":case"embed":yt("load",h);break;case"video":case"audio":for(E=0;E<Xa.length;E++)yt(Xa[E],h);break;case"source":yt("error",h);break;case"img":case"image":case"link":yt("error",h),yt("load",h);break;case"details":yt("toggle",h);break;case"input":Ze(h,b),yt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},yt("invalid",h);break;case"textarea":Kl(h,b),yt("invalid",h)}Xt(c,b),E=null;for(var w in b)if(b.hasOwnProperty(w)){var M=b[w];w==="children"?typeof M=="string"?h.textContent!==M&&(b.suppressHydrationWarning!==!0&&bc(h.textContent,M,i),E=["children",M]):typeof M=="number"&&h.textContent!==""+M&&(b.suppressHydrationWarning!==!0&&bc(h.textContent,M,i),E=["children",""+M]):s.hasOwnProperty(w)&&M!=null&&w==="onScroll"&&yt("scroll",h)}switch(c){case"input":$e(h),Ln(h,b,!0);break;case"textarea":$e(h),Zl(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=_c)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{w=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=oe(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=w.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=w.createElement(c,{is:h.is}):(i=w.createElement(c),c==="select"&&(w=i,h.multiple?w.multiple=!0:h.size&&(w.size=h.size))):i=w.createElementNS(i,c),i[Rr]=o,i[Ja]=h,Nw(i,o,!1,!1),o.stateNode=i;e:{switch(w=Ir(c,h),c){case"dialog":yt("cancel",i),yt("close",i),E=h;break;case"iframe":case"object":case"embed":yt("load",i),E=h;break;case"video":case"audio":for(E=0;E<Xa.length;E++)yt(Xa[E],i);E=h;break;case"source":yt("error",i),E=h;break;case"img":case"image":case"link":yt("error",i),yt("load",i),E=h;break;case"details":yt("toggle",i),E=h;break;case"input":Ze(i,h),E=We(i,h),yt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=N({},h,{value:void 0}),yt("invalid",i);break;case"textarea":Kl(i,h),E=ur(i,h),yt("invalid",i);break;default:E=h}Xt(c,E),M=E;for(b in M)if(M.hasOwnProperty(b)){var z=M[b];b==="style"?mi(i,z):b==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&Qe(i,z)):b==="children"?typeof z=="string"?(c!=="textarea"||z!=="")&&nt(i,z):typeof z=="number"&&nt(i,""+z):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?z!=null&&b==="onScroll"&&yt("scroll",i):z!=null&&I(i,b,z,w))}switch(c){case"input":$e(i),Ln(i,h,!1);break;case"textarea":$e(i),Zl(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ee(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?Or(i,!!h.multiple,b,!1):h.defaultValue!=null&&Or(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=_c)}switch(c){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 an(o),null;case 6:if(i&&o.stateNode!=null)Cw(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=gs(ru.current),gs(Lr.current),kc(o)){if(h=o.stateNode,c=o.memoizedProps,h[Rr]=o,(b=h.nodeValue!==c)&&(i=Fn,i!==null))switch(i.tag){case 3:bc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&bc(h.nodeValue,c,(i.mode&1)!==0)}b&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Rr]=o,o.stateNode=h}return an(o),null;case 13:if(Tt(wt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(xt&&Bn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)Px(),No(),o.flags|=98560,b=!1;else if(b=kc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Rr]=o}else No(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;an(o),b=!1}else dr!==null&&(jm(dr),dr=null),b=!0;if(!b)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=c,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(wt.current&1)!==0?Bt===0&&(Bt=3):Vm())),o.updateQueue!==null&&(o.flags|=4),an(o),null);case 4:return Io(),Om(i,o),i===null&&Qa(o.stateNode.containerInfo),an(o),null;case 10:return im(o.type._context),an(o),null;case 17:return vn(o.type)&&wc(),an(o),null;case 19:if(Tt(wt),b=o.memoizedState,b===null)return an(o),null;if(h=(o.flags&128)!==0,w=b.rendering,w===null)if(h)uu(b,!1);else{if(Bt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(w=Lc(i),w!==null){for(o.flags|=128,uu(b,!1),h=w.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)b=c,i=h,b.flags&=14680066,w=b.alternate,w===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=w.childLanes,b.lanes=w.lanes,b.child=w.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=w.memoizedProps,b.memoizedState=w.memoizedState,b.updateQueue=w.updateQueue,b.type=w.type,i=w.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return ht(wt,wt.current&1|2),o.child}i=i.sibling}b.tail!==null&&Ct()>Do&&(o.flags|=128,h=!0,uu(b,!1),o.lanes=4194304)}else{if(!h)if(i=Lc(w),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),uu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!w.alternate&&!xt)return an(o),null}else 2*Ct()-b.renderingStartTime>Do&&c!==1073741824&&(o.flags|=128,h=!0,uu(b,!1),o.lanes=4194304);b.isBackwards?(w.sibling=o.child,o.child=w):(c=b.last,c!==null?c.sibling=w:o.child=w,b.last=w)}return b.tail!==null?(o=b.tail,b.rendering=o,b.tail=o.sibling,b.renderingStartTime=Ct(),o.sibling=null,c=wt.current,ht(wt,h?c&1|2:c&1),o):(an(o),null);case 22:case 23:return $m(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Un&1073741824)!==0&&(an(o),o.subtreeFlags&6&&(o.flags|=8192)):an(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function DB(i,o){switch(Jp(o),o.tag){case 1:return vn(o.type)&&wc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Io(),Tt(Sn),Tt(sn),dm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return lm(o),null;case 13:if(Tt(wt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));No()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return Tt(wt),null;case 4:return Io(),null;case 10:return im(o.type._context),null;case 22:case 23:return $m(),null;case 24:return null;default:return null}}var $c=!1,un=!1,MB=typeof WeakSet=="function"?WeakSet:Set,Oe=null;function Ro(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){At(i,o,h)}else c.current=null}function Im(i,o,c){try{c()}catch(h){At(i,o,h)}}var Ow=!1;function FB(i,o){if($p=lc,i=ux(),Dp(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var E=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{c.nodeType,b.nodeType}catch(we){c=null;break e}var w=0,M=-1,z=-1,Z=0,ge=0,Te=i,pe=null;t:for(;;){for(var ke;Te!==c||E!==0&&Te.nodeType!==3||(M=w+E),Te!==b||h!==0&&Te.nodeType!==3||(z=w+h),Te.nodeType===3&&(w+=Te.nodeValue.length),(ke=Te.firstChild)!==null;)pe=Te,Te=ke;for(;;){if(Te===i)break t;if(pe===c&&++Z===E&&(M=w),pe===b&&++ge===h&&(z=w),(ke=Te.nextSibling)!==null)break;Te=pe,pe=Te.parentNode}Te=ke}c=M===-1||z===-1?null:{start:M,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for(Vp={focusedElem:i,selectionRange:c},lc=!1,Oe=o;Oe!==null;)if(o=Oe,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Oe=i;else for(;Oe!==null;){o=Oe;try{var Ie=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Ie!==null){var Re=Ie.memoizedProps,Ot=Ie.memoizedState,G=o.stateNode,V=G.getSnapshotBeforeUpdate(o.elementType===o.type?Re:fr(o.type,Re),Ot);G.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var Q=o.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(we){At(o,o.return,we)}if(i=o.sibling,i!==null){i.return=o.return,Oe=i;break}Oe=o.return}return Ie=Ow,Ow=!1,Ie}function lu(i,o,c){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 b=E.destroy;E.destroy=void 0,b!==void 0&&Im(o,c,b)}E=E.next}while(E!==h)}}function Vc(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&i)===i){var h=c.create;c.destroy=h()}c=c.next}while(c!==o)}}function Pm(i){var o=i.ref;if(o!==null){var c=i.stateNode;i.tag,i=c,typeof o=="function"?o(i):o.current=i}}function Iw(i){var o=i.alternate;o!==null&&(i.alternate=null,Iw(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Rr],delete o[Ja],delete o[Gp],delete o[TB],delete o[bB])),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 Pw(i){return i.tag===5||i.tag===3||i.tag===4}function Rw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Pw(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 Rm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.nodeType===8?c.parentNode.insertBefore(i,o):c.insertBefore(i,o):(c.nodeType===8?(o=c.parentNode,o.insertBefore(i,c)):(o=c,o.appendChild(i)),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=_c));else if(h!==4&&(i=i.child,i!==null))for(Rm(i,o,c),i=i.sibling;i!==null;)Rm(i,o,c),i=i.sibling}function Lm(i,o,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Lm(i,o,c),i=i.sibling;i!==null;)Lm(i,o,c),i=i.sibling}var Qt=null,hr=!1;function ki(i,o,c){for(c=c.child;c!==null;)Lw(i,o,c),c=c.sibling}function Lw(i,o,c){if(Pr&&typeof Pr.onCommitFiberUnmount=="function")try{Pr.onCommitFiberUnmount(rc,c)}catch(M){}switch(c.tag){case 5:un||Ro(c,o);case 6:var h=Qt,E=hr;Qt=null,ki(i,o,c),Qt=h,hr=E,Qt!==null&&(hr?(i=Qt,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):Qt.removeChild(c.stateNode));break;case 18:Qt!==null&&(hr?(i=Qt,c=c.stateNode,i.nodeType===8?Wp(i.parentNode,c):i.nodeType===1&&Wp(i,c),ja(i)):Wp(Qt,c.stateNode));break;case 4:h=Qt,E=hr,Qt=c.stateNode.containerInfo,hr=!0,ki(i,o,c),Qt=h,hr=E;break;case 0:case 11:case 14:case 15:if(!un&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,w=b.destroy;b=b.tag,w!==void 0&&((b&2)!==0||(b&4)!==0)&&Im(c,o,w),E=E.next}while(E!==h)}ki(i,o,c);break;case 1:if(!un&&(Ro(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(M){At(c,o,M)}ki(i,o,c);break;case 21:ki(i,o,c);break;case 22:c.mode&1?(un=(h=un)||c.memoizedState!==null,ki(i,o,c),un=h):ki(i,o,c);break;default:ki(i,o,c)}}function Dw(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new MB),o.forEach(function(h){var E=YB.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function pr(i,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var b=i,w=o,M=w;e:for(;M!==null;){switch(M.tag){case 5:Qt=M.stateNode,hr=!1;break e;case 3:Qt=M.stateNode.containerInfo,hr=!0;break e;case 4:Qt=M.stateNode.containerInfo,hr=!0;break e}M=M.return}if(Qt===null)throw Error(n(160));Lw(b,w,E),Qt=null,hr=!1;var z=E.alternate;z!==null&&(z.return=null),E.return=null}catch(Z){At(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Mw(o,i),o=o.sibling}function Mw(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(pr(o,i),Mr(i),h&4){try{lu(3,i,i.return),Vc(3,i)}catch(Re){At(i,i.return,Re)}try{lu(5,i,i.return)}catch(Re){At(i,i.return,Re)}}break;case 1:pr(o,i),Mr(i),h&512&&c!==null&&Ro(c,c.return);break;case 5:if(pr(o,i),Mr(i),h&512&&c!==null&&Ro(c,c.return),i.flags&32){var E=i.stateNode;try{nt(E,"")}catch(Re){At(i,i.return,Re)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,w=c!==null?c.memoizedProps:b,M=i.type,z=i.updateQueue;if(i.updateQueue=null,z!==null)try{M==="input"&&b.type==="radio"&&b.name!=null&&Pe(E,b),Ir(M,w);var Z=Ir(M,b);for(w=0;w<z.length;w+=2){var ge=z[w],Te=z[w+1];ge==="style"?mi(E,Te):ge==="dangerouslySetInnerHTML"?Qe(E,Te):ge==="children"?nt(E,Te):I(E,ge,Te,Z)}switch(M){case"input":Et(E,b);break;case"textarea":Jl(E,b);break;case"select":var pe=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var ke=b.value;ke!=null?Or(E,!!b.multiple,ke,!1):pe!==!!b.multiple&&(b.defaultValue!=null?Or(E,!!b.multiple,b.defaultValue,!0):Or(E,!!b.multiple,b.multiple?[]:"",!1))}E[Ja]=b}catch(Re){At(i,i.return,Re)}}break;case 6:if(pr(o,i),Mr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Re){At(i,i.return,Re)}}break;case 3:if(pr(o,i),Mr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{ja(o.containerInfo)}catch(Re){At(i,i.return,Re)}break;case 4:pr(o,i),Mr(i);break;case 13:pr(o,i),Mr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(Fm=Ct())),h&4&&Dw(i);break;case 22:if(ge=c!==null&&c.memoizedState!==null,i.mode&1?(un=(Z=un)||ge,pr(o,i),un=Z):pr(o,i),Mr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!ge&&(i.mode&1)!==0)for(Oe=i,ge=i.child;ge!==null;){for(Te=Oe=ge;Oe!==null;){switch(pe=Oe,ke=pe.child,pe.tag){case 0:case 11:case 14:case 15:lu(4,pe,pe.return);break;case 1:Ro(pe,pe.return);var Ie=pe.stateNode;if(typeof Ie.componentWillUnmount=="function"){h=pe,c=pe.return;try{o=h,Ie.props=o.memoizedProps,Ie.state=o.memoizedState,Ie.componentWillUnmount()}catch(Re){At(h,c,Re)}}break;case 5:Ro(pe,pe.return);break;case 22:if(pe.memoizedState!==null){Uw(Te);continue}}ke!==null?(ke.return=pe,Oe=ke):Uw(Te)}ge=ge.sibling}e:for(ge=null,Te=i;;){if(Te.tag===5){if(ge===null){ge=Te;try{E=Te.stateNode,Z?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(M=Te.stateNode,z=Te.memoizedProps.style,w=z!=null&&z.hasOwnProperty("display")?z.display:null,M.style.display=Vn("display",w))}catch(Re){At(i,i.return,Re)}}}else if(Te.tag===6){if(ge===null)try{Te.stateNode.nodeValue=Z?"":Te.memoizedProps}catch(Re){At(i,i.return,Re)}}else if((Te.tag!==22&&Te.tag!==23||Te.memoizedState===null||Te===i)&&Te.child!==null){Te.child.return=Te,Te=Te.child;continue}if(Te===i)break e;for(;Te.sibling===null;){if(Te.return===null||Te.return===i)break e;ge===Te&&(ge=null),Te=Te.return}ge===Te&&(ge=null),Te.sibling.return=Te.return,Te=Te.sibling}}break;case 19:pr(o,i),Mr(i),h&4&&Dw(i);break;case 21:break;default:pr(o,i),Mr(i)}}function Mr(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(Pw(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(nt(E,""),h.flags&=-33);var b=Rw(i);Lm(i,b,E);break;case 3:case 4:var w=h.stateNode.containerInfo,M=Rw(i);Rm(i,M,w);break;default:throw Error(n(161))}}catch(z){At(i,i.return,z)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function BB(i,o,c){Oe=i,Fw(i)}function Fw(i,o,c){for(var h=(i.mode&1)!==0;Oe!==null;){var E=Oe,b=E.child;if(E.tag===22&&h){var w=E.memoizedState!==null||$c;if(!w){var M=E.alternate,z=M!==null&&M.memoizedState!==null||un;M=$c;var Z=un;if($c=w,(un=z)&&!Z)for(Oe=E;Oe!==null;)w=Oe,z=w.child,w.tag===22&&w.memoizedState!==null?Hw(E):z!==null?(z.return=w,Oe=z):Hw(E);for(;b!==null;)Oe=b,Fw(b),b=b.sibling;Oe=E,$c=M,un=Z}Bw(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Oe=b):Bw(i)}}function Bw(i){for(;Oe!==null;){var o=Oe;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:un||Vc(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!un)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:fr(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=o.updateQueue;b!==null&&Ux(o,b,h);break;case 3:var w=o.updateQueue;if(w!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}Ux(o,w,c)}break;case 5:var M=o.stateNode;if(c===null&&o.flags&4){c=M;var z=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&c.focus();break;case"img":z.src&&(c.src=z.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 ge=Z.memoizedState;if(ge!==null){var Te=ge.dehydrated;Te!==null&&ja(Te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}un||o.flags&512&&Pm(o)}catch(pe){At(o,o.return,pe)}}if(o===i){Oe=null;break}if(c=o.sibling,c!==null){c.return=o.return,Oe=c;break}Oe=o.return}}function Uw(i){for(;Oe!==null;){var o=Oe;if(o===i){Oe=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Oe=c;break}Oe=o.return}}function Hw(i){for(;Oe!==null;){var o=Oe;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{Vc(4,o)}catch(z){At(o,c,z)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(z){At(o,E,z)}}var b=o.return;try{Pm(o)}catch(z){At(o,b,z)}break;case 5:var w=o.return;try{Pm(o)}catch(z){At(o,w,z)}}}catch(z){At(o,o.return,z)}if(o===i){Oe=null;break}var M=o.sibling;if(M!==null){M.return=o.return,Oe=M;break}Oe=o.return}}var UB=Math.ceil,qc=j.ReactCurrentDispatcher,Dm=j.ReactCurrentOwner,Xn=j.ReactCurrentBatchConfig,rt=0,Vt=null,Lt=null,Kt=0,Un=0,Lo=wi(0),Bt=0,cu=null,ys=0,Yc=0,Mm=0,du=null,Nn=null,Fm=0,Do=1/0,ei=null,Wc=!1,Bm=null,Ci=null,Gc=!1,Oi=null,Xc=0,fu=0,Um=null,Qc=-1,Kc=0;function hn(){return(rt&6)!==0?Ct():Qc!==-1?Qc:Qc=Ct()}function Ii(i){return(i.mode&1)===0?1:(rt&2)!==0&&Kt!==0?Kt&-Kt:xB.transition!==null?(Kc===0&&(Kc=R_()),Kc):(i=ut,i!==0||(i=window.event,i=i===void 0?16:z_(i.type)),i)}function mr(i,o,c,h){if(50<fu)throw fu=0,Um=null,Error(n(185));Ma(i,c,h),((rt&2)===0||i!==Vt)&&(i===Vt&&((rt&2)===0&&(Yc|=c),Bt===4&&Pi(i,Kt)),kn(i,h),c===1&&rt===0&&(o.mode&1)===0&&(Do=Ct()+500,vc&&vi()))}function kn(i,o){var c=i.callbackNode;xF(i,o);var h=oc(i,i===Vt?Kt:0);if(h===0)c!==null&&O_(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&O_(c),o===1)i.tag===0?_B(zw.bind(null,i)):Nx(zw.bind(null,i)),EB(function(){(rt&6)===0&&vi()}),c=null;else{switch(L_(h)){case 1:c=yp;break;case 4:c=I_;break;case 16:c=nc;break;case 536870912:c=P_;break;default:c=nc}c=Qw(c,jw.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function jw(i,o){if(Qc=-1,Kc=0,(rt&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Mo()&&i.callbackNode!==c)return null;var h=oc(i,i===Vt?Kt:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=Jc(i,h);else{o=h;var E=rt;rt|=2;var b=Vw();(Vt!==i||Kt!==o)&&(ei=null,Do=Ct()+500,bs(i,o));do try{zB();break}catch(M){$w(i,M)}while(!0);rm(),qc.current=b,rt=E,Lt!==null?o=0:(Vt=null,Kt=0,o=Bt)}if(o!==0){if(o===2&&(E=Tp(i),E!==0&&(h=E,o=Hm(i,E))),o===1)throw c=cu,bs(i,0),Pi(i,h),kn(i,Ct()),c;if(o===6)Pi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!HB(E)&&(o=Jc(i,h),o===2&&(b=Tp(i),b!==0&&(h=b,o=Hm(i,b))),o===1))throw c=cu,bs(i,0),Pi(i,h),kn(i,Ct()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:_s(i,Nn,ei);break;case 3:if(Pi(i,h),(h&130023424)===h&&(o=Fm+500-Ct(),10<o)){if(oc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){hn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Yp(_s.bind(null,i,Nn,ei),o);break}_s(i,Nn,ei);break;case 4:if(Pi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var w=31-lr(h);b=1<<w,w=o[w],w>E&&(E=w),h&=~b}if(h=E,h=Ct()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*UB(h/1960))-h,10<h){i.timeoutHandle=Yp(_s.bind(null,i,Nn,ei),h);break}_s(i,Nn,ei);break;case 5:_s(i,Nn,ei);break;default:throw Error(n(329))}}}return kn(i,Ct()),i.callbackNode===c?jw.bind(null,i):null}function Hm(i,o){var c=du;return i.current.memoizedState.isDehydrated&&(bs(i,o).flags|=256),i=Jc(i,o),i!==2&&(o=Nn,Nn=c,o!==null&&jm(o)),i}function jm(i){Nn===null?Nn=i:Nn.push.apply(Nn,i)}function HB(i){for(var o=i;;){if(o.flags&16384){var c=o.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var E=c[h],b=E.getSnapshot;E=E.value;try{if(!cr(b(),E))return!1}catch(w){return!1}}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;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 Pi(i,o){for(o&=~Mm,o&=~Yc,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-lr(o),h=1<<c;i[c]=-1,o&=~h}}function zw(i){if((rt&6)!==0)throw Error(n(327));Mo();var o=oc(i,0);if((o&1)===0)return kn(i,Ct()),null;var c=Jc(i,o);if(i.tag!==0&&c===2){var h=Tp(i);h!==0&&(o=h,c=Hm(i,h))}if(c===1)throw c=cu,bs(i,0),Pi(i,o),kn(i,Ct()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,_s(i,Nn,ei),kn(i,Ct()),null}function zm(i,o){var c=rt;rt|=1;try{return i(o)}finally{rt=c,rt===0&&(Do=Ct()+500,vc&&vi())}}function Ts(i){Oi!==null&&Oi.tag===0&&(rt&6)===0&&Mo();var o=rt;rt|=1;var c=Xn.transition,h=ut;try{if(Xn.transition=null,ut=1,i)return i()}finally{ut=h,Xn.transition=c,rt=o,(rt&6)===0&&vi()}}function $m(){Un=Lo.current,Tt(Lo)}function bs(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,gB(c)),Lt!==null)for(c=Lt.return;c!==null;){var h=c;switch(Jp(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&wc();break;case 3:Io(),Tt(Sn),Tt(sn),dm();break;case 5:lm(h);break;case 4:Io();break;case 13:Tt(wt);break;case 19:Tt(wt);break;case 10:im(h.type._context);break;case 22:case 23:$m()}c=c.return}if(Vt=i,Lt=i=Ri(i.current,null),Kt=Un=o,Bt=0,cu=null,Mm=Yc=ys=0,Nn=du=null,ms!==null){for(o=0;o<ms.length;o++)if(c=ms[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var w=b.next;b.next=E,h.next=w}c.pending=h}ms=null}return i}function $w(i,o){do{var c=Lt;try{if(rm(),Dc.current=Uc,Mc){for(var h=St.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Mc=!1}if(Es=0,$t=Ft=St=null,iu=!1,su=0,Dm.current=null,c===null||c.return===null){Bt=1,cu=o,Lt=null;break}e:{var b=i,w=c.return,M=c,z=o;if(o=Kt,M.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var Z=z,ge=M,Te=ge.tag;if((ge.mode&1)===0&&(Te===0||Te===11||Te===15)){var pe=ge.alternate;pe?(ge.updateQueue=pe.updateQueue,ge.memoizedState=pe.memoizedState,ge.lanes=pe.lanes):(ge.updateQueue=null,ge.memoizedState=null)}var ke=pw(w);if(ke!==null){ke.flags&=-257,mw(ke,w,M,b,o),ke.mode&1&&hw(b,Z,o),o=ke,z=Z;var Ie=o.updateQueue;if(Ie===null){var Re=new Set;Re.add(z),o.updateQueue=Re}else Ie.add(z);break e}else{if((o&1)===0){hw(b,Z,o),Vm();break e}z=Error(n(426))}}else if(xt&&M.mode&1){var Ot=pw(w);if(Ot!==null){(Ot.flags&65536)===0&&(Ot.flags|=256),mw(Ot,w,M,b,o),tm(Po(z,M));break e}}b=z=Po(z,M),Bt!==4&&(Bt=2),du===null?du=[b]:du.push(b),b=w;do{switch(b.tag){case 3:b.flags|=65536,o&=-o,b.lanes|=o;var G=dw(b,z,o);Bx(b,G);break e;case 1:M=z;var V=b.type,Q=b.stateNode;if((b.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(Ci===null||!Ci.has(Q)))){b.flags|=65536,o&=-o,b.lanes|=o;var we=fw(b,M,o);Bx(b,we);break e}}b=b.return}while(b!==null)}Yw(c)}catch(Le){o=Le,Lt===c&&c!==null&&(Lt=c=c.return);continue}break}while(!0)}function Vw(){var i=qc.current;return qc.current=Uc,i===null?Uc:i}function Vm(){(Bt===0||Bt===3||Bt===2)&&(Bt=4),Vt===null||(ys&268435455)===0&&(Yc&268435455)===0||Pi(Vt,Kt)}function Jc(i,o){var c=rt;rt|=2;var h=Vw();(Vt!==i||Kt!==o)&&(ei=null,bs(i,o));do try{jB();break}catch(E){$w(i,E)}while(!0);if(rm(),rt=c,qc.current=h,Lt!==null)throw Error(n(261));return Vt=null,Kt=0,Bt}function jB(){for(;Lt!==null;)qw(Lt)}function zB(){for(;Lt!==null&&!hF();)qw(Lt)}function qw(i){var o=Xw(i.alternate,i,Un);i.memoizedProps=i.pendingProps,o===null?Yw(i):Lt=o,Dm.current=null}function Yw(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=LB(c,o,Un),c!==null){Lt=c;return}}else{if(c=DB(c,o),c!==null){c.flags&=32767,Lt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Bt=6,Lt=null;return}}if(o=o.sibling,o!==null){Lt=o;return}Lt=o=i}while(o!==null);Bt===0&&(Bt=5)}function _s(i,o,c){var h=ut,E=Xn.transition;try{Xn.transition=null,ut=1,$B(i,o,c,h)}finally{Xn.transition=E,ut=h}return null}function $B(i,o,c,h){do Mo();while(Oi!==null);if((rt&6)!==0)throw Error(n(327));c=i.finishedWork;var E=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=c.lanes|c.childLanes;if(wF(i,b),i===Vt&&(Lt=Vt=null,Kt=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Gc||(Gc=!0,Qw(nc,function(){return Mo(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=Xn.transition,Xn.transition=null;var w=ut;ut=1;var M=rt;rt|=4,Dm.current=null,FB(i,c),Mw(c,i),lB(Vp),lc=!!$p,Vp=$p=null,i.current=c,BB(c),pF(),rt=M,ut=w,Xn.transition=b}else i.current=c;if(Gc&&(Gc=!1,Oi=i,Xc=E),b=i.pendingLanes,b===0&&(Ci=null),EF(c.stateNode),kn(i,Ct()),o!==null)for(h=i.onRecoverableError,c=0;c<o.length;c++)E=o[c],h(E.value,{componentStack:E.stack,digest:E.digest});if(Wc)throw Wc=!1,i=Bm,Bm=null,i;return(Xc&1)!==0&&i.tag!==0&&Mo(),b=i.pendingLanes,(b&1)!==0?i===Um?fu++:(fu=0,Um=i):fu=0,vi(),null}function Mo(){if(Oi!==null){var i=L_(Xc),o=Xn.transition,c=ut;try{if(Xn.transition=null,ut=16>i?16:i,Oi===null)var h=!1;else{if(i=Oi,Oi=null,Xc=0,(rt&6)!==0)throw Error(n(331));var E=rt;for(rt|=4,Oe=i.current;Oe!==null;){var b=Oe,w=b.child;if((Oe.flags&16)!==0){var M=b.deletions;if(M!==null){for(var z=0;z<M.length;z++){var Z=M[z];for(Oe=Z;Oe!==null;){var ge=Oe;switch(ge.tag){case 0:case 11:case 15:lu(8,ge,b)}var Te=ge.child;if(Te!==null)Te.return=ge,Oe=Te;else for(;Oe!==null;){ge=Oe;var pe=ge.sibling,ke=ge.return;if(Iw(ge),ge===Z){Oe=null;break}if(pe!==null){pe.return=ke,Oe=pe;break}Oe=ke}}}var Ie=b.alternate;if(Ie!==null){var Re=Ie.child;if(Re!==null){Ie.child=null;do{var Ot=Re.sibling;Re.sibling=null,Re=Ot}while(Re!==null)}}Oe=b}}if((b.subtreeFlags&2064)!==0&&w!==null)w.return=b,Oe=w;else e:for(;Oe!==null;){if(b=Oe,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:lu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Oe=G;break e}Oe=b.return}}var V=i.current;for(Oe=V;Oe!==null;){w=Oe;var Q=w.child;if((w.subtreeFlags&2064)!==0&&Q!==null)Q.return=w,Oe=Q;else e:for(w=V;Oe!==null;){if(M=Oe,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:Vc(9,M)}}catch(Le){At(M,M.return,Le)}if(M===w){Oe=null;break e}var we=M.sibling;if(we!==null){we.return=M.return,Oe=we;break e}Oe=M.return}}if(rt=E,vi(),Pr&&typeof Pr.onPostCommitFiberRoot=="function")try{Pr.onPostCommitFiberRoot(rc,i)}catch(Le){}h=!0}return h}finally{ut=c,Xn.transition=o}}return!1}function Ww(i,o,c){o=Po(c,o),o=dw(i,o,1),i=Ni(i,o,1),o=hn(),i!==null&&(Ma(i,1,o),kn(i,o))}function At(i,o,c){if(i.tag===3)Ww(i,i,c);else for(;o!==null;){if(o.tag===3){Ww(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Ci===null||!Ci.has(h))){i=Po(c,i),i=fw(o,i,1),o=Ni(o,i,1),i=hn(),o!==null&&(Ma(o,1,i),kn(o,i));break}}o=o.return}}function VB(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=hn(),i.pingedLanes|=i.suspendedLanes&c,Vt===i&&(Kt&c)===c&&(Bt===4||Bt===3&&(Kt&130023424)===Kt&&500>Ct()-Fm?bs(i,0):Mm|=c),kn(i,o)}function Gw(i,o){o===0&&((i.mode&1)===0?o=1:(o=sc,sc<<=1,(sc&130023424)===0&&(sc=4194304)));var c=hn();i=Kr(i,o),i!==null&&(Ma(i,o,c),kn(i,c))}function qB(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),Gw(i,c)}function YB(i,o){var c=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),Gw(i,c)}var Xw;Xw=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||Sn.current)An=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return An=!1,RB(i,o,c);An=(i.flags&131072)!==0}else An=!1,xt&&(o.flags&1048576)!==0&&kx(o,Nc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;zc(i,o),i=o.pendingProps;var E=So(o,sn.current);Oo(o,c),E=pm(null,o,h,i,E,c);var b=mm();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,vn(h)?(b=!0,Sc(o)):b=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,am(o),E.updater=Hc,o.stateNode=E,E._reactInternals=o,_m(o,h,i,c),o=vm(null,o,h,!0,b,c)):(o.tag=0,xt&&b&&Kp(o),fn(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(zc(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=GB(h),i=fr(h,i),E){case 0:o=Sm(null,o,h,i,c);break e;case 1:o=_w(null,o,h,i,c);break e;case 11:o=gw(null,o,h,i,c);break e;case 14:o=Ew(null,o,h,fr(h.type,i),c);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),Sm(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),_w(i,o,h,E,c);case 3:e:{if(xw(o),i===null)throw Error(n(387));h=o.pendingProps,b=o.memoizedState,E=b.element,Fx(i,o),Rc(o,h,null,c);var w=o.memoizedState;if(h=w.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){E=Po(Error(n(423)),o),o=ww(i,o,h,c,E);break e}else if(h!==E){E=Po(Error(n(424)),o),o=ww(i,o,h,c,E);break e}else for(Bn=xi(o.stateNode.containerInfo.firstChild),Fn=o,xt=!0,dr=null,c=Dx(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(No(),h===E){o=Zr(i,o,c);break e}fn(i,o,h,c)}o=o.child}return o;case 5:return Hx(o),i===null&&em(o),h=o.type,E=o.pendingProps,b=i!==null?i.memoizedProps:null,w=E.children,qp(h,E)?w=null:b!==null&&qp(h,b)&&(o.flags|=32),bw(i,o),fn(i,o,w,c),o.child;case 6:return i===null&&em(o),null;case 13:return Sw(i,o,c);case 4:return um(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=ko(o,null,h,c):fn(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),gw(i,o,h,E,c);case 7:return fn(i,o,o.pendingProps,c),o.child;case 8:return fn(i,o,o.pendingProps.children,c),o.child;case 12:return fn(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,b=o.memoizedProps,w=E.value,ht(Oc,h._currentValue),h._currentValue=w,b!==null)if(cr(b.value,w)){if(b.children===E.children&&!Sn.current){o=Zr(i,o,c);break e}}else for(b=o.child,b!==null&&(b.return=o);b!==null;){var M=b.dependencies;if(M!==null){w=b.child;for(var z=M.firstContext;z!==null;){if(z.context===h){if(b.tag===1){z=Jr(-1,c&-c),z.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var ge=Z.pending;ge===null?z.next=z:(z.next=ge.next,ge.next=z),Z.pending=z}}b.lanes|=c,z=b.alternate,z!==null&&(z.lanes|=c),sm(b.return,c,o),M.lanes|=c;break}z=z.next}}else if(b.tag===10)w=b.type===o.type?null:b.child;else if(b.tag===18){if(w=b.return,w===null)throw Error(n(341));w.lanes|=c,M=w.alternate,M!==null&&(M.lanes|=c),sm(w,c,o),w=b.sibling}else w=b.child;if(w!==null)w.return=b;else for(w=b;w!==null;){if(w===o){w=null;break}if(b=w.sibling,b!==null){b.return=w.return,w=b;break}w=w.return}b=w}fn(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,Oo(o,c),E=Wn(E),h=h(E),o.flags|=1,fn(i,o,h,c),o.child;case 14:return h=o.type,E=fr(h,o.pendingProps),E=fr(h.type,E),Ew(i,o,h,E,c);case 15:return yw(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:fr(h,E),zc(i,o),o.tag=1,vn(h)?(i=!0,Sc(o)):i=!1,Oo(o,c),lw(o,h,E),_m(o,h,E,c),vm(null,o,h,!0,i,c);case 19:return Aw(i,o,c);case 22:return Tw(i,o,c)}throw Error(n(156,o.tag))};function Qw(i,o){return C_(i,o)}function WB(i,o,c,h){this.tag=i,this.key=c,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 Qn(i,o,c,h){return new WB(i,o,c,h)}function qm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function GB(i){if(typeof i=="function")return qm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ee)return 11;if(i===ce)return 14}return 2}function Ri(i,o){var c=i.alternate;return c===null?(c=Qn(i.tag,o,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=o,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,o=i.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function Zc(i,o,c,h,E,b){var w=2;if(h=i,typeof i=="function")qm(i)&&(w=1);else if(typeof i=="string")w=5;else e:switch(i){case W:return xs(c.children,E,b,o);case ie:w=8,E|=8;break;case de:return i=Qn(12,c,o,E|2),i.elementType=de,i.lanes=b,i;case xe:return i=Qn(13,c,o,E),i.elementType=xe,i.lanes=b,i;case fe:return i=Qn(19,c,o,E),i.elementType=fe,i.lanes=b,i;case le:return ed(c,E,b,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:w=10;break e;case se:w=9;break e;case ee:w=11;break e;case ce:w=14;break e;case he:w=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=Qn(w,c,o,E),o.elementType=i,o.type=h,o.lanes=b,o}function xs(i,o,c,h){return i=Qn(7,i,h,o),i.lanes=c,i}function ed(i,o,c,h){return i=Qn(22,i,h,o),i.elementType=le,i.lanes=c,i.stateNode={isHidden:!1},i}function Ym(i,o,c){return i=Qn(6,i,null,o),i.lanes=c,i}function Wm(i,o,c){return o=Qn(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function XB(i,o,c,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=bp(0),this.expirationTimes=bp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function Gm(i,o,c,h,E,b,w,M,z){return i=new XB(i,o,c,M,z),o===1?(o=1,b===!0&&(o|=8)):o=0,b=Qn(3,null,null,o),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},am(b),i}function QB(i,o,c){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:c}}function Kw(i){if(!i)return Si;i=i._reactInternals;e:{if(cs(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(vn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(vn(c))return vx(i,c,o)}return o}function Jw(i,o,c,h,E,b,w,M,z){return i=Gm(c,h,!0,i,E,b,w,M,z),i.context=Kw(null),c=i.current,h=hn(),E=Ii(c),b=Jr(h,E),b.callback=o!=null?o:null,Ni(c,b,E),i.current.lanes=E,Ma(i,E,h),kn(i,h),i}function td(i,o,c,h){var E=o.current,b=hn(),w=Ii(E);return c=Kw(c),o.context===null?o.context=c:o.pendingContext=c,o=Jr(b,w),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Ni(E,o,w),i!==null&&(mr(i,E,w,b),Pc(i,E,w)),w}function nd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Zw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function Xm(i,o){Zw(i,o),(i=i.alternate)&&Zw(i,o)}function KB(){return null}var e2=typeof reportError=="function"?reportError:function(i){console.error(i)};function Qm(i){this._internalRoot=i}rd.prototype.render=Qm.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));td(i,o,null,null)},rd.prototype.unmount=Qm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Ts(function(){td(null,i,null,null)}),o[Wr]=null}};function rd(i){this._internalRoot=i}rd.prototype.unstable_scheduleHydration=function(i){if(i){var o=F_();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Ti.length&&o!==0&&o<Ti[c].priority;c++);Ti.splice(c,0,i),c===0&&H_(i)}};function Km(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function id(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function t2(){}function JB(i,o,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var Z=nd(w);b.call(Z)}}var w=Jw(o,h,i,0,null,!1,!1,"",t2);return i._reactRootContainer=w,i[Wr]=w.current,Qa(i.nodeType===8?i.parentNode:i),Ts(),w}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var M=h;h=function(){var Z=nd(z);M.call(Z)}}var z=Gm(i,0,!1,null,null,!1,!1,"",t2);return i._reactRootContainer=z,i[Wr]=z.current,Qa(i.nodeType===8?i.parentNode:i),Ts(function(){td(o,z,c,h)}),z}function sd(i,o,c,h,E){var b=c._reactRootContainer;if(b){var w=b;if(typeof E=="function"){var M=E;E=function(){var z=nd(w);M.call(z)}}td(o,w,i,E)}else w=JB(c,o,i,E,h);return nd(w)}D_=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=Da(o.pendingLanes);c!==0&&(_p(o,c|1),kn(o,Ct()),(rt&6)===0&&(Do=Ct()+500,vi()))}break;case 13:Ts(function(){var h=Kr(i,1);if(h!==null){var E=hn();mr(h,i,1,E)}}),Xm(i,1)}},xp=function(i){if(i.tag===13){var o=Kr(i,134217728);if(o!==null){var c=hn();mr(o,i,134217728,c)}Xm(i,134217728)}},M_=function(i){if(i.tag===13){var o=Ii(i),c=Kr(i,o);if(c!==null){var h=hn();mr(c,i,o,h)}Xm(i,o)}},F_=function(){return ut},B_=function(i,o){var c=ut;try{return ut=i,o()}finally{ut=c}},pp=function(i,o,c){switch(o){case"input":if(Et(i,c),o=c.name,c.type==="radio"&&o!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<c.length;o++){var h=c[o];if(h!==i&&h.form===i.form){var E=xc(h);if(!E)throw Error(n(90));gt(h),Et(h,E)}}}break;case"textarea":Jl(i,c);break;case"select":o=c.value,o!=null&&Or(i,!!c.multiple,o,!1)}},x_=zm,w_=Ts;var ZB={usingClientEntryPoint:!1,Events:[Za,xo,xc,b_,__,zm]},hu={findFiberByHostInstance:ds,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},e7={bundleType:hu.bundleType,version:hu.version,rendererPackageName:hu.rendererPackageName,rendererConfig:hu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=N_(i),i===null?null:i.stateNode},findFiberByHostInstance:hu.findFiberByHostInstance||KB,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 od=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!od.isDisabled&&od.supportsFiber)try{rc=od.inject(e7),Pr=od}catch(i){}}return En.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ZB,En.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Km(o))throw Error(n(200));return QB(i,o,null,c)},En.createRoot=function(i,o){if(!Km(i))throw Error(n(299));var c=!1,h="",E=e2;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=Gm(i,1,!1,null,null,c,!1,h,E),i[Wr]=o.current,Qa(i.nodeType===8?i.parentNode:i),new Qm(o)},En.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=N_(o),i=i===null?null:i.stateNode,i},En.flushSync=function(i){return Ts(i)},En.hydrate=function(i,o,c){if(!id(o))throw Error(n(200));return sd(null,i,o,!0,c)},En.hydrateRoot=function(i,o,c){if(!Km(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",w=e2;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(w=c.onRecoverableError)),o=Jw(o,null,i,1,c!=null?c:null,E,!1,b,w),i[Wr]=o.current,Qa(i),h)for(i=0;i<h.length;i++)c=h[i],E=c._getVersion,E=E(c._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[c,E]:o.mutableSourceEagerHydrationData.push(c,E);return new rd(o)},En.render=function(i,o,c){if(!id(o))throw Error(n(200));return sd(null,i,o,!1,c)},En.unmountComponentAtNode=function(i){if(!id(i))throw Error(n(40));return i._reactRootContainer?(Ts(function(){sd(null,null,i,!1,function(){i._reactRootContainer=null,i[Wr]=null})}),!0):!1},En.unstable_batchedUpdates=zm,En.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!id(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return sd(i,o,c,!1,h)},En.version="18.3.1-next-f1338f8080-20240426",En}var qg;function Yg(){if(qg)return sf.exports;qg=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=cN(),sf.exports}var Ds=Yg();function Wg(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=Wg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function F(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Wg(e))&&(r&&(r+=" "),r+=t);return r}var Gg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Xg=Mi.createContext&&Mi.createContext(Gg),dN=["attr","size","title"];function fN(e,t){if(e==null)return{};var n=hN(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 hN(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 Vu(){return Vu=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},Vu.apply(this,arguments)}function Qg(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 qu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qg(Object(n),!0).forEach(function(r){pN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pN(e,t,n){return t=mN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mN(e){var t=gN(e,"string");return typeof t=="symbol"?t:t+""}function gN(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 Kg(e){return e&&e.map((t,n)=>Mi.createElement(t.tag,qu({key:n},t.attr),Kg(t.child)))}function ot(e){return t=>Mi.createElement(EN,Vu({attr:qu({},e.attr)},t),Kg(e.child))}function EN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=fN(e,dN),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Mi.createElement("svg",Vu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:qu(qu({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&Mi.createElement("title",null,a),e.children)};return Xg!==void 0?Mi.createElement(Xg.Consumer,null,n=>t(n)):t(Gg)}function yN(e){return ot({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function TN(e){return ot({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function bN(e){return ot({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 tr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:_.jsx("button",{className:F(e,`${C}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?_.jsx("img",{className:F(`${C}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),_N="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",xN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=at(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?_.jsx(bN,{className:F(t,`${C}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||_N,alt:"Copilot",className:F(t,`${C}-minimized-icon-img`)});return _.jsx(tr,{className:F(t,`${C}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},wN=()=>{const{globalClassName:e,themeVariables:t}=at(),n=()=>{zu(!1),Br(!0)};return Ds.createPortal(_.jsx("div",{className:F(e,`${C}-minimized-container`),style:t,children:_.jsx(xN,{onClick:n})}),document.body)};function SN(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function cn(){const e=H.useContext(mg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const vN=e=>({[`${Cn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Cn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Cn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Cn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Cn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Cn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function AN(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm18.31 6-2.76 5z"},child:[]},{tag:"path",attr:{d:"M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"},child:[]}]})(e)}function NN(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8A5.87 5.87 0 0 1 6 12c0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"},child:[]}]})(e)}function Jg(e){return ot({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 kN(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function uf(e){return ot({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 CN(e){return ot({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 ON(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function IN(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function Zg(e){return ot({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 e1(e){return ot({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 PN(e){return ot({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 RN(e){return ot({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 LN(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function t1(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}const Yu=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>_.jsx("button",{className:F(`${C}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),DN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?_.jsx("img",{className:F(`${C}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(uf,{size:"16px"})},MN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return _.jsx(tr,{className:F(e,n,`cim-${r}-component`,`${C}-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:_.jsx(uf,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(Yu,{className:F(e,n,`cim-${r}-component`,`${C}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&_.jsx(DN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function O7(){}function I7(){}function n1(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 r1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const FN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UN={};function i1(e,t){return(UN.jsx?BN:FN).test(e)}const HN=/[ \t\n\f\r]/g;function jN(e){return typeof e=="object"?e.type==="text"?s1(e.value):!1:s1(e)}function s1(e){return e.replace(HN,"")===""}class Xo{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Xo.prototype.normal={},Xo.prototype.property={},Xo.prototype.space=void 0;function o1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Xo(n,r,t)}function Qo(e){return e.toLowerCase()}class yn{constructor(t,n){this.attribute=n,this.property=t}}yn.prototype.attribute="",yn.prototype.booleanish=!1,yn.prototype.boolean=!1,yn.prototype.commaOrSpaceSeparated=!1,yn.prototype.commaSeparated=!1,yn.prototype.defined=!1,yn.prototype.mustUseProperty=!1,yn.prototype.number=!1,yn.prototype.overloadedBoolean=!1,yn.prototype.property="",yn.prototype.spaceSeparated=!1,yn.prototype.space=void 0;let zN=0;const Ye=Yi(),Rt=Yi(),lf=Yi(),be=Yi(),ct=Yi(),qi=Yi(),In=Yi();function Yi(){return ud(2,++zN)}const cf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ye,booleanish:Rt,commaOrSpaceSeparated:In,commaSeparated:qi,number:be,overloadedBoolean:lf,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),df=Object.keys(cf);class ff extends yn{constructor(t,n,r,s){let a=-1;if(super(t,n),a1(this,"space",s),typeof r=="number")for(;++a<df.length;){const u=df[a];a1(this,df[a],(r&cf[u])===cf[u])}}}ff.prototype.defined=!0;function a1(e,t,n){n&&(e[t]=n)}function Ms(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new ff(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Qo(r)]=r,n[Qo(a.attribute)]=r}return new Xo(t,n,e.space)}const u1=Ms({properties:{ariaActiveDescendant:null,ariaAtomic:Rt,ariaAutoComplete:null,ariaBusy:Rt,ariaChecked:Rt,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:Rt,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:Rt,ariaFlowTo:ct,ariaGrabbed:Rt,ariaHasPopup:null,ariaHidden:Rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:be,ariaLive:null,ariaModal:Rt,ariaMultiLine:Rt,ariaMultiSelectable:Rt,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:Rt,ariaReadOnly:Rt,ariaRelevant:null,ariaRequired:Rt,ariaRoleDescription:ct,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:Rt,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function l1(e,t){return t in e?e[t]:t}function c1(e,t){return l1(e,t.toLowerCase())}const $N=Ms({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qi,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Ye,allowPaymentRequest:Ye,allowUserMedia:Ye,alpha:Ye,alt:null,as:null,async:Ye,autoCapitalize:null,autoComplete:ct,autoFocus:Ye,autoPlay:Ye,blocking:ct,capture:null,charSet:null,checked:Ye,cite:null,className:ct,closedBy:null,colorSpace:null,cols:be,colSpan:be,command:null,commandFor:null,content:null,contentEditable:Rt,controls:Ye,controlsList:ct,coords:be|qi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ye,defer:Ye,dir:null,dirName:null,disabled:Ye,download:lf,draggable:Rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ye,formTarget:null,headers:ct,height:be,hidden:lf,high:be,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ye,inputMode:null,integrity:null,is:null,isMap:Ye,itemId:null,itemProp:ct,itemRef:ct,itemScope:Ye,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ye,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Ye,muted:Ye,name:null,nonce:null,noModule:Ye,noValidate:Ye,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:Ye,optimum:be,pattern:null,ping:ct,placeholder:null,playsInline:Ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ye,referrerPolicy:null,rel:ct,required:Ye,reversed:Ye,rows:be,rowSpan:be,sandbox:ct,scope:null,scoped:Ye,seamless:Ye,selected:Ye,shadowRootClonable:Ye,shadowRootCustomElementRegistry:Ye,shadowRootDelegatesFocus:Ye,shadowRootMode:null,shadowRootSerializable:Ye,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:Rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Ye,useMap:null,value:Rt,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ye,declare:Ye,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Ye,noHref:Ye,noShade:Ye,noWrap:Ye,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:Rt,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ye,disablePictureInPicture:Ye,disableRemotePlayback:Ye,exportParts:qi,part:ct,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:c1}),VN=Ms({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:In,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:ct,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:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,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:qi,g2:qi,glyphName:qi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:In,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,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:be,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:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:In,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:In,rev:In,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:In,requiredFeatures:In,requiredFonts:In,requiredFormats:In,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:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:In,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:In,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:In,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:l1}),d1=Ms({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()}}),f1=Ms({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:c1}),h1=Ms({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),qN={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"},YN=/[A-Z]/g,p1=/-[a-z]/g,WN=/^data[-\w.:]+$/i;function Wu(e,t){const n=Qo(t);let r=t,s=yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&WN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(p1,XN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!p1.test(a)){let u=a.replace(YN,GN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=ff}return new s(r,t)}function GN(e){return"-"+e.toLowerCase()}function XN(e){return e.charAt(1).toUpperCase()}const Ko=o1([u1,$N,d1,f1,h1],"html"),ii=o1([u1,VN,d1,f1,h1],"svg");function m1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function g1(e){return e.join(" ").trim()}var Fs={},hf,E1;function QN(){if(E1)return hf;E1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
24
+ `,f="/",p="*",m="",T="comment",y="declaration";function x(A,S){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];S=S||{};var k=1,I=1;function j(fe){var ce=fe.match(t);ce&&(k+=ce.length);var he=fe.lastIndexOf(d);I=~he?fe.length-he:I+fe.length}function Y(){var fe={line:k,column:I};return function(ce){return ce.position=new R(fe),de(),ce}}function R(fe){this.start=fe,this.end={line:k,column:I},this.source=S.source}R.prototype.content=A;function W(fe){var ce=new Error(S.source+":"+k+":"+I+": "+fe);if(ce.reason=fe,ce.filename=S.source,ce.line=k,ce.column=I,ce.source=A,!S.silent)throw ce}function ie(fe){var ce=fe.exec(A);if(ce){var he=ce[0];return j(he),A=A.slice(he.length),ce}}function de(){ie(n)}function $(fe){var ce;for(fe=fe||[];ce=se();)ce!==!1&&fe.push(ce);return fe}function se(){var fe=Y();if(!(f!=A.charAt(0)||p!=A.charAt(1))){for(var ce=2;m!=A.charAt(ce)&&(p!=A.charAt(ce)||f!=A.charAt(ce+1));)++ce;if(ce+=2,m===A.charAt(ce-1))return W("End of comment missing");var he=A.slice(2,ce-2);return I+=2,j(he),A=A.slice(ce),I+=2,fe({type:T,comment:he})}}function ee(){var fe=Y(),ce=ie(r);if(ce){if(se(),!ie(s))return W("property missing ':'");var he=ie(a),le=fe({type:y,property:v(ce[0].replace(e,m)),value:he?v(he[0].replace(e,m)):m});return ie(u),le}}function xe(){var fe=[];$(fe);for(var ce;ce=ee();)ce!==!1&&(fe.push(ce),$(fe));return fe}return de(),xe()}function v(A){return A?A.replace(l,m):m}return hf=x,hf}var y1;function KN(){if(y1)return Fs;y1=1;var e=Fs&&Fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.default=n;const t=e(QN());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;l?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Fs}var Jo={},T1;function JN(){if(T1)return Jo;T1=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.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()},l=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,l):f=f.replace(r,l),f.replace(t,u))};return Jo.camelCase=d,Jo}var Zo,b1;function ZN(){if(b1)return Zo;b1=1;var e=Zo&&Zo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(KN()),n=JN();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(l,d){l&&d&&(u[(0,n.camelCase)(l,a)]=d)}),u}return r.default=r,Zo=r,Zo}var ek=ZN();const tk=Ke(ek),Gu=_1("end"),Tr=_1("start");function _1(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 x1(e){const t=Tr(e),n=Gu(e);if(t&&n)return{start:t,end:n}}function ea(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?w1(e.position):"start"in e||"end"in e?w1(e):"line"in e||"column"in e?pf(e):""}function pf(e){return S1(e&&e.line)+":"+S1(e&&e.column)}function w1(e){return pf(e&&e.start)+"-"+pf(e&&e.end)}function S1(e){return e&&typeof e=="number"?e:1}class en 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=U({},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 l=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=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=ea(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}}en.prototype.file="",en.prototype.name="",en.prototype.reason="",en.prototype.message="",en.prototype.stack="",en.prototype.column=void 0,en.prototype.line=void 0,en.prototype.ancestors=void 0,en.prototype.cause=void 0,en.prototype.fatal=void 0,en.prototype.place=void 0,en.prototype.ruleId=void 0,en.prototype.source=void 0;const mf={}.hasOwnProperty,nk=new Map,rk=/[A-Z]/g,ik=new Set(["table","tbody","thead","tfoot","tr"]),sk=new Set(["td","th"]),v1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ok(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=pk(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=hk(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"?ii:Ko,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=A1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function A1(e,t,n){if(t.type==="element")return ak(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return uk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ck(e,t,n);if(t.type==="mdxjsEsm")return lk(e,t);if(t.type==="root")return dk(e,t,n);if(t.type==="text")return fk(e,t)}function ak(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=k1(e,t.tagName,!1),u=mk(e,t);let l=Ef(e,t);return ik.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!jN(d):!0})),N1(e,u,a,t),gf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function uk(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)}ta(e,t.position)}function lk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ta(e,t.position)}function ck(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=ii,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:k1(e,t.name,!0),u=gk(e,t),l=Ef(e,t);return N1(e,u,a,t),gf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function dk(e,t,n){const r={};return gf(r,Ef(e,t)),e.create(t,e.Fragment,r,n)}function fk(e,t){return t.value}function N1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function hk(e,t,n){return r;function r(s,a,u,l){const f=Array.isArray(u.children)?n:t;return l?f(a,u,l):f(a,u)}}function pk(e,t){return n;function n(r,s,a,u){const l=Array.isArray(a.children),d=Tr(r);return t(s,a,u,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function mk(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&mf.call(t.properties,s)){const a=Ek(e,s,t.properties[s]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&sk.has(t.tagName)?r=l:n[u]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function gk(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 l=u.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ta(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 l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else ta(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Ef(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:nk;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 l=A1(e,a,u);l!==void 0&&n.push(l)}return n}function Ek(e,t,n){const r=Wu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?r1(n):g1(n)),r.property==="style"){let s=typeof n=="object"?n:yk(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Tk(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?qN[r.property]||r.property:r.attribute,n]}}function yk(e,t){try{return tk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new en("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=v1+"#cannot-parse-style-attribute",s}}function k1(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 l=i1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}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 mf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);ta(e)}function ta(e,t){const n=new en("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=v1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Tk(e){const t={};let n;for(n in e)mf.call(e,n)&&(t[bk(n)]=e[n]);return t}function bk(e){let t=e.replace(rk,_k);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function _k(e){return"-"+e.toLowerCase()}const yf={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"]},xk={};function Tf(e,t){const n=xk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return C1(e,r,s)}function C1(e,t,n){if(wk(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 O1(e.children,t,n)}return Array.isArray(e)?O1(e,t,n):""}function O1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=C1(e[s],t,n);return r.join("")}function wk(e){return!!(e&&typeof e=="object")}const I1=document.createElement("i");function bf(e){const t="&"+e+";";I1.innerHTML=t;const n=I1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Pn(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 jn(e,t){return e.length>0?(Pn(e,e.length,0,t),e):t}const P1={}.hasOwnProperty;function R1(e){const t={};let n=-1;for(;++n<e.length;)Sk(t,e[n]);return t}function Sk(e,t){let n;for(n in t){const s=(P1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){P1.call(s,u)||(s[u]=[]);const l=a[u];vk(s[u],Array.isArray(l)?l:l?[l]:[])}}}function vk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pn(e,0,0,r)}function L1(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 nr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const dn=si(/[A-Za-z]/),tn=si(/[\dA-Za-z]/),Ak=si(/[#-'*+\--9=?A-Z^-~]/);function Xu(e){return e!==null&&(e<32||e===127)}const _f=si(/\d/),Nk=si(/[\dA-Fa-f]/),kk=si(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function dt(e){return e!==null&&(e<0||e===32)}function Je(e){return e===-2||e===-1||e===32}const Qu=si(new RegExp("\\p{P}|\\p{S}","u")),Wi=si(/\s/);function si(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bs(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&tn(e.charCodeAt(n+1))&&tn(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 l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(u=String.fromCharCode(a,l),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 tt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Je(d)?(e.enter(n),l(d)):t(d)}function l(d){return Je(d)&&a++<s?(e.consume(d),l):(e.exit(n),t(d))}}const Ck={tokenize:Ok};function Ok(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),tt(e,t,"linePrefix")}function s(l){return e.enter("paragraph"),a(l)}function a(l){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(l)}function u(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Be(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const Ik={tokenize:Pk},D1={tokenize:Rk};function Pk(e){const t=this,n=[];let r=0,s,a,u;return l;function l(I){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,d,f)(I)}return f(I)}function d(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&k();const j=t.events.length;let Y=j,R;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){R=t.events[Y][1].end;break}S(r);let W=j;for(;W<t.events.length;)t.events[W][1].end=U({},R),W++;return Pn(t.events,Y+1,0,t.events.slice(j)),t.events.length=W,f(I)}return l(I)}function f(I){if(r===n.length){if(!s)return T(I);if(s.currentConstruct&&s.currentConstruct.concrete)return x(I);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(D1,p,m)(I)}function p(I){return s&&k(),S(r),T(I)}function m(I){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(I)}function T(I){return t.containerState={},e.attempt(D1,y,x)(I)}function y(I){return r++,n.push([t.currentConstruct,t.containerState]),T(I)}function x(I){if(I===null){s&&k(),S(0),e.consume(I);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),v(I)}function v(I){if(I===null){A(e.exit("chunkFlow"),!0),S(0),e.consume(I);return}return Be(I)?(e.consume(I),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(I),v)}function A(I,j){const Y=t.sliceStream(I);if(j&&Y.push(null),I.previous=a,a&&(a.next=I),a=I,s.defineSkip(I.start),s.write(Y),t.parser.lazy[I.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 W=t.events.length;let ie=W,de,$;for(;ie--;)if(t.events[ie][0]==="exit"&&t.events[ie][1].type==="chunkFlow"){if(de){$=t.events[ie][1].end;break}de=!0}for(S(r),R=W;R<t.events.length;)t.events[R][1].end=U({},$),R++;Pn(t.events,ie+1,0,t.events.slice(W)),t.events.length=R}}function S(I){let j=n.length;for(;j-- >I;){const Y=n[j];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=I}function k(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function Rk(e,t,n){return tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Us(e){if(e===null||dt(e)||Wi(e))return 1;if(Qu(e))return 2}function Ku(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 xf={name:"attention",resolveAll:Lk,tokenize:Dk};function Lk(e,t){let n=-1,r,s,a,u,l,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=U({},e[r][1].end),T=U({},e[n][1].start);M1(m,-d),M1(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:U({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:U({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:U({},e[r][1].end),end:U({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:U({},u.start),end:U({},l.end)},e[r][1].end=U({},u.start),e[n][1].start=U({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=jn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=jn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=jn(f,Ku(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=jn(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=jn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Pn(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 Dk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Us(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===a)return e.consume(d),l;const f=e.exit("attentionSequence"),p=Us(d),m=!p||p===2&&s||n.includes(d),T=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function M1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Mk={name:"autolink",tokenize:Fk};function Fk(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 dn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||tn(y)?(r=1,l(y)):f(y)}function l(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||tn(y))&&r++<32?(e.consume(y),l):(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||Xu(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):Ak(y)?(e.consume(y),f):n(y)}function p(y){return tn(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):T(y)}function T(y){if((y===45||tn(y))&&r++<63){const x=y===45?T:m;return e.consume(y),x}return n(y)}}const na={partial:!0,tokenize:Bk};function Bk(e,t,n){return r;function r(a){return Je(a)?tt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Be(a)?t(a):n(a)}}const F1={continuation:{tokenize:Hk},exit:jk,name:"blockQuote",tokenize:Uk};function Uk(e,t,n){const r=this;return s;function s(u){if(u===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Je(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function Hk(e,t,n){const r=this;return s;function s(u){return Je(u)?tt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(F1,t,n)(u)}}function jk(e){e.exit("blockQuote")}const B1={name:"characterEscape",tokenize:zk};function zk(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 kk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const U1={name:"characterReference",tokenize:$k};function $k(e,t,n){const r=this;let s=0,a,u;return l;function l(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=tn,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=Nk,p):(e.enter("characterReferenceValue"),a=7,u=_f,p(m))}function p(m){if(m===59&&s){const T=e.exit("characterReferenceValue");return u===tn&&!bf(r.sliceSerialize(T))?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 H1={partial:!0,tokenize:qk},j1={concrete:!0,name:"codeFenced",tokenize:Vk};function Vk(e,t,n){const r=this,s={partial:!0,tokenize:Y};let a=0,u=0,l;return d;function d(R){return f(R)}function f(R){const W=r.events[r.events.length-1];return a=W&&W[1].type==="linePrefix"?W[2].sliceSerialize(W[1],!0).length:0,l=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===l?(u++,e.consume(R),p):u<3?n(R):(e.exit("codeFencedFenceSequence"),Je(R)?tt(e,m,"whitespace")(R):m(R))}function m(R){return R===null||Be(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(H1,v,j)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(R))}function T(R){return R===null||Be(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):Je(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,y,"whitespace")(R)):R===96&&R===l?n(R):(e.consume(R),T)}function y(R){return R===null||Be(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(R))}function x(R){return R===null||Be(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===l?n(R):(e.consume(R),x)}function v(R){return e.attempt(s,j,A)(R)}function A(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),S}function S(R){return a>0&&Je(R)?tt(e,k,"linePrefix",a+1)(R):k(R)}function k(R){return R===null||Be(R)?e.check(H1,v,j)(R):(e.enter("codeFlowValue"),I(R))}function I(R){return R===null||Be(R)?(e.exit("codeFlowValue"),k(R)):(e.consume(R),I)}function j(R){return e.exit("codeFenced"),t(R)}function Y(R,W,ie){let de=0;return $;function $(ce){return R.enter("lineEnding"),R.consume(ce),R.exit("lineEnding"),se}function se(ce){return R.enter("codeFencedFence"),Je(ce)?tt(R,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ce):ee(ce)}function ee(ce){return ce===l?(R.enter("codeFencedFenceSequence"),xe(ce)):ie(ce)}function xe(ce){return ce===l?(de++,R.consume(ce),xe):de>=u?(R.exit("codeFencedFenceSequence"),Je(ce)?tt(R,fe,"whitespace")(ce):fe(ce)):ie(ce)}function fe(ce){return ce===null||Be(ce)?(R.exit("codeFencedFence"),W(ce)):ie(ce)}}}function qk(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 wf={name:"codeIndented",tokenize:Wk},Yk={partial:!0,tokenize:Gk};function Wk(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),tt(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(Yk,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||Be(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function Gk(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):tt(e,a,"linePrefix",5)(u)}function a(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):Be(u)?s(u):n(u)}}const Xk={name:"codeText",previous:Kk,resolve:Qk,tokenize:Jk};function Qk(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 Kk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Jk(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(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 Zk{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&&ra(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),ra(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ra(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);ra(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ra(this.left,n.reverse())}}}function ra(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 z1(e){const t={};let n=-1,r,s,a,u,l,d,f;const p=new Zk(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,eC(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=U({},p.get(s)[1].start),l=p.slice(s,n),l.unshift(r),p.splice(s,n-s+1,l))}}return Pn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function eC(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 l=u.events,d=[],f={};let p,m,T=-1,y=n,x=0,v=0;const A=[v];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;++T<l.length;)l[T][0]==="exit"&&l[T-1][0]==="enter"&&l[T][1].type===l[T-1][1].type&&l[T][1].start.line!==l[T][1].end.line&&(v=T+1,A.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),T=A.length;T--;){const S=l.slice(A[T],A[T+1]),k=a.pop();d.push([k,k+S.length-1]),e.splice(k,2,S)}for(d.reverse(),T=-1;++T<d.length;)f[x+d[T][0]]=x+d[T][1],x+=d[T][1]-d[T][0]-1;return f}const tC={resolve:rC,tokenize:iC},nC={partial:!0,tokenize:sC};function rC(e){return z1(e),e}function iC(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?a(l):Be(l)?e.check(nC,u,a)(l):(e.consume(l),s)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function u(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function sC(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),tt(e,a,"linePrefix")}function a(u){if(u===null||Be(u))return n(u);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function $1(e,t,n,r,s,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(S){return S===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(S),e.exit(a),T):S===null||S===32||S===41||Xu(S)?n(S):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(S))}function T(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===62?(e.exit("chunkString"),e.exit(l),T(S)):S===null||S===60||Be(S)?n(S):(e.consume(S),S===92?x:y)}function x(S){return S===60||S===62||S===92?(e.consume(S),y):y(S)}function v(S){return!p&&(S===null||S===41||dt(S))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(S)):p<f&&S===40?(e.consume(S),p++,v):S===41?(e.consume(S),p--,v):S===null||S===32||S===40||Xu(S)?n(S):(e.consume(S),S===92?A:v)}function A(S){return S===40||S===41||S===92?(e.consume(S),v):v(S)}}function V1(e,t,n,r,s,a){const u=this;let l=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 l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_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)||l++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Je(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function q1(e,t,n,r,s,a){let u;return l;function l(T){return T===34||T===39||T===40?(e.enter(r),e.enter(s),e.consume(T),e.exit(s),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(s),e.consume(T),e.exit(s),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):Be(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),tt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||Be(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function ia(e,t){let n;return r;function r(s){return Be(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Je(s)?tt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const oC={name:"definition",tokenize:uC},aC={partial:!0,tokenize:lC};function uC(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return V1.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return s=nr(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 dt(y)?ia(e,f)(y):f(y)}function f(y){return $1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(aC,m,m)(y)}function m(y){return Je(y)?tt(e,T,"whitespace")(y):T(y)}function T(y){return y===null||Be(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function lC(e,t,n){return r;function r(l){return dt(l)?ia(e,s)(l):n(l)}function s(l){return q1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Je(l)?tt(e,u,"whitespace")(l):u(l)}function u(l){return l===null||Be(l)?t(l):n(l)}}const cC={name:"hardBreakEscape",tokenize:dC};function dC(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 fC={name:"headingAtx",resolve:hC,tokenize:pC};function hC(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"},Pn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function pC(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||dt(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Be(p)?(e.exit("atxHeading"),t(p)):Je(p)?tt(e,l,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),l(p))}function f(p){return p===null||p===35||dt(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const mC=["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"],Y1=["pre","script","style","textarea"],gC={concrete:!0,name:"htmlFlow",resolveTo:TC,tokenize:bC},EC={partial:!0,tokenize:xC},yC={partial:!0,tokenize:_C};function TC(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 bC(e,t,n){const r=this;let s,a,u,l,d;return f;function f(P){return p(P)}function p(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),T):P===47?(e.consume(P),a=!0,v):P===63?(e.consume(P),s=3,r.interrupt?t:N):dn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function T(P){return P===45?(e.consume(P),s=2,y):P===91?(e.consume(P),s=5,l=0,x):dn(P)?(e.consume(P),s=4,r.interrupt?t:N):n(P)}function y(P){return P===45?(e.consume(P),r.interrupt?t:N):n(P)}function x(P){const Se="CDATA[";return P===Se.charCodeAt(l++)?(e.consume(P),l===Se.length?r.interrupt?t:ee:x):n(P)}function v(P){return dn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function A(P){if(P===null||P===47||P===62||dt(P)){const Se=P===47,Me=u.toLowerCase();return!Se&&!a&&Y1.includes(Me)?(s=1,r.interrupt?t(P):ee(P)):mC.includes(u.toLowerCase())?(s=6,Se?(e.consume(P),S):r.interrupt?t(P):ee(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):a?k(P):I(P))}return P===45||tn(P)?(e.consume(P),u+=String.fromCharCode(P),A):n(P)}function S(P){return P===62?(e.consume(P),r.interrupt?t:ee):n(P)}function k(P){return Je(P)?(e.consume(P),k):$(P)}function I(P){return P===47?(e.consume(P),$):P===58||P===95||dn(P)?(e.consume(P),j):Je(P)?(e.consume(P),I):$(P)}function j(P){return P===45||P===46||P===58||P===95||tn(P)?(e.consume(P),j):Y(P)}function Y(P){return P===61?(e.consume(P),R):Je(P)?(e.consume(P),Y):I(P)}function R(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),d=P,W):Je(P)?(e.consume(P),R):ie(P)}function W(P){return P===d?(e.consume(P),d=null,de):P===null||Be(P)?n(P):(e.consume(P),W)}function ie(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||dt(P)?Y(P):(e.consume(P),ie)}function de(P){return P===47||P===62||Je(P)?I(P):n(P)}function $(P){return P===62?(e.consume(P),se):n(P)}function se(P){return P===null||Be(P)?ee(P):Je(P)?(e.consume(P),se):n(P)}function ee(P){return P===45&&s===2?(e.consume(P),he):P===60&&s===1?(e.consume(P),le):P===62&&s===4?(e.consume(P),D):P===63&&s===3?(e.consume(P),N):P===93&&s===5?(e.consume(P),ae):Be(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(EC,J,xe)(P)):P===null||Be(P)?(e.exit("htmlFlowData"),xe(P)):(e.consume(P),ee)}function xe(P){return e.check(yC,fe,J)(P)}function fe(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ce}function ce(P){return P===null||Be(P)?xe(P):(e.enter("htmlFlowData"),ee(P))}function he(P){return P===45?(e.consume(P),N):ee(P)}function le(P){return P===47?(e.consume(P),u="",K):ee(P)}function K(P){if(P===62){const Se=u.toLowerCase();return Y1.includes(Se)?(e.consume(P),D):ee(P)}return dn(P)&&u.length<8?(e.consume(P),u+=String.fromCharCode(P),K):ee(P)}function ae(P){return P===93?(e.consume(P),N):ee(P)}function N(P){return P===62?(e.consume(P),D):P===45&&s===2?(e.consume(P),N):ee(P)}function D(P){return P===null||Be(P)?(e.exit("htmlFlowData"),J(P)):(e.consume(P),D)}function J(P){return e.exit("htmlFlow"),t(P)}}function _C(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 xC(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(na,t,n)}}const wC={name:"htmlText",tokenize:SC};function SC(e,t,n){const r=this;let s,a,u;return l;function l(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),I):dn(N)?(e.consume(N),ie):n(N)}function f(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),a=0,x):dn(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),T):Be(N)?(u=m,le(N)):(e.consume(N),m)}function T(N){return N===45?(e.consume(N),y):m(N)}function y(N){return N===62?he(N):N===45?T(N):m(N)}function x(N){const D="CDATA[";return N===D.charCodeAt(a++)?(e.consume(N),a===D.length?v:x):n(N)}function v(N){return N===null?n(N):N===93?(e.consume(N),A):Be(N)?(u=v,le(N)):(e.consume(N),v)}function A(N){return N===93?(e.consume(N),S):v(N)}function S(N){return N===62?he(N):N===93?(e.consume(N),S):v(N)}function k(N){return N===null||N===62?he(N):Be(N)?(u=k,le(N)):(e.consume(N),k)}function I(N){return N===null?n(N):N===63?(e.consume(N),j):Be(N)?(u=I,le(N)):(e.consume(N),I)}function j(N){return N===62?he(N):I(N)}function Y(N){return dn(N)?(e.consume(N),R):n(N)}function R(N){return N===45||tn(N)?(e.consume(N),R):W(N)}function W(N){return Be(N)?(u=W,le(N)):Je(N)?(e.consume(N),W):he(N)}function ie(N){return N===45||tn(N)?(e.consume(N),ie):N===47||N===62||dt(N)?de(N):n(N)}function de(N){return N===47?(e.consume(N),he):N===58||N===95||dn(N)?(e.consume(N),$):Be(N)?(u=de,le(N)):Je(N)?(e.consume(N),de):he(N)}function $(N){return N===45||N===46||N===58||N===95||tn(N)?(e.consume(N),$):se(N)}function se(N){return N===61?(e.consume(N),ee):Be(N)?(u=se,le(N)):Je(N)?(e.consume(N),se):de(N)}function ee(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),s=N,xe):Be(N)?(u=ee,le(N)):Je(N)?(e.consume(N),ee):(e.consume(N),fe)}function xe(N){return N===s?(e.consume(N),s=void 0,ce):N===null?n(N):Be(N)?(u=xe,le(N)):(e.consume(N),xe)}function fe(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||dt(N)?de(N):(e.consume(N),fe)}function ce(N){return N===47||N===62||dt(N)?de(N):n(N)}function he(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function le(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),K}function K(N){return Je(N)?tt(e,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ae(N)}function ae(N){return e.enter("htmlTextData"),u(N)}}const Sf={name:"labelEnd",resolveAll:kC,resolveTo:CC,tokenize:OC},vC={tokenize:IC},AC={tokenize:PC},NC={tokenize:RC};function kC(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&&Pn(e,0,e.length,n),e}function CC(e,t){let n=e.length,r=0,s,a,u,l;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:U({},e[a][1].start),end:U({},e[e.length-1][1].end)},f={type:"label",start:U({},e[a][1].start),end:U({},e[u][1].end)},p={type:"labelText",start:U({},e[a+r+2][1].end),end:U({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=jn(l,e.slice(a+1,a+r+3)),l=jn(l,[["enter",p,t]]),l=jn(l,Ku(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=jn(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=jn(l,e.slice(u+1)),l=jn(l,[["exit",d,t]]),Pn(e,a,e.length,l),e}function OC(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 l;function l(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(nr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(vC,p,u?p:m)(T):T===91?e.attempt(AC,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(NC,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function IC(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 dt(m)?ia(e,a)(m):a(m)}function a(m){return m===41?p(m):$1(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return dt(m)?ia(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?q1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return dt(m)?ia(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 PC(e,t,n){const r=this;return s;function s(l){return V1.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(nr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function RC(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 LC={name:"labelStartImage",resolveAll:Sf.resolveAll,tokenize:DC};function DC(e,t,n){const r=this;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),u):n(l)}function u(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const MC={name:"labelStartLink",resolveAll:Sf.resolveAll,tokenize:FC};function FC(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 vf={name:"lineEnding",tokenize:BC};function BC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),tt(e,t,"linePrefix")}}const Ju={name:"thematicBreak",tokenize:UC};function UC(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,l(f)}function l(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"),Je(f)?tt(e,l,"whitespace")(f):l(f))}}const Tn={continuation:{tokenize:$C},exit:qC,name:"list",tokenize:zC},HC={partial:!0,tokenize:YC},jC={partial:!0,tokenize:VC};function zC(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 l;function l(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:_f(y)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Ju,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 _f(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(na,r.interrupt?n:p,e.attempt(HC,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Je(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),T):n(y)}function T(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function $C(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(na,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tt(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Je(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(jC,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,tt(e,e.attempt(Tn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function VC(e,t,n){const r=this;return tt(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 qC(e){e.exit(this.containerState.type)}function YC(e,t,n){const r=this;return tt(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!Je(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const W1={name:"setextUnderline",resolveTo:WC,tokenize:GC};function WC(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:U({},e[r][1].start),end:U({},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=U({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function GC(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"),l(f)}function l(f){return f===s?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),Je(f)?tt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Be(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const XC={tokenize:QC};function QC(e){const t=this,n=e.attempt(na,r,e.attempt(this.parser.constructs.flowInitial,s,tt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(tC,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 KC={resolveAll:X1()},JC=G1("string"),ZC=G1("text");function G1(e){return{resolveAll:X1(e==="text"?e3:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,l);return u;function u(p){return f(p)?a(p):l(p)}function l(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 T=-1;if(m)for(;++T<m.length;){const y=m[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function X1(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 e3(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,l=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)l++,u--;if(u)break;u=-1}else if(f===-2)d=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||d||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:U({},r.end)};r.end=U({},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 t3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:oC},disable:{null:[]},document:{42:Tn,43:Tn,45:Tn,48:Tn,49:Tn,50:Tn,51:Tn,52:Tn,53:Tn,54:Tn,55:Tn,56:Tn,57:Tn,62:F1},flow:{35:fC,42:Ju,45:[W1,Ju],60:gC,61:W1,95:Ju,96:j1,126:j1},flowInitial:{[-2]:wf,[-1]:wf,32:wf},insideSpan:{null:[xf,KC]},string:{38:U1,92:B1},text:{[-5]:vf,[-4]:vf,[-3]:vf,33:LC,38:U1,42:xf,60:[Mk,wC],91:MC,92:[cC,B1],93:Sf,95:xf,96:Xk}},Symbol.toStringTag,{value:"Module"}));function n3(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=[],l=[];const d={attempt:W(Y),check:W(R),consume:k,enter:I,exit:j,interrupt:W(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:x,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(se){return u=jn(u,se),A(),u[u.length-1]!==null?[]:(ie(t,0),f.events=Ku(a,f.events,f),f.events)}function T(se,ee){return i3(y(se),ee)}function y(se){return r3(u,se)}function x(){const{_bufferIndex:se,_index:ee,line:xe,column:fe,offset:ce}=r;return{_bufferIndex:se,_index:ee,line:xe,column:fe,offset:ce}}function v(se){s[se.line]=se.column,$()}function A(){let se;for(;r._index<u.length;){const ee=u[r._index];if(typeof ee=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<ee.length;)S(ee.charCodeAt(r._bufferIndex));else S(ee)}}function S(se){p=p(se)}function k(se){Be(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,$()):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 I(se,ee){const xe=ee||{};return xe.type=se,xe.start=x(),f.events.push(["enter",xe,f]),l.push(xe),xe}function j(se){const ee=l.pop();return ee.end=x(),f.events.push(["exit",ee,f]),ee}function Y(se,ee){ie(se,ee.from)}function R(se,ee){ee.restore()}function W(se,ee){return xe;function xe(fe,ce,he){let le,K,ae,N;return Array.isArray(fe)?J(fe):"tokenize"in fe?J([fe]):D(fe);function D(_e){return ne;function ne(Ee){const re=Ee!==null&&_e[Ee],ve=Ee!==null&&_e.null,$e=[...Array.isArray(re)?re:re?[re]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return J($e)(Ee)}}function J(_e){return le=_e,K=0,_e.length===0?he:P(_e[K])}function P(_e){return ne;function ne(Ee){return N=de(),ae=_e,_e.partial||(f.currentConstruct=_e),_e.name&&f.parser.constructs.disable.null.includes(_e.name)?Me():_e.tokenize.call(ee?Object.assign(Object.create(f),ee):f,d,Se,Me)(Ee)}}function Se(_e){return se(ae,N),ce}function Me(_e){return N.restore(),++K<le.length?P(le[K]):he}}}function ie(se,ee){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&Pn(f.events,ee,f.events.length-ee,se.resolve(f.events.slice(ee),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function de(){const se=x(),ee=f.previous,xe=f.currentConstruct,fe=f.events.length,ce=Array.from(l);return{from:fe,restore:he};function he(){r=se,f.previous=ee,f.currentConstruct=xe,f.events.length=fe,l=ce,$()}}function $(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function r3(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 l=u[0];typeof l=="string"?u[0]=l.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function i3(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=`
25
25
  `;break}case-3:{u=`\r
26
- `;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 r3(e){const r={constructs:R1([Zk,...(e||{}).extensions||[]]),content:s(NC),defined:[],document:s(kC),flow:s(Wk),lazy:{},string:s(Qk),text:s(Kk)};return r;function s(a){return u;function u(l){return e3(r,a,l)}}}function i3(e){for(;!z1(e););return e}const Q1=/[\0\t\n\r]/g;function s3(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,p,m,T,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(Q1.lastIndex=m,f=Q1.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-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=T+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const o3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function a3(e){return e.replace(o3,u3)}function u3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return L1(n.slice(a?2:1),a?16:10)}return Tf(n)||e}const K1={}.hasOwnProperty;function l3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),c3(n)(i3(r3(n).document().write(s3()(e,t,!0))))}function c3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(wn),autolinkProtocol:he,autolinkEmail:he,atxHeading:a(dn),blockQuote:a(re),characterEscape:he,characterReference:he,codeFenced:a(Ne),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Ne,u),codeText:a(Ye,u),codeTextData:he,data:he,codeFlowValue:he,definition:a(et),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(nn),hardBreakEscape:a($e),hardBreakTrailing:a($e),htmlFlow:a(It,u),htmlFlowData:he,htmlText:a(It,u),htmlTextData:he,image:a(Ln),label:u,link:a(wn),listItem:a(Or),listItemValue:T,listOrdered:a(ar,m),listUnordered:a(ar),paragraph:a(ur),reference:P,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(dn),strong:a(Ql),thematicBreak:a(Jl)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:ie,autolinkProtocol:ye,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:De,characterReferenceMarkerNumeric:De,characterReferenceValue:xe,characterReference:ne,codeFenced:d(A),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:$,codeIndented:d(S),codeText:d(de),codeTextData:$,data:$,definition:d(),definitionDestinationString:j,definitionLabelString:C,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(ee),hardBreakTrailing:d(ee),htmlFlow:d(we),htmlFlowData:$,htmlText:d(fe),htmlTextData:$,image:d(ce),label:ue,labelText:K,lineEnding:oe,link:d(pe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Se,resourceDestinationString:N,resourceTitleString:M,resource:J,setextHeading:d(se),setextHeadingLineSequence:W,setextHeadingText:R,strong:d(),thematicBreak:d()}};J1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ae){let Ae={type:"root",children:[]};const ze={stack:[Ae],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Xe=[];let tt=-1;for(;++tt<ae.length;)if(ae[tt][1].type==="listOrdered"||ae[tt][1].type==="listUnordered")if(ae[tt][0]==="enter")Xe.push(tt);else{const Yt=Xe.pop();tt=s(ae,Yt,tt)}for(tt=-1;++tt<ae.length;){const Yt=t[ae[tt][0]];K1.call(Yt,ae[tt][1].type)&&Yt[ae[tt][1].type].call(Object.assign({sliceSerialize:ae[tt][2].sliceSerialize},ze),ae[tt][1])}if(ze.tokenStack.length>0){const Yt=ze.tokenStack[ze.tokenStack.length-1];(Yt[1]||Z1).call(ze,void 0,Yt[0])}for(Ae.position={start:oi(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:oi(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt<t.transforms.length;)Ae=t.transforms[tt](Ae)||Ae;return Ae}function s(ae,Ae,ze){let Xe=Ae-1,tt=-1,Yt=!1,qr,Vn,mi,ls;for(;++Xe<=ze;){const Wt=ae[Xe];switch(Wt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Wt[0]==="enter"?tt++:tt--,ls=void 0;break}case"lineEndingBlank":{Wt[0]==="enter"&&(qr&&!ls&&!tt&&!mi&&(mi=Xe),ls=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ls=void 0}if(!tt&&Wt[0]==="enter"&&Wt[1].type==="listItemPrefix"||tt===-1&&Wt[0]==="exit"&&(Wt[1].type==="listUnordered"||Wt[1].type==="listOrdered")){if(qr){let Ir=Xe;for(Vn=void 0;Ir--;){const Dn=ae[Ir];if(Dn[1].type==="lineEnding"||Dn[1].type==="lineEndingBlank"){if(Dn[0]==="exit")continue;Vn&&(ae[Vn][1].type="lineEndingBlank",Yt=!0),Dn[1].type="lineEnding",Vn=Ir}else if(!(Dn[1].type==="linePrefix"||Dn[1].type==="blockQuotePrefix"||Dn[1].type==="blockQuotePrefixWhitespace"||Dn[1].type==="blockQuoteMarker"||Dn[1].type==="listItemIndent"))break}mi&&(!Vn||mi<Vn)&&(qr._spread=!0),qr.end=Object.assign({},Vn?ae[Vn][1].start:Wt[1].end),ae.splice(Vn||Xe,0,["exit",qr,Wt[2]]),Xe++,ze++}if(Wt[1].type==="listItemPrefix"){const Ir={type:"listItem",_spread:!1,start:Object.assign({},Wt[1].start),end:void 0};qr=Ir,ae.splice(Xe,0,["enter",Ir,Wt[2]]),Xe++,ze++,mi=void 0,ls=!0}}}return ae[Ae][1]._spread=Yt,ze}function a(ae,Ae){return ze;function ze(Xe){l.call(this,ae(Xe),Xe),Ae&&Ae.call(this,Xe)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(ae,Ae,ze){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([Ae,ze||void 0]),ae.position={start:oi(Ae.start),end:void 0}}function d(ae){return Ae;function Ae(ze){ae&&ae.call(this,ze),f.call(this,ze)}}function f(ae,Ae){const ze=this.stack.pop(),Xe=this.tokenStack.pop();if(Xe)Xe[0].type!==ae.type&&(Ae?Ae.call(this,ae,Xe[0]):(Xe[1]||Z1).call(this,ae,Xe[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Zo({start:ae.start,end:ae.end})+"): it’s not open");ze.position.end=oi(ae.end)}function p(){return yf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(ae){if(this.data.expectingFirstListItemValue){const Ae=this.stack[this.stack.length-2];Ae.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.lang=ae}function x(){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.meta=ae}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=ae.replace(/(\r?\n|\r)$/g,"")}function C(ae){const Ae=this.resume(),ze=this.stack[this.stack.length-1];ze.label=Ae,ze.identifier=nr(this.sliceSerialize(ae)).toLowerCase()}function I(){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=ae}function j(){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=ae}function Y(ae){const Ae=this.stack[this.stack.length-1];if(!Ae.depth){const ze=this.sliceSerialize(ae).length;Ae.depth=ze}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function W(ae){const Ae=this.stack[this.stack.length-1];Ae.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function se(){this.data.setextHeadingSlurpLineEnding=void 0}function he(ae){const ze=this.stack[this.stack.length-1].children;let Xe=ze[ze.length-1];(!Xe||Xe.type!=="text")&&(Xe=Kl(),Xe.position={start:oi(ae.start),end:void 0},ze.push(Xe)),this.stack.push(Xe)}function $(ae){const Ae=this.stack.pop();Ae.value+=this.sliceSerialize(ae),Ae.position.end=oi(ae.end)}function oe(ae){const Ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ze=Ae.children[Ae.children.length-1];ze.position.end=oi(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ae.type)&&(he.call(this,ae),$.call(this,ae))}function ee(){this.data.atHardBreak=!0}function we(){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=ae}function fe(){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=ae}function de(){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=ae}function pe(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=Ae,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function ce(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=Ae,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function K(ae){const Ae=this.sliceSerialize(ae),ze=this.stack[this.stack.length-2];ze.label=a3(Ae),ze.identifier=nr(Ae).toLowerCase()}function ue(){const ae=this.stack[this.stack.length-1],Ae=this.resume(),ze=this.stack[this.stack.length-1];if(this.data.inReference=!0,ze.type==="link"){const Xe=ae.children;ze.children=Xe}else ze.alt=Ae}function N(){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=ae}function M(){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=ae}function J(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function Se(ae){const Ae=this.resume(),ze=this.stack[this.stack.length-1];ze.label=Ae,ze.identifier=nr(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function De(ae){this.data.characterReferenceType=ae.type}function xe(ae){const Ae=this.sliceSerialize(ae),ze=this.data.characterReferenceType;let Xe;ze?(Xe=L1(Ae,ze==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Xe=Tf(Ae);const tt=this.stack[this.stack.length-1];tt.value+=Xe}function ne(ae){const Ae=this.stack.pop();Ae.position.end=oi(ae.end)}function ye(ae){$.call(this,ae);const Ae=this.stack[this.stack.length-1];Ae.url=this.sliceSerialize(ae)}function ie(ae){$.call(this,ae);const Ae=this.stack[this.stack.length-1];Ae.url="mailto:"+this.sliceSerialize(ae)}function re(){return{type:"blockquote",children:[]}}function Ne(){return{type:"code",lang:null,meta:null,value:""}}function Ye(){return{type:"inlineCode",value:""}}function et(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function nn(){return{type:"emphasis",children:[]}}function dn(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function It(){return{type:"html",value:""}}function Ln(){return{type:"image",title:null,url:"",alt:null}}function wn(){return{type:"link",title:null,url:"",children:[]}}function ar(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function Or(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function ur(){return{type:"paragraph",children:[]}}function Ql(){return{type:"strong",children:[]}}function Kl(){return{type:"text",value:""}}function Jl(){return{type:"thematicBreak"}}}function oi(e){return{line:e.line,column:e.column,offset:e.offset}}function J1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?J1(e,r):d3(e,r)}}function d3(e,t){let n;for(n in t)if(K1.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 Z1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Zo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Zo({start:t.start,end:t.end})+") is still open")}function f3(e){const t=this;t.parser=n;function n(r){return l3(r,le(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function h3(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 p3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
- `}]}function m3(e,t){const n=t.value?t.value+`
28
- `:"",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 g3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function E3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function y3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Bs(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,l+=1,e.footnoteCounts.set(r,l);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(l>1?"-"+l:""),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 T3(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 b3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function eE(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 _3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eE(e,t);const s={src:Bs(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 x3(e,t){const n={src:Bs(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 w3(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 S3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eE(e,t);const s={href:Bs(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 v3(e,t){const n={href:Bs(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 A3(e,t,n){const r=e.all(t),s=n?N3(n):tE(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 l=-1;for(;++l<r.length;){const p=r[l];(s||l!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
26
+ `;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 s3(e){const r={constructs:R1([t3,...(e||{}).extensions||[]]),content:s(Ck),defined:[],document:s(Ik),flow:s(XC),lazy:{},string:s(JC),text:s(ZC)};return r;function s(a){return u;function u(l){return n3(r,a,l)}}}function o3(e){for(;!z1(e););return e}const Q1=/[\0\t\n\r]/g;function a3(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,p,m,T,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(Q1.lastIndex=m,f=Q1.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-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=T+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const u3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function l3(e){return e.replace(u3,c3)}function c3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return L1(n.slice(a?2:1),a?16:10)}return bf(n)||e}const K1={}.hasOwnProperty;function d3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),f3(n)(o3(s3(n).document().write(a3()(e,t,!0))))}function f3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(wn),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(Ze),blockQuote:a(ve),characterEscape:de,characterReference:de,codeFenced:a($e),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a($e,u),codeText:a(gt,u),codeTextData:de,data:de,codeFlowValue:de,definition:a(Ce),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(We),hardBreakEscape:a(Pe),hardBreakTrailing:a(Pe),htmlFlow:a(Et,u),htmlFlowData:de,htmlText:a(Et,u),htmlTextData:de,image:a(Ln),label:u,link:a(wn),listItem:a(Or),listItemValue:T,listOrdered:a(ar,m),listUnordered:a(ar),paragraph:a(ur),reference:P,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Ze),strong:a(Kl),thematicBreak:a(Zl)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:re,autolinkProtocol:Ee,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:Me,characterReferenceMarkerNumeric:Me,characterReferenceValue:_e,characterReference:ne,codeFenced:d(A),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:$,codeIndented:d(S),codeText:d(ce),codeTextData:$,data:$,definition:d(),definitionDestinationString:j,definitionLabelString:k,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(ee),hardBreakTrailing:d(ee),htmlFlow:d(xe),htmlFlowData:$,htmlText:d(fe),htmlTextData:$,image:d(le),label:ae,labelText:K,lineEnding:se,link:d(he),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Se,resourceDestinationString:N,resourceTitleString:D,resource:J,setextHeading:d(ie),setextHeadingLineSequence:W,setextHeadingText:R,strong:d(),thematicBreak:d()}};J1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let Ae={type:"root",children:[]};const Ve={stack:[Ae],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Qe=[];let nt=-1;for(;++nt<oe.length;)if(oe[nt][1].type==="listOrdered"||oe[nt][1].type==="listUnordered")if(oe[nt][0]==="enter")Qe.push(nt);else{const Gt=Qe.pop();nt=s(oe,Gt,nt)}for(nt=-1;++nt<oe.length;){const Gt=t[oe[nt][0]];K1.call(Gt,oe[nt][1].type)&&Gt[oe[nt][1].type].call(Object.assign({sliceSerialize:oe[nt][2].sliceSerialize},Ve),oe[nt][1])}if(Ve.tokenStack.length>0){const Gt=Ve.tokenStack[Ve.tokenStack.length-1];(Gt[1]||Z1).call(Ve,void 0,Gt[0])}for(Ae.position={start:oi(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:oi(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<t.transforms.length;)Ae=t.transforms[nt](Ae)||Ae;return Ae}function s(oe,Ae,Ve){let Qe=Ae-1,nt=-1,Gt=!1,Yr,Vn,mi,ls;for(;++Qe<=Ve;){const Xt=oe[Qe];switch(Xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xt[0]==="enter"?nt++:nt--,ls=void 0;break}case"lineEndingBlank":{Xt[0]==="enter"&&(Yr&&!ls&&!nt&&!mi&&(mi=Qe),ls=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ls=void 0}if(!nt&&Xt[0]==="enter"&&Xt[1].type==="listItemPrefix"||nt===-1&&Xt[0]==="exit"&&(Xt[1].type==="listUnordered"||Xt[1].type==="listOrdered")){if(Yr){let Ir=Qe;for(Vn=void 0;Ir--;){const Dn=oe[Ir];if(Dn[1].type==="lineEnding"||Dn[1].type==="lineEndingBlank"){if(Dn[0]==="exit")continue;Vn&&(oe[Vn][1].type="lineEndingBlank",Gt=!0),Dn[1].type="lineEnding",Vn=Ir}else if(!(Dn[1].type==="linePrefix"||Dn[1].type==="blockQuotePrefix"||Dn[1].type==="blockQuotePrefixWhitespace"||Dn[1].type==="blockQuoteMarker"||Dn[1].type==="listItemIndent"))break}mi&&(!Vn||mi<Vn)&&(Yr._spread=!0),Yr.end=Object.assign({},Vn?oe[Vn][1].start:Xt[1].end),oe.splice(Vn||Qe,0,["exit",Yr,Xt[2]]),Qe++,Ve++}if(Xt[1].type==="listItemPrefix"){const Ir={type:"listItem",_spread:!1,start:Object.assign({},Xt[1].start),end:void 0};Yr=Ir,oe.splice(Qe,0,["enter",Ir,Xt[2]]),Qe++,Ve++,mi=void 0,ls=!0}}}return oe[Ae][1]._spread=Gt,Ve}function a(oe,Ae){return Ve;function Ve(Qe){l.call(this,oe(Qe),Qe),Ae&&Ae.call(this,Qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(oe,Ae,Ve){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([Ae,Ve||void 0]),oe.position={start:oi(Ae.start),end:void 0}}function d(oe){return Ae;function Ae(Ve){oe&&oe.call(this,Ve),f.call(this,Ve)}}function f(oe,Ae){const Ve=this.stack.pop(),Qe=this.tokenStack.pop();if(Qe)Qe[0].type!==oe.type&&(Ae?Ae.call(this,oe,Qe[0]):(Qe[1]||Z1).call(this,oe,Qe[0]));else throw new Error("Cannot close `"+oe.type+"` ("+ea({start:oe.start,end:oe.end})+"): it’s not open");Ve.position.end=oi(oe.end)}function p(){return Tf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(oe){if(this.data.expectingFirstListItemValue){const Ae=this.stack[this.stack.length-2];Ae.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function y(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.lang=oe}function x(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.meta=oe}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe.replace(/(\r?\n|\r)$/g,"")}function k(oe){const Ae=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=Ae,Ve.identifier=nr(this.sliceSerialize(oe)).toLowerCase()}function I(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=oe}function j(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=oe}function Y(oe){const Ae=this.stack[this.stack.length-1];if(!Ae.depth){const Ve=this.sliceSerialize(oe).length;Ae.depth=Ve}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function W(oe){const Ae=this.stack[this.stack.length-1];Ae.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function ie(){this.data.setextHeadingSlurpLineEnding=void 0}function de(oe){const Ve=this.stack[this.stack.length-1].children;let Qe=Ve[Ve.length-1];(!Qe||Qe.type!=="text")&&(Qe=Jl(),Qe.position={start:oi(oe.start),end:void 0},Ve.push(Qe)),this.stack.push(Qe)}function $(oe){const Ae=this.stack.pop();Ae.value+=this.sliceSerialize(oe),Ae.position.end=oi(oe.end)}function se(oe){const Ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ve=Ae.children[Ae.children.length-1];Ve.position.end=oi(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ae.type)&&(de.call(this,oe),$.call(this,oe))}function ee(){this.data.atHardBreak=!0}function xe(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe}function fe(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe}function ce(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=oe}function he(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Ae,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function le(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Ae,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function K(oe){const Ae=this.sliceSerialize(oe),Ve=this.stack[this.stack.length-2];Ve.label=l3(Ae),Ve.identifier=nr(Ae).toLowerCase()}function ae(){const oe=this.stack[this.stack.length-1],Ae=this.resume(),Ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ve.type==="link"){const Qe=oe.children;Ve.children=Qe}else Ve.alt=Ae}function N(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=oe}function D(){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=oe}function J(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function Se(oe){const Ae=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=Ae,Ve.identifier=nr(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function Me(oe){this.data.characterReferenceType=oe.type}function _e(oe){const Ae=this.sliceSerialize(oe),Ve=this.data.characterReferenceType;let Qe;Ve?(Qe=L1(Ae,Ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Qe=bf(Ae);const nt=this.stack[this.stack.length-1];nt.value+=Qe}function ne(oe){const Ae=this.stack.pop();Ae.position.end=oi(oe.end)}function Ee(oe){$.call(this,oe);const Ae=this.stack[this.stack.length-1];Ae.url=this.sliceSerialize(oe)}function re(oe){$.call(this,oe);const Ae=this.stack[this.stack.length-1];Ae.url="mailto:"+this.sliceSerialize(oe)}function ve(){return{type:"blockquote",children:[]}}function $e(){return{type:"code",lang:null,meta:null,value:""}}function gt(){return{type:"inlineCode",value:""}}function Ce(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function We(){return{type:"emphasis",children:[]}}function Ze(){return{type:"heading",depth:0,children:[]}}function Pe(){return{type:"break"}}function Et(){return{type:"html",value:""}}function Ln(){return{type:"image",title:null,url:"",alt:null}}function wn(){return{type:"link",title:null,url:"",children:[]}}function ar(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Or(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function ur(){return{type:"paragraph",children:[]}}function Kl(){return{type:"strong",children:[]}}function Jl(){return{type:"text",value:""}}function Zl(){return{type:"thematicBreak"}}}function oi(e){return{line:e.line,column:e.column,offset:e.offset}}function J1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?J1(e,r):h3(e,r)}}function h3(e,t){let n;for(n in t)if(K1.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 Z1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ea({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ea({start:t.start,end:t.end})+") is still open")}function p3(e){const t=this;t.parser=n;function n(r){return d3(r,ue(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function m3(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 g3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
+ `}]}function E3(e,t){const n=t.value?t.value+`
28
+ `:"",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 y3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function T3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function b3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Bs(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,l+=1,e.footnoteCounts.set(r,l);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(l>1?"-"+l:""),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 _3(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 x3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function eE(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 w3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eE(e,t);const s={src:Bs(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 S3(e,t){const n={src:Bs(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 v3(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 A3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return eE(e,t);const s={href:Bs(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 N3(e,t){const n={href:Bs(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 k3(e,t,n){const r=e.all(t),s=n?C3(n):tE(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 l=-1;for(;++l<r.length;){const p=r[l];(s||l!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
29
29
  `}),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:`
30
- `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function N3(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=tE(n[r])}return t}function tE(e){const t=e.spread;return t==null?e.children.length>1:t}function C3(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 k3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function O3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function I3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function P3(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)},l=Tr(t.children[1]),d=Gu(t.children[t.children.length-1]);l&&d&&(u.position={start:l,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 R3(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,l=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let x={type:"element",tagName:a,properties:T,children:[]};m&&(x.children=e.all(m),e.patch(m,x),x=e.applyData(m,x)),f.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function L3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const nE=9,rE=32;function D3(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===nE||a===rE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===nE||a===rE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function M3(e,t){const n={type:"text",value:D3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function F3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const B3={blockquote:h3,break:p3,code:m3,delete:g3,emphasis:E3,footnoteReference:y3,heading:T3,html:b3,imageReference:_3,image:x3,inlineCode:w3,linkReference:S3,link:v3,listItem:A3,list:C3,paragraph:k3,root:O3,strong:I3,table:P3,tableCell:L3,tableRow:R3,text:M3,thematicBreak:F3,toml:Zu,yaml:Zu,definition:Zu,footnoteDefinition:Zu};function Zu(){}const sE=-1,el=0,ia=1,tl=2,vf=3,Af=4,Nf=5,Cf=6,oE=7,aE=8,uE=typeof self=="object"?self:globalThis,lE=(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 uE[e](t)},U3=(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 el:case sE:return n(u,s);case ia:{const l=n([],s);for(const d of u)l.push(r(d));return l}case tl:{const l=n({},s);for(const[d,f]of u)l[r(d)]=r(f);return l}case vf:return n(new Date(u),s);case Af:{const{source:l,flags:d}=u;return n(new RegExp(l,d),s)}case Nf:{const l=n(new Map,s);for(const[d,f]of u)l.set(r(d),r(f));return l}case Cf:{const l=n(new Set,s);for(const d of u)l.add(r(d));return l}case oE:{const{name:l,message:d}=u;return n(typeof uE[l]=="function"?lE(l,d):new Error(d),s)}case aE: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:l}=new Uint8Array(u);return n(new DataView(l),u)}}return n(lE(a,u),s)};return r},cE=e=>U3(new Map,e)(0),Gi="",{toString:H3}={},{keys:j3}=Object,sa=e=>{const t=typeof e;if(t!=="object"||!e)return[el,t];const n=H3.call(e).slice(8,-1);switch(n){case"Array":return[ia,Gi];case"Object":return[tl,Gi];case"Date":return[vf,Gi];case"RegExp":return[Af,Gi];case"Map":return[Nf,Gi];case"Set":return[Cf,Gi];case"DataView":return[ia,n]}return n.includes("Array")?[ia,n]:e instanceof Error?[oE,e.name||"Error"]:[tl,n]},nl=([e,t])=>e===el&&(t==="function"||t==="symbol"),z3=(e,t,n,r)=>{const s=(u,l)=>{const d=r.push(u)-1;return n.set(l,d),d},a=u=>{if(n.has(u))return n.get(u);let[l,d]=sa(u);switch(l){case el:{let p=u;switch(d){case"bigint":l=aE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([sE],u)}return s([l,p],u)}case ia:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),s([d,[...T]],u)}const p=[],m=s([l,p],u);for(const T of u)p.push(a(T));return m}case tl:{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([l,p],u);for(const T of j3(u))(e||!nl(sa(u[T])))&&p.push([a(T),a(u[T])]);return m}case vf:return s([l,isNaN(u.getTime())?Gi:u.toISOString()],u);case Af:{const{source:p,flags:m}=u;return s([l,{source:p,flags:m}],u)}case Nf:{const p=[],m=s([l,p],u);for(const[T,y]of u)(e||!(nl(sa(T))||nl(sa(y))))&&p.push([a(T),a(y)]);return m}case Cf:{const p=[],m=s([l,p],u);for(const T of u)(e||!nl(sa(T)))&&p.push(a(T));return m}}const{message:f}=u;return s([l,{name:d,message:f}],u)};return a},dE=(e,{json:t,lossy:n}={})=>{const r=[];return z3(!(t||n),!!t,new Map,r)(e),r},Xi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?cE(dE(e,t)):structuredClone(e):(e,t)=>cE(dE(e,t));function $3(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 V3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function q3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||$3,r=e.options.footnoteBackLabel||V3,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];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(),T=Bs(m.toLowerCase());let y=0;const x=[],v=e.footnoteCounts.get(m);for(;v!==void 0&&++y<=v;){x.length>0&&x.push({type:"text",value:" "});let C=typeof n=="string"?n:n(d,y);typeof C=="string"&&(C={type:"text",value:C}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const C=A.children[A.children.length-1];C&&C.type==="text"?C.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...x)}else p.push(...x);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,S),l.push(S)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:le(U({},Xi(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
30
+ `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function C3(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=tE(n[r])}return t}function tE(e){const t=e.spread;return t==null?e.children.length>1:t}function O3(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 I3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function P3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function R3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function L3(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)},l=Tr(t.children[1]),d=Gu(t.children[t.children.length-1]);l&&d&&(u.position={start:l,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 D3(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,l=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let x={type:"element",tagName:a,properties:T,children:[]};m&&(x.children=e.all(m),e.patch(m,x),x=e.applyData(m,x)),f.push(x)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function M3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const nE=9,rE=32;function F3(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===nE||a===rE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===nE||a===rE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function B3(e,t){const n={type:"text",value:F3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function U3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const H3={blockquote:m3,break:g3,code:E3,delete:y3,emphasis:T3,footnoteReference:b3,heading:_3,html:x3,imageReference:w3,image:S3,inlineCode:v3,linkReference:A3,link:N3,listItem:k3,list:O3,paragraph:I3,root:P3,strong:R3,table:L3,tableCell:M3,tableRow:D3,text:B3,thematicBreak:U3,toml:Zu,yaml:Zu,definition:Zu,footnoteDefinition:Zu};function Zu(){}const sE=-1,el=0,sa=1,tl=2,Af=3,Nf=4,kf=5,Cf=6,oE=7,aE=8,uE=typeof self=="object"?self:globalThis,lE=(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 uE[e](t)},j3=(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 el:case sE:return n(u,s);case sa:{const l=n([],s);for(const d of u)l.push(r(d));return l}case tl:{const l=n({},s);for(const[d,f]of u)l[r(d)]=r(f);return l}case Af:return n(new Date(u),s);case Nf:{const{source:l,flags:d}=u;return n(new RegExp(l,d),s)}case kf:{const l=n(new Map,s);for(const[d,f]of u)l.set(r(d),r(f));return l}case Cf:{const l=n(new Set,s);for(const d of u)l.add(r(d));return l}case oE:{const{name:l,message:d}=u;return n(typeof uE[l]=="function"?lE(l,d):new Error(d),s)}case aE: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:l}=new Uint8Array(u);return n(new DataView(l),u)}}return n(lE(a,u),s)};return r},cE=e=>j3(new Map,e)(0),Gi="",{toString:z3}={},{keys:$3}=Object,oa=e=>{const t=typeof e;if(t!=="object"||!e)return[el,t];const n=z3.call(e).slice(8,-1);switch(n){case"Array":return[sa,Gi];case"Object":return[tl,Gi];case"Date":return[Af,Gi];case"RegExp":return[Nf,Gi];case"Map":return[kf,Gi];case"Set":return[Cf,Gi];case"DataView":return[sa,n]}return n.includes("Array")?[sa,n]:e instanceof Error?[oE,e.name||"Error"]:[tl,n]},nl=([e,t])=>e===el&&(t==="function"||t==="symbol"),V3=(e,t,n,r)=>{const s=(u,l)=>{const d=r.push(u)-1;return n.set(l,d),d},a=u=>{if(n.has(u))return n.get(u);let[l,d]=oa(u);switch(l){case el:{let p=u;switch(d){case"bigint":l=aE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([sE],u)}return s([l,p],u)}case sa:{if(d){let T=u;return d==="DataView"?T=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(T=new Uint8Array(u)),s([d,[...T]],u)}const p=[],m=s([l,p],u);for(const T of u)p.push(a(T));return m}case tl:{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([l,p],u);for(const T of $3(u))(e||!nl(oa(u[T])))&&p.push([a(T),a(u[T])]);return m}case Af:return s([l,isNaN(u.getTime())?Gi:u.toISOString()],u);case Nf:{const{source:p,flags:m}=u;return s([l,{source:p,flags:m}],u)}case kf:{const p=[],m=s([l,p],u);for(const[T,y]of u)(e||!(nl(oa(T))||nl(oa(y))))&&p.push([a(T),a(y)]);return m}case Cf:{const p=[],m=s([l,p],u);for(const T of u)(e||!nl(oa(T)))&&p.push(a(T));return m}}const{message:f}=u;return s([l,{name:d,message:f}],u)};return a},dE=(e,{json:t,lossy:n}={})=>{const r=[];return V3(!(t||n),!!t,new Map,r)(e),r},Xi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?cE(dE(e,t)):structuredClone(e):(e,t)=>cE(dE(e,t));function q3(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 Y3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function W3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||q3,r=e.options.footnoteBackLabel||Y3,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];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(),T=Bs(m.toLowerCase());let y=0;const x=[],v=e.footnoteCounts.get(m);for(;v!==void 0&&++y<=v;){x.length>0&&x.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const k=A.children[A.children.length-1];k&&k.type==="text"?k.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...x)}else p.push(...x);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,S),l.push(S)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:ue(U({},Xi(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
31
31
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
32
- `}]}}const rl=(function(e){if(e==null)return X3;if(typeof e=="function")return il(e);if(typeof e=="object")return Array.isArray(e)?Y3(e):W3(e);if(typeof e=="string")return G3(e);throw new Error("Expected function, string, or object as test")});function Y3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rl(e[n]);return il(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function W3(e){const t=e;return il(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function G3(e){return il(t);function t(n){return n&&n.type===e}}function il(e){return t;function t(n,r,s){return!!(Q3(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function X3(){return!0}function Q3(e){return e!==null&&typeof e=="object"&&"type"in e}function MB(e){return e}const fE=[],K3=!0,kf=!1,J3="skip";function hE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=rl(s),u=r?-1:1;l(e,void 0,[])();function l(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(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=fE,x,v,A;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=Z3(n(d,p)),y[0]===kf))return y;if("children"in d&&d.children){const S=d;if(S.children&&y[0]!==J3)for(v=(r?S.children.length:-1)+u,A=p.concat(S);v>-1&&v<S.children.length;){const C=S.children[v];if(x=l(C,v,A)(),x[0]===kf)return x;v=typeof x[1]=="number"?x[1]:v+u}}return y}}}function Z3(e){return Array.isArray(e)?e:typeof e=="number"?[K3,e]:e==null?fE:[e]}function sl(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),hE(e,a,l,s);function l(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const Of={}.hasOwnProperty,eO={};function tO(e,t){const n=t||eO,r=new Map,s=new Map,a=new Map,u=U(U({},B3),n.handlers),l={all:f,applyData:rO,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:nO,wrap:sO};return sl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,T=String(p.identifier).toUpperCase();m.has(T)||m.set(T,p)}}),l;function d(p,m){const T=p.type,y=l.handlers[T];if(Of.call(l.handlers,T)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(T)){if("children"in p){const v=p,{children:A}=v,S=pn(v,["children"]),C=Xi(S);return C.children=l.all(p),C}return Xi(p)}return(l.options.unknownHandler||iO)(l,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const x=l.one(T[y],p);if(x){if(y&&T[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=pE(x.value)),!Array.isArray(x)&&x.type==="element")){const v=x.children[0];v&&v.type==="text"&&(v.value=pE(v.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function nO(e,t){e.position&&(t.position=x1(e))}function rO(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,Xi(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function iO(e,t){const n=t.data||{},r="value"in t&&!(Of.call(n,"hProperties")||Of.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 sO(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
32
+ `}]}}const rl=(function(e){if(e==null)return K3;if(typeof e=="function")return il(e);if(typeof e=="object")return Array.isArray(e)?G3(e):X3(e);if(typeof e=="string")return Q3(e);throw new Error("Expected function, string, or object as test")});function G3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rl(e[n]);return il(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function X3(e){const t=e;return il(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function Q3(e){return il(t);function t(n){return n&&n.type===e}}function il(e){return t;function t(n,r,s){return!!(J3(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function K3(){return!0}function J3(e){return e!==null&&typeof e=="object"&&"type"in e}function j7(e){return e}const fE=[],Z3=!0,Of=!1,eO="skip";function hE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=rl(s),u=r?-1:1;l(e,void 0,[])();function l(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(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=fE,x,v,A;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=tO(n(d,p)),y[0]===Of))return y;if("children"in d&&d.children){const S=d;if(S.children&&y[0]!==eO)for(v=(r?S.children.length:-1)+u,A=p.concat(S);v>-1&&v<S.children.length;){const k=S.children[v];if(x=l(k,v,A)(),x[0]===Of)return x;v=typeof x[1]=="number"?x[1]:v+u}}return y}}}function tO(e){return Array.isArray(e)?e:typeof e=="number"?[Z3,e]:e==null?fE:[e]}function sl(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),hE(e,a,l,s);function l(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const If={}.hasOwnProperty,nO={};function rO(e,t){const n=t||nO,r=new Map,s=new Map,a=new Map,u=U(U({},H3),n.handlers),l={all:f,applyData:sO,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:iO,wrap:aO};return sl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,T=String(p.identifier).toUpperCase();m.has(T)||m.set(T,p)}}),l;function d(p,m){const T=p.type,y=l.handlers[T];if(If.call(l.handlers,T)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(T)){if("children"in p){const v=p,{children:A}=v,S=pn(v,["children"]),k=Xi(S);return k.children=l.all(p),k}return Xi(p)}return(l.options.unknownHandler||oO)(l,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const x=l.one(T[y],p);if(x){if(y&&T[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=pE(x.value)),!Array.isArray(x)&&x.type==="element")){const v=x.children[0];v&&v.type==="text"&&(v.value=pE(v.value))}Array.isArray(x)?m.push(...x):m.push(x)}}}return m}}function iO(e,t){e.position&&(t.position=x1(e))}function sO(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,Xi(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function oO(e,t){const n=t.data||{},r="value"in t&&!(If.call(n,"hProperties")||If.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 aO(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
33
33
  `});++r<e.length;)r&&n.push({type:"text",value:`
34
34
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
35
- `}),n}function pE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function mE(e,t){const n=tO(e,t),r=n.one(e,void 0),s=q3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
36
- `},s),a}function oO(e,t){return e&&"run"in e?function(n,r){return je(this,null,function*(){const s=mE(n,U({file:r},t));yield e.run(s,r)})}:function(n,r){return mE(n,U({file:r},e||t))}}function gE(e){if(e)throw e}var If,EE;function aO(){if(EE)return If;EE=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 T;for(T in f);return typeof T=="undefined"||e.call(f,T)},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},l=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return If=function d(){var f,p,m,T,y,x,v=arguments[0],A=1,S=arguments.length,C=!1;for(typeof v=="boolean"&&(C=v,v=arguments[1]||{},A=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});A<S;++A)if(f=arguments[A],f!=null)for(p in f)m=l(v,p),T=l(f,p),v!==T&&(C&&T&&(a(T)||(y=s(T)))?(y?(y=!1,x=m&&s(m)?m:[]):x=m&&a(m)?m:{},u(v,{name:p,newValue:d(C,x,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},If}var uO=aO();const Pf=Qe(uO);function Rf(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 lO(){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);l(null,...s);function l(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?cO(p,l)(...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 cO(e,t){let n;return r;function r(...u){const l=e.length>u.length;let d;l&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(l&&n)throw p;return s(p)}l||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...l){n||(n=!0,t(u,...l))}function a(u){s(null,u)}}const br={basename:dO,dirname:fO,extname:hO,join:pO,sep:"/"};function dO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');oa(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,l=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),l>-1&&(e.codePointAt(s)===t.codePointAt(l--)?l<0&&(r=s):(l=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function fO(e){if(oa(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 hO(e){oa(e);let t=e.length,n=-1,r=0,s=-1,a=0,u;for(;t--;){const l=e.codePointAt(t);if(l===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),l===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 pO(...e){let t=-1,n;for(;++t<e.length;)oa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":mO(n)}function mO(e){oa(e);const t=e.codePointAt(0)===47;let n=gO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function gO(e,t){let n="",r=0,s=-1,a=0,u=-1,l,d;for(;++u<=e.length;){if(u<e.length)l=e.codePointAt(u);else{if(l===47)break;l=47}if(l===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 l===46&&a>-1?a++:a=-1}return n}function oa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const EO={cwd:yO};function yO(){return"/"}function Lf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function TO(e){if(typeof e=="string")e=new URL(e);else if(!Lf(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 bO(e)}function bO(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 Df=["history","path","basename","stem","extname","dirname"];class yE{constructor(t){let n;t?Lf(t)?n={path:t}:typeof t=="string"||_O(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":EO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Df.length;){const a=Df[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)Df.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?br.basename(this.path):void 0}set basename(t){Ff(t,"basename"),Mf(t,"basename"),this.path=br.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?br.dirname(this.path):void 0}set dirname(t){TE(this.basename,"dirname"),this.path=br.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?br.extname(this.path):void 0}set extname(t){if(Mf(t,"extname"),TE(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=br.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Lf(t)&&(t=TO(t)),Ff(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?br.basename(this.path,this.extname):void 0}set stem(t){Ff(t,"stem"),Mf(t,"stem"),this.path=br.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 Jt(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 Mf(e,t){if(e&&e.includes(br.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+br.sep+"`")}function Ff(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function TE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function _O(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xO=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),wO={}.hasOwnProperty;class Bf extends xO{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=lO()}copy(){const t=new Bf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Pf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(jf("data",this.frozen),this.namespace[t]=n,this):wO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(jf("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=ol(t),r=this.parser||this.Parser;return Uf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Uf("process",this.parser||this.Parser),Hf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const l=ol(t),d=r.parse(l);r.run(d,l,function(p,m,T){if(p||!m||!T)return f(p);const y=m,x=r.stringify(y,T);AO(x)?T.value=x:T.result=x,f(p,T)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Uf("processSync",this.parser||this.Parser),Hf("processSync",this.compiler||this.Compiler),this.process(t,s),_E("processSync","process",n),r;function s(a,u){n=!0,gE(a),r=u}}run(t,n,r){bE(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,l){const d=ol(n);s.run(t,d,f);function f(p,m,T){const y=m||t;p?l(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),_E("runSync","run",r),s;function a(u,l){gE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=ol(n),s=this.compiler||this.Compiler;return Hf("stringify",s),bE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(jf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?l(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");l(f.plugins),f.settings&&(s.settings=Pf(!0,s.settings,f.settings))}function l(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,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,...x]=p;const v=r[T][1];Rf(v)&&Rf(y)&&(y=Pf(!0,v,y)),r[T]=[f,y,...x]}}}}const SO=new Bf().freeze();function Uf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Hf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jf(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 bE(e){if(!Rf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _E(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ol(e){return vO(e)?e:new yE(e)}function vO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function AO(e){return typeof e=="string"||NO(e)}function NO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const CO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",xE=[],wE={allowDangerousHtml:!0},kO=/^(https?|ircs?|mailto|xmpp)$/i,OO=[{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 SE(e){const t=IO(e),n=PO(e);return RO(t.runSync(t.parse(n),n),e)}function IO(e){const t=e.rehypePlugins||xE,n=e.remarkPlugins||xE,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),wE):wE;return SO().use(f3).use(n).use(oO,r).use(t)}function PO(e){const t=e.children||"",n=new yE;return typeof t=="string"&&(n.value=t),n}function RO(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||LO;for(const p of OO)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+CO+p.id,void 0);return sl(e,f),iC(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Ef)if(Object.hasOwn(Ef,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],v=Ef[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(x||""),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,T)),y&&T&&typeof m=="number")return l&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function LO(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||kO.test(e.slice(0,t))?e:""}const vE=/[#.]/g;function DO(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){vE.lastIndex=s;const l=vE.exec(n),d=n.slice(s,l?l.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),l&&(a=l[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function AE(e,t,n){const r=n?UO(n):void 0;function s(a,u,...l){let d;if(a==null){d={type:"root",children:[]};const f=u;l.unshift(f)}else{d=DO(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,MO(u))l.unshift(u);else for(const[m,T]of Object.entries(u))FO(e,d.properties,m,T)}for(const f of l)zf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function MO(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 FO(e,t,n,r){const s=Wu(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=m1(r):s.commaSeparated?a=n1(r):s.commaOrSpaceSeparated?a=m1(n1(r).join(" ")):a=NE(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?BO(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(NE(s,s.property,l));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function zf(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)zf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?zf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function NE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Xo(n)===Xo(t)))return!0}return n}function BO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function UO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const HO=["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"],jO=AE(Qo,"div"),zO=AE(ii,"g",HO);function $O(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 l=n[u];if(l===void 0){const d=CE(t,n[u-1]);l=d===-1?t.length+1:d+1,n[u]=l}if(l>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 l=n[n.length-1],d=CE(t,l),f=d===-1?t.length+1:d+1;if(l===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 CE(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
37
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Qi={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/"},kE={}.hasOwnProperty,VO=Object.prototype;function qO(e,t){const n=t||{};return $f({file:n.file||void 0,location:!1,schema:n.space==="svg"?ii:Qo,verbose:n.verbose||!1},e)}function $f(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},al(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:OE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=$O(a),l=u.toPoint(0),d=u.toPoint(a.length);n.position={start:l,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},al(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},al(e,r,n),n}default:return n=YO(e,t),n}}function OE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=$f(e,t[n]);r.push(s)}return r}function YO(e,t){const n=e.schema;e.schema=t.namespaceURI===Qi.svg?ii:Qo;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;kE.call(VO,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?zO:jO)(t.tagName,s,OE(e,t.childNodes));if(al(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&Hs(d.startTag),p=d&&d.endTag&&Hs(d.endTag),m=$f(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function al(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=WO(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function WO(e,t,n){const r=Hs(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)kE.call(n.attrs,u)&&(a[Wu(e.schema,u).property]=Hs(n.attrs[u]));n.startTag;const l=Hs(n.startTag),d=n.endTag?Hs(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Hs(e){const t=IE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=IE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function IE(e){return e.line&&e.column?e:void 0}const PE={}.hasOwnProperty;function RE(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&PE.call(s,e)){const d=String(s[e]);u=PE.call(l,d)?l[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 GO={},XO={}.hasOwnProperty,LE=RE("type",{handlers:{root:KO,element:nI,text:eI,comment:tI,doctype:ZO}});function QO(e,t){const r=(t||GO).space;return LE(e,r==="svg"?ii:Qo)}function KO(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Vf(e.children,n,t),js(e,n),n}function JO(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Vf(e.children,n,t),js(e,n),n}function ZO(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return js(e,t),t}function eI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return js(e,t),t}function tI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return js(e,t),t}function nI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ii);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&XO.call(e.properties,a)){const d=rI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Qi[u],childNodes:[],parentNode:null};return l.childNodes=Vf(e.children,l,r),js(e,l),e.tagName==="template"&&e.content&&(l.content=JO(e.content,r)),l}function rI(e,t,n){const r=Wu(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?r1(n):g1(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=Qi[r.space]}return s}function Vf(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=LE(e[r],n);a.parentNode=t,s.push(a)}return s}function js(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 iI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],sI=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]),Et="�";var O;(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"})(O||(O={}));const bn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function DE(e){return e>=55296&&e<=57343}function oI(e){return e>=56320&&e<=57343}function aI(e,t){return(e-55296)*1024+9216+t}function ME(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function FE(e){return e>=64976&&e<=65007||sI.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 uI=65536;class lI{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=uI,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,l=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:l,endOffset:l}}_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(oI(n))return this.pos++,this._addGap(),aI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,O.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,O.EOF;const r=this.html.charCodeAt(n);return r===O.CARRIAGE_RETURN?O.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,O.EOF;let t=this.html.charCodeAt(this.pos);return t===O.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,O.LINE_FEED):t===O.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,DE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===O.LINE_FEED||t===O.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ME(t)?this._err(te.controlCharacterInInputStream):FE(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 Ge;(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"})(Ge||(Ge={}));function BE(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 cI=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))),dI=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 fI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=dI.get(e))!==null&&t!==void 0?t:e}var Ft;(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"})(Ft||(Ft={}));const hI=32;var ai;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ai||(ai={}));function qf(e){return e>=Ft.ZERO&&e<=Ft.NINE}function pI(e){return e>=Ft.UPPER_A&&e<=Ft.UPPER_F||e>=Ft.LOWER_A&&e<=Ft.LOWER_F}function mI(e){return e>=Ft.UPPER_A&&e<=Ft.UPPER_Z||e>=Ft.LOWER_A&&e<=Ft.LOWER_Z||qf(e)}function gI(e){return e===Ft.EQUALS||mI(e)}var Bt;(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"})(Bt||(Bt={}));var Br;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Br||(Br={}));class EI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Bt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Br.Strict}startEntity(t){this.decodeMode=t,this.state=Bt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Bt.EntityStart:return t.charCodeAt(n)===Ft.NUM?(this.state=Bt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Bt.NamedEntity,this.stateNamedEntity(t,n));case Bt.NumericStart:return this.stateNumericStart(t,n);case Bt.NumericDecimal:return this.stateNumericDecimal(t,n);case Bt.NumericHex:return this.stateNumericHex(t,n);case Bt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|hI)===Ft.LOWER_X?(this.state=Bt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Bt.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(qf(s)||pI(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(qf(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===Ft.SEMI)this.consumed+=1;else if(this.decodeMode===Br.Strict)return 0;return this.emitCodePoint(fI(this.result),this.consumed),this.errors&&(t!==Ft.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&ai.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=yI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Br.Attribute&&(a===0||gI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&ai.VALUE_LENGTH)>>14,a!==0){if(u===Ft.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Br.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]&ai.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]&~ai.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Bt.NamedEntity:return this.result!==0&&(this.decodeMode!==Br.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Bt.NumericDecimal:return this.emitNumericEntity(0,2);case Bt.NumericHex:return this.emitNumericEntity(0,3);case Bt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Bt.EntityStart:return 0}}}function yI(e,t,n,r){const s=(t&ai.BRANCH_LENGTH)>>7,a=t&ai.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,l=u+s-1;for(;u<=l;){const d=u+l>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)l=d-1;else return e[d+s]}return-1}var ge;(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/"})(ge||(ge={}));var Ki;(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"})(Ki||(Ki={}));var zn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(zn||(zn={}));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 TI=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 zs(e){var t;return(t=TI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const Te=g,bI={[ge.HTML]:new Set([Te.ADDRESS,Te.APPLET,Te.AREA,Te.ARTICLE,Te.ASIDE,Te.BASE,Te.BASEFONT,Te.BGSOUND,Te.BLOCKQUOTE,Te.BODY,Te.BR,Te.BUTTON,Te.CAPTION,Te.CENTER,Te.COL,Te.COLGROUP,Te.DD,Te.DETAILS,Te.DIR,Te.DIV,Te.DL,Te.DT,Te.EMBED,Te.FIELDSET,Te.FIGCAPTION,Te.FIGURE,Te.FOOTER,Te.FORM,Te.FRAME,Te.FRAMESET,Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6,Te.HEAD,Te.HEADER,Te.HGROUP,Te.HR,Te.HTML,Te.IFRAME,Te.IMG,Te.INPUT,Te.LI,Te.LINK,Te.LISTING,Te.MAIN,Te.MARQUEE,Te.MENU,Te.META,Te.NAV,Te.NOEMBED,Te.NOFRAMES,Te.NOSCRIPT,Te.OBJECT,Te.OL,Te.P,Te.PARAM,Te.PLAINTEXT,Te.PRE,Te.SCRIPT,Te.SECTION,Te.SELECT,Te.SOURCE,Te.STYLE,Te.SUMMARY,Te.TABLE,Te.TBODY,Te.TD,Te.TEMPLATE,Te.TEXTAREA,Te.TFOOT,Te.TH,Te.THEAD,Te.TITLE,Te.TR,Te.TRACK,Te.UL,Te.WBR,Te.XMP]),[ge.MATHML]:new Set([Te.MI,Te.MO,Te.MN,Te.MS,Te.MTEXT,Te.ANNOTATION_XML]),[ge.SVG]:new Set([Te.TITLE,Te.FOREIGN_OBJECT,Te.DESC]),[ge.XLINK]:new Set,[ge.XML]:new Set,[ge.XMLNS]:new Set},Yf=new Set([Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var L;(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"})(L||(L={}));const vt={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function _I(e){return e>=O.DIGIT_0&&e<=O.DIGIT_9}function aa(e){return e>=O.LATIN_CAPITAL_A&&e<=O.LATIN_CAPITAL_Z}function xI(e){return e>=O.LATIN_SMALL_A&&e<=O.LATIN_SMALL_Z}function ui(e){return xI(e)||aa(e)}function UE(e){return ui(e)||_I(e)}function ul(e){return e+32}function HE(e){return e===O.SPACE||e===O.LINE_FEED||e===O.TABULATION||e===O.FORM_FEED}function jE(e){return HE(e)||e===O.SOLIDUS||e===O.GREATER_THAN_SIGN}function wI(e){return e===O.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:DE(e)?te.surrogateCharacterReference:FE(e)?te.noncharacterCharacterReference:ME(e)||e===O.CARRIAGE_RETURN?te.controlCharacterReference:null}class SI{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=L.DATA,this.returnState=L.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new lI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new EI(cI,(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=wI(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:Ge.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ge.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ge.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ge.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(BE(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=zs(t.tagName),t.type===Ge.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 Ge.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ge.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ge.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:Ge.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=HE(t)?Ge.WHITESPACE_CHARACTER:t===O.NULL?Ge.NULL_CHARACTER:Ge.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ge.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Br.Attribute:Br.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===L.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case L.DATA:{this._stateData(t);break}case L.RCDATA:{this._stateRcdata(t);break}case L.RAWTEXT:{this._stateRawtext(t);break}case L.SCRIPT_DATA:{this._stateScriptData(t);break}case L.PLAINTEXT:{this._statePlaintext(t);break}case L.TAG_OPEN:{this._stateTagOpen(t);break}case L.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case L.TAG_NAME:{this._stateTagName(t);break}case L.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case L.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case L.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case L.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case L.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case L.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case L.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case L.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case L.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case L.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case L.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case L.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case L.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case L.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case L.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case L.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case L.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case L.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case L.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case L.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case L.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case L.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case L.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case L.BOGUS_COMMENT:{this._stateBogusComment(t);break}case L.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case L.COMMENT_START:{this._stateCommentStart(t);break}case L.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case L.COMMENT:{this._stateComment(t);break}case L.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case L.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case L.COMMENT_END:{this._stateCommentEnd(t);break}case L.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case L.DOCTYPE:{this._stateDoctype(t);break}case L.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case L.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case L.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case L.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case L.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case L.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case L.CDATA_SECTION:{this._stateCdataSection(t);break}case L.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case L.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case L.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case L.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case O.AMPERSAND:{this._startCharacterReference();break}case O.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Et);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Et);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Et);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Et);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ui(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case O.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case O.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case O.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case O.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ui(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case O.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=L.DATA;break}case O.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=Et;break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(aa(t)?ul(t):t)}}_stateRcdataLessThanSign(t){t===O.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ui(t)?(this.state=L.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=L.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 O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case O.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case O.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=L.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===O.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ui(t)?(this.state=L.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case O.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case O.EXCLAMATION_MARK:{this.state=L.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=L.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ui(t)?(this.state=L.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===O.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===O.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Et);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(Et);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case O.HYPHEN_MINUS:{this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(Et);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===O.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ui(t)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ui(t)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(bn.SCRIPT,!1)&&jE(this.preprocessor.peek(bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Et);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Et);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case O.HYPHEN_MINUS:{this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Et);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===O.SOLIDUS?(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(bn.SCRIPT,!1)&&jE(this.preprocessor.peek(bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.SOLIDUS:case O.GREATER_THAN_SIGN:case O.EOF:{this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case O.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=L.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:case O.SOLIDUS:case O.GREATER_THAN_SIGN:case O.EOF:{this._leaveAttrName(),this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case O.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case O.QUOTATION_MARK:case O.APOSTROPHE:case O.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=Et;break}default:this.currentAttr.name+=String.fromCodePoint(aa(t)?ul(t):t)}}_stateAfterAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case O.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{this.state=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=Et;break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case O.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=Et;break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=Et;break}case O.QUOTATION_MARK:case O.APOSTROPHE:case O.LESS_THAN_SIGN:case O.EQUALS_SIGN:case O.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case O.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case O.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.data+=Et;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(bn.DASH_DASH,!0)?(this._createCommentToken(bn.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(bn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(bn.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(bn.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(bn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=L.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case O.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.data+=Et;break}case O.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 O.EXCLAMATION_MARK:{n.data+="!",this.state=L.COMMENT_LESS_THAN_SIGN_BANG;break}case O.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===O.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===O.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==O.GREATER_THAN_SIGN&&t!==O.EOF&&this._err(te.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case O.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case O.HYPHEN_MINUS:{n.data+="-";break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case O.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case O.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=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(aa(t))this._createDoctypeToken(String.fromCharCode(ul(t))),this.state=L.DOCTYPE_NAME;else switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(Et),this.state=L.DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.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=L.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.name+=Et;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(aa(t)?ul(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(bn.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(bn.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=Et;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.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 O.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=Et;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.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 O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=Et;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.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 O.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=Et;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.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 O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.NULL:{this._err(te.unexpectedNullCharacter);break}case O.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case O.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case O.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===O.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA;break}case O.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=L.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(O.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&UE(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){UE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===O.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const zE=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),$E=new Set([...zE,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),ll=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),vI=new Set([...ll,g.OL,g.UL]),AI=new Set([...ll,g.BUTTON]),VE=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),qE=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),NI=new Set([g.TR,g.TEMPLATE,g.HTML]),CI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),kI=new Set([g.TABLE,g.TEMPLATE,g.HTML]),OI=new Set([g.TD,g.TH]);class II{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)===ge.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])!==ge.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(Yf,ge.HTML)}popUntilTableCellPopped(){this.popUntilPopped(OI,ge.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(kI,ge.HTML)}clearBackToTableBodyContext(){this.clearBackTo(CI,ge.HTML)}clearBackToTableRowContext(){this.clearBackTo(NI,ge.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 ge.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case ge.SVG:{if(qE.has(s))return!1;break}case ge.MATHML:{if(VE.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ll)}hasInListItemScope(t){return this.hasInDynamicScope(t,vI)}hasInButtonScope(t){return this.hasInDynamicScope(t,AI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ge.HTML:{if(Yf.has(n))return!0;if(ll.has(n))return!1;break}case ge.SVG:{if(qE.has(n))return!1;break}case ge.MATHML:{if(VE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ge.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])===ge.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])===ge.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&&zE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&$E.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&$E.has(this.currentTagId);)this.pop()}}const Wf=3;var _r;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(_r||(_r={}));const YE={type:_r.Marker};class PI{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 l=0;l<this.entries.length;l++){const d=this.entries[l];if(d.type===_r.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:l,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Wf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Wf)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const l=r[u];l.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=Wf&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(YE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:_r.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:_r.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(YE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===_r.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===_r.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===_r.Element&&n.element===t)}}const li={createDocument(){return{nodeName:"#document",mode:zn.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};li.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(li.isTextNode(n)){n.value+=t;return}}li.appendChild(e,li.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&li.isTextNode(r)?r.value+=t:li.insertBefore(e,li.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=U(U({},e.sourceCodeLocation),t)}},WE="html",RI="about:legacy-compat",LI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",GE=["+//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//"],DI=[...GE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],MI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),XE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],FI=[...XE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function QE(e,t){return t.some(n=>e.startsWith(n))}function BI(e){return e.name===WE&&e.publicId===null&&(e.systemId===null||e.systemId===RI)}function UI(e){if(e.name!==WE)return zn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===LI)return zn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),MI.has(n))return zn.QUIRKS;let r=t===null?DI:GE;if(QE(n,r))return zn.QUIRKS;if(r=t===null?XE:FI,QE(n,r))return zn.LIMITED_QUIRKS}return zn.NO_QUIRKS}const KE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},HI="definitionurl",jI="definitionURL",zI=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])),$I=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ge.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ge.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ge.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ge.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ge.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ge.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ge.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ge.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ge.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ge.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ge.XMLNS}]]),VI=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])),qI=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 YI(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===Ki.COLOR||r===Ki.SIZE||r===Ki.FACE)||qI.has(t)}function JE(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===HI){e.attrs[t].name=jI;break}}function ZE(e){for(let t=0;t<e.attrs.length;t++){const n=zI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Gf(e){for(let t=0;t<e.attrs.length;t++){const n=$I.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 WI(e){const t=VI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=zs(e.tagName))}function GI(e,t){return t===ge.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function XI(e,t,n){if(t===ge.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ki.ENCODING){const s=n[r].value.toLowerCase();return s===KE.TEXT_HTML||s===KE.APPLICATION_XML}}return t===ge.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function QI(e,t,n,r){return(!r||r===ge.HTML)&&XI(e,t,n)||(!r||r===ge.MATHML)&&GI(e,t)}const KI="hidden",JI=8,ZI=3;var B;(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"})(B||(B={}));const eP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ey=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),ty={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:li,onParseError:null};class ny{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=B.INITIAL,this.originalInsertionMode=B.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=U(U({},ty),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 SI(this.options,this),this.activeFormattingElements=new PI(this.treeAdapter),this.fragmentContextID=r?zs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new II(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=U(U({},ty),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,ge.HTML,[]));const s=r.treeAdapter.createElement("documentmock",ge.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(B.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:eP,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)===ge.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ge.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=B.TEXT}switchToPlaintextParsing(){this.insertionMode=B.TEXT,this.originalInsertionMode=B.IN_BODY,this.tokenizer.state=vt.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)!==ge.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=vt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=vt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=vt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=vt.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(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&le(U({},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,ge.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ge.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,ge.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===Ge.END_TAG&&s===n.tagName?{endTag:U({},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)===ge.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ge.HTML)}_processToken(t){switch(t.type){case Ge.CHARACTER:{this.onCharacter(t);break}case Ge.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ge.COMMENT:{this.onComment(t);break}case Ge.DOCTYPE:{this.onDoctype(t);break}case Ge.START_TAG:{this._processStartTag(t);break}case Ge.END_TAG:{this.onEndTag(t);break}case Ge.EOF:{this.onEof(t);break}case Ge.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return QI(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===_r.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=B.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=B.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=B.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=B.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=B.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=B.IN_TABLE;return}case g.BODY:{this.insertionMode=B.IN_BODY;return}case g.FRAMESET:{this.insertionMode=B.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?B.AFTER_HEAD:B.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=B.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=B.IN_HEAD;return}break}}this.insertionMode=B.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=B.IN_SELECT_IN_TABLE;return}}this.insertionMode=B.IN_SELECT}_isElementCausesFosterParenting(t){return ey.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)===ge.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 bI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){OR(this,t);return}switch(this.insertionMode){case B.INITIAL:{ua(this,t);break}case B.BEFORE_HTML:{la(this,t);break}case B.BEFORE_HEAD:{ca(this,t);break}case B.IN_HEAD:{da(this,t);break}case B.IN_HEAD_NO_SCRIPT:{fa(this,t);break}case B.AFTER_HEAD:{ha(this,t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:{iy(this,t);break}case B.TEXT:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Jf(this,t);break}case B.IN_TABLE_TEXT:{fy(this,t);break}case B.IN_COLUMN_GROUP:{fl(this,t);break}case B.AFTER_BODY:{ml(this,t);break}case B.AFTER_AFTER_BODY:{gl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){kR(this,t);return}switch(this.insertionMode){case B.INITIAL:{ua(this,t);break}case B.BEFORE_HTML:{la(this,t);break}case B.BEFORE_HEAD:{ca(this,t);break}case B.IN_HEAD:{da(this,t);break}case B.IN_HEAD_NO_SCRIPT:{fa(this,t);break}case B.AFTER_HEAD:{ha(this,t);break}case B.TEXT:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Jf(this,t);break}case B.IN_COLUMN_GROUP:{fl(this,t);break}case B.AFTER_BODY:{ml(this,t);break}case B.AFTER_AFTER_BODY:{gl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Qf(this,t);return}switch(this.insertionMode){case B.INITIAL:case B.BEFORE_HTML:case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_TEMPLATE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{Qf(this,t);break}case B.IN_TABLE_TEXT:{ga(this,t);break}case B.AFTER_BODY:{aP(this,t);break}case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{uP(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case B.INITIAL:{lP(this,t);break}case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case B.IN_TABLE_TEXT:{ga(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)?IR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{ua(this,t);break}case B.BEFORE_HTML:{cP(this,t);break}case B.BEFORE_HEAD:{fP(this,t);break}case B.IN_HEAD:{rr(this,t);break}case B.IN_HEAD_NO_SCRIPT:{mP(this,t);break}case B.AFTER_HEAD:{EP(this,t);break}case B.IN_BODY:{en(this,t);break}case B.IN_TABLE:{$s(this,t);break}case B.IN_TABLE_TEXT:{ga(this,t);break}case B.IN_CAPTION:{hR(this,t);break}case B.IN_COLUMN_GROUP:{Zf(this,t);break}case B.IN_TABLE_BODY:{hl(this,t);break}case B.IN_ROW:{pl(this,t);break}case B.IN_CELL:{gR(this,t);break}case B.IN_SELECT:{my(this,t);break}case B.IN_SELECT_IN_TABLE:{yR(this,t);break}case B.IN_TEMPLATE:{bR(this,t);break}case B.AFTER_BODY:{xR(this,t);break}case B.IN_FRAMESET:{wR(this,t);break}case B.AFTER_FRAMESET:{vR(this,t);break}case B.AFTER_AFTER_BODY:{NR(this,t);break}case B.AFTER_AFTER_FRAMESET:{CR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?PR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{ua(this,t);break}case B.BEFORE_HTML:{dP(this,t);break}case B.BEFORE_HEAD:{hP(this,t);break}case B.IN_HEAD:{pP(this,t);break}case B.IN_HEAD_NO_SCRIPT:{gP(this,t);break}case B.AFTER_HEAD:{yP(this,t);break}case B.IN_BODY:{dl(this,t);break}case B.TEXT:{rR(this,t);break}case B.IN_TABLE:{pa(this,t);break}case B.IN_TABLE_TEXT:{ga(this,t);break}case B.IN_CAPTION:{pR(this,t);break}case B.IN_COLUMN_GROUP:{mR(this,t);break}case B.IN_TABLE_BODY:{eh(this,t);break}case B.IN_ROW:{py(this,t);break}case B.IN_CELL:{ER(this,t);break}case B.IN_SELECT:{gy(this,t);break}case B.IN_SELECT_IN_TABLE:{TR(this,t);break}case B.IN_TEMPLATE:{_R(this,t);break}case B.AFTER_BODY:{yy(this,t);break}case B.IN_FRAMESET:{SR(this,t);break}case B.AFTER_FRAMESET:{AR(this,t);break}case B.AFTER_AFTER_BODY:{gl(this,t);break}}}onEof(t){switch(this.insertionMode){case B.INITIAL:{ua(this,t);break}case B.BEFORE_HTML:{la(this,t);break}case B.BEFORE_HEAD:{ca(this,t);break}case B.IN_HEAD:{da(this,t);break}case B.IN_HEAD_NO_SCRIPT:{fa(this,t);break}case B.AFTER_HEAD:{ha(this,t);break}case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{cy(this,t);break}case B.TEXT:{iR(this,t);break}case B.IN_TABLE_TEXT:{ga(this,t);break}case B.IN_TEMPLATE:{Ey(this,t);break}case B.AFTER_BODY:case B.IN_FRAMESET:case B.AFTER_FRAMESET:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{Kf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===O.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 B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.TEXT:case B.IN_COLUMN_GROUP:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{this._insertCharacters(t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:case B.AFTER_BODY:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{ry(this,t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Jf(this,t);break}case B.IN_TABLE_TEXT:{dy(this,t);break}}}}function tP(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):ly(e,t),n}function nP(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 rP(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 l=e.activeFormattingElements.getElementEntry(u),d=l&&a>=ZI;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=iP(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function iP(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 sP(e,t,n){const r=e.treeAdapter.getTagName(t),s=zs(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===ge.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function oP(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 Xf(e,t){for(let n=0;n<JI;n++){const r=tP(e,t);if(!r)break;const s=nP(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=rP(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&sP(e,u,a),oP(e,s,r)}}function Qf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function aP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function uP(e,t){e._appendCommentNode(t,e.document)}function Kf(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 lP(e,t){e._setDocumentType(t);const n=t.forceQuirks?zn.QUIRKS:UI(t);BI(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=B.BEFORE_HTML}function ua(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,zn.QUIRKS),e.insertionMode=B.BEFORE_HTML,e._processToken(t)}function cP(e,t){t.tagID===g.HTML?(e._insertElement(t,ge.HTML),e.insertionMode=B.BEFORE_HEAD):la(e,t)}function dP(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&la(e,t)}function la(e,t){e._insertFakeRootElement(),e.insertionMode=B.BEFORE_HEAD,e._processToken(t)}function fP(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.HEAD:{e._insertElement(t,ge.HTML),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD;break}default:ca(e,t)}}function hP(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?ca(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function ca(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD,e._processToken(t)}function rr(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,ge.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,vt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,vt.RAWTEXT):(e._insertElement(t,ge.HTML),e.insertionMode=B.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,vt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,vt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=B.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(B.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:da(e,t)}}function pP(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=B.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{da(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ji(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=B.AFTER_HEAD,e._processToken(t)}function mP(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:{rr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:fa(e,t)}}function gP(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=B.IN_HEAD;break}case g.BR:{fa(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function fa(e,t){const n=t.type===Ge.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=B.IN_HEAD,e._processToken(t)}function EP(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.BODY:{e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=B.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ge.HTML),e.insertionMode=B.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),rr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:ha(e,t)}}function yP(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{ha(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function ha(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=B.IN_BODY,cl(e,t)}function cl(e,t){switch(t.type){case Ge.CHARACTER:{iy(e,t);break}case Ge.WHITESPACE_CHARACTER:{ry(e,t);break}case Ge.COMMENT:{Qf(e,t);break}case Ge.START_TAG:{en(e,t);break}case Ge.END_TAG:{dl(e,t);break}case Ge.EOF:{cy(e,t);break}}}function ry(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function iy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function TP(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function bP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function _P(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ge.HTML),e.insertionMode=B.IN_FRAMESET)}function xP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML)}function wP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Yf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ge.HTML)}function SP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function vP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML),n||(e.formElement=e.openElements.current))}function AP(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,ge.HTML)}function NP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.tokenizer.state=vt.PLAINTEXT}function CP(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.framesetOk=!1}function kP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Xf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function OP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function IP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Xf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function PP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function RP(e,t){e.treeAdapter.getDocumentMode(e.document)!==zn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=B.IN_TABLE}function sy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ge.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function oy(e){const t=BE(e,Ki.TYPE);return t!=null&&t.toLowerCase()===KI}function LP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ge.HTML),oy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function DP(e,t){e._appendElement(t,ge.HTML),t.ackSelfClosing=!0}function MP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ge.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function FP(e,t){t.tagName=X.IMG,t.tagID=g.IMG,sy(e,t)}function BP(e,t){e._insertElement(t,ge.HTML),e.skipNextNewLine=!0,e.tokenizer.state=vt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=B.TEXT}function UP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,vt.RAWTEXT)}function HP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,vt.RAWTEXT)}function ay(e,t){e._switchToTextParsing(t,vt.RAWTEXT)}function jP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===B.IN_TABLE||e.insertionMode===B.IN_CAPTION||e.insertionMode===B.IN_TABLE_BODY||e.insertionMode===B.IN_ROW||e.insertionMode===B.IN_CELL?B.IN_SELECT_IN_TABLE:B.IN_SELECT}function zP(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML)}function $P(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ge.HTML)}function VP(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ge.HTML)}function qP(e,t){e._reconstructActiveFormattingElements(),JE(t),Gf(t),t.selfClosing?e._appendElement(t,ge.MATHML):e._insertElement(t,ge.MATHML),t.ackSelfClosing=!0}function YP(e,t){e._reconstructActiveFormattingElements(),ZE(t),Gf(t),t.selfClosing?e._appendElement(t,ge.SVG):e._insertElement(t,ge.SVG),t.ackSelfClosing=!0}function uy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.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:{OP(e,t);break}case g.A:{kP(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{wP(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:{xP(e,t);break}case g.LI:case g.DD:case g.DT:{AP(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{sy(e,t);break}case g.HR:{MP(e,t);break}case g.RB:case g.RTC:{$P(e,t);break}case g.RT:case g.RP:{VP(e,t);break}case g.PRE:case g.LISTING:{SP(e,t);break}case g.XMP:{UP(e,t);break}case g.SVG:{YP(e,t);break}case g.HTML:{TP(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:{rr(e,t);break}case g.BODY:{bP(e,t);break}case g.FORM:{vP(e,t);break}case g.NOBR:{IP(e,t);break}case g.MATH:{qP(e,t);break}case g.TABLE:{RP(e,t);break}case g.INPUT:{LP(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{DP(e,t);break}case g.IMAGE:{FP(e,t);break}case g.BUTTON:{CP(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{PP(e,t);break}case g.IFRAME:{HP(e,t);break}case g.SELECT:{jP(e,t);break}case g.OPTION:case g.OPTGROUP:{zP(e,t);break}case g.NOEMBED:case g.NOFRAMES:{ay(e,t);break}case g.FRAMESET:{_P(e,t);break}case g.TEXTAREA:{BP(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?ay(e,t):uy(e,t);break}case g.PLAINTEXT:{NP(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:uy(e,t)}}function WP(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function GP(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,yy(e,t))}function XP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function QP(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 KP(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function JP(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function ZP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function eR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function tR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function nR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function ly(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 dl(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:{Xf(e,t);break}case g.P:{KP(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:{XP(e,t);break}case g.LI:{JP(e);break}case g.DD:case g.DT:{ZP(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{eR(e);break}case g.BR:{nR(e);break}case g.BODY:{WP(e,t);break}case g.HTML:{GP(e,t);break}case g.FORM:{QP(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{tR(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:ly(e,t)}}function cy(e,t){e.tmplInsertionModeStack.length>0?Ey(e,t):Kf(e,t)}function rR(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 iR(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Jf(e,t){if(e.openElements.currentTagId!==void 0&&ey.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=B.IN_TABLE_TEXT,t.type){case Ge.CHARACTER:{fy(e,t);break}case Ge.WHITESPACE_CHARACTER:{dy(e,t);break}}else ma(e,t)}function sR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ge.HTML),e.insertionMode=B.IN_CAPTION}function oR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ge.HTML),e.insertionMode=B.IN_COLUMN_GROUP}function aR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=B.IN_COLUMN_GROUP,Zf(e,t)}function uR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ge.HTML),e.insertionMode=B.IN_TABLE_BODY}function lR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=B.IN_TABLE_BODY,hl(e,t)}function cR(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function dR(e,t){oy(t)?e._appendElement(t,ge.HTML):ma(e,t),t.ackSelfClosing=!0}function fR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ge.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function $s(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{lR(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{rr(e,t);break}case g.COL:{aR(e,t);break}case g.FORM:{fR(e,t);break}case g.TABLE:{cR(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{uR(e,t);break}case g.INPUT:{dR(e,t);break}case g.CAPTION:{sR(e,t);break}case g.COLGROUP:{oR(e,t);break}default:ma(e,t)}}function pa(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Ji(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:ma(e,t)}}function ma(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,cl(e,t),e.fosterParentingEnabled=n}function dy(e,t){e.pendingCharacterTokens.push(t)}function fy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ga(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ma(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const hy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function hR(e,t){const n=t.tagID;hy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,$s(e,t)):en(e,t)}function pR(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=B.IN_TABLE,n===g.TABLE&&pa(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:dl(e,t)}}function Zf(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.COL:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{rr(e,t);break}default:fl(e,t)}}function mR(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case g.TEMPLATE:{Ji(e,t);break}case g.COL:break;default:fl(e,t)}}function fl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE,e._processToken(t))}function hl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ge.HTML),e.insertionMode=B.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=B.IN_ROW,pl(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=B.IN_TABLE,$s(e,t));break}default:$s(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=B.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,pa(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:pa(e,t)}}function pl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ge.HTML),e.insertionMode=B.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=B.IN_TABLE_BODY,hl(e,t));break}default:$s(e,t)}}function py(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.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=B.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:pa(e,t)}}function gR(e,t){const n=t.tagID;hy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),pl(e,t)):en(e,t)}function ER(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=B.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),py(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:dl(e,t)}}function my(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,ge.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ge.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ge.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:{rr(e,t);break}}}function gy(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:{Ji(e,t);break}}}function yR(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)):my(e,t)}function TR(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)):gy(e,t)}function bR(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:{rr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=B.IN_TABLE,e.insertionMode=B.IN_TABLE,$s(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=B.IN_COLUMN_GROUP,e.insertionMode=B.IN_COLUMN_GROUP,Zf(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=B.IN_TABLE_BODY,e.insertionMode=B.IN_TABLE_BODY,hl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=B.IN_ROW,e.insertionMode=B.IN_ROW,pl(e,t);break}default:e.tmplInsertionModeStack[0]=B.IN_BODY,e.insertionMode=B.IN_BODY,en(e,t)}}function _R(e,t){t.tagID===g.TEMPLATE&&Ji(e,t)}function Ey(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Kf(e,t)}function xR(e,t){t.tagID===g.HTML?en(e,t):ml(e,t)}function yy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=B.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 ml(e,t)}function ml(e,t){e.insertionMode=B.IN_BODY,cl(e,t)}function wR(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.FRAMESET:{e._insertElement(t,ge.HTML);break}case g.FRAME:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{rr(e,t);break}}}function SR(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=B.AFTER_FRAMESET))}function vR(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.NOFRAMES:{rr(e,t);break}}}function AR(e,t){t.tagID===g.HTML&&(e.insertionMode=B.AFTER_AFTER_FRAMESET)}function NR(e,t){t.tagID===g.HTML?en(e,t):gl(e,t)}function gl(e,t){e.insertionMode=B.IN_BODY,cl(e,t)}function CR(e,t){switch(t.tagID){case g.HTML:{en(e,t);break}case g.NOFRAMES:{rr(e,t);break}}}function kR(e,t){t.chars=Et,e._insertCharacters(t)}function OR(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ty(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ge.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function IR(e,t){if(YI(t))Ty(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ge.MATHML?JE(t):r===ge.SVG&&(WI(t),ZE(t)),Gf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function PR(e,t){if(t.tagID===g.P||t.tagID===g.BR){Ty(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)===ge.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 RR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,LR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),by={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function _y(e,t){const n=VR(e),r=RE("type",{handlers:{root:DR,element:MR,text:FR,comment:wy,doctype:BR,raw:HR},unknown:jR}),s={parser:n?new ny(by):ny.getFragmentParser(void 0,by),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),Vs(s,Tr());const a=n?s.parser.document:s.parser.getFragment(),u=qO(a,{file:s.options.file});return s.stitches&&sl(u,"comment",function(l,d,f){const p=l;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 xy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function DR(e,t){xy(e.children,t)}function MR(e,t){zR(e,t),xy(e.children,t),$R(e,t)}function FR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ge.CHARACTER,chars:e.value,location:Ea(e)};Vs(t,Tr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function BR(e,t){const n={type:Ge.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ea(e)};Vs(t,Tr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function UR(e,t){t.stitches=!0;const n=qR(e);if("children"in e&&"children"in n){const r=_y({type:"root",children:e.children},t.options);n.children=r.children}wy({type:"comment",value:{stitch:n}},t)}function wy(e,t){const n=e.value,r={type:Ge.COMMENT,data:n,location:Ea(e)};Vs(t,Tr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function HR(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,Sy(t,Tr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(RR,"&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 jR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))UR(n,t);else{let r="";throw LR.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 Vs(e,t){Sy(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=vt.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 Sy(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 zR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===vt.PLAINTEXT)return;Vs(t,Tr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:Qi.html;s===Qi.html&&n==="svg"&&(s=Qi.svg);const a=QO(le(U({},e),{children:[]}),{space:s===Qi.svg?"svg":"html"}),u={type:Ge.START_TAG,tagName:n,tagID:zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ea(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function $R(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&iI.includes(n)||t.parser.tokenizer.state===vt.PLAINTEXT)return;Vs(t,Gu(e));const r={type:Ge.END_TAG,tagName:n,tagID:zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ea(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===vt.RCDATA||t.parser.tokenizer.state===vt.RAWTEXT||t.parser.tokenizer.state===vt.SCRIPT_DATA)&&(t.parser.tokenizer.state=vt.DATA)}function VR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ea(e){const t=Tr(e)||{line:void 0,column:void 0,offset:void 0},n=Gu(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 qR(e){return"children"in e?Xi(le(U({},e),{children:[]})):Xi(e)}function vy(e){return function(t,n){return _y(t,le(U({},e),{file:n}))}}const Zi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ay={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Zi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Zi],h2:[["className","sr-only"]],img:[...Zi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Zi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Zi],table:[...Zi],ul:[...Zi,["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"]},ci={}.hasOwnProperty;function YR(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},Ay),t):Ay,stack:[]},s=Ny(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function Ny(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return WR(e,n);case"doctype":return GR(e,n);case"element":return XR(e,n);case"root":return QR(e,n);case"text":return KR(e,n)}}}function WR(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 ya(a,t),a}}function GR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ya(n,t),n}}function XR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Cy(e,t.children),s=JR(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&&ci.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let d=-1;for(a=!1;++d<l.length;)e.stack.includes(l[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 ya(u,t),u}function QR(e,t){const r={type:"root",children:Cy(e,t.children)};return ya(r,t),r}function KR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ya(r,t),r}function Cy(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=Ny(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function JR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&ci.call(r,n)?r[n]:void 0,u=r&&ci.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(ci.call(l,f)){const p=l[f];let m=ky(e,Iy(a,f),f,p);m==null&&(m=ky(e,Iy(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&ci.call(s,n)){const p=s[n];for(f in p)ci.call(p,f)&&!ci.call(d,f)&&(d[f]=p[f])}return d}function ky(e,t,n,r){return t?Array.isArray(r)?ZR(e,t,n,r):Oy(e,t,n,r):void 0}function ZR(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Oy(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Oy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&e6(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 e6(e,t,n){const r=e.schema.protocols&&ci.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("?"),l=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||l>-1&&a>l)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 ya(e,t){const n=x1(t);t.data&&(e.data=Xi(t.data)),n&&(e.position=n)}function Iy(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 t6(e){return function(t){return YR(t,e)}}const Py=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return _.jsx("a",le(U(U({className:F(e,`${k}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},n6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ut();return!e&&!t?null:_.jsx("div",{className:F(n,`${k}-disclaimer`),children:t?_.jsx(SE,{rehypePlugins:[vy,t6],components:{ul:({children:r})=>_.jsx("ul",{className:F(n,`${k}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:F(n,`${k}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:F(n,`${k}-li`),children:r}),a:({href:r,title:s,children:a})=>_.jsx(Py,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>_.jsx("img",{className:F(n,`${k}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>_.jsx("p",{className:F(n,`${k}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:F(n,`${k}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:F(n,`${k}-disclaimer-text`),children:e})})},th=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a}=ln(),{globalClassName:u,searchConfig:l,enableEscalationToAgent:d}=ut(),f=H.useRef(null),p=t||!s&&!a,m=y=>{var v;y.preventDefault();const x=(((v=f.current)==null?void 0:v.value)||"").trim();x&&(f.current.value="",r(x))},T=()=>{r("Can you connect me to a human?")};return _.jsxs("div",{className:F(u,e,`cim-${n}-component`,`${k}-search-bar-wrapper`),children:[_.jsxs("form",{className:F(u,e,`cim-${n}-component`,`${k}-search-bar`),name:`${k}-search-form`,onSubmit:m,children:[_.jsx("input",{className:F(u,e,`cim-${n}-component`,`${k}-search-input`),type:"text",ref:f,placeholder:(l==null?void 0:l.placeholder)||"Ask us anything",name:`${k}-user-input`,disabled:p}),_.jsx(LN,{className:e,globalClassName:u,searchConfig:l,componentType:n,isLoading:p}),d&&_.jsx(tr,{className:F(u,`${k}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:p,onClick:T,icon:_.jsx(xN,{})})]}),_.jsx(n6,{})]})};function r6(e){return st({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 i6(e){return st({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 Ry=H.createContext({isOpen:!1}),nh=H.createContext(null),Ly=H.createContext(null),qs=()=>{var n,r;const e=H.useContext(nh),t=H.useContext(Ly);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Dy=({onClearChat:e,componentType:t})=>{const n=qs(),r=()=>{e(),n()};return _.jsxs("button",{className:F(`${k}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(i6,{}),"Clear chat"]})},My=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=ut(),r=qs(),[s,a]=H.useState(!1),u=()=>je(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(l){n==null||n.error("Error downloading transcript:",l)}finally{a(!1)}}});return _.jsxs("button",{className:F(`${k}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[_.jsx(r6,{}),"Download transcript"]})};function s6(e){return e==null?[]:Array.isArray(e)?e:[e]}var o6=(e,...t)=>e.concat(t),a6=(e,...t)=>e.filter(n=>!t.includes(n)),u6=e=>Array.from(new Set(e));function Fy(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?s?l:0:a>=u?s?0:t>u?u:t:a}function l6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return Fy(e,t,{step:-r,loop:s})}var c6=e=>Array.isArray(e),By=e=>e!=null&&typeof e=="object",d6=e=>By(e)&&!c6(e),El=e=>typeof e=="string",Ys=e=>typeof e=="function",f6=e=>e==null,h6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p6=e=>Object.prototype.toString.call(e),Uy=Function.prototype.toString,m6=Uy.call(Object),g6=e=>{if(!By(e)||p6(e)!="[object Object]"||T6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=h6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Uy.call(n)==m6},E6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,y6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,T6=e=>E6(e)||y6(e),b6=e=>e(),_6=()=>{},rh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function x6(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:w6,max:S6}=Math,v6=e=>Number.isNaN(e),A6=e=>v6(e)?0:e,Hy=(e,t,n)=>w6(S6(A6(e),t),n);function ih(e){if(!g6(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]=ih(s))}return n}function sh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function N6(e,t){if(e==null)throw new Error(t())}function C6(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 k6=Object.defineProperty,O6=(e,t,n)=>t in e?k6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oh=(e,t,n)=>O6(e,typeof t!="symbol"?t+"":t,n),jy=()=>{},yl=e=>typeof e=="object"&&e!==null,Ws=e=>e?"":void 0,zy=e=>e?"true":void 0,I6=1,P6=9,R6=11,Ut=e=>yl(e)&&e.nodeType===I6&&typeof e.nodeName=="string",Tl=e=>yl(e)&&e.nodeType===P6,L6=e=>yl(e)&&e===e.window,$y=e=>Ut(e)?e.localName||"":"#document";function D6(e){return["html","body","#document"].includes($y(e))}var M6=e=>yl(e)&&e.nodeType!==void 0,es=e=>M6(e)&&e.nodeType===R6&&"host"in e,F6=e=>Ut(e)&&e.localName==="input",B6=e=>Ut(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ta(e){if(!e)return!1;const t=e.getRootNode();return Qs(t)===e}var U6=/(textarea|select)/;function H6(e){if(e==null||!Ut(e))return!1;try{return F6(e)&&e.selectionStart!=null||U6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Gs(e,t){var r;if(!e||!t||!Ut(e)||!Ut(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&es(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function xr(e){var t;return Tl(e)?e:L6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function j6(e){return xr(e).documentElement}function Xs(e){var t,n,r;return es(e)?Xs(e.host):Tl(e)?(t=e.defaultView)!=null?t:window:Ut(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Qs(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 z6(e){if($y(e)==="html")return e;const t=e.assignedSlot||e.parentNode||es(e)&&e.host||j6(e);return es(t)?t.host:t}function ah(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Tl(t)||es(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var uh=new WeakMap;function Ks(e){return uh.has(e)||uh.set(e,Xs(e).getComputedStyle(e)),uh.get(e)}var lh=new Set(["menu","listbox","dialog","grid","tree","region"]),$6=e=>lh.has(e),Vy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function qy(e,t){const n=new Set,r=ah(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Vy(l);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"),T=p.getAttribute("aria-modal")==="true";if(m&&$6(m)&&!T&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function Yy(e,t){const n=ah(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Vy(l);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"),T=p.getAttribute("aria-modal")==="true";m&&lh.has(m)&&!T&&(t(p),s(p))}}}};s(e)}function V6(e){const t=new Set;return Yy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function q6(e){const t=e.getAttribute("role");return!!(t&&lh.has(t))}function Y6(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function W6(e){var t;return Y6(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function G6(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)&&q6(e))}var ch=()=>typeof document!="undefined";function X6(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var dh=e=>ch()&&e.test(X6()),Q6=e=>ch()&&e.test(navigator.vendor),Wy=()=>ch()&&!!navigator.maxTouchPoints,K6=()=>dh(/^iPhone/i),J6=()=>dh(/^iPad/i)||fh()&&navigator.maxTouchPoints>1,bl=()=>K6()||J6(),Z6=()=>fh()||bl(),fh=()=>dh(/^Mac/i),e4=()=>Z6()&&Q6(/apple/i);function t4(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 ir(e){var n;const t=t4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Gy=e=>e.button===0,n4=e=>e.button===2||fh()&&e.ctrlKey&&e.button===0,r4=e=>"touches"in e&&e.touches.length>0,i4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Xy={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function s4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=i4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in Xy&&(s=Xy[s]),s}function Qy(e,t="client"){const n=r4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Ht=(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)}},Ky=e=>Ut(e)&&e.tagName==="IFRAME",o4=/^(audio|video|details)$/;function Jy(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var a4=e=>!Number.isNaN(Jy(e)),u4=e=>Jy(e)<0;function l4(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 Zy(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let l=0;for(;l<s.length;){const d=s[l++];if(!d||a.has(d))continue;a.add(d);const f=l4(d,t);if(f){const p=Array.from(f.querySelectorAll(_l)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,x)=>{u.set(y,T+x)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,T+x)})}s.push(...p)}}return r}var _l="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",eT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(_l));(n==!0||n=="if-empty"&&s.length===0)&&Ut(e)&&wr(e)&&s.unshift(e);const u=[];for(const l of s)if(wr(l)){if(Ky(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...eT(d,{getShadowRoot:r}));continue}u.push(l)}return r?Zy(u,r,wr):u};function wr(e){return!Ut(e)||e.closest("[inert]")?!1:e.matches(_l)&&B6(e)}function Js(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(_l));n&&ts(e)&&s.unshift(e);const a=[];for(const u of s)if(ts(u)){if(Ky(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...Js(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Zy(a,r,ts);return!u.length&&n?s:u}return!a.length&&n?s:a}function ts(e){return Ut(e)&&e.tabIndex>0?!0:wr(e)&&!u4(e)}function c4(e,t={}){const n=Js(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function d4(e,t={}){const{current:n,getShadowRoot:r}=t,s=Js(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Qs(a);if(!u)return null;const l=s.indexOf(u);return s[l+1]||null}function ba(e){return e.tabIndex<0&&(o4.test(e.localName)||H6(e))&&!a4(e)?0:e.tabIndex}function tT(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=Js(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var f4=class s2{constructor(){oh(this,"id",null),oh(this,"fn_cleanup"),oh(this,"cleanup",()=>{this.cancel()})}static create(){return new s2}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 Rt(e){const t=f4.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 hh(e){const t=z6(e);return D6(t)?xr(t).body:Ut(t)&&m4(t)?t:hh(t)}var h4=/auto|scroll|overlay|hidden|clip/,p4=new Set(["inline","contents"]);function m4(e){const t=Xs(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return h4.test(n+s+r)&&!p4.has(a)}var Zs="default",ph="",xl=new WeakMap;function g4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return bl()?(Zs==="default"&&(ph=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),Zs="disabled"):t&&(xl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>E4({target:t,doc:r})}function E4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(bl()){if(Zs!=="disabled")return;Zs="restoring",setTimeout(()=>{nT(()=>{Zs==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=ph||""),ph="",Zs="default")})},300)}else if(t&&xl.has(t)){const a=xl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),xl.delete(t)}}function y4(e={}){const u=e,{defer:t,target:n}=u,r=pn(u,["defer","target"]),s=t?Rt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(g4(le(U({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function T4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=Qy(l),f=Math.sqrt(ad(d.x,2)+ad(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=Qy(l);r({point:d,event:l})},u=[Ht(e,"pointermove",s,!1),Ht(e,"pointerup",a,!1),Ht(e,"pointercancel",a,!1),Ht(e,"contextmenu",a,!1),y4({doc:e})];return()=>{u.forEach(l=>l())}}function b4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,l=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=c4(e,{includeContainer:!0,getShadowRoot:a}),y=d4(l,{current:n,getShadowRoot:a}),x=!m&&!T;f.shiftKey&&Ta(y)?(s==null||s(),p=T):f.shiftKey&&(Ta(m)||x)?p=n:!f.shiftKey&&Ta(n)?(s==null||s(),p=m):!f.shiftKey&&(Ta(T)||x)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Ht(u,"keydown",d,!0)}function _4(e,t){const l=t,{defer:n,triggerElement:r}=l,s=pn(l,["defer","triggerElement"]),a=n?Rt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(b4(d,U({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function x4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function wl(e,t){if(!e)return jy;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 w4(e,t,n){if(!e)return jy;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 S4(e,t,n){const{signal:r}=t;return[new Promise((u,l)=>{const d=setTimeout(()=>{l(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),l(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),l(f))})}),()=>t.abort()]}function v4(e,t){const{timeout:n,rootNode:r}=t,s=Xs(r),a=xr(r),u=new s.AbortController;return S4(new Promise(l=>{const d=e();if(d){l(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),l(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var A4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),N4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,rT=e=>{const t={};let n;for(;n=N4.exec(e);)t[n[1]]=n[2];return t},C4=(e,t)=>{if(El(e)){if(El(t))return`${e};${t}`;e=rT(e)}else El(t)&&(t=rT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Lt(...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]=rh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=A4(t[s],n[s]);continue}if(s==="style"){t[s]=C4(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 FB(e){return e}var eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(eo||{}),mh="__init__";function k4(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>xr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>Qs(t()),a=u=>t().getElementById(u);return le(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Ta,getById:a})}function O4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var to=()=>e=>Array.from(new Set(e)),iT=typeof globalThis.document!="undefined"?H.useLayoutEffect:H.useEffect;function Sl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=H.useState(t),[s,a]=H.useState(r),u=e().value!==void 0,l=H.useRef(s);l.current=u?e().value:s;const d=H.useRef(l.current);iT(()=>{d.current=l.current},[s,e().value]);const f=y=>{var A,S;const x=d.current,v=Ys(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:x}),u||a(v),n(v,x)||(S=(A=e()).onChange)==null||S.call(A,v,x)};function p(){return u?e().value:s}return{initial:r,ref:l,get:p,set(y){(e().sync?Ds.flushSync:b6)(()=>f(y))},invoke(y,x){var v,A;(A=(v=e()).onChange)==null||A.call(v,y,x)},hash(y){var x,v,A;return(A=(v=(x=e()).hash)==null?void 0:v.call(x,y))!=null?A:String(y)}}}Sl.cleanup=e=>{H.useEffect(()=>e,[])},Sl.ref=e=>{const t=H.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function I4(e){const t=H.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var P4=(e,t)=>{const n=H.useRef(!1),r=H.useRef(!1);H.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),H.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function vl(e,t={}){var oe,ee,we,fe,de,pe;const n=H.useMemo(()=>{const{id:ce,ids:K,getRootNode:ue}=t;return k4({id:ce,ids:K,getRootNode:ue})},[t]),r=(...ce)=>{e.debug&&console.log(...ce)},s=(ee=(oe=e.props)==null?void 0:oe.call(e,{props:ih(t),scope:n}))!=null?ee:t,a=R4(s),u=(we=e.context)==null?void 0:we.call(e,{prop:a,bindable:Sl,scope:n,flush:oT,getContext(){return d},getComputed(){return Y},getRefs(){return v},getEvent(){return y()}}),l=sT(u),d={get(ce){var K;return(K=l.current)==null?void 0:K[ce].ref.current},set(ce,K){var ue;(ue=l.current)==null||ue[ce].set(K)},initial(ce){var K;return(K=l.current)==null?void 0:K[ce].initial},hash(ce){var ue,N;const K=(ue=l.current)==null?void 0:ue[ce].get();return(N=l.current)==null?void 0:N[ce].hash(K)}},f=H.useRef(new Map),p=H.useRef(null),m=H.useRef(null),T=H.useRef({type:""}),y=()=>le(U({},T.current),{current(){return T.current},previous(){return m.current}}),x=()=>le(U({},R),{matches(...ce){return ce.includes(R.ref.current)},hasTag(ce){var K,ue;return!!((ue=(K=e.states[R.ref.current])==null?void 0:K.tags)!=null&&ue.includes(ce))}}),v=I4((de=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:d}))!=null?de:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:$,action:S,guard:C,track:P4,refs:v,computed:Y,flush:oT,scope:n,choose:j}),S=ce=>{const K=Ys(ce)?ce(A()):ce;if(!K)return;const ue=K.map(N=>{var J,P;const M=(P=(J=e.implementations)==null?void 0:J.actions)==null?void 0:P[N];return M||sh(`[zag-js] No implementation found for action "${JSON.stringify(N)}"`),M});for(const N of ue)N==null||N(A())},C=ce=>{var K,ue;return Ys(ce)?ce(A()):(ue=(K=e.implementations)==null?void 0:K.guards)==null?void 0:ue[ce](A())},I=ce=>{const K=Ys(ce)?ce(A()):ce;if(!K)return;const ue=K.map(M=>{var P,Se;const J=(Se=(P=e.implementations)==null?void 0:P.effects)==null?void 0:Se[M];return J||sh(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),J}),N=[];for(const M of ue){const J=M==null?void 0:M(A());J&&N.push(J)}return()=>N.forEach(M=>M==null?void 0:M())},j=ce=>s6(ce).find(K=>{let ue=!K.guard;return El(K.guard)?ue=!!C(K.guard):Ys(K.guard)&&(ue=K.guard(A())),ue}),Y=ce=>{N6(e.computed,()=>"[zag-js] No computed object found on machine");const K=e.computed[ce];return K({context:d,event:y(),prop:a,refs:v,scope:n,computed:Y})},R=Sl(()=>({defaultValue:e.initialState({prop:a}),onChange(ce,K){var N,M,J,P;if(K){const Se=f.current.get(K);Se==null||Se(),f.current.delete(K)}K&&S((N=e.states[K])==null?void 0:N.exit),S((M=p.current)==null?void 0:M.actions);const ue=I((J=e.states[ce])==null?void 0:J.effects);if(ue&&f.current.set(ce,ue),K===mh){S(e.entry);const Se=I(e.effects);Se&&f.current.set(mh,Se)}S((P=e.states[ce])==null?void 0:P.entry)}})),W=H.useRef(void 0),se=H.useRef(eo.NotStarted);iT(()=>{queueMicrotask(()=>{var M;const ue=se.current===eo.Started;se.current=eo.Started,r(ue?"rehydrating...":"initializing...");const N=(M=W.current)!=null?M:R.initial;R.invoke(N,ue?R.get():mh)});const ce=f.current,K=R.ref.current;return()=>{r("unmounting..."),W.current=K,se.current=eo.Stopped,ce.forEach(ue=>ue==null?void 0:ue()),f.current=new Map,p.current=null,queueMicrotask(()=>{S(e.exit)})}},[]);const he=()=>"ref"in R?R.ref.current:R.get(),$=ce=>{queueMicrotask(()=>{var P,Se,De,xe,ne;if(se.current!==eo.Started)return;m.current=T.current,T.current=ce;let K=he();const ue=(De=(P=e.states[K].on)==null?void 0:P[ce.type])!=null?De:(Se=e.on)==null?void 0:Se[ce.type],N=j(ue);if(!N)return;p.current=N;const M=(xe=N.target)!=null?xe:K;r("transition",ce.type,N.target||K,`(${N.actions})`);const J=M!==K;J?Ds.flushSync(()=>R.set(M)):N.reenter&&!J?R.invoke(K,K):S((ne=N.actions)!=null?ne:[])})};return(pe=e.watch)==null||pe.call(e,A()),{state:x(),send:$,context:d,prop:a,scope:n,refs:v,computed:Y,event:y(),getStatus:()=>se.current}}function sT(e){const t=H.useRef(e);return t.current=e,t}function R4(e){const t=sT(e);return function(r){return t.current[r]}}function oT(e){queueMicrotask(()=>{Ds.flushSync(()=>e())})}var gh=O4(e=>e);function Al(...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 L4(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 Eh=e=>{const t=H.memo(H.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=pn(f,["asChild","children"]);if(!s)return H.createElement(e,le(U({},u),{ref:r}),a);if(!H.isValidElement(a))return null;const l=H.Children.only(a),d=L4(l);return H.cloneElement(l,le(U({},Lt(u,l.props)),{ref:r?Al(r,d):d}))}));return t.displayName=e.displayName||e.name,t},tn=(()=>{const e=new Map;return new Proxy(Eh,{apply(t,n,r){return Eh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Eh(r)),e.get(r)}})})();function D4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ns(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=H.createContext(u);l.displayName=t;function d(){var p;const f=H.useContext(l);if(!f&&n){const m=new Error(a!=null?a:D4(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[M4,yh]=ns({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[aT,_a]=ns({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),uT=H.forwardRef((e,t)=>{const n=yh(),r=_a(),s=Lt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(tn.div,le(U({},s),{ref:Al(r.ref,t)}))});uT.displayName="PopoverContent";const lT=H.forwardRef((e,t)=>{const n=yh(),r=_a(),s=Lt(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(tn.div,le(U({},s),{ref:t}))});lT.displayName="PopoverPositioner";const xa=()=>(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]},[{},U({},e)]),cT=e=>xa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function F4(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 B4={props({props:e}){return le(U({},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",Ks(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"});Rt(()=>{var l,d;const u=Nl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((l=t.get("styles"))==null?void 0:l.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})=>{Rt(()=>{e.set("prevAnimationName",Nl(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,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===s&&e.set("prevAnimationName",Nl(t.get("styles")))},u=d=>{const f=Nl(t.get("styles"));ir(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 l=wl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),nT(()=>l())}}}}};function Nl(e){return(e==null?void 0:e.animationName)||"none"}to()(["onExitComplete","present","immediate"]);function U4(e,t={}){const{sync:n=!1}=t,r=H4(e);return H.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 H4(e){const t=H.useRef(e);return t.current=e,t}const Th=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=T,a=pn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=H.useRef(!1),l=le(U({},a),{present:r,onExitComplete:U4(e.onExitComplete)}),d=vl(B4,l),f=F4(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 rs=(e,t=[])=>({parts:(...n)=>{if(j4(t))return rs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>rs(e,[...t,...n]),omit:(...n)=>rs(e,t.filter(r=>!n.includes(r))),rename:n=>rs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${no(e)}"][data-part="${no(r)}"]`,`& [data-scope="${no(e)}"][data-part="${no(r)}"]`].join(", "),attrs:{"data-scope":no(e),"data-part":no(r)}}}),{})}),no=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),j4=e=>e.length===0;const z4=["top","right","bottom","left"],di=Math.min,Ur=Math.max,Cl=Math.round,kl=Math.floor,Sr=e=>({x:e,y:e}),$4={left:"right",right:"left",bottom:"top",top:"bottom"};function dT(e,t,n){return Ur(e,di(t,n))}function Hr(e,t){return typeof e=="function"?e(t):e}function fi(e){return e.split("-")[0]}function ro(e){return e.split("-")[1]}function bh(e){return e==="x"?"y":"x"}function _h(e){return e==="y"?"height":"width"}function vr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function xh(e){return bh(vr(e))}function V4(e,t,n){n===void 0&&(n=!1);const r=ro(e),s=xh(e),a=_h(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Ol(u)),[u,Ol(u)]}function q4(e){const t=Ol(e);return[wh(e),t,wh(t)]}function wh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const fT=["left","right"],hT=["right","left"],Y4=["top","bottom"],W4=["bottom","top"];function G4(e,t,n){switch(e){case"top":case"bottom":return n?t?hT:fT:t?fT:hT;case"left":case"right":return t?Y4:W4;default:return[]}}function X4(e,t,n,r){const s=ro(e);let a=G4(fi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(wh)))),a}function Ol(e){const t=fi(e);return $4[t]+e.slice(t.length)}function Q4(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 pT(e){return typeof e!="number"?Q4(e):{top:e,right:e,bottom:e,left:e}}function Il(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 mT(e,t,n){let{reference:r,floating:s}=e;const a=vr(t),u=xh(t),l=_h(u),d=fi(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,T=r[l]/2-s[l]/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 x=ro(t);return x&&(y[u]+=T*(x==="end"?1:-1)*(n&&f?-1:1)),y}function K4(e,t){return je(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=Hr(t,e),x=pT(y),A=l[T?m==="floating"?"reference":"floating":m],S=Il(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),C=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,I=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),j=(yield a.isElement==null?void 0:a.isElement(I))&&(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1},Y=Il(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:C,offsetParent:I,strategy:d}):C);return{top:(S.top-Y.top+x.top)/j.y,bottom:(Y.bottom-S.bottom+x.bottom)/j.y,left:(S.left-Y.left+x.left)/j.x,right:(Y.right-S.right+x.right)/j.x}})}const J4=50,Z4=(e,t,n)=>je(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:le(U({},u),{detectOverflow:K4}),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}=mT(f,r,d),T=r,y=0;const x={};for(let v=0;v<a.length;v++){const A=a[v];if(!A)continue;const{name:S,fn:C}=A,{x:I,y:j,data:Y,reset:R}=yield C({x:p,y:m,initialPlacement:r,placement:T,strategy:s,middlewareData:x,rects:f,platform:l,elements:{reference:e,floating:t}});p=I!=null?I:p,m=j!=null?j:m,x[S]=U(U({},x[S]),Y),R&&y<J4&&(y++,typeof R=="object"&&(R.placement&&(T=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):R.rects),{x:p,y:m}=mT(f,T,d)),v=-1)}return{x:p,y:m,placement:T,strategy:s,middlewareData:x}}),eL=e=>({name:"arrow",options:e,fn(n){return je(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=Hr(e,n)||{};if(p==null)return{};const T=pT(m),y={x:r,y:s},x=xh(a),v=_h(x),A=yield l.getDimensions(p),S=x==="y",C=S?"top":"left",I=S?"bottom":"right",j=S?"clientHeight":"clientWidth",Y=u.reference[v]+u.reference[x]-y[x]-u.floating[v],R=y[x]-u.reference[x],W=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let se=W?W[j]:0;(!se||!(yield l.isElement==null?void 0:l.isElement(W)))&&(se=d.floating[j]||u.floating[v]);const he=Y/2-R/2,$=se/2-A[v]/2-1,oe=di(T[C],$),ee=di(T[I],$),we=se-A[v]-ee,fe=se/2-A[v]/2+he,de=dT(oe,fe,we),pe=!f.arrow&&ro(a)!=null&&fe!==de&&u.reference[v]/2-(fe<oe?oe:ee)-A[v]/2<0,ce=pe?fe<oe?fe-oe:fe-we:0;return{[x]:y[x]+ce,data:U({[x]:de,centerOffset:fe-de-ce},pe&&{alignmentOffset:ce}),reset:pe}})}}),tL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return je(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,de=Hr(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:A=!0}=de,S=pn(de,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=fi(a),I=vr(d),j=fi(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(j||!A?[Ol(d)]:q4(d)),W=v!=="none";!y&&W&&R.push(...X4(d,A,v,Y));const se=[d,...R],he=yield f.detectOverflow(n,S),$=[];let oe=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&$.push(he[C]),T){const pe=V4(a,l,Y);$.push(he[pe[0]],he[pe[1]])}if(oe=[...oe,{placement:a,overflows:$}],!$.every(pe=>pe<=0)){var ee,we;const pe=(((ee=u.flip)==null?void 0:ee.index)||0)+1,ce=se[pe];if(ce&&(!(T==="alignment"?I!==vr(ce):!1)||oe.every(N=>vr(N.placement)===I?N.overflows[0]>0:!0)))return{data:{index:pe,overflows:oe},reset:{placement:ce}};let K=(we=oe.filter(ue=>ue.overflows[0]<=0).sort((ue,N)=>ue.overflows[1]-N.overflows[1])[0])==null?void 0:we.placement;if(!K)switch(x){case"bestFit":{var fe;const ue=(fe=oe.filter(N=>{if(W){const M=vr(N.placement);return M===I||M==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(M=>M>0).reduce((M,J)=>M+J,0)]).sort((N,M)=>N[1]-M[1])[0])==null?void 0:fe[0];ue&&(K=ue);break}case"initialPlacement":K=d;break}if(a!==K)return{reset:{placement:K}}}return{}})}}};function gT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ET(e){return z4.some(t=>e[t]>=0)}const nL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return je(this,null,function*(){const{rects:r,platform:s}=n,l=Hr(e,n),{strategy:a="referenceHidden"}=l,u=pn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,le(U({},u),{elementContext:"reference"})),f=gT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:ET(f)}}}case"escaped":{const d=yield s.detectOverflow(n,le(U({},u),{altBoundary:!0})),f=gT(d,r.floating);return{data:{escapedOffsets:f,escaped:ET(f)}}}default:return{}}})}}},yT=new Set(["left","top"]);function rL(e,t){return je(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=fi(n),l=ro(n),d=vr(n)==="y",f=yT.has(u)?-1:1,p=a&&d?-1:1,m=Hr(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof x=="number"&&(y=l==="end"?x*-1:x),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const iL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return je(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield rL(n,e);return l===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:le(U({},f),{placement:l})}})}}},sL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return je(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,I=Hr(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:j=>{let{x:Y,y:R}=j;return{x:Y,y:R}}}}=I,p=pn(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},T=yield u.detectOverflow(n,p),y=vr(a),x=bh(y);let v=m[x],A=m[y];const S=(j,Y)=>dT(Y+T[j==="y"?"top":"left"],Y,Y-T[j==="y"?"bottom":"right"]);l&&(v=S(x,v)),d&&(A=S(y,A));const C=f.fn(le(U({},n),{[x]:v,[y]:A}));return le(U({},C),{data:{x:C.x-r,y:C.y-s,enabled:{[x]:l,[y]:d}}})})}}},oL=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:l,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=Hr(e,t),T={x:s,y:a},y=vr(u),x=bh(y);let v=T[x],A=T[y];const S=Hr(f,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:(n=S.mainAxis)!=null?n:0,crossAxis:(r=S.crossAxis)!=null?r:0};if(p){const Y=x==="y"?"height":"width",R=l.reference[x]-l.floating[Y]+C.mainAxis,W=l.reference[x]+l.reference[Y]-C.mainAxis;v<R?v=R:v>W&&(v=W)}if(m){var I,j;const Y=x==="y"?"width":"height",R=yT.has(fi(u)),W=l.reference[y]-l.floating[Y]+(R&&((I=d.offset)==null?void 0:I[y])||0)+(R?0:C.crossAxis),se=l.reference[y]+l.reference[Y]+(R?0:((j=d.offset)==null?void 0:j[y])||0)-(R?C.crossAxis:0);A<W?A=W:A>se&&(A=se)}return{[x]:v,[y]:A}}}},aL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return je(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,$=Hr(e,n),{apply:l=()=>{}}=$,d=pn($,["apply"]),f=yield a.detectOverflow(n,d),p=fi(r),m=ro(r),T=vr(r)==="y",{width:y,height:x}=s.floating;let v,A;p==="top"||p==="bottom"?(v=p,A=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(A=p,v=m==="end"?"top":"bottom");const S=x-f.top-f.bottom,C=y-f.left-f.right,I=di(x-f[v],S),j=di(y-f[A],C),Y=n.middlewareData.shift,R=!Y;let W=I,se=j;Y!=null&&Y.enabled.x&&(se=C),Y!=null&&Y.enabled.y&&(W=S),R&&!m&&(T?se=y-2*Ur(f.left,f.right):W=x-2*Ur(f.top,f.bottom)),yield l(le(U({},n),{availableWidth:se,availableHeight:W}));const he=yield a.getDimensions(u.floating);return y!==he.width||x!==he.height?{reset:{rects:!0}}:{}})}}};function Pl(){return typeof window!="undefined"}function io(e){return TT(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ar(e){var t;return(t=(TT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function TT(e){return Pl()?e instanceof Node||e instanceof Rn(e).Node:!1}function sr(e){return Pl()?e instanceof Element||e instanceof Rn(e).Element:!1}function Nr(e){return Pl()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function bT(e){return!Pl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function wa(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=or(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function uL(e){return/^(table|td|th)$/.test(io(e))}function Rl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const lL=/transform|translate|scale|rotate|perspective|filter/,cL=/paint|layout|strict|content/,is=e=>!!e&&e!=="none";let Sh;function vh(e){const t=sr(e)?or(e):e;return is(t.transform)||is(t.translate)||is(t.scale)||is(t.rotate)||is(t.perspective)||!Ah()&&(is(t.backdropFilter)||is(t.filter))||lL.test(t.willChange||"")||cL.test(t.contain||"")}function dL(e){let t=hi(e);for(;Nr(t)&&!so(t);){if(vh(t))return t;if(Rl(t))return null;t=hi(t)}return null}function Ah(){return Sh==null&&(Sh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Sh}function so(e){return/^(html|body|#document)$/.test(io(e))}function or(e){return Rn(e).getComputedStyle(e)}function Ll(e){return sr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if(io(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bT(e)&&e.host||Ar(e);return bT(t)?t.host:t}function _T(e){const t=hi(e);return so(t)?(e.ownerDocument||e).body:Nr(t)&&wa(t)?t:_T(t)}function Sa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=_T(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Rn(s);if(a){const l=Nh(u);return t.concat(u,u.visualViewport||[],wa(s)?s:[],l&&n?Sa(l):[])}else return t.concat(s,Sa(s,[],n))}function Nh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xT(e){const t=or(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Nr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=Cl(n)!==a||Cl(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function Ch(e){return sr(e)?e:e.contextElement}function oo(e){const t=Ch(e);if(!Nr(t))return Sr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=xT(t);let u=(a?Cl(n.width):n.width)/r,l=(a?Cl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const fL=Sr(0);function wT(e){const t=Rn(e);return!Ah()||!t.visualViewport?fL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rn(e)?!1:t}function ss(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Ch(e);let u=Sr(1);t&&(r?sr(r)&&(u=oo(r)):u=oo(e));const l=hL(a,n,r)?wT(a):Sr(0);let d=(s.left+l.x)/u.x,f=(s.top+l.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const T=Rn(a),y=r&&sr(r)?Rn(r):r;let x=T,v=Nh(x);for(;v&&r&&y!==x;){const A=oo(v),S=v.getBoundingClientRect(),C=or(v),I=S.left+(v.clientLeft+parseFloat(C.paddingLeft))*A.x,j=S.top+(v.clientTop+parseFloat(C.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,m*=A.y,d+=I,f+=j,x=Rn(v),v=Nh(x)}}return Il({width:p,height:m,x:d,y:f})}function Dl(e,t){const n=Ll(e).scrollLeft;return t?t.left+n:ss(Ar(e)).left+n}function ST(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Dl(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function pL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Ar(r),l=t?Rl(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Sr(1);const p=Sr(0),m=Nr(r);if((m||!m&&!a)&&((io(r)!=="body"||wa(u))&&(d=Ll(r)),Nr(r))){const y=ss(r);f=oo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?ST(u,d):Sr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function mL(e){return Array.from(e.getClientRects())}function gL(e){const t=Ar(e),n=Ll(e),r=e.ownerDocument.body,s=Ur(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ur(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Dl(e);const l=-n.scrollTop;return or(r).direction==="rtl"&&(u+=Ur(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const vT=25;function EL(e,t){const n=Rn(e),r=Ar(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(s){a=s.width,u=s.height;const p=Ah();(!p||p&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=Dl(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-y);x<=vT&&(a-=x)}else f<=vT&&(a+=f);return{width:a,height:u,x:l,y:d}}const yL=new Set(["absolute","fixed"]);function TL(e,t){const n=ss(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Nr(e)?oo(e):Sr(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function AT(e,t,n){let r;if(t==="viewport")r=EL(e,n);else if(t==="document")r=gL(Ar(e));else if(sr(t))r=TL(t,n);else{const s=wT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Il(r)}function NT(e,t){const n=hi(e);return n===t||!sr(n)||so(n)?!1:or(n).position==="fixed"||NT(n,t)}function bL(e,t){const n=t.get(e);if(n)return n;let r=Sa(e,[],!1).filter(l=>sr(l)&&io(l)!=="body"),s=null;const a=or(e).position==="fixed";let u=a?hi(e):e;for(;sr(u)&&!so(u);){const l=or(u),d=vh(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&yL.has(s.position)||wa(u)&&!d&&NT(e,u))?r=r.filter(p=>p!==u):s=l,u=hi(u)}return t.set(e,r),r}function _L(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Rl(t)?[]:bL(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=AT(t,p,s);return f.top=Ur(m.top,f.top),f.right=di(m.right,f.right),f.bottom=di(m.bottom,f.bottom),f.left=Ur(m.left,f.left),f},AT(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function xL(e){const{width:t,height:n}=xT(e);return{width:t,height:n}}function wL(e,t,n){const r=Nr(t),s=Ar(t),a=n==="fixed",u=ss(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Sr(0);function f(){d.x=Dl(s)}if(r||!r&&!a)if((io(t)!=="body"||wa(s))&&(l=Ll(t)),r){const y=ss(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?ST(s,l):Sr(0),m=u.left+l.scrollLeft-d.x-p.x,T=u.top+l.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function kh(e){return or(e).position==="static"}function CT(e,t){if(!Nr(e)||or(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ar(e)===n&&(n=n.ownerDocument.body),n}function kT(e,t){const n=Rn(e);if(Rl(e))return n;if(!Nr(e)){let s=hi(e);for(;s&&!so(s);){if(sr(s)&&!kh(s))return s;s=hi(s)}return n}let r=CT(e,t);for(;r&&uL(r)&&kh(r);)r=CT(r,t);return r&&so(r)&&kh(r)&&!vh(r)?n:r||dL(e)||n}const SL=function(e){return je(this,null,function*(){const t=this.getOffsetParent||kT,n=this.getDimensions,r=yield n(e.floating);return{reference:wL(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function vL(e){return or(e).direction==="rtl"}const AL={convertOffsetParentRelativeRectToViewportRelativeRect:pL,getDocumentElement:Ar,getClippingRect:_L,getOffsetParent:kT,getElementRects:SL,getClientRects:mL,getDimensions:xL,getScale:oo,isElement:sr,isRTL:vL};function OT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function NL(e,t){let n=null,r;const s=Ar(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function u(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(l||t(),!T||!y)return;const x=kl(m),v=kl(s.clientWidth-(p+T)),A=kl(s.clientHeight-(m+y)),S=kl(p),I={rootMargin:-x+"px "+-v+"px "+-A+"px "+-S+"px",threshold:Ur(0,di(1,d))||1};let j=!0;function Y(R){const W=R[0].intersectionRatio;if(W!==d){if(!j)return u();W?u(!1,W):r=setTimeout(()=>{u(!1,1e-7)},1e3)}W===1&&!OT(f,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(Y,le(U({},I),{root:s.ownerDocument}))}catch(R){n=new IntersectionObserver(Y,I)}n.observe(e)}return u(!0),a}function CL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Ch(e),p=s||a?[...f?Sa(f):[],...Sa(t)]:[];p.forEach(S=>{s&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const m=f&&l?NL(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(S=>{let[C]=S;C&&C.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let x,v=d?ss(e):null;d&&A();function A(){const S=ss(e);v&&!OT(v,S)&&n(),v=S,x=requestAnimationFrame(A)}return n(),()=>{var S;p.forEach(C=>{s&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),m==null||m(),(S=y)==null||S.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const kL=iL,OL=sL,IL=tL,PL=aL,RL=nL,LL=eL,DL=oL,ML=(e,t,n)=>{const r=new Map,s=U({platform:AL},n),a=le(U({},s.platform),{_c:r});return Z4(e,t,le(U({},s),{platform:a}))};function IT(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 le(U({},s),{toJSON:()=>s})}function FL(e){if(!e)return IT();const{x:t,y:n,width:r,height:s}=e;return IT(t,n,r,s)}function BL(e,t){return{contextElement:Ut(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?FL(r):n.getBoundingClientRect()}}}var va=e=>({variable:e,reference:`var(${e})`}),jr={arrowSize:va("--arrow-size"),arrowSizeHalf:va("--arrow-size-half"),arrowBg:va("--arrow-background"),transformOrigin:va("--transform-origin"),arrowOffset:va("--arrow-offset")},UL=e=>e==="top"||e==="bottom"?"y":"x";function HL(e,t){return{name:"transformOrigin",fn(n){var he,$,oe,ee,we;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=UL(d),p=((he=s.arrow)==null?void 0:he.x)||0,m=(($=s.arrow)==null?void 0:$.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+T/2,v=m+y/2,A=Math.abs(((oe=s.shift)==null?void 0:oe.y)||0),S=u.reference.height/2,C=y/2,I=(we=(ee=e.offset)==null?void 0:ee.mainAxis)!=null?we:e.gutter,j=typeof I=="number"?I+C:I!=null?I:C,Y=A>j,R={top:`${x}px calc(100% + ${j}px)`,bottom:`${x}px ${-j}px`,left:`calc(100% + ${j}px) ${v}px`,right:`${-j}px ${v}px`}[d],W=`${x}px ${u.reference.y+S-l}px`,se=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(jr.transformOrigin.variable,se?W:R),{data:{transformOrigin:se?W:R}}}}}var jL={name:"rects",fn({rects:e}){return{data:e}}},zL=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% + ${jr.arrowOffset.reference})`}),{}}}};function $L(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var VL={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function PT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Oh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function qL(e,t,n){const r=e||t.createElement("div");return LL({element:r,padding:n.arrowPadding})}function YL(e,t){var n;if(!f6((n=t.offset)!=null?n:t.gutter))return kL(({placement:r})=>{var p,m,T,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:l}=$L(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return ih({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function WL(e){if(!e.flip)return;const t=Oh(e.boundary);return IL(le(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function GL(e){if(!e.slide&&!e.overlap)return;const t=Oh(e.boundary);return OL(le(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:DL()}))}function XL(e){return PL({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),l=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",`${l}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function QL(e){var t;if(e.hideWhenDetached)return RL({strategy:"referenceHidden",boundary:(t=Oh(e.boundary))!=null?t:"clippingAncestors"})}function KL(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function JL(e,t,n={}){const r=BL(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},VL,n),a=t.querySelector("[data-part=arrow]"),u=[YL(a,s),WL(s),GL(s),qL(a,t.ownerDocument,s),zL(a),HL({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),XL(s),QL(s),jL],{placement:l,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>je(null,null,function*(){var j;if(!r||!t)return;const v=yield ML(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),p==null||p({placed:!0});const A=Xs(t),S=PT(A,v.x),C=PT(A,v.y);t.style.setProperty("--x",`${S}px`),t.style.setProperty("--y",`${C}px`),s.hideWhenDetached&&(((j=v.middlewareData.hide)==null?void 0:j.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const I=t.firstElementChild;if(I){const Y=Ks(I);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>je(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=KL(s.listeners),x=s.listeners?CL(r,t,T,y):_6;return T(),()=>{x==null||x(),p==null||p({placed:!1})}}function RT(e,t,n={}){const l=n,{defer:r}=l,s=pn(l,["defer"]),a=r?Rt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(JL(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var ZL={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function e5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:jr.arrowSize.reference,height:jr.arrowSize.reference,[jr.arrowSizeHalf.variable]:`calc(${jr.arrowSize.reference} / 2)`,[jr.arrowOffset.variable]:`calc(${jr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?ZL[t.split("-")[0]]:void 0,background:jr.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 ao=new WeakMap,Ml=new WeakMap,Fl={},Ih=0,LT=e=>e&&(e.host||LT(e.parentNode)),t5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=LT(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),n5=new Set(["script","output","status","next-route-announcer"]),r5=e=>n5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),i5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=t5(n,Array.isArray(e)?e:[e]);Fl[r]||(Fl[r]=new WeakMap);const l=Fl[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&&Ut(y)&&Yy(y,x=>{m(x)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(f.has(x))T(x);else try{if(r5(x))return;const A=x.getAttribute(s)==="true",S=(ao.get(x)||0)+1,C=(l.get(x)||0)+1;ao.set(x,S),l.set(x,C),d.push(x),S===1&&A&&Ml.set(x,!0),C===1&&x.setAttribute(r,""),A||x.setAttribute(s,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",x,v)}})};return T(n),f.clear(),Ih++,()=>{d.forEach(y=>{const x=ao.get(y)-1,v=l.get(y)-1;ao.set(y,x),l.set(y,v),x||(Ml.has(y)||y.removeAttribute(s),Ml.delete(y)),v||y.removeAttribute(r)}),Ih--,Ih||(ao=new WeakMap,ao=new WeakMap,Ml=new WeakMap,Fl={})}},s5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,o5=(e,t=s5(e),n="data-aria-hidden",r=!0)=>{if(t)return i5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},a5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function DT(e,t={}){const{defer:n=!0}=t,r=n?a5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(o5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function u5(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 l5(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 MT="pointerdown.outside",FT="focus.outside";function c5(e){for(const t of e)if(Ut(t)&&wr(t))return!0;return!1}var BT=e=>"clientY"in e;function d5(e,t){if(!BT(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 f5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function UT(e,t){if(!t||!BT(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)},l={x:e.clientX,y:e.clientY};return f5(u,l)?r||a:!1}function h5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=xr(e),f=Xs(e),p=u5(f),m=l5(f);function T(I,j){if(!Ut(j)||!j.isConnected||Gs(e,j)||d5(e,I)||l&&qy(e,j))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const W=hh(Y);if(UT(I,W))return!1}const R=hh(e);return UT(I,R)?!1:!(n!=null&&n(j))}const y=new Set,x=es(e==null?void 0:e.getRootNode());function v(I){function j(Y){var he,$;const R=u&&!Wy()?Rt:oe=>oe(),W=Y!=null?Y:I,se=($=(he=W==null?void 0:W.composedPath)==null?void 0:he.call(W))!=null?$:[W==null?void 0:W.target];R(()=>{const oe=x?se[0]:ir(I);if(!(!e||!T(I,oe))){if(s||a){const ee=rh(s,a);e.addEventListener(MT,ee,{once:!0})}HT(e,MT,{bubbles:!1,cancelable:!0,detail:{originalEvent:W,contextmenu:n4(W),focusable:c5(se),target:oe}})}})}I.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(Ht(d,"click",j,{once:!0})),y.add(m.addEventListener("click",j,{once:!0})),y.add(p.addEventListener("click",j,{once:!0}))):j()}const A=new Set,S=setTimeout(()=>{A.add(Ht(d,"pointerdown",v,!0)),A.add(m.addEventListener("pointerdown",v,!0)),A.add(p.addEventListener("pointerdown",v,!0))},0);function C(I){(u?Rt:Y=>Y())(()=>{var W,se;const Y=(se=(W=I==null?void 0:I.composedPath)==null?void 0:W.call(I))!=null?se:[I==null?void 0:I.target],R=x?Y[0]:ir(I);if(!(!e||!T(I,R))){if(r||a){const he=rh(r,a);e.addEventListener(FT,he,{once:!0})}HT(e,FT,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:wr(R),target:R}})}})}return Wy()||(A.add(Ht(d,"focusin",C,!0)),A.add(m.addEventListener("focusin",C,!0)),A.add(p.addEventListener("focusin",C,!0))),()=>{clearTimeout(S),y.forEach(I=>I()),A.forEach(I=>I())}}function p5(e,t){const{defer:n}=t,r=n?Rt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(h5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function HT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function m5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Ht(xr(e),"keydown",n,{capture:!0})}var jT="layer:request-dismiss",$n={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=>Gs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Gs(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=>$n.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];E5(e,jT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),g5(e,jT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function g5(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 E5(e,t,n){e.addEventListener(t,n,{once:!0})}var zT;function $T(){$n.layers.forEach(({node:e})=>{e.style.pointerEvents=$n.isBelowPointerBlockingLayer(e)?"none":"auto"})}function y5(e){e.style.pointerEvents=""}function T5(e,t){const n=xr(e),r=[];return $n.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(zT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=v4(()=>{const l=s();return Ut(l)?l:null},{timeout:1e3});a.then(l=>r.push(wl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{$n.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=zT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function b5(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:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};$n.add(f),$T();function p(v){var S,C;const A=ir(v.detail.originalEvent);$n.isBelowPointerBlockingLayer(e)||$n.isInBranch(A)||((S=t.onPointerDownOutside)==null||S.call(t,v),(C=t.onInteractOutside)==null||C.call(t,v),!v.defaultPrevented&&(l&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function m(v){var S,C;const A=ir(v.detail.originalEvent);$n.isInBranch(A)||((S=t.onFocusOutside)==null||S.call(t,v),(C=t.onInteractOutside)==null||C.call(t,v),!v.defaultPrevented&&(l&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function T(v){var A;$n.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var I;if(!e)return!1;const A=typeof u=="function"?u():u,S=Array.isArray(A)?A:[A],C=(I=t.persistentElements)==null?void 0:I.map(j=>j()).filter(Ut);return C&&S.push(...C),S.some(j=>Gs(j,v))||$n.isInNestedLayer(e,v)}const x=[a?T5(e,t.persistentElements):void 0,m5(e,T),p5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{$n.remove(e),$T(),y5(e),x.forEach(v=>v==null?void 0:v())}}function VT(e,t){const{defer:n}=t,r=n?Rt:a=>a(),s=[];return s.push(r(()=>{const a=Ys(e)?e():e;s.push(b5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var _5=Object.defineProperty,x5=(e,t,n)=>t in e?_5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yt=(e,t,n)=>x5(e,typeof t!="symbol"?t+"":t,n),qT={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()}},w5=[],S5=class{constructor(e,t){yt(this,"trapStack"),yt(this,"config"),yt(this,"doc"),yt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),yt(this,"portalContainers",new Set),yt(this,"listenerCleanups",[]),yt(this,"handleFocus",r=>{const s=ir(r),a=this.findContainerIndex(s,r)>=0;if(a||Tl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(ba(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],l=!1):p-1>=0&&(u=f[p-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>ba(f)>0))||(l=!1);else l=!1;l&&(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}),yt(this,"handlePointerDown",r=>{const s=ir(r);if(!(this.findContainerIndex(s,r)>=0)){if(Na(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Na(this.config.allowOutsideClick,r)||r.preventDefault()}}),yt(this,"handleClick",r=>{const s=ir(r);this.findContainerIndex(s,r)>=0||Na(this.config.clickOutsideDeactivates,r)||Na(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),yt(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;Aa(r)&&r.preventDefault(),this.tryFocus(a)}}),yt(this,"handleEscapeKey",r=>{v5(r)&&Na(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),yt(this,"_mutationObserver"),yt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(l=>Array.from(l.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(l=>l.type==="attributes"&&(l.attributeName==="aria-controls"||l.attributeName==="aria-expanded")?!0:l.type==="childList"&&l.addedNodes.length>0?Array.from(l.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return W6(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?G6(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),yt(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)}))}),yt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!wr(r)){const s=Qs(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}),yt(this,"tryFocus",r=>{if(r!==!1&&r!==Qs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,A5(r)&&r.select()}}),yt(this,"deactivate",r=>{if(!this.state.active)return this;const s=U({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(),qT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),l=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{YT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),yt(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}),yt(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}),yt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),yt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),yt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),yt(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 l=u;if(typeof u=="string"){try{l=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!l&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return l}),yt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||ir(s);this.updateTabbableNodes();let l=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?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=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||wr(u)&&!ts(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];l=ba(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Aa(s)||(l=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||wr(u)&&!ts(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];l=ba(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Aa(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||w5;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Aa(r)&&!r.shiftKey},isKeyBackward(r){return Aa(r)&&r.shiftKey}},t);this.doc=n.document||xr(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=>{V6(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?qy(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Js(e,{getShadowRoot:this.config.getShadowRoot}),n=eT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let l=!1;for(let f=0;f<t.length;f++)if(ba(t[f])>0){l=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(ts(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(ts(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,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 qT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?YT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ht(this.doc,"focusin",this.handleFocus,!0),Ht(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ht(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ht(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ht(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ht(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=Qs(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)}},Aa=e=>e.key==="Tab",Na=(e,...t)=>typeof e=="function"?e(...t):e,v5=e=>!e.isComposing&&e.key==="Escape",YT=e=>setTimeout(e,0),A5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function WT(e,t={}){let n;const r=Rt(()=>{const s=typeof e=="function"?e():e;if(s){n=new S5(s,le(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:xr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Ph="data-scroll-lock";function N5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function GT(e){const t=Ks(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function XT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Ph))return;const u=GT(r)||GT(s),l=n.innerWidth-r.clientWidth;s.setAttribute(Ph,"");const d=()=>w4(r,"--scrollbar-width",`${l}px`),f=N5(r),p=()=>{const x={overflow:"hidden"};return!u&&l>0&&(x[f]=`${l}px`),wl(s,x)},m=()=>{var Y,R;const{scrollX:x,scrollY:v,visualViewport:A}=n,S=(Y=A==null?void 0:A.offsetLeft)!=null?Y:0,C=(R=A==null?void 0:A.offsetTop)!=null?R:0,I={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(C))}px`,left:`${-(x-Math.floor(S))}px`,right:"0"};!u&&l>0&&(I[f]=`${l}px`);const j=wl(s,I);return()=>{j==null||j(),n.scrollTo({left:x,top:v,behavior:"instant"})}},T=[d(),bl()?m():p()];return()=>{T.forEach(x=>x==null?void 0:x()),s.removeAttribute(Ph)}}var C5=rs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Cr=C5.build(),QT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},KT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Rh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},JT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},k5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Lh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Dh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},O5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},ZT=e=>e.getById(QT(e)),uo=e=>e.getById(KT(e)),lo=e=>e.getById(Rh(e)),eb=e=>e.getById(JT(e)),I5=e=>e.getById(Lh(e)),P5=e=>e.getById(Dh(e));function R5(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=e5(le(U({},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(le(U({id:k5(l)},Cr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(le(U({},Cr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(le(U({},Cr.anchor.attrs),{dir:u("dir"),id:QT(l)}))},getTriggerProps(){return t.button(le(U({},Cr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:KT(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Rh(l),onPointerDown(y){Gy(y)&&e4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(le(U({},Cr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(le(U({id:JT(l)},Cr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(le(U({},Cr.content.attrs),{dir:u("dir"),id:Rh(l),tabIndex:-1,role:"dialog","aria-modal":zy(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Ws(d),"aria-labelledby":m.title?Lh(l):void 0,"aria-describedby":m.description?Dh(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(le(U({},Cr.title.attrs),{id:Lh(l),dir:u("dir")}))},getDescriptionProps(){return t.element(le(U({},Cr.description.attrs),{id:Dh(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(le(U({},Cr.closeTrigger.attrs),{dir:u("dir"),id:O5(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var L5={props({props:e}){return le(U({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:U({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=ZT(n))!=null?a:uo(n);return RT(r,()=>eb(n),le(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>lo(n);let s=!0;return VT(r,{type:"popover",pointerBlocking:t("modal"),exclude:uo(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:_4(()=>lo(t),{triggerElement:uo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?DT(()=>[lo(t),uo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return XT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?WT(()=>lo(t),{initialFocus:()=>tT({root:lo(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=ZT(n))!=null?u:uo(n);RT(s,()=>eb(n),le(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Rt(()=>{Object.assign(e.get("renderedElements"),{title:!!I5(t),description:!!P5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Rt(()=>{const n=tT({root:lo(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||Rt(()=>{const a=uo(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})}}}};to()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[UB,Bl]=ns({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[HB,Mh]=ns({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),D5=e=>{const t=H.useId(),{getRootNode:n}=Bl(),{dir:r}=Mh(),s=U({id:t,dir:r,getRootNode:n},e),a=vl(L5,s);return R5(a,gh)},M5=e=>{const[t,u]=cT(e),l=u,{children:n}=l,r=pn(l,["children"]),s=D5(r),a=Th(Lt({present:s.open},t));return _.jsx(M4,{value:s,children:_.jsx(aT,{value:a,children:n})})},tb=H.forwardRef((e,t)=>{const n=yh(),r=_a(),s=Lt(le(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(tn.button,le(U({},s),{ref:t}))});tb.displayName="PopoverTrigger";function F5(e){return st({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 B5(e){return st({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 nb(e){return st({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 rb(e){return st({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 U5(e){return st({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 H5(e){return st({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 Fh(e){return st({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 ib(e){return st({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]=H.useState(!1),{globalClassName:a}=ut(),u=f=>{s(f.open)},l=H.useCallback(()=>{s(!1)},[]),d=H.useMemo(()=>({closeMenu:l}),[l]);return _.jsxs(M5,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(tb,{"aria-label":`Overflow menu for ${t}`,className:F(`${k}-overflow-menu-button-trigger`,`${k}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(ib,{})}),_.jsx(lT,{children:_.jsx(uT,{className:F(`${k}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(Ly.Provider,{value:d,children:n})})})]})};function sb(e){return st({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 st({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,os]=ns({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Bh=H.forwardRef((e,t)=>{const n=os(),r=Lt(n.getControlProps(),e);return _.jsx(tn.div,le(U(U({},r),e),{ref:t}))});Bh.displayName="CarouselControl";const Uh=H.forwardRef((e,t)=>{const[n,r]=xa()(e,["readOnly","index"]),s=os(),a=Lt(s.getIndicatorProps(n),r);return _.jsx(tn.button,le(U({},a),{ref:t}))});Uh.displayName="CarouselIndicator";const Hh=H.forwardRef((e,t)=>{const n=os(),r=Lt(n.getIndicatorGroupProps(),e);return _.jsx(tn.div,le(U({},r),{ref:t}))});Hh.displayName="CarouselIndicatorGroup";const jh=H.forwardRef((e,t)=>{const[n,r]=xa()(e,["index","snapAlign"]),s=os(),a=Lt(s.getItemProps(n),r);return _.jsx(tn.div,le(U({},a),{ref:t}))});jh.displayName="CarouselItem";const zh=H.forwardRef((e,t)=>{const n=os(),r=Lt(n.getItemGroupProps(),e);return _.jsx(tn.div,le(U({},r),{ref:t}))});zh.displayName="CarouselItemGroup";const $h=H.forwardRef((e,t)=>{const n=os(),r=Lt(n.getNextTriggerProps(),e);return _.jsx(tn.button,le(U({},r),{ref:t}))});$h.displayName="CarouselNextTrigger";const Vh=H.forwardRef((e,t)=>{const n=os(),r=Lt(n.getPrevTriggerProps(),e);return _.jsx(tn.button,le(U({},r),{ref:t}))});Vh.displayName="CarouselPrevTrigger";function $5(e){const t=Ks(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 l(T,y){let x=parseFloat(T);return/%/.test(T)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=l(r,n.width),f=l(s,n.height),p=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function V5(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 ab(e){let t=[];for(const n of e.children)t=t.concat(n,ab(n));return t}function ub(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?ab(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",l=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!V5(n,m,u))continue;const T=Ks(p);let[y,x]=T.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const v=a==="x"?x:y,A=m[l]-n[l]+e[f];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+m[d]/2});break;case"end":r[a].end.push({node:p,position:A+m[d]});break}}}return r}function lb(e){const t=e.getBoundingClientRect(),n=$5(e),r=ub(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:cb([...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(db(0,s.x))),y:cb([...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(db(0,s.y)))}}function q5(e,t,n){const r=ub(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var cb=e=>[...new Set(e)],db=(e,t)=>n=>Math.max(e,Math.min(t,n)),Y5=rs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),zr=Y5.build(),W5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},G5=(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}`},Ul=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},X5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},Q5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},K5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},fb=(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}`},_n=e=>e.getById(Ul(e)),hb=e=>x4(_n(e),"[data-part=item]"),J5=(e,t)=>e.getById(fb(e,t)),pb=e=>{const t=_n(e);if(!t)return;const n=Js(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function Z5(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),T=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),v=l("slidesPerPage"),A=l("padding"),S=l("translations");return{isPlaying:d,isDragging:f,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return x/y.length},scrollToIndex(C,I){a({type:"INDEX.SET",index:C,instant:I})},scrollTo(C,I){a({type:"PAGE.SET",index:C,instant:I})},scrollNext(C){a({type:"PAGE.NEXT",instant:C})},scrollPrev(C){a({type:"PAGE.PREV",instant:C})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(C){return Array.from(r.get("slidesInView")).includes(C)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(le(U({},zr.root.attrs),{id:W5(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":v,"--slide-spacing":l("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(le(U({},zr.itemGroup.attrs),{id:Ul(u),"data-orientation":l("orientation"),"data-dragging":Ws(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(C){Gs(C.currentTarget,ir(C))&&a({type:"VIEWPORT.FOCUS"})},onBlur(C){Gs(C.currentTarget,C.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(C){if(C.defaultPrevented||!l("allowMouseDrag")||!Gy(C))return;const I=ir(C);wr(I)&&I!==C.currentTarget||(C.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:x6(C=>{const I=l("orientation")==="horizontal"?"deltaX":"deltaY";C[I]<0&&!s("canScrollPrev")||C[I]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",l("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:A,[T?"paddingInline":"paddingBlock"]:A,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(C){const I=r.get("slidesInView").includes(C.index);return t.element(le(U({},zr.item.attrs),{id:G5(u,C.index),dir:l("dir"),role:"group","data-index":C.index,"data-inview":Ws(I),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":S.item(C.index,l("slideCount")),"aria-hidden":zy(!I),style:{scrollSnapAlign:(()=>{var se;const j=(se=C.snapAlign)!=null?se:"start",Y=l("slidesPerMove"),R=Y==="auto"?Math.floor(l("slidesPerPage")):Y;return(C.index+R)%R===0?j:void 0})()}}))},getControlProps(){return t.element(le(U({},zr.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(le(U({},zr.prevTrigger.attrs),{id:Q5(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":S.prevTrigger,"data-orientation":l("orientation"),"aria-controls":Ul(u),onClick(C){C.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(le(U({},zr.nextTrigger.attrs),{dir:l("dir"),id:X5(u),type:"button","aria-label":S.nextTrigger,"data-orientation":l("orientation"),"aria-controls":Ul(u),disabled:!p,onClick(C){C.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(le(U({},zr.indicatorGroup.attrs),{dir:l("dir"),id:K5(u),"data-orientation":l("orientation"),onKeyDown(C){if(C.defaultPrevented)return;const I="indicator",j={ArrowDown(W){T||(a({type:"PAGE.NEXT",src:I}),W.preventDefault())},ArrowUp(W){T||(a({type:"PAGE.PREV",src:I}),W.preventDefault())},ArrowRight(W){T&&(a({type:"PAGE.NEXT",src:I}),W.preventDefault())},ArrowLeft(W){T&&(a({type:"PAGE.PREV",src:I}),W.preventDefault())},Home(W){a({type:"PAGE.SET",index:0,src:I}),W.preventDefault()},End(W){a({type:"PAGE.SET",index:y.length-1,src:I}),W.preventDefault()}},Y=s4(C,{dir:l("dir"),orientation:l("orientation")}),R=j[Y];R==null||R(C)}}))},getIndicatorProps(C){return t.button(le(U({},zr.indicator.attrs),{dir:l("dir"),id:fb(u,C.index),type:"button","data-orientation":l("orientation"),"data-index":C.index,"data-readonly":Ws(C.readOnly),"data-current":Ws(C.index===x),"aria-label":S.indicator(C.index),onClick(I){I.defaultPrevented||C.readOnly||a({type:"PAGE.SET",index:C.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(le(U({},zr.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":Ws(d),"aria-label":d?S.autoplayStop:S.autoplayStart,onClick(C){C.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var eD={props({props:e}){return C6(e,["slideCount"],"carousel"),le(U({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:U({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:tD(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 d6(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(_n(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=_n(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),pb(e)});return pb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!_n(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Rt(()=>{s(),Rt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return hb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=_n(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?o6(d,m):a6(d,m)},n.get("slidesInView"));n.set("slidesInView",u6(l))},{root:r,threshold:t("inViewThreshold")});return hb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=_n(n);return r?Ht(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 Ht(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return T4(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 Ht(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=Hy((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=_n(n);if(!l)return;const d=r("isHorizontal")?"left":"top";s(()=>{l.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=_n(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=Fy(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=l6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=_n(r);if(!s)return;const a=q5(s,n("isHorizontal")?"x":"y",l=>l.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(l=>Math.abs(l-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=Hy(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=_n(n);if(!r)return;const s=lb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=_n(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=_n(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=_n(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=lb(r),l=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]);Rt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l: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=J5(n,e.get("page"));r&&Rt(()=>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 tD(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}to()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),to()(["index","readOnly"]),to()(["index","snapAlign"]);const nD=e=>{const t=H.useId(),{getRootNode:n}=Bl(),{dir:r}=Mh(),s=U({id:t,dir:r,getRootNode:n},e),a=vl(eD,s);return Z5(a,gh)},qh=H.forwardRef((e,t)=>{const[n,r]=xa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=nD(n),a=Lt(s.getRootProps(),r);return _.jsx(z5,{value:s,children:_.jsx(tn.div,le(U({},a),{ref:t}))})});qh.displayName="CarouselRoot";const rD=180,iD=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},sD=({globalClassName:e,className:t,itemMinWidth:n=rD,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((se,he)=>({node:se,key:H.isValidElement(se)&&se.key!=null?se.key:`carousel-item-${he}`})),T=m.length,y=H.useRef(null),[x,v]=H.useState(0),{width:A}=KA();H.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[A,T]);const S=iD(r),C=n+S,I=x>0?(x+S)/C:1,j=Math.max(1,Math.floor(I));if(T===0)return null;const Y=T>j,R=Math.ceil(T/j),W=Y?Math.max(1,I):j;return _.jsxs(qh,{ref:y,className:F(e,t,`${k}-carousel`),slidesPerPage:W,slidesPerMove:j,spacing:r,loop:s,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[_.jsx(zh,{className:F(e,`${k}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map(({node:se,key:he},$)=>_.jsx(jh,{index:$,className:F(e,`${k}-carousel__item`),children:se},he))}),l&&Y&&_.jsxs(Bh,{className:F(e,`${k}-carousel__control`),children:[_.jsx(Vh,{className:F(e,`${k}-carousel__prev-trigger`),"aria-label":"Previous slide",children:_.jsx(nb,{size:"16px"})}),_.jsx($h,{className:F(e,`${k}-carousel__next-trigger`),"aria-label":"Next slide",children:_.jsx(rb,{size:"16px"})})]}),u&&Y&&_.jsx(Hh,{className:F(e,`${k}-carousel__indicator-group`),children:Array.from({length:R},(se,he)=>_.jsx(Uh,{index:he,className:F(e,`${k}-carousel__indicator`),"aria-label":`Go to slide group ${he+1}`},he))})]})},oD=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:F(e,`${k}-close-button`),disabled:r,onClick:n,children:_.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.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"})})}),[aD,uD]=ns({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),lD=e=>xa()(e,["lazyMount","unmountOnExit"]),[cD,Ca]=ns({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),mb=H.forwardRef((e,t)=>{const n=Ca(),r=uD(),s=Th(le(U({},r),{present:n.open})),a=Lt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:_.jsx(tn.div,le(U({},a),{ref:Al(s.ref,t)}))});mb.displayName="DialogBackdrop";const Yh=H.forwardRef((e,t)=>{const n=Ca(),r=_a(),s=Lt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(tn.div,le(U({},s),{ref:Al(r.ref,t)}))});Yh.displayName="DialogContent";const Wh=H.forwardRef((e,t)=>{const n=Ca(),r=Lt(n.getDescriptionProps(),e);return _.jsx(tn.div,le(U({},r),{ref:t}))});Wh.displayName="DialogDescription";const Gh=H.forwardRef((e,t)=>{const n=Ca(),r=Lt(n.getPositionerProps(),e);return _a().unmounted?null:_.jsx(tn.div,le(U({},r),{ref:t}))});Gh.displayName="DialogPositioner";var dD=rs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),as=dD.build(),gb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},yb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Tb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Hl=e=>e.getById(Xh(e)),fD=e=>e.getById(gb(e)),hD=e=>e.getById(Eb(e)),pD=e=>e.getById(yb(e)),mD=e=>e.getById(Qh(e)),gD=e=>e.getById(Kh(e)),ED=e=>e.getById(Tb(e));function yD(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,l=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(le(U({},as.trigger.attrs),{dir:a("dir"),id:yb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Xh(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(le(U({},as.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Eb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(le(U({},as.positioner.attrs),{dir:a("dir"),id:gb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(le(U({},as.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Xh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:Qh(u),"aria-describedby":f.description?Kh(u):void 0}))},getTitleProps(){return t.element(le(U({},as.title.attrs),{dir:a("dir"),id:Qh(u)}))},getDescriptionProps(){return t.element(le(U({},as.description.attrs),{dir:a("dir"),id:Kh(u)}))},getCloseTriggerProps(){return t.button(le(U({},as.closeTrigger.attrs),{dir:a("dir"),id:Tb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var TD={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>ED(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return U({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 VT(()=>Hl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[pD(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 XT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?WT(()=>Hl(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")?DT(()=>[Hl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Rt(()=>{e.set("rendered",{title:!!mD(t),description:!!gD(t)})})},syncZIndex({scope:e}){Rt(()=>{const t=Hl(e);if(!t)return;const n=Ks(t);[fD(e),hD(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})}}}};to()(["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 bD=e=>{const t=H.useId(),{getRootNode:n}=Bl(),{dir:r}=Mh(),s=U({id:t,getRootNode:n,dir:r},e),a=vl(TD,s);return yD(a,gh)},bb=e=>{const[t,l]=cT(e),d=l,{children:n}=d,r=pn(d,["children"]),[s]=lD(t),a=bD(r),u=Th(Lt({present:a.open},t));return _.jsx(cD,{value:a,children:_.jsx(aD,{value:s,children:_.jsx(aT,{value:u,children:n})})})},_b=H.forwardRef((e,t)=>{const n=Ca(),r=Lt(n.getTitleProps(),e);return _.jsx(tn.h2,le(U({},r),{ref:t}))});_b.displayName="DialogTitle";const _D=({children:e})=>{const[t,n]=H.useState(!1),r=H.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=H.useMemo(()=>({isOpen:t}),[t]);return _.jsx(nh.Provider,{value:r,children:_.jsx(Ry.Provider,{value:s,children:e})})},xb=()=>H.useContext(Ry),wb=()=>{const e=H.useContext(nh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},xD=`${k}-overflow-menu-button-trigger`,wD=({componentType:e,children:t})=>{const{isOpen:n}=xb(),{closeMenu:r}=wb(),{globalClassName:s}=ut(),a=H.useRef(null);return H.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${xD}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",l),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",l)}},[n,r]),n?_.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:F(`${k}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},SD=({componentType:e,className:t})=>{const{toggleMenu:n}=wb(),{isOpen:r}=xb(),{globalClassName:s}=ut();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:F(`${k}-overflow-menu-button-trigger`,`${k}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:_.jsx(ib,{})})};class vD{constructor(){We(this,"initialState",Lg);We(this,"promptsStateProxy");We(this,"promptsParamsProxy");We(this,"_fullGet",(t,n)=>Reflect.get(t,n));We(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return CD(n,r),Reflect.set(t,n,r)});We(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));We(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));We(this,"updatePromptsParamsProxy",t=>new Proxy(U({},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 pi=new vD,AD=e=>{window.addEventListener(ef,e)},ND=e=>{window.removeEventListener(ef,e)},CD=(e,t)=>{const n=new CustomEvent(ef,{detail:{property:e,value:t}});window.dispatchEvent(n)},Sb=e=>{const t=pi.isOpen,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isOpen=n},kD=e=>{const t=pi.isInline,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isInline=n},OD=({elementId:e,entryType:t,params:n,isInline:r})=>{pi.promptsStateProxy.elementId=e,t&&(pi.promptsStateProxy.entryType=t),typeof r=="boolean"&&kD(r),n&&pi.updatePromptsParamsProxy(n),pi.isOpen||Sb(!0)},ID=()=>{const e=H.useContext(Mg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},Jh=()=>{const e=H.useContext(Dg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},PD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),{previousComponentType:r}=ri(),s=qs(),a=()=>{$u(r||"dialog"),s()};return t?_.jsx(tr,{className:F(n,`${k}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(sb,{})}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(sb,{}),"Show ",r||"dialog"]})},RD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),{isModalFullscreen:r}=ri(),s=qs(),a=()=>{tf(!r),s()},u=r?ON:IN,l="Toggle Fullscreen";return t?_.jsx(tr,{ariaLabel:l,title:l,className:F(n,`${k}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),l]})},LD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),{dialogPosition:r}=ri(),s=qs(),a=r==="bottom-left",u=()=>{nf(a?"bottom-right":"bottom-left"),s()},l=a?B5:F5,d=a?"Move right":"Move left";return t?_.jsx(tr,{className:F(n,`${k}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(l,{})}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(l,{}),d]})},vb=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:l}=ut(),{mode:d}=ri(),f=u==="messaging"&&l&&!!r,p=d==="standalone",m=e==="modal",T=m?PD:Nb,y=m?RD:LD,x=H.useMemo(()=>s?wN(s):{},[s]);return _.jsx(_D,{children:_.jsxs("div",{className:F(a,`${k}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:F(a,`${k}-${e}-header`,{standalone:p,embedded:!p}),style:x,children:[(s==null?void 0:s.logoUrl)&&_.jsx("img",{alt:"",role:"img",className:F(a,`${k}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),_.jsx(_b,{className:F(a,`${k}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),_.jsxs("div",{className:F(a,`${k}-${e}-controls`),children:[_.jsx(T,{componentType:e,isIcon:!0}),_.jsx(SD,{componentType:e}),_.jsx(oD,{className:F(a,`cim-${e}-component`),onClick:n})]})]}),_.jsxs(wD,{componentType:e,children:[_.jsx(y,{componentType:e}),_.jsx(HD,{componentType:e}),_.jsx(Dy,{componentType:e,onClearChat:t}),f&&_.jsx(My,{componentType:e,onDownloadTranscript:r})]})]})})},jl="USD",$r=(e,t)=>{if(typeof e!="number"||Number.isNaN(e))return null;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e)}catch(n){return`${e}`}},DD=({retailPrice:e,discountPrice:t,currencyCode:n=jl})=>{const r=n||jl,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:$r(a,r),comparePrice:$r(u,r),hasDiscount:s}},Ab=e=>typeof e=="number"&&Number.isFinite(e),MD=({priceBreakdown:e,currencyCode:t=jl})=>{if(!e)return null;const n=t||jl,r=[e.sales,e.original],s=r.map(p=>p==null?void 0:p.min).filter(Ab),a=r.map(p=>p==null?void 0:p.max).filter(Ab);if(s.length===0||a.length===0)return null;const u=Math.min(...s),l=Math.max(...a);if(u===l)return null;const d=$r(u,n),f=$r(l,n);return d===null||f===null?null:{range:`${d} – ${f}`,low:d,high:f}},Zh=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=DD({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return _.jsxs("div",{className:F(s,a,`${k}-price`),style:f,children:[_.jsx("span",{className:F(s,`${k}-price__amount`),children:u}),d&&l&&_.jsx("span",{className:F(s,`${k}-price__compare`),children:l})]})},FD={sparkle:Fh,plus:U5,"paper-plane":H5},BD=({icon:e,className:t})=>{const n=FD[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},UD=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=ut(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=x=>()=>{a(x)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},T=x=>_.jsxs(_.Fragment,{children:[l&&_.jsx(BD,{icon:l,className:`${k}-suggestion-button-icon`}),_.jsx("span",{children:x})]});return _.jsx("div",{className:F(t,`${k}-suggestion-container ${f}`,e),children:n.map(x=>s?_.jsx(Yu,{disabled:r,className:F(t,`${k}-suggestion-button standalone`,m),onClick:p(x),children:T(x)},x):_.jsx("button",{disabled:r,className:F(t,`${k}-suggestion-button embedded`,m),onClick:p(x),children:T(x)},x))})},HD=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ut();if(!r)return null;const s=()=>{ni(!1),zu(!0)};return t?_.jsx(tr,{className:F(n,`${k}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:_.jsx(Jg,{})}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(Jg,{}),"Minimize"]})},Nb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ut(),r=qs(),s=()=>{$u("modal"),r()};return t?_.jsx(tr,{className:F(n,`${k}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:_.jsx(ob,{})}):_.jsxs("button",{className:F(n,`${k}-overflow-menu-button`,`${k}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(ob,{}),"Show modal"]})},jD=["Hey there! 👋 What can I find for you today?","Shopping for a gift? Tell me your budget and preferences","Need help? Connect to an agent"],zD=3e3,$D=400,VD=({globalClassName:e,isWidgetStandalone:t,messages:n=jD})=>{const[r,s]=H.useState(0),[a,u]=H.useState(!0);return H.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},$D)},zD);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),_.jsxs("div",{className:F(e,`${k}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[_.jsxs("div",{className:`${k}-connecting-pulse-wrapper`,children:[_.jsx("div",{className:`${k}-connecting-pulse`}),_.jsx("div",{className:`${k}-connecting-ring`})]}),_.jsx("span",{className:F(`${k}-connecting-text`,a&&`${k}-connecting-text--visible`),children:n[r]})]})},qD=({shouldShow:e,loadingText:t})=>e?_.jsx("span",{className:`${k}-processing-text`,children:t}):null,YD=({shouldShow:e})=>e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:`${k}-processing-shimmer-bar`}),_.jsx("div",{className:`${k}-processing-shimmer-bar`}),_.jsx("div",{className:`${k}-processing-shimmer-bar`})]}):null,ep=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>_.jsxs("div",{className:F(e,`${k}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[_.jsx(qD,{shouldShow:!!n,loadingText:n}),_.jsx(YD,{shouldShow:!n})]});function Cb(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 WD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function GD(e,t,n){const s=rl((n||{}).ignore||[]),a=XD(t);let u=-1;for(;++u<a.length;)hE(e,"text",l);function l(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],x=T?T.children:void 0;if(s(y,x?x.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let x=0;const A=m.children.indexOf(f);let S=!1,C=[];T.lastIndex=0;let I=T.exec(f.value);for(;I;){const j=I.index,Y={index:I.index,input:I.input,stack:[...p,f]};let R=y(...I,Y);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?T.lastIndex=j+1:(x!==j&&C.push({type:"text",value:f.value.slice(x,j)}),Array.isArray(R)?C.push(...R):R&&C.push(R),x=j+I[0].length,S=!0),!T.global)break;I=T.exec(f.value)}return S?(x<f.value.length&&C.push({type:"text",value:f.value.slice(x)}),m.children.splice(A,1,...C)):C=[f],A+C.length}}function XD(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([QD(s[0]),KD(s[1])])}return t}function QD(e){return typeof e=="string"?new RegExp(WD(e),"g"):e}function KD(e){return typeof e=="function"?e:function(){return e}}const tp="phrasing",np=["autolink","link","image","label"];function JD(){return{transforms:[s8],enter:{literalAutolink:e8,literalAutolinkEmail:rp,literalAutolinkHttp:rp,literalAutolinkWww:rp},exit:{literalAutolink:i8,literalAutolinkEmail:r8,literalAutolinkHttp:t8,literalAutolinkWww:n8}}}function ZD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:tp,notInConstruct:np},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:tp,notInConstruct:np},{character:":",before:"[ps]",after:"\\/",inConstruct:tp,notInConstruct:np}]}}function e8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function rp(e){this.config.enter.autolinkProtocol.call(this,e)}function t8(e){this.config.exit.autolinkProtocol.call(this,e)}function n8(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 r8(e){this.config.exit.autolinkEmail.call(this,e)}function i8(e){this.exit(e)}function s8(e){GD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,o8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),a8]],{ignore:["link","linkReference"]})}function o8(e,t,n,r,s){let a="";if(!kb(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!u8(n)))return!1;const u=l8(n+r);if(!u[0])return!1;const l={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[l,{type:"text",value:u[1]}]:l}function a8(e,t,n,r){return!kb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function u8(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 l8(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=Cb(e,"(");let a=Cb(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 kb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wi(n)||Qu(n))&&(!t||n!==47)}Ob.peek=y8;function c8(){this.buffer()}function d8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function f8(){this.buffer()}function h8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function p8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=nr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function m8(e){this.exit(e)}function g8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=nr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function E8(e){this.exit(e)}function y8(){return"["}function Ob(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),l=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),u(),a+=s.move("]"),a}function T8(){return{enter:{gfmFootnoteCallString:c8,gfmFootnoteCall:d8,gfmFootnoteDefinitionLabelString:f8,gfmFootnoteDefinition:h8},exit:{gfmFootnoteCallString:p8,gfmFootnoteCall:m8,gfmFootnoteDefinitionLabelString:g8,gfmFootnoteDefinition:E8}}}function b8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ob},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const l=a.createTracker(u);let d=l.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),d+=l.move((t?`
38
- `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?Ib:_8))),f(),d}}function _8(e,t,n){return t===0?e:Ib(e,t,n)}function Ib(e,t,n){return(n?"":" ")+e}const x8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Pb.peek=N8;function w8(){return{canContainEols:["delete"],enter:{strikethrough:v8},exit:{strikethrough:A8}}}function S8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:x8}],handlers:{delete:Pb}}}function v8(e){this.enter({type:"delete",children:[]},e)}function A8(e){this.exit(e)}function Pb(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,le(U({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function N8(){return"~"}function C8(e){return e.length}function k8(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||C8,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const v=[],A=[];let S=-1;for(e[p].length>f&&(f=e[p].length);++S<e[p].length;){const C=O8(e[p][S]);if(n.alignDelimiters!==!1){const I=s(C);A[S]=I,(d[S]===void 0||I>d[S])&&(d[S]=I)}v.push(C)}u[p]=v,l[p]=A}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=Rb(r[m]);else{const v=Rb(r);for(;++m<f;)a[m]=v}m=-1;const T=[],y=[];for(;++m<f;){const v=a[m];let A="",S="";v===99?(A=":",S=":"):v===108?A=":":v===114&&(S=":");let C=n.alignDelimiters===!1?1:Math.max(1,d[m]-A.length-S.length);const I=A+"-".repeat(C)+S;n.alignDelimiters!==!1&&(C=A.length+C+S.length,C>d[m]&&(d[m]=C),y[m]=C),T[m]=I}u.splice(1,0,T),l.splice(1,0,y),p=-1;const x=[];for(;++p<u.length;){const v=u[p],A=l[p];m=-1;const S=[];for(;++m<f;){const C=v[m]||"";let I="",j="";if(n.alignDelimiters!==!1){const Y=d[m]-(A[m]||0),R=a[m];R===114?I=" ".repeat(Y):R===99?Y%2?(I=" ".repeat(Y/2+.5),j=" ".repeat(Y/2-.5)):(I=" ".repeat(Y/2),j=I):j=" ".repeat(Y)}n.delimiterStart!==!1&&!m&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||m)&&S.push(" "),n.alignDelimiters!==!1&&S.push(I),S.push(C),n.alignDelimiters!==!1&&S.push(j),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&S.push("|")}x.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return x.join(`
39
- `)}function O8(e){return e==null?"":String(e)}function Rb(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 I8(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()),P8);return s(),u}function P8(e,t,n){return">"+(n?"":" ")+e}function R8(e,t){return Lb(e,t.inConstruct,!0)&&!Lb(e,t.notInConstruct,!1)}function Lb(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 Db(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
40
- `&&R8(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
- `}function L8(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 D8(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 M8(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 F8(e,t,n,r){const s=M8(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(D8(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,B8);return m(),T}const l=n.createTracker(r),d=s.repeat(Math.max(L8(a,s)+1,3)),f=n.enter("codeFenced");let p=l.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=l.move(n.safe(e.lang,U({before:p,after:" ",encode:["`"]},l.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=l.move(" "),p+=l.move(n.safe(e.meta,U({before:p,after:`
35
+ `}),n}function pE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function mE(e,t){const n=rO(e,t),r=n.one(e,void 0),s=W3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
36
+ `},s),a}function uO(e,t){return e&&"run"in e?function(n,r){return ze(this,null,function*(){const s=mE(n,U({file:r},t));yield e.run(s,r)})}:function(n,r){return mE(n,U({file:r},e||t))}}function gE(e){if(e)throw e}var Pf,EE;function lO(){if(EE)return Pf;EE=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 T;for(T in f);return typeof T=="undefined"||e.call(f,T)},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},l=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Pf=function d(){var f,p,m,T,y,x,v=arguments[0],A=1,S=arguments.length,k=!1;for(typeof v=="boolean"&&(k=v,v=arguments[1]||{},A=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});A<S;++A)if(f=arguments[A],f!=null)for(p in f)m=l(v,p),T=l(f,p),v!==T&&(k&&T&&(a(T)||(y=s(T)))?(y?(y=!1,x=m&&s(m)?m:[]):x=m&&a(m)?m:{},u(v,{name:p,newValue:d(k,x,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},Pf}var cO=lO();const Rf=Ke(cO);function Lf(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 dO(){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);l(null,...s);function l(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?fO(p,l)(...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 fO(e,t){let n;return r;function r(...u){const l=e.length>u.length;let d;l&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(l&&n)throw p;return s(p)}l||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...l){n||(n=!0,t(u,...l))}function a(u){s(null,u)}}const br={basename:hO,dirname:pO,extname:mO,join:gO,sep:"/"};function hO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');aa(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,l=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),l>-1&&(e.codePointAt(s)===t.codePointAt(l--)?l<0&&(r=s):(l=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function pO(e){if(aa(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 mO(e){aa(e);let t=e.length,n=-1,r=0,s=-1,a=0,u;for(;t--;){const l=e.codePointAt(t);if(l===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),l===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 gO(...e){let t=-1,n;for(;++t<e.length;)aa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":EO(n)}function EO(e){aa(e);const t=e.codePointAt(0)===47;let n=yO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function yO(e,t){let n="",r=0,s=-1,a=0,u=-1,l,d;for(;++u<=e.length;){if(u<e.length)l=e.codePointAt(u);else{if(l===47)break;l=47}if(l===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 l===46&&a>-1?a++:a=-1}return n}function aa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const TO={cwd:bO};function bO(){return"/"}function Df(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function _O(e){if(typeof e=="string")e=new URL(e);else if(!Df(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 xO(e)}function xO(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 Mf=["history","path","basename","stem","extname","dirname"];class yE{constructor(t){let n;t?Df(t)?n={path:t}:typeof t=="string"||wO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":TO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Mf.length;){const a=Mf[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)Mf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?br.basename(this.path):void 0}set basename(t){Bf(t,"basename"),Ff(t,"basename"),this.path=br.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?br.dirname(this.path):void 0}set dirname(t){TE(this.basename,"dirname"),this.path=br.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?br.extname(this.path):void 0}set extname(t){if(Ff(t,"extname"),TE(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=br.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Df(t)&&(t=_O(t)),Bf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?br.basename(this.path,this.extname):void 0}set stem(t){Bf(t,"stem"),Ff(t,"stem"),this.path=br.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 en(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 Ff(e,t){if(e&&e.includes(br.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+br.sep+"`")}function Bf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function TE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function wO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const SO=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),vO={}.hasOwnProperty;class Uf extends SO{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=dO()}copy(){const t=new Uf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Rf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(zf("data",this.frozen),this.namespace[t]=n,this):vO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(zf("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=ol(t),r=this.parser||this.Parser;return Hf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Hf("process",this.parser||this.Parser),jf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const l=ol(t),d=r.parse(l);r.run(d,l,function(p,m,T){if(p||!m||!T)return f(p);const y=m,x=r.stringify(y,T);kO(x)?T.value=x:T.result=x,f(p,T)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Hf("processSync",this.parser||this.Parser),jf("processSync",this.compiler||this.Compiler),this.process(t,s),_E("processSync","process",n),r;function s(a,u){n=!0,gE(a),r=u}}run(t,n,r){bE(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,l){const d=ol(n);s.run(t,d,f);function f(p,m,T){const y=m||t;p?l(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),_E("runSync","run",r),s;function a(u,l){gE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=ol(n),s=this.compiler||this.Compiler;return jf("stringify",s),bE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(zf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?l(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");l(f.plugins),f.settings&&(s.settings=Rf(!0,s.settings,f.settings))}function l(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,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,...x]=p;const v=r[T][1];Lf(v)&&Lf(y)&&(y=Rf(!0,v,y)),r[T]=[f,y,...x]}}}}const AO=new Uf().freeze();function Hf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function jf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function zf(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 bE(e){if(!Lf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _E(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ol(e){return NO(e)?e:new yE(e)}function NO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function kO(e){return typeof e=="string"||CO(e)}function CO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const OO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",xE=[],wE={allowDangerousHtml:!0},IO=/^(https?|ircs?|mailto|xmpp)$/i,PO=[{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 SE(e){const t=RO(e),n=LO(e);return DO(t.runSync(t.parse(n),n),e)}function RO(e){const t=e.rehypePlugins||xE,n=e.remarkPlugins||xE,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),wE):wE;return AO().use(p3).use(n).use(uO,r).use(t)}function LO(e){const t=e.children||"",n=new yE;return typeof t=="string"&&(n.value=t),n}function DO(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||MO;for(const p of PO)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+OO+p.id,void 0);return sl(e,f),ok(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in yf)if(Object.hasOwn(yf,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],v=yf[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(x||""),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,T)),y&&T&&typeof m=="number")return l&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function MO(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||IO.test(e.slice(0,t))?e:""}const vE=/[#.]/g;function FO(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){vE.lastIndex=s;const l=vE.exec(n),d=n.slice(s,l?l.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),l&&(a=l[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function AE(e,t,n){const r=n?jO(n):void 0;function s(a,u,...l){let d;if(a==null){d={type:"root",children:[]};const f=u;l.unshift(f)}else{d=FO(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,BO(u))l.unshift(u);else for(const[m,T]of Object.entries(u))UO(e,d.properties,m,T)}for(const f of l)$f(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function BO(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 UO(e,t,n,r){const s=Wu(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=m1(r):s.commaSeparated?a=n1(r):s.commaOrSpaceSeparated?a=m1(n1(r).join(" ")):a=NE(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?HO(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(NE(s,s.property,l));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function $f(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)$f(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?$f(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function NE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Qo(n)===Qo(t)))return!0}return n}function HO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function jO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const zO=["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"],$O=AE(Ko,"div"),VO=AE(ii,"g",zO);function qO(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 l=n[u];if(l===void 0){const d=kE(t,n[u-1]);l=d===-1?t.length+1:d+1,n[u]=l}if(l>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 l=n[n.length-1],d=kE(t,l),f=d===-1?t.length+1:d+1;if(l===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 kE(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
37
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Qi={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/"},CE={}.hasOwnProperty,YO=Object.prototype;function WO(e,t){const n=t||{};return Vf({file:n.file||void 0,location:!1,schema:n.space==="svg"?ii:Ko,verbose:n.verbose||!1},e)}function Vf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},al(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:OE(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=qO(a),l=u.toPoint(0),d=u.toPoint(a.length);n.position={start:l,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},al(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},al(e,r,n),n}default:return n=GO(e,t),n}}function OE(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=Vf(e,t[n]);r.push(s)}return r}function GO(e,t){const n=e.schema;e.schema=t.namespaceURI===Qi.svg?ii:Ko;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;CE.call(YO,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?VO:$O)(t.tagName,s,OE(e,t.childNodes));if(al(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&Hs(d.startTag),p=d&&d.endTag&&Hs(d.endTag),m=Vf(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function al(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=XO(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function XO(e,t,n){const r=Hs(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)CE.call(n.attrs,u)&&(a[Wu(e.schema,u).property]=Hs(n.attrs[u]));n.startTag;const l=Hs(n.startTag),d=n.endTag?Hs(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Hs(e){const t=IE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=IE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function IE(e){return e.line&&e.column?e:void 0}const PE={}.hasOwnProperty;function RE(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&PE.call(s,e)){const d=String(s[e]);u=PE.call(l,d)?l[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 QO={},KO={}.hasOwnProperty,LE=RE("type",{handlers:{root:ZO,element:iI,text:nI,comment:rI,doctype:tI}});function JO(e,t){const r=(t||QO).space;return LE(e,r==="svg"?ii:Ko)}function ZO(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=qf(e.children,n,t),js(e,n),n}function eI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=qf(e.children,n,t),js(e,n),n}function tI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return js(e,t),t}function nI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return js(e,t),t}function rI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return js(e,t),t}function iI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ii);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&KO.call(e.properties,a)){const d=sI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Qi[u],childNodes:[],parentNode:null};return l.childNodes=qf(e.children,l,r),js(e,l),e.tagName==="template"&&e.content&&(l.content=eI(e.content,r)),l}function sI(e,t,n){const r=Wu(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?r1(n):g1(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=Qi[r.space]}return s}function qf(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=LE(e[r],n);a.parentNode=t,s.push(a)}return s}function js(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 oI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],aI=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]),bt="�";var O;(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"})(O||(O={}));const bn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function DE(e){return e>=55296&&e<=57343}function uI(e){return e>=56320&&e<=57343}function lI(e,t){return(e-55296)*1024+9216+t}function ME(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function FE(e){return e>=64976&&e<=65007||aI.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 cI=65536;class dI{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=cI,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,l=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:l,endOffset:l}}_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(uI(n))return this.pos++,this._addGap(),lI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,O.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,O.EOF;const r=this.html.charCodeAt(n);return r===O.CARRIAGE_RETURN?O.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,O.EOF;let t=this.html.charCodeAt(this.pos);return t===O.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,O.LINE_FEED):t===O.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,DE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===O.LINE_FEED||t===O.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ME(t)?this._err(te.controlCharacterInInputStream):FE(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 BE(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 fI=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))),hI=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 pI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=hI.get(e))!==null&&t!==void 0?t:e}var Ut;(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"})(Ut||(Ut={}));const mI=32;var ai;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ai||(ai={}));function Yf(e){return e>=Ut.ZERO&&e<=Ut.NINE}function gI(e){return e>=Ut.UPPER_A&&e<=Ut.UPPER_F||e>=Ut.LOWER_A&&e<=Ut.LOWER_F}function EI(e){return e>=Ut.UPPER_A&&e<=Ut.UPPER_Z||e>=Ut.LOWER_A&&e<=Ut.LOWER_Z||Yf(e)}function yI(e){return e===Ut.EQUALS||EI(e)}var Ht;(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"})(Ht||(Ht={}));var Ur;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ur||(Ur={}));class TI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ht.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ur.Strict}startEntity(t){this.decodeMode=t,this.state=Ht.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ht.EntityStart:return t.charCodeAt(n)===Ut.NUM?(this.state=Ht.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ht.NamedEntity,this.stateNamedEntity(t,n));case Ht.NumericStart:return this.stateNumericStart(t,n);case Ht.NumericDecimal:return this.stateNumericDecimal(t,n);case Ht.NumericHex:return this.stateNumericHex(t,n);case Ht.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|mI)===Ut.LOWER_X?(this.state=Ht.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ht.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(Yf(s)||gI(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(Yf(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===Ut.SEMI)this.consumed+=1;else if(this.decodeMode===Ur.Strict)return 0;return this.emitCodePoint(pI(this.result),this.consumed),this.errors&&(t!==Ut.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&ai.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=bI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ur.Attribute&&(a===0||yI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&ai.VALUE_LENGTH)>>14,a!==0){if(u===Ut.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ur.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]&ai.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]&~ai.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Ht.NamedEntity:return this.result!==0&&(this.decodeMode!==Ur.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ht.NumericDecimal:return this.emitNumericEntity(0,2);case Ht.NumericHex:return this.emitNumericEntity(0,3);case Ht.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ht.EntityStart:return 0}}}function bI(e,t,n,r){const s=(t&ai.BRANCH_LENGTH)>>7,a=t&ai.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,l=u+s-1;for(;u<=l;){const d=u+l>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)l=d-1;else return e[d+s]}return-1}var me;(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/"})(me||(me={}));var Ki;(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"})(Ki||(Ki={}));var zn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(zn||(zn={}));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 _I=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 zs(e){var t;return(t=_I.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const ye=g,xI={[me.HTML]:new Set([ye.ADDRESS,ye.APPLET,ye.AREA,ye.ARTICLE,ye.ASIDE,ye.BASE,ye.BASEFONT,ye.BGSOUND,ye.BLOCKQUOTE,ye.BODY,ye.BR,ye.BUTTON,ye.CAPTION,ye.CENTER,ye.COL,ye.COLGROUP,ye.DD,ye.DETAILS,ye.DIR,ye.DIV,ye.DL,ye.DT,ye.EMBED,ye.FIELDSET,ye.FIGCAPTION,ye.FIGURE,ye.FOOTER,ye.FORM,ye.FRAME,ye.FRAMESET,ye.H1,ye.H2,ye.H3,ye.H4,ye.H5,ye.H6,ye.HEAD,ye.HEADER,ye.HGROUP,ye.HR,ye.HTML,ye.IFRAME,ye.IMG,ye.INPUT,ye.LI,ye.LINK,ye.LISTING,ye.MAIN,ye.MARQUEE,ye.MENU,ye.META,ye.NAV,ye.NOEMBED,ye.NOFRAMES,ye.NOSCRIPT,ye.OBJECT,ye.OL,ye.P,ye.PARAM,ye.PLAINTEXT,ye.PRE,ye.SCRIPT,ye.SECTION,ye.SELECT,ye.SOURCE,ye.STYLE,ye.SUMMARY,ye.TABLE,ye.TBODY,ye.TD,ye.TEMPLATE,ye.TEXTAREA,ye.TFOOT,ye.TH,ye.THEAD,ye.TITLE,ye.TR,ye.TRACK,ye.UL,ye.WBR,ye.XMP]),[me.MATHML]:new Set([ye.MI,ye.MO,ye.MN,ye.MS,ye.MTEXT,ye.ANNOTATION_XML]),[me.SVG]:new Set([ye.TITLE,ye.FOREIGN_OBJECT,ye.DESC]),[me.XLINK]:new Set,[me.XML]:new Set,[me.XMLNS]:new Set},Wf=new Set([ye.H1,ye.H2,ye.H3,ye.H4,ye.H5,ye.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var L;(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"})(L||(L={}));const kt={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function wI(e){return e>=O.DIGIT_0&&e<=O.DIGIT_9}function ua(e){return e>=O.LATIN_CAPITAL_A&&e<=O.LATIN_CAPITAL_Z}function SI(e){return e>=O.LATIN_SMALL_A&&e<=O.LATIN_SMALL_Z}function ui(e){return SI(e)||ua(e)}function UE(e){return ui(e)||wI(e)}function ul(e){return e+32}function HE(e){return e===O.SPACE||e===O.LINE_FEED||e===O.TABULATION||e===O.FORM_FEED}function jE(e){return HE(e)||e===O.SOLIDUS||e===O.GREATER_THAN_SIGN}function vI(e){return e===O.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:DE(e)?te.surrogateCharacterReference:FE(e)?te.noncharacterCharacterReference:ME(e)||e===O.CARRIAGE_RETURN?te.controlCharacterReference:null}class AI{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=L.DATA,this.returnState=L.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new dI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new TI(fI,(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=vI(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(BE(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=zs(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=HE(t)?Xe.WHITESPACE_CHARACTER:t===O.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=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ur.Attribute:Ur.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===L.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case L.DATA:{this._stateData(t);break}case L.RCDATA:{this._stateRcdata(t);break}case L.RAWTEXT:{this._stateRawtext(t);break}case L.SCRIPT_DATA:{this._stateScriptData(t);break}case L.PLAINTEXT:{this._statePlaintext(t);break}case L.TAG_OPEN:{this._stateTagOpen(t);break}case L.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case L.TAG_NAME:{this._stateTagName(t);break}case L.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case L.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case L.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case L.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case L.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case L.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case L.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case L.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case L.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case L.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case L.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case L.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case L.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case L.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case L.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case L.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case L.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case L.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case L.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case L.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case L.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case L.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case L.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case L.BOGUS_COMMENT:{this._stateBogusComment(t);break}case L.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case L.COMMENT_START:{this._stateCommentStart(t);break}case L.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case L.COMMENT:{this._stateComment(t);break}case L.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case L.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case L.COMMENT_END:{this._stateCommentEnd(t);break}case L.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case L.DOCTYPE:{this._stateDoctype(t);break}case L.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case L.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case L.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case L.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case L.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case L.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case L.CDATA_SECTION:{this._stateCdataSection(t);break}case L.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case L.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case L.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case L.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case O.AMPERSAND:{this._startCharacterReference();break}case O.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(bt);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(bt);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(bt);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(bt);break}case O.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ui(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case O.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case O.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case O.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case O.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ui(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case O.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=L.DATA;break}case O.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=bt;break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ua(t)?ul(t):t)}}_stateRcdataLessThanSign(t){t===O.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ui(t)?(this.state=L.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=L.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 O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case O.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case O.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=L.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===O.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ui(t)?(this.state=L.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case O.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case O.EXCLAMATION_MARK:{this.state=L.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=L.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ui(t)?(this.state=L.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===O.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===O.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(bt);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(bt);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case O.HYPHEN_MINUS:{this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case O.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(bt);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===O.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ui(t)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ui(t)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(bn.SCRIPT,!1)&&jE(this.preprocessor.peek(bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(bt);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(bt);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case O.HYPHEN_MINUS:{this._emitChars("-");break}case O.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case O.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(bt);break}case O.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===O.SOLIDUS?(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(bn.SCRIPT,!1)&&jE(this.preprocessor.peek(bn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<bn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.SOLIDUS:case O.GREATER_THAN_SIGN:case O.EOF:{this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case O.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=L.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:case O.SOLIDUS:case O.GREATER_THAN_SIGN:case O.EOF:{this._leaveAttrName(),this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case O.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case O.QUOTATION_MARK:case O.APOSTROPHE:case O.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=bt;break}default:this.currentAttr.name+=String.fromCodePoint(ua(t)?ul(t):t)}}_stateAfterAttributeName(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case O.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{this.state=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=bt;break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case O.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=bt;break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.AMPERSAND:{this._startCharacterReference();break}case O.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case O.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=bt;break}case O.QUOTATION_MARK:case O.APOSTROPHE:case O.LESS_THAN_SIGN:case O.EQUALS_SIGN:case O.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case O.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case O.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case O.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case O.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.data+=bt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(bn.DASH_DASH,!0)?(this._createCommentToken(bn.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(bn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(bn.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(bn.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(bn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=L.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case O.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.data+=bt;break}case O.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 O.EXCLAMATION_MARK:{n.data+="!",this.state=L.COMMENT_LESS_THAN_SIGN_BANG;break}case O.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===O.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===O.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==O.GREATER_THAN_SIGN&&t!==O.EOF&&this._err(te.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case O.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case O.HYPHEN_MINUS:{n.data+="-";break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case O.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case O.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case O.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case O.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=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ua(t))this._createDoctypeToken(String.fromCharCode(ul(t))),this.state=L.DOCTYPE_NAME;else switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(bt),this.state=L.DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.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=L.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.name+=bt;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ua(t)?ul(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(bn.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(bn.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=bt;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.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 O.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=bt;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.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 O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case O.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case O.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case O.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case O.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=bt;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.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 O.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case O.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=bt;break}case O.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.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 O.SPACE:case O.LINE_FEED:case O.TABULATION:case O.FORM_FEED:break;case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case O.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case O.NULL:{this._err(te.unexpectedNullCharacter);break}case O.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case O.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case O.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===O.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case O.GREATER_THAN_SIGN:{this.state=L.DATA;break}case O.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=L.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(O.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&UE(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){UE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===O.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const zE=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),$E=new Set([...zE,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),ll=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),NI=new Set([...ll,g.OL,g.UL]),kI=new Set([...ll,g.BUTTON]),VE=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),qE=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),CI=new Set([g.TR,g.TEMPLATE,g.HTML]),OI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),II=new Set([g.TABLE,g.TEMPLATE,g.HTML]),PI=new Set([g.TD,g.TH]);class RI{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)===me.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])!==me.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(Wf,me.HTML)}popUntilTableCellPopped(){this.popUntilPopped(PI,me.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(II,me.HTML)}clearBackToTableBodyContext(){this.clearBackTo(OI,me.HTML)}clearBackToTableRowContext(){this.clearBackTo(CI,me.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 me.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case me.SVG:{if(qE.has(s))return!1;break}case me.MATHML:{if(VE.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ll)}hasInListItemScope(t){return this.hasInDynamicScope(t,NI)}hasInButtonScope(t){return this.hasInDynamicScope(t,kI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case me.HTML:{if(Wf.has(n))return!0;if(ll.has(n))return!1;break}case me.SVG:{if(qE.has(n))return!1;break}case me.MATHML:{if(VE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===me.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])===me.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])===me.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&&zE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&$E.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&$E.has(this.currentTagId);)this.pop()}}const Gf=3;var _r;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(_r||(_r={}));const YE={type:_r.Marker};class LI{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 l=0;l<this.entries.length;l++){const d=this.entries[l];if(d.type===_r.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:l,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Gf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Gf)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const l=r[u];l.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=Gf&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(YE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:_r.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:_r.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(YE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===_r.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===_r.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===_r.Element&&n.element===t)}}const li={createDocument(){return{nodeName:"#document",mode:zn.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};li.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(li.isTextNode(n)){n.value+=t;return}}li.appendChild(e,li.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&li.isTextNode(r)?r.value+=t:li.insertBefore(e,li.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=U(U({},e.sourceCodeLocation),t)}},WE="html",DI="about:legacy-compat",MI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",GE=["+//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//"],FI=[...GE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],BI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),XE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],UI=[...XE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function QE(e,t){return t.some(n=>e.startsWith(n))}function HI(e){return e.name===WE&&e.publicId===null&&(e.systemId===null||e.systemId===DI)}function jI(e){if(e.name!==WE)return zn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===MI)return zn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),BI.has(n))return zn.QUIRKS;let r=t===null?FI:GE;if(QE(n,r))return zn.QUIRKS;if(r=t===null?XE:UI,QE(n,r))return zn.LIMITED_QUIRKS}return zn.NO_QUIRKS}const KE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},zI="definitionurl",$I="definitionURL",VI=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])),qI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:me.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:me.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:me.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:me.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:me.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:me.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:me.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:me.XML}],["xml:space",{prefix:"xml",name:"space",namespace:me.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:me.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:me.XMLNS}]]),YI=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])),WI=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 GI(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===Ki.COLOR||r===Ki.SIZE||r===Ki.FACE)||WI.has(t)}function JE(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===zI){e.attrs[t].name=$I;break}}function ZE(e){for(let t=0;t<e.attrs.length;t++){const n=VI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Xf(e){for(let t=0;t<e.attrs.length;t++){const n=qI.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 XI(e){const t=YI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=zs(e.tagName))}function QI(e,t){return t===me.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function KI(e,t,n){if(t===me.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ki.ENCODING){const s=n[r].value.toLowerCase();return s===KE.TEXT_HTML||s===KE.APPLICATION_XML}}return t===me.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function JI(e,t,n,r){return(!r||r===me.HTML)&&KI(e,t,n)||(!r||r===me.MATHML)&&QI(e,t)}const ZI="hidden",eP=8,tP=3;var B;(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"})(B||(B={}));const nP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ey=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),ty={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:li,onParseError:null};class ny{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=B.INITIAL,this.originalInsertionMode=B.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=U(U({},ty),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 AI(this.options,this),this.activeFormattingElements=new LI(this.treeAdapter),this.fragmentContextID=r?zs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new RI(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=U(U({},ty),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,me.HTML,[]));const s=r.treeAdapter.createElement("documentmock",me.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(B.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:nP,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)===me.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,me.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=B.TEXT}switchToPlaintextParsing(){this.insertionMode=B.TEXT,this.originalInsertionMode=B.IN_BODY,this.tokenizer.state=kt.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)!==me.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=kt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=kt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=kt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=kt.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(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&ue(U({},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,me.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,me.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,me.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:U({},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)===me.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,me.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 JI(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===_r.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=B.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=B.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=B.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=B.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=B.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=B.IN_TABLE;return}case g.BODY:{this.insertionMode=B.IN_BODY;return}case g.FRAMESET:{this.insertionMode=B.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?B.AFTER_HEAD:B.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=B.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=B.IN_HEAD;return}break}}this.insertionMode=B.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=B.IN_SELECT_IN_TABLE;return}}this.insertionMode=B.IN_SELECT}_isElementCausesFosterParenting(t){return ey.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)===me.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 xI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){PR(this,t);return}switch(this.insertionMode){case B.INITIAL:{la(this,t);break}case B.BEFORE_HTML:{ca(this,t);break}case B.BEFORE_HEAD:{da(this,t);break}case B.IN_HEAD:{fa(this,t);break}case B.IN_HEAD_NO_SCRIPT:{ha(this,t);break}case B.AFTER_HEAD:{pa(this,t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:{iy(this,t);break}case B.TEXT:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Zf(this,t);break}case B.IN_TABLE_TEXT:{fy(this,t);break}case B.IN_COLUMN_GROUP:{fl(this,t);break}case B.AFTER_BODY:{ml(this,t);break}case B.AFTER_AFTER_BODY:{gl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){IR(this,t);return}switch(this.insertionMode){case B.INITIAL:{la(this,t);break}case B.BEFORE_HTML:{ca(this,t);break}case B.BEFORE_HEAD:{da(this,t);break}case B.IN_HEAD:{fa(this,t);break}case B.IN_HEAD_NO_SCRIPT:{ha(this,t);break}case B.AFTER_HEAD:{pa(this,t);break}case B.TEXT:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Zf(this,t);break}case B.IN_COLUMN_GROUP:{fl(this,t);break}case B.AFTER_BODY:{ml(this,t);break}case B.AFTER_AFTER_BODY:{gl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Kf(this,t);return}switch(this.insertionMode){case B.INITIAL:case B.BEFORE_HTML:case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_TEMPLATE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{Kf(this,t);break}case B.IN_TABLE_TEXT:{Ea(this,t);break}case B.AFTER_BODY:{lP(this,t);break}case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{cP(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case B.INITIAL:{dP(this,t);break}case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case B.IN_TABLE_TEXT:{Ea(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)?RR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{la(this,t);break}case B.BEFORE_HTML:{fP(this,t);break}case B.BEFORE_HEAD:{pP(this,t);break}case B.IN_HEAD:{rr(this,t);break}case B.IN_HEAD_NO_SCRIPT:{EP(this,t);break}case B.AFTER_HEAD:{TP(this,t);break}case B.IN_BODY:{nn(this,t);break}case B.IN_TABLE:{$s(this,t);break}case B.IN_TABLE_TEXT:{Ea(this,t);break}case B.IN_CAPTION:{mR(this,t);break}case B.IN_COLUMN_GROUP:{eh(this,t);break}case B.IN_TABLE_BODY:{hl(this,t);break}case B.IN_ROW:{pl(this,t);break}case B.IN_CELL:{yR(this,t);break}case B.IN_SELECT:{my(this,t);break}case B.IN_SELECT_IN_TABLE:{bR(this,t);break}case B.IN_TEMPLATE:{xR(this,t);break}case B.AFTER_BODY:{SR(this,t);break}case B.IN_FRAMESET:{vR(this,t);break}case B.AFTER_FRAMESET:{NR(this,t);break}case B.AFTER_AFTER_BODY:{CR(this,t);break}case B.AFTER_AFTER_FRAMESET:{OR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?LR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{la(this,t);break}case B.BEFORE_HTML:{hP(this,t);break}case B.BEFORE_HEAD:{mP(this,t);break}case B.IN_HEAD:{gP(this,t);break}case B.IN_HEAD_NO_SCRIPT:{yP(this,t);break}case B.AFTER_HEAD:{bP(this,t);break}case B.IN_BODY:{dl(this,t);break}case B.TEXT:{sR(this,t);break}case B.IN_TABLE:{ma(this,t);break}case B.IN_TABLE_TEXT:{Ea(this,t);break}case B.IN_CAPTION:{gR(this,t);break}case B.IN_COLUMN_GROUP:{ER(this,t);break}case B.IN_TABLE_BODY:{th(this,t);break}case B.IN_ROW:{py(this,t);break}case B.IN_CELL:{TR(this,t);break}case B.IN_SELECT:{gy(this,t);break}case B.IN_SELECT_IN_TABLE:{_R(this,t);break}case B.IN_TEMPLATE:{wR(this,t);break}case B.AFTER_BODY:{yy(this,t);break}case B.IN_FRAMESET:{AR(this,t);break}case B.AFTER_FRAMESET:{kR(this,t);break}case B.AFTER_AFTER_BODY:{gl(this,t);break}}}onEof(t){switch(this.insertionMode){case B.INITIAL:{la(this,t);break}case B.BEFORE_HTML:{ca(this,t);break}case B.BEFORE_HEAD:{da(this,t);break}case B.IN_HEAD:{fa(this,t);break}case B.IN_HEAD_NO_SCRIPT:{ha(this,t);break}case B.AFTER_HEAD:{pa(this,t);break}case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{cy(this,t);break}case B.TEXT:{oR(this,t);break}case B.IN_TABLE_TEXT:{Ea(this,t);break}case B.IN_TEMPLATE:{Ey(this,t);break}case B.AFTER_BODY:case B.IN_FRAMESET:case B.AFTER_FRAMESET:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{Jf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===O.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 B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.TEXT:case B.IN_COLUMN_GROUP:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{this._insertCharacters(t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:case B.AFTER_BODY:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{ry(this,t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Zf(this,t);break}case B.IN_TABLE_TEXT:{dy(this,t);break}}}}function rP(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):ly(e,t),n}function iP(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 sP(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 l=e.activeFormattingElements.getElementEntry(u),d=l&&a>=tP;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=oP(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function oP(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 aP(e,t,n){const r=e.treeAdapter.getTagName(t),s=zs(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===me.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function uP(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 Qf(e,t){for(let n=0;n<eP;n++){const r=rP(e,t);if(!r)break;const s=iP(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=sP(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&aP(e,u,a),uP(e,s,r)}}function Kf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function lP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function cP(e,t){e._appendCommentNode(t,e.document)}function Jf(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 dP(e,t){e._setDocumentType(t);const n=t.forceQuirks?zn.QUIRKS:jI(t);HI(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=B.BEFORE_HTML}function la(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,zn.QUIRKS),e.insertionMode=B.BEFORE_HTML,e._processToken(t)}function fP(e,t){t.tagID===g.HTML?(e._insertElement(t,me.HTML),e.insertionMode=B.BEFORE_HEAD):ca(e,t)}function hP(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&ca(e,t)}function ca(e,t){e._insertFakeRootElement(),e.insertionMode=B.BEFORE_HEAD,e._processToken(t)}function pP(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.HEAD:{e._insertElement(t,me.HTML),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD;break}default:da(e,t)}}function mP(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?da(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function da(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD,e._processToken(t)}function rr(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,kt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,kt.RAWTEXT):(e._insertElement(t,me.HTML),e.insertionMode=B.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,kt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,kt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=B.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(B.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:fa(e,t)}}function gP(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=B.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{fa(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ji(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 fa(e,t){e.openElements.pop(),e.insertionMode=B.AFTER_HEAD,e._processToken(t)}function EP(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{rr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:ha(e,t)}}function yP(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=B.IN_HEAD;break}case g.BR:{ha(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function ha(e,t){const n=t.type===Xe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=B.IN_HEAD,e._processToken(t)}function TP(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.BODY:{e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=B.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,me.HTML),e.insertionMode=B.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),rr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:pa(e,t)}}function bP(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{pa(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function pa(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=B.IN_BODY,cl(e,t)}function cl(e,t){switch(t.type){case Xe.CHARACTER:{iy(e,t);break}case Xe.WHITESPACE_CHARACTER:{ry(e,t);break}case Xe.COMMENT:{Kf(e,t);break}case Xe.START_TAG:{nn(e,t);break}case Xe.END_TAG:{dl(e,t);break}case Xe.EOF:{cy(e,t);break}}}function ry(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function iy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function _P(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function xP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function wP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_FRAMESET)}function SP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function vP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Wf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,me.HTML)}function AP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function NP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),n||(e.formElement=e.openElements.current))}function kP(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,me.HTML)}function CP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.tokenizer.state=kt.PLAINTEXT}function OP(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1}function IP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Qf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function PP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function RP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Qf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function LP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function DP(e,t){e.treeAdapter.getDocumentMode(e.document)!==zn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=B.IN_TABLE}function sy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function oy(e){const t=BE(e,Ki.TYPE);return t!=null&&t.toLowerCase()===ZI}function MP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),oy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function FP(e,t){e._appendElement(t,me.HTML),t.ackSelfClosing=!0}function BP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function UP(e,t){t.tagName=X.IMG,t.tagID=g.IMG,sy(e,t)}function HP(e,t){e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.tokenizer.state=kt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=B.TEXT}function jP(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,kt.RAWTEXT)}function zP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,kt.RAWTEXT)}function ay(e,t){e._switchToTextParsing(t,kt.RAWTEXT)}function $P(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===B.IN_TABLE||e.insertionMode===B.IN_CAPTION||e.insertionMode===B.IN_TABLE_BODY||e.insertionMode===B.IN_ROW||e.insertionMode===B.IN_CELL?B.IN_SELECT_IN_TABLE:B.IN_SELECT}function VP(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function qP(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,me.HTML)}function YP(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,me.HTML)}function WP(e,t){e._reconstructActiveFormattingElements(),JE(t),Xf(t),t.selfClosing?e._appendElement(t,me.MATHML):e._insertElement(t,me.MATHML),t.ackSelfClosing=!0}function GP(e,t){e._reconstructActiveFormattingElements(),ZE(t),Xf(t),t.selfClosing?e._appendElement(t,me.SVG):e._insertElement(t,me.SVG),t.ackSelfClosing=!0}function uy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function nn(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:{PP(e,t);break}case g.A:{IP(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{vP(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:{SP(e,t);break}case g.LI:case g.DD:case g.DT:{kP(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{sy(e,t);break}case g.HR:{BP(e,t);break}case g.RB:case g.RTC:{qP(e,t);break}case g.RT:case g.RP:{YP(e,t);break}case g.PRE:case g.LISTING:{AP(e,t);break}case g.XMP:{jP(e,t);break}case g.SVG:{GP(e,t);break}case g.HTML:{_P(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:{rr(e,t);break}case g.BODY:{xP(e,t);break}case g.FORM:{NP(e,t);break}case g.NOBR:{RP(e,t);break}case g.MATH:{WP(e,t);break}case g.TABLE:{DP(e,t);break}case g.INPUT:{MP(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{FP(e,t);break}case g.IMAGE:{UP(e,t);break}case g.BUTTON:{OP(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{LP(e,t);break}case g.IFRAME:{zP(e,t);break}case g.SELECT:{$P(e,t);break}case g.OPTION:case g.OPTGROUP:{VP(e,t);break}case g.NOEMBED:case g.NOFRAMES:{ay(e,t);break}case g.FRAMESET:{wP(e,t);break}case g.TEXTAREA:{HP(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?ay(e,t):uy(e,t);break}case g.PLAINTEXT:{CP(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:uy(e,t)}}function XP(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function QP(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,yy(e,t))}function KP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function JP(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 ZP(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function eR(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function tR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function nR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function rR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function iR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function ly(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 dl(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:{Qf(e,t);break}case g.P:{ZP(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:{KP(e,t);break}case g.LI:{eR(e);break}case g.DD:case g.DT:{tR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{nR(e);break}case g.BR:{iR(e);break}case g.BODY:{XP(e,t);break}case g.HTML:{QP(e,t);break}case g.FORM:{JP(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{rR(e,t);break}case g.TEMPLATE:{Ji(e,t);break}default:ly(e,t)}}function cy(e,t){e.tmplInsertionModeStack.length>0?Ey(e,t):Jf(e,t)}function sR(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 oR(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Zf(e,t){if(e.openElements.currentTagId!==void 0&&ey.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=B.IN_TABLE_TEXT,t.type){case Xe.CHARACTER:{fy(e,t);break}case Xe.WHITESPACE_CHARACTER:{dy(e,t);break}}else ga(e,t)}function aR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_CAPTION}function uR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_COLUMN_GROUP}function lR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=B.IN_COLUMN_GROUP,eh(e,t)}function cR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_TABLE_BODY}function dR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=B.IN_TABLE_BODY,hl(e,t)}function fR(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function hR(e,t){oy(t)?e._appendElement(t,me.HTML):ga(e,t),t.ackSelfClosing=!0}function pR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,me.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function $s(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{dR(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{rr(e,t);break}case g.COL:{lR(e,t);break}case g.FORM:{pR(e,t);break}case g.TABLE:{fR(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{cR(e,t);break}case g.INPUT:{hR(e,t);break}case g.CAPTION:{aR(e,t);break}case g.COLGROUP:{uR(e,t);break}default:ga(e,t)}}function ma(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Ji(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:ga(e,t)}}function ga(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,cl(e,t),e.fosterParentingEnabled=n}function dy(e,t){e.pendingCharacterTokens.push(t)}function fy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ea(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ga(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const hy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function mR(e,t){const n=t.tagID;hy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,$s(e,t)):nn(e,t)}function gR(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=B.IN_TABLE,n===g.TABLE&&ma(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:dl(e,t)}}function eh(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.COL:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{rr(e,t);break}default:fl(e,t)}}function ER(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case g.TEMPLATE:{Ji(e,t);break}case g.COL:break;default:fl(e,t)}}function fl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE,e._processToken(t))}function hl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,me.HTML),e.insertionMode=B.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=B.IN_ROW,pl(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=B.IN_TABLE,$s(e,t));break}default:$s(e,t)}}function th(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=B.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,ma(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:ma(e,t)}}function pl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,me.HTML),e.insertionMode=B.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=B.IN_TABLE_BODY,hl(e,t));break}default:$s(e,t)}}function py(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,th(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=B.IN_TABLE_BODY,th(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:ma(e,t)}}function yR(e,t){const n=t.tagID;hy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),pl(e,t)):nn(e,t)}function TR(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=B.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),py(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:dl(e,t)}}function my(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,me.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,me.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,me.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:{rr(e,t);break}}}function gy(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:{Ji(e,t);break}}}function bR(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)):my(e,t)}function _R(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)):gy(e,t)}function xR(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:{rr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=B.IN_TABLE,e.insertionMode=B.IN_TABLE,$s(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=B.IN_COLUMN_GROUP,e.insertionMode=B.IN_COLUMN_GROUP,eh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=B.IN_TABLE_BODY,e.insertionMode=B.IN_TABLE_BODY,hl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=B.IN_ROW,e.insertionMode=B.IN_ROW,pl(e,t);break}default:e.tmplInsertionModeStack[0]=B.IN_BODY,e.insertionMode=B.IN_BODY,nn(e,t)}}function wR(e,t){t.tagID===g.TEMPLATE&&Ji(e,t)}function Ey(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Jf(e,t)}function SR(e,t){t.tagID===g.HTML?nn(e,t):ml(e,t)}function yy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=B.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 ml(e,t)}function ml(e,t){e.insertionMode=B.IN_BODY,cl(e,t)}function vR(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.FRAMESET:{e._insertElement(t,me.HTML);break}case g.FRAME:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{rr(e,t);break}}}function AR(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=B.AFTER_FRAMESET))}function NR(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.NOFRAMES:{rr(e,t);break}}}function kR(e,t){t.tagID===g.HTML&&(e.insertionMode=B.AFTER_AFTER_FRAMESET)}function CR(e,t){t.tagID===g.HTML?nn(e,t):gl(e,t)}function gl(e,t){e.insertionMode=B.IN_BODY,cl(e,t)}function OR(e,t){switch(t.tagID){case g.HTML:{nn(e,t);break}case g.NOFRAMES:{rr(e,t);break}}}function IR(e,t){t.chars=bt,e._insertCharacters(t)}function PR(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ty(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==me.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function RR(e,t){if(GI(t))Ty(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===me.MATHML?JE(t):r===me.SVG&&(XI(t),ZE(t)),Xf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function LR(e,t){if(t.tagID===g.P||t.tagID===g.BR){Ty(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)===me.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 DR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,MR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),by={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function _y(e,t){const n=YR(e),r=RE("type",{handlers:{root:FR,element:BR,text:UR,comment:wy,doctype:HR,raw:zR},unknown:$R}),s={parser:n?new ny(by):ny.getFragmentParser(void 0,by),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),Vs(s,Tr());const a=n?s.parser.document:s.parser.getFragment(),u=WO(a,{file:s.options.file});return s.stitches&&sl(u,"comment",function(l,d,f){const p=l;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 xy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function FR(e,t){xy(e.children,t)}function BR(e,t){VR(e,t),xy(e.children,t),qR(e,t)}function UR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:ya(e)};Vs(t,Tr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function HR(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ya(e)};Vs(t,Tr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function jR(e,t){t.stitches=!0;const n=WR(e);if("children"in e&&"children"in n){const r=_y({type:"root",children:e.children},t.options);n.children=r.children}wy({type:"comment",value:{stitch:n}},t)}function wy(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:ya(e)};Vs(t,Tr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function zR(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,Sy(t,Tr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(DR,"&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 $R(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))jR(n,t);else{let r="";throw MR.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 Vs(e,t){Sy(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=kt.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 Sy(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 VR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===kt.PLAINTEXT)return;Vs(t,Tr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:Qi.html;s===Qi.html&&n==="svg"&&(s=Qi.svg);const a=JO(ue(U({},e),{children:[]}),{space:s===Qi.svg?"svg":"html"}),u={type:Xe.START_TAG,tagName:n,tagID:zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ya(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function qR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&oI.includes(n)||t.parser.tokenizer.state===kt.PLAINTEXT)return;Vs(t,Gu(e));const r={type:Xe.END_TAG,tagName:n,tagID:zs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ya(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===kt.RCDATA||t.parser.tokenizer.state===kt.RAWTEXT||t.parser.tokenizer.state===kt.SCRIPT_DATA)&&(t.parser.tokenizer.state=kt.DATA)}function YR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ya(e){const t=Tr(e)||{line:void 0,column:void 0,offset:void 0},n=Gu(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 WR(e){return"children"in e?Xi(ue(U({},e),{children:[]})):Xi(e)}function vy(e){return function(t,n){return _y(t,ue(U({},e),{file:n}))}}const Zi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ay={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Zi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Zi],h2:[["className","sr-only"]],img:[...Zi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Zi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Zi],table:[...Zi],ul:[...Zi,["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"]},ci={}.hasOwnProperty;function GR(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},Ay),t):Ay,stack:[]},s=Ny(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function Ny(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return XR(e,n);case"doctype":return QR(e,n);case"element":return KR(e,n);case"root":return JR(e,n);case"text":return ZR(e,n)}}}function XR(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 Ta(a,t),a}}function QR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ta(n,t),n}}function KR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ky(e,t.children),s=e6(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&&ci.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let d=-1;for(a=!1;++d<l.length;)e.stack.includes(l[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 Ta(u,t),u}function JR(e,t){const r={type:"root",children:ky(e,t.children)};return Ta(r,t),r}function ZR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ta(r,t),r}function ky(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=Ny(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function e6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&ci.call(r,n)?r[n]:void 0,u=r&&ci.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(ci.call(l,f)){const p=l[f];let m=Cy(e,Iy(a,f),f,p);m==null&&(m=Cy(e,Iy(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&ci.call(s,n)){const p=s[n];for(f in p)ci.call(p,f)&&!ci.call(d,f)&&(d[f]=p[f])}return d}function Cy(e,t,n,r){return t?Array.isArray(r)?t6(e,t,n,r):Oy(e,t,n,r):void 0}function t6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=Oy(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Oy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&n6(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 n6(e,t,n){const r=e.schema.protocols&&ci.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("?"),l=s.indexOf("#"),d=s.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||l>-1&&a>l)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 Ta(e,t){const n=x1(t);t.data&&(e.data=Xi(t.data)),n&&(e.position=n)}function Iy(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 r6(e){return function(t){return GR(t,e)}}const Py=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return _.jsx("a",ue(U(U({className:F(e,`${C}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},i6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=at();return!e&&!t?null:_.jsx("div",{className:F(n,`${C}-disclaimer`),children:t?_.jsx(SE,{rehypePlugins:[vy,r6],components:{ul:({children:r})=>_.jsx("ul",{className:F(n,`${C}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:F(n,`${C}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:F(n,`${C}-li`),children:r}),a:({href:r,title:s,children:a})=>_.jsx(Py,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>_.jsx("img",{className:F(n,`${C}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>_.jsx("p",{className:F(n,`${C}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:F(n,`${C}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:F(n,`${C}-disclaimer-text`),children:e})})},nh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a}=cn(),{globalClassName:u,searchConfig:l,enableEscalationToAgent:d}=at(),f=H.useRef(null),p=t||!s&&!a,m=y=>{var v;y.preventDefault();const x=(((v=f.current)==null?void 0:v.value)||"").trim();x&&(f.current.value="",r(x))},T=()=>{r("Can you connect me to a human?")};return _.jsxs("div",{className:F(u,e,`cim-${n}-component`,`${C}-search-bar-wrapper`),children:[_.jsxs("form",{className:F(u,e,`cim-${n}-component`,`${C}-search-bar`),name:`${C}-search-form`,onSubmit:m,children:[_.jsx("input",{className:F(u,e,`cim-${n}-component`,`${C}-search-input`),type:"text",ref:f,placeholder:(l==null?void 0:l.placeholder)||"Ask us anything",name:`${C}-user-input`,disabled:p}),_.jsx(MN,{className:e,globalClassName:u,searchConfig:l,componentType:n,isLoading:p}),d&&_.jsx(tr,{className:F(u,`${C}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:p,onClick:T,icon:_.jsx(SN,{})})]}),_.jsx(i6,{})]})};function s6(e){return ot({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 o6(e){return ot({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 Ry=H.createContext({isOpen:!1}),rh=H.createContext(null),Ly=H.createContext(null),qs=()=>{var n,r;const e=H.useContext(rh),t=H.useContext(Ly);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Dy=({onClearChat:e,componentType:t})=>{const n=qs(),r=()=>{e(),n()};return _.jsxs("button",{className:F(`${C}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(o6,{}),"Clear chat"]})},My=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=at(),r=qs(),[s,a]=H.useState(!1),u=()=>ze(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(l){n==null||n.error("Error downloading transcript:",l)}finally{a(!1)}}});return _.jsxs("button",{className:F(`${C}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[_.jsx(s6,{}),"Download transcript"]})};function a6(e){return e==null?[]:Array.isArray(e)?e:[e]}var u6=(e,...t)=>e.concat(t),l6=(e,...t)=>e.filter(n=>!t.includes(n)),c6=e=>Array.from(new Set(e));function Fy(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?s?l:0:a>=u?s?0:t>u?u:t:a}function d6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return Fy(e,t,{step:-r,loop:s})}var f6=e=>Array.isArray(e),By=e=>e!=null&&typeof e=="object",h6=e=>By(e)&&!f6(e),El=e=>typeof e=="string",Ys=e=>typeof e=="function",p6=e=>e==null,m6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),g6=e=>Object.prototype.toString.call(e),Uy=Function.prototype.toString,E6=Uy.call(Object),y6=e=>{if(!By(e)||g6(e)!="[object Object]"||_6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=m6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Uy.call(n)==E6},T6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,b6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,_6=e=>T6(e)||b6(e),x6=e=>e(),w6=()=>{},ih=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function S6(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:v6,max:A6}=Math,N6=e=>Number.isNaN(e),k6=e=>N6(e)?0:e,Hy=(e,t,n)=>v6(A6(k6(e),t),n);function sh(e){if(!y6(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 oh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function C6(e,t){if(e==null)throw new Error(t())}function O6(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 I6=Object.defineProperty,P6=(e,t,n)=>t in e?I6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ah=(e,t,n)=>P6(e,typeof t!="symbol"?t+"":t,n),jy=()=>{},yl=e=>typeof e=="object"&&e!==null,Ws=e=>e?"":void 0,zy=e=>e?"true":void 0,R6=1,L6=9,D6=11,jt=e=>yl(e)&&e.nodeType===R6&&typeof e.nodeName=="string",Tl=e=>yl(e)&&e.nodeType===L6,M6=e=>yl(e)&&e===e.window,$y=e=>jt(e)?e.localName||"":"#document";function F6(e){return["html","body","#document"].includes($y(e))}var B6=e=>yl(e)&&e.nodeType!==void 0,es=e=>B6(e)&&e.nodeType===D6&&"host"in e,U6=e=>jt(e)&&e.localName==="input",H6=e=>jt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ba(e){if(!e)return!1;const t=e.getRootNode();return Qs(t)===e}var j6=/(textarea|select)/;function z6(e){if(e==null||!jt(e))return!1;try{return U6(e)&&e.selectionStart!=null||j6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Gs(e,t){var r;if(!e||!t||!jt(e)||!jt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&es(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function xr(e){var t;return Tl(e)?e:M6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function $6(e){return xr(e).documentElement}function Xs(e){var t,n,r;return es(e)?Xs(e.host):Tl(e)?(t=e.defaultView)!=null?t:window:jt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Qs(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 V6(e){if($y(e)==="html")return e;const t=e.assignedSlot||e.parentNode||es(e)&&e.host||$6(e);return es(t)?t.host:t}function uh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Tl(t)||es(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var lh=new WeakMap;function Ks(e){return lh.has(e)||lh.set(e,Xs(e).getComputedStyle(e)),lh.get(e)}var ch=new Set(["menu","listbox","dialog","grid","tree","region"]),q6=e=>ch.has(e),Vy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function qy(e,t){const n=new Set,r=uh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Vy(l);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"),T=p.getAttribute("aria-modal")==="true";if(m&&q6(m)&&!T&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function Yy(e,t){const n=uh(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Vy(l);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"),T=p.getAttribute("aria-modal")==="true";m&&ch.has(m)&&!T&&(t(p),s(p))}}}};s(e)}function Y6(e){const t=new Set;return Yy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function W6(e){const t=e.getAttribute("role");return!!(t&&ch.has(t))}function G6(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function X6(e){var t;return G6(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function Q6(e){if(!e.id)return!1;const t=uh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&W6(e))}var dh=()=>typeof document!="undefined";function K6(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var fh=e=>dh()&&e.test(K6()),J6=e=>dh()&&e.test(navigator.vendor),Wy=()=>dh()&&!!navigator.maxTouchPoints,Z6=()=>fh(/^iPhone/i),e4=()=>fh(/^iPad/i)||hh()&&navigator.maxTouchPoints>1,bl=()=>Z6()||e4(),t4=()=>hh()||bl(),hh=()=>fh(/^Mac/i),n4=()=>t4()&&J6(/apple/i);function r4(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 ir(e){var n;const t=r4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Gy=e=>e.button===0,i4=e=>e.button===2||hh()&&e.ctrlKey&&e.button===0,s4=e=>"touches"in e&&e.touches.length>0,o4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Xy={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function a4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=o4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in Xy&&(s=Xy[s]),s}function Qy(e,t="client"){const n=s4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var zt=(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)}},Ky=e=>jt(e)&&e.tagName==="IFRAME",u4=/^(audio|video|details)$/;function Jy(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var l4=e=>!Number.isNaN(Jy(e)),c4=e=>Jy(e)<0;function d4(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 Zy(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let l=0;for(;l<s.length;){const d=s[l++];if(!d||a.has(d))continue;a.add(d);const f=d4(d,t);if(f){const p=Array.from(f.querySelectorAll(_l)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,x)=>{u.set(y,T+x)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,T+x)})}s.push(...p)}}return r}var _l="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",eT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(_l));(n==!0||n=="if-empty"&&s.length===0)&&jt(e)&&wr(e)&&s.unshift(e);const u=[];for(const l of s)if(wr(l)){if(Ky(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...eT(d,{getShadowRoot:r}));continue}u.push(l)}return r?Zy(u,r,wr):u};function wr(e){return!jt(e)||e.closest("[inert]")?!1:e.matches(_l)&&H6(e)}function Js(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(_l));n&&ts(e)&&s.unshift(e);const a=[];for(const u of s)if(ts(u)){if(Ky(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...Js(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Zy(a,r,ts);return!u.length&&n?s:u}return!a.length&&n?s:a}function ts(e){return jt(e)&&e.tabIndex>0?!0:wr(e)&&!c4(e)}function f4(e,t={}){const n=Js(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function h4(e,t={}){const{current:n,getShadowRoot:r}=t,s=Js(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Qs(a);if(!u)return null;const l=s.indexOf(u);return s[l+1]||null}function _a(e){return e.tabIndex<0&&(u4.test(e.localName)||z6(e))&&!l4(e)?0:e.tabIndex}function tT(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=Js(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var p4=class a2{constructor(){ah(this,"id",null),ah(this,"fn_cleanup"),ah(this,"cleanup",()=>{this.cancel()})}static create(){return new a2}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 Dt(e){const t=p4.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=V6(e);return F6(t)?xr(t).body:jt(t)&&E4(t)?t:ph(t)}var m4=/auto|scroll|overlay|hidden|clip/,g4=new Set(["inline","contents"]);function E4(e){const t=Xs(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return m4.test(n+s+r)&&!g4.has(a)}var Zs="default",mh="",xl=new WeakMap;function y4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return bl()?(Zs==="default"&&(mh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),Zs="disabled"):t&&(xl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>T4({target:t,doc:r})}function T4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(bl()){if(Zs!=="disabled")return;Zs="restoring",setTimeout(()=>{nT(()=>{Zs==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=mh||""),mh="",Zs="default")})},300)}else if(t&&xl.has(t)){const a=xl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),xl.delete(t)}}function b4(e={}){const u=e,{defer:t,target:n}=u,r=pn(u,["defer","target"]),s=t?Dt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(y4(ue(U({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function _4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=Qy(l),f=Math.sqrt(ud(d.x,2)+ud(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=Qy(l);r({point:d,event:l})},u=[zt(e,"pointermove",s,!1),zt(e,"pointerup",a,!1),zt(e,"pointercancel",a,!1),zt(e,"contextmenu",a,!1),b4({doc:e})];return()=>{u.forEach(l=>l())}}function x4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,l=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=f4(e,{includeContainer:!0,getShadowRoot:a}),y=h4(l,{current:n,getShadowRoot:a}),x=!m&&!T;f.shiftKey&&ba(y)?(s==null||s(),p=T):f.shiftKey&&(ba(m)||x)?p=n:!f.shiftKey&&ba(n)?(s==null||s(),p=m):!f.shiftKey&&(ba(T)||x)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return zt(u,"keydown",d,!0)}function w4(e,t){const l=t,{defer:n,triggerElement:r}=l,s=pn(l,["defer","triggerElement"]),a=n?Dt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(x4(d,U({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function S4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function wl(e,t){if(!e)return jy;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 v4(e,t,n){if(!e)return jy;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 A4(e,t,n){const{signal:r}=t;return[new Promise((u,l)=>{const d=setTimeout(()=>{l(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),l(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),l(f))})}),()=>t.abort()]}function N4(e,t){const{timeout:n,rootNode:r}=t,s=Xs(r),a=xr(r),u=new s.AbortController;return A4(new Promise(l=>{const d=e();if(d){l(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),l(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var k4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),C4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,rT=e=>{const t={};let n;for(;n=C4.exec(e);)t[n[1]]=n[2];return t},O4=(e,t)=>{if(El(e)){if(El(t))return`${e};${t}`;e=rT(e)}else El(t)&&(t=rT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Mt(...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]=ih(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=k4(t[s],n[s]);continue}if(s==="style"){t[s]=O4(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 z7(e){return e}var eo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(eo||{}),gh="__init__";function I4(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>xr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>Qs(t()),a=u=>t().getElementById(u);return ue(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:ba,getById:a})}function P4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var to=()=>e=>Array.from(new Set(e)),iT=typeof globalThis.document!="undefined"?H.useLayoutEffect:H.useEffect;function Sl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=H.useState(t),[s,a]=H.useState(r),u=e().value!==void 0,l=H.useRef(s);l.current=u?e().value:s;const d=H.useRef(l.current);iT(()=>{d.current=l.current},[s,e().value]);const f=y=>{var A,S;const x=d.current,v=Ys(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:x}),u||a(v),n(v,x)||(S=(A=e()).onChange)==null||S.call(A,v,x)};function p(){return u?e().value:s}return{initial:r,ref:l,get:p,set(y){(e().sync?Ds.flushSync:x6)(()=>f(y))},invoke(y,x){var v,A;(A=(v=e()).onChange)==null||A.call(v,y,x)},hash(y){var x,v,A;return(A=(v=(x=e()).hash)==null?void 0:v.call(x,y))!=null?A:String(y)}}}Sl.cleanup=e=>{H.useEffect(()=>e,[])},Sl.ref=e=>{const t=H.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function R4(e){const t=H.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var L4=(e,t)=>{const n=H.useRef(!1),r=H.useRef(!1);H.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),H.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function vl(e,t={}){var se,ee,xe,fe,ce,he;const n=H.useMemo(()=>{const{id:le,ids:K,getRootNode:ae}=t;return I4({id:le,ids:K,getRootNode:ae})},[t]),r=(...le)=>{e.debug&&console.log(...le)},s=(ee=(se=e.props)==null?void 0:se.call(e,{props:sh(t),scope:n}))!=null?ee:t,a=D4(s),u=(xe=e.context)==null?void 0:xe.call(e,{prop:a,bindable:Sl,scope:n,flush:oT,getContext(){return d},getComputed(){return Y},getRefs(){return v},getEvent(){return y()}}),l=sT(u),d={get(le){var K;return(K=l.current)==null?void 0:K[le].ref.current},set(le,K){var ae;(ae=l.current)==null||ae[le].set(K)},initial(le){var K;return(K=l.current)==null?void 0:K[le].initial},hash(le){var ae,N;const K=(ae=l.current)==null?void 0:ae[le].get();return(N=l.current)==null?void 0:N[le].hash(K)}},f=H.useRef(new Map),p=H.useRef(null),m=H.useRef(null),T=H.useRef({type:""}),y=()=>ue(U({},T.current),{current(){return T.current},previous(){return m.current}}),x=()=>ue(U({},R),{matches(...le){return le.includes(R.ref.current)},hasTag(le){var K,ae;return!!((ae=(K=e.states[R.ref.current])==null?void 0:K.tags)!=null&&ae.includes(le))}}),v=R4((ce=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:d}))!=null?ce:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:$,action:S,guard:k,track:L4,refs:v,computed:Y,flush:oT,scope:n,choose:j}),S=le=>{const K=Ys(le)?le(A()):le;if(!K)return;const ae=K.map(N=>{var J,P;const D=(P=(J=e.implementations)==null?void 0:J.actions)==null?void 0:P[N];return D||oh(`[zag-js] No implementation found for action "${JSON.stringify(N)}"`),D});for(const N of ae)N==null||N(A())},k=le=>{var K,ae;return Ys(le)?le(A()):(ae=(K=e.implementations)==null?void 0:K.guards)==null?void 0:ae[le](A())},I=le=>{const K=Ys(le)?le(A()):le;if(!K)return;const ae=K.map(D=>{var P,Se;const J=(Se=(P=e.implementations)==null?void 0:P.effects)==null?void 0:Se[D];return J||oh(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),J}),N=[];for(const D of ae){const J=D==null?void 0:D(A());J&&N.push(J)}return()=>N.forEach(D=>D==null?void 0:D())},j=le=>a6(le).find(K=>{let ae=!K.guard;return El(K.guard)?ae=!!k(K.guard):Ys(K.guard)&&(ae=K.guard(A())),ae}),Y=le=>{C6(e.computed,()=>"[zag-js] No computed object found on machine");const K=e.computed[le];return K({context:d,event:y(),prop:a,refs:v,scope:n,computed:Y})},R=Sl(()=>({defaultValue:e.initialState({prop:a}),onChange(le,K){var N,D,J,P;if(K){const Se=f.current.get(K);Se==null||Se(),f.current.delete(K)}K&&S((N=e.states[K])==null?void 0:N.exit),S((D=p.current)==null?void 0:D.actions);const ae=I((J=e.states[le])==null?void 0:J.effects);if(ae&&f.current.set(le,ae),K===gh){S(e.entry);const Se=I(e.effects);Se&&f.current.set(gh,Se)}S((P=e.states[le])==null?void 0:P.entry)}})),W=H.useRef(void 0),ie=H.useRef(eo.NotStarted);iT(()=>{queueMicrotask(()=>{var D;const ae=ie.current===eo.Started;ie.current=eo.Started,r(ae?"rehydrating...":"initializing...");const N=(D=W.current)!=null?D:R.initial;R.invoke(N,ae?R.get():gh)});const le=f.current,K=R.ref.current;return()=>{r("unmounting..."),W.current=K,ie.current=eo.Stopped,le.forEach(ae=>ae==null?void 0:ae()),f.current=new Map,p.current=null,queueMicrotask(()=>{S(e.exit)})}},[]);const de=()=>"ref"in R?R.ref.current:R.get(),$=le=>{queueMicrotask(()=>{var P,Se,Me,_e,ne;if(ie.current!==eo.Started)return;m.current=T.current,T.current=le;let K=de();const ae=(Me=(P=e.states[K].on)==null?void 0:P[le.type])!=null?Me:(Se=e.on)==null?void 0:Se[le.type],N=j(ae);if(!N)return;p.current=N;const D=(_e=N.target)!=null?_e:K;r("transition",le.type,N.target||K,`(${N.actions})`);const J=D!==K;J?Ds.flushSync(()=>R.set(D)):N.reenter&&!J?R.invoke(K,K):S((ne=N.actions)!=null?ne:[])})};return(he=e.watch)==null||he.call(e,A()),{state:x(),send:$,context:d,prop:a,scope:n,refs:v,computed:Y,event:y(),getStatus:()=>ie.current}}function sT(e){const t=H.useRef(e);return t.current=e,t}function D4(e){const t=sT(e);return function(r){return t.current[r]}}function oT(e){queueMicrotask(()=>{Ds.flushSync(()=>e())})}var Eh=P4(e=>e);function Al(...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 M4(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 yh=e=>{const t=H.memo(H.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=pn(f,["asChild","children"]);if(!s)return H.createElement(e,ue(U({},u),{ref:r}),a);if(!H.isValidElement(a))return null;const l=H.Children.only(a),d=M4(l);return H.cloneElement(l,ue(U({},Mt(u,l.props)),{ref:r?Al(r,d):d}))}));return t.displayName=e.displayName||e.name,t},rn=(()=>{const e=new Map;return new Proxy(yh,{apply(t,n,r){return yh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,yh(r)),e.get(r)}})})();function F4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ns(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=H.createContext(u);l.displayName=t;function d(){var p;const f=H.useContext(l);if(!f&&n){const m=new Error(a!=null?a:F4(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[B4,Th]=ns({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[aT,xa]=ns({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),uT=H.forwardRef((e,t)=>{const n=Th(),r=xa(),s=Mt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(rn.div,ue(U({},s),{ref:Al(r.ref,t)}))});uT.displayName="PopoverContent";const lT=H.forwardRef((e,t)=>{const n=Th(),r=xa(),s=Mt(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(rn.div,ue(U({},s),{ref:t}))});lT.displayName="PopoverPositioner";const wa=()=>(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]},[{},U({},e)]),cT=e=>wa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function U4(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 H4={props({props:e}){return ue(U({},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",Ks(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"});Dt(()=>{var l,d;const u=Nl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((l=t.get("styles"))==null?void 0:l.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})=>{Dt(()=>{e.set("prevAnimationName",Nl(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,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===s&&e.set("prevAnimationName",Nl(t.get("styles")))},u=d=>{const f=Nl(t.get("styles"));ir(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 l=wl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),nT(()=>l())}}}}};function Nl(e){return(e==null?void 0:e.animationName)||"none"}to()(["onExitComplete","present","immediate"]);function j4(e,t={}){const{sync:n=!1}=t,r=z4(e);return H.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 z4(e){const t=H.useRef(e);return t.current=e,t}const bh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=T,a=pn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=H.useRef(!1),l=ue(U({},a),{present:r,onExitComplete:j4(e.onExitComplete)}),d=vl(H4,l),f=U4(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 rs=(e,t=[])=>({parts:(...n)=>{if($4(t))return rs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>rs(e,[...t,...n]),omit:(...n)=>rs(e,t.filter(r=>!n.includes(r))),rename:n=>rs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${no(e)}"][data-part="${no(r)}"]`,`& [data-scope="${no(e)}"][data-part="${no(r)}"]`].join(", "),attrs:{"data-scope":no(e),"data-part":no(r)}}}),{})}),no=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),$4=e=>e.length===0;const V4=["top","right","bottom","left"],di=Math.min,Hr=Math.max,kl=Math.round,Cl=Math.floor,Sr=e=>({x:e,y:e}),q4={left:"right",right:"left",bottom:"top",top:"bottom"};function dT(e,t,n){return Hr(e,di(t,n))}function jr(e,t){return typeof e=="function"?e(t):e}function fi(e){return e.split("-")[0]}function ro(e){return e.split("-")[1]}function _h(e){return e==="x"?"y":"x"}function xh(e){return e==="y"?"height":"width"}function vr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function wh(e){return _h(vr(e))}function Y4(e,t,n){n===void 0&&(n=!1);const r=ro(e),s=wh(e),a=xh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Ol(u)),[u,Ol(u)]}function W4(e){const t=Ol(e);return[Sh(e),t,Sh(t)]}function Sh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const fT=["left","right"],hT=["right","left"],G4=["top","bottom"],X4=["bottom","top"];function Q4(e,t,n){switch(e){case"top":case"bottom":return n?t?hT:fT:t?fT:hT;case"left":case"right":return t?G4:X4;default:return[]}}function K4(e,t,n,r){const s=ro(e);let a=Q4(fi(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Sh)))),a}function Ol(e){const t=fi(e);return q4[t]+e.slice(t.length)}function J4(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 pT(e){return typeof e!="number"?J4(e):{top:e,right:e,bottom:e,left:e}}function Il(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 mT(e,t,n){let{reference:r,floating:s}=e;const a=vr(t),u=wh(t),l=xh(u),d=fi(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,T=r[l]/2-s[l]/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 x=ro(t);return x&&(y[u]+=T*(x==="end"?1:-1)*(n&&f?-1:1)),y}function Z4(e,t){return ze(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=jr(t,e),x=pT(y),A=l[T?m==="floating"?"reference":"floating":m],S=Il(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),k=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,I=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),j=(yield a.isElement==null?void 0:a.isElement(I))&&(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1},Y=Il(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:I,strategy:d}):k);return{top:(S.top-Y.top+x.top)/j.y,bottom:(Y.bottom-S.bottom+x.bottom)/j.y,left:(S.left-Y.left+x.left)/j.x,right:(Y.right-S.right+x.right)/j.x}})}const eL=50,tL=(e,t,n)=>ze(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:ue(U({},u),{detectOverflow:Z4}),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}=mT(f,r,d),T=r,y=0;const x={};for(let v=0;v<a.length;v++){const A=a[v];if(!A)continue;const{name:S,fn:k}=A,{x:I,y:j,data:Y,reset:R}=yield k({x:p,y:m,initialPlacement:r,placement:T,strategy:s,middlewareData:x,rects:f,platform:l,elements:{reference:e,floating:t}});p=I!=null?I:p,m=j!=null?j:m,x[S]=U(U({},x[S]),Y),R&&y<eL&&(y++,typeof R=="object"&&(R.placement&&(T=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):R.rects),{x:p,y:m}=mT(f,T,d)),v=-1)}return{x:p,y:m,placement:T,strategy:s,middlewareData:x}}),nL=e=>({name:"arrow",options:e,fn(n){return ze(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=jr(e,n)||{};if(p==null)return{};const T=pT(m),y={x:r,y:s},x=wh(a),v=xh(x),A=yield l.getDimensions(p),S=x==="y",k=S?"top":"left",I=S?"bottom":"right",j=S?"clientHeight":"clientWidth",Y=u.reference[v]+u.reference[x]-y[x]-u.floating[v],R=y[x]-u.reference[x],W=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ie=W?W[j]:0;(!ie||!(yield l.isElement==null?void 0:l.isElement(W)))&&(ie=d.floating[j]||u.floating[v]);const de=Y/2-R/2,$=ie/2-A[v]/2-1,se=di(T[k],$),ee=di(T[I],$),xe=ie-A[v]-ee,fe=ie/2-A[v]/2+de,ce=dT(se,fe,xe),he=!f.arrow&&ro(a)!=null&&fe!==ce&&u.reference[v]/2-(fe<se?se:ee)-A[v]/2<0,le=he?fe<se?fe-se:fe-xe:0;return{[x]:y[x]+le,data:U({[x]:ce,centerOffset:fe-ce-le},he&&{alignmentOffset:le}),reset:he}})}}),rL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return ze(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,ce=jr(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:A=!0}=ce,S=pn(ce,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=fi(a),I=vr(d),j=fi(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(j||!A?[Ol(d)]:W4(d)),W=v!=="none";!y&&W&&R.push(...K4(d,A,v,Y));const ie=[d,...R],de=yield f.detectOverflow(n,S),$=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&$.push(de[k]),T){const he=Y4(a,l,Y);$.push(de[he[0]],de[he[1]])}if(se=[...se,{placement:a,overflows:$}],!$.every(he=>he<=0)){var ee,xe;const he=(((ee=u.flip)==null?void 0:ee.index)||0)+1,le=ie[he];if(le&&(!(T==="alignment"?I!==vr(le):!1)||se.every(N=>vr(N.placement)===I?N.overflows[0]>0:!0)))return{data:{index:he,overflows:se},reset:{placement:le}};let K=(xe=se.filter(ae=>ae.overflows[0]<=0).sort((ae,N)=>ae.overflows[1]-N.overflows[1])[0])==null?void 0:xe.placement;if(!K)switch(x){case"bestFit":{var fe;const ae=(fe=se.filter(N=>{if(W){const D=vr(N.placement);return D===I||D==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(D=>D>0).reduce((D,J)=>D+J,0)]).sort((N,D)=>N[1]-D[1])[0])==null?void 0:fe[0];ae&&(K=ae);break}case"initialPlacement":K=d;break}if(a!==K)return{reset:{placement:K}}}return{}})}}};function gT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ET(e){return V4.some(t=>e[t]>=0)}const iL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return ze(this,null,function*(){const{rects:r,platform:s}=n,l=jr(e,n),{strategy:a="referenceHidden"}=l,u=pn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,ue(U({},u),{elementContext:"reference"})),f=gT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:ET(f)}}}case"escaped":{const d=yield s.detectOverflow(n,ue(U({},u),{altBoundary:!0})),f=gT(d,r.floating);return{data:{escapedOffsets:f,escaped:ET(f)}}}default:return{}}})}}},yT=new Set(["left","top"]);function sL(e,t){return ze(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=fi(n),l=ro(n),d=vr(n)==="y",f=yT.has(u)?-1:1,p=a&&d?-1:1,m=jr(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:x}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof x=="number"&&(y=l==="end"?x*-1:x),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const oL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return ze(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield sL(n,e);return l===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:ue(U({},f),{placement:l})}})}}},aL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return ze(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,I=jr(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:j=>{let{x:Y,y:R}=j;return{x:Y,y:R}}}}=I,p=pn(I,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},T=yield u.detectOverflow(n,p),y=vr(a),x=_h(y);let v=m[x],A=m[y];const S=(j,Y)=>dT(Y+T[j==="y"?"top":"left"],Y,Y-T[j==="y"?"bottom":"right"]);l&&(v=S(x,v)),d&&(A=S(y,A));const k=f.fn(ue(U({},n),{[x]:v,[y]:A}));return ue(U({},k),{data:{x:k.x-r,y:k.y-s,enabled:{[x]:l,[y]:d}}})})}}},uL=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:l,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=jr(e,t),T={x:s,y:a},y=vr(u),x=_h(y);let v=T[x],A=T[y];const S=jr(f,t),k=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:(n=S.mainAxis)!=null?n:0,crossAxis:(r=S.crossAxis)!=null?r:0};if(p){const Y=x==="y"?"height":"width",R=l.reference[x]-l.floating[Y]+k.mainAxis,W=l.reference[x]+l.reference[Y]-k.mainAxis;v<R?v=R:v>W&&(v=W)}if(m){var I,j;const Y=x==="y"?"width":"height",R=yT.has(fi(u)),W=l.reference[y]-l.floating[Y]+(R&&((I=d.offset)==null?void 0:I[y])||0)+(R?0:k.crossAxis),ie=l.reference[y]+l.reference[Y]+(R?0:((j=d.offset)==null?void 0:j[y])||0)-(R?k.crossAxis:0);A<W?A=W:A>ie&&(A=ie)}return{[x]:v,[y]:A}}}},lL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return ze(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,$=jr(e,n),{apply:l=()=>{}}=$,d=pn($,["apply"]),f=yield a.detectOverflow(n,d),p=fi(r),m=ro(r),T=vr(r)==="y",{width:y,height:x}=s.floating;let v,A;p==="top"||p==="bottom"?(v=p,A=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(A=p,v=m==="end"?"top":"bottom");const S=x-f.top-f.bottom,k=y-f.left-f.right,I=di(x-f[v],S),j=di(y-f[A],k),Y=n.middlewareData.shift,R=!Y;let W=I,ie=j;Y!=null&&Y.enabled.x&&(ie=k),Y!=null&&Y.enabled.y&&(W=S),R&&!m&&(T?ie=y-2*Hr(f.left,f.right):W=x-2*Hr(f.top,f.bottom)),yield l(ue(U({},n),{availableWidth:ie,availableHeight:W}));const de=yield a.getDimensions(u.floating);return y!==de.width||x!==de.height?{reset:{rects:!0}}:{}})}}};function Pl(){return typeof window!="undefined"}function io(e){return TT(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ar(e){var t;return(t=(TT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function TT(e){return Pl()?e instanceof Node||e instanceof Rn(e).Node:!1}function sr(e){return Pl()?e instanceof Element||e instanceof Rn(e).Element:!1}function Nr(e){return Pl()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function bT(e){return!Pl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function Sa(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=or(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function cL(e){return/^(table|td|th)$/.test(io(e))}function Rl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const dL=/transform|translate|scale|rotate|perspective|filter/,fL=/paint|layout|strict|content/,is=e=>!!e&&e!=="none";let vh;function Ah(e){const t=sr(e)?or(e):e;return is(t.transform)||is(t.translate)||is(t.scale)||is(t.rotate)||is(t.perspective)||!Nh()&&(is(t.backdropFilter)||is(t.filter))||dL.test(t.willChange||"")||fL.test(t.contain||"")}function hL(e){let t=hi(e);for(;Nr(t)&&!so(t);){if(Ah(t))return t;if(Rl(t))return null;t=hi(t)}return null}function Nh(){return vh==null&&(vh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vh}function so(e){return/^(html|body|#document)$/.test(io(e))}function or(e){return Rn(e).getComputedStyle(e)}function Ll(e){return sr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if(io(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bT(e)&&e.host||Ar(e);return bT(t)?t.host:t}function _T(e){const t=hi(e);return so(t)?(e.ownerDocument||e).body:Nr(t)&&Sa(t)?t:_T(t)}function va(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=_T(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=Rn(s);if(a){const l=kh(u);return t.concat(u,u.visualViewport||[],Sa(s)?s:[],l&&n?va(l):[])}else return t.concat(s,va(s,[],n))}function kh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xT(e){const t=or(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Nr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=kl(n)!==a||kl(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function Ch(e){return sr(e)?e:e.contextElement}function oo(e){const t=Ch(e);if(!Nr(t))return Sr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=xT(t);let u=(a?kl(n.width):n.width)/r,l=(a?kl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const pL=Sr(0);function wT(e){const t=Rn(e);return!Nh()||!t.visualViewport?pL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rn(e)?!1:t}function ss(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Ch(e);let u=Sr(1);t&&(r?sr(r)&&(u=oo(r)):u=oo(e));const l=mL(a,n,r)?wT(a):Sr(0);let d=(s.left+l.x)/u.x,f=(s.top+l.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const T=Rn(a),y=r&&sr(r)?Rn(r):r;let x=T,v=kh(x);for(;v&&r&&y!==x;){const A=oo(v),S=v.getBoundingClientRect(),k=or(v),I=S.left+(v.clientLeft+parseFloat(k.paddingLeft))*A.x,j=S.top+(v.clientTop+parseFloat(k.paddingTop))*A.y;d*=A.x,f*=A.y,p*=A.x,m*=A.y,d+=I,f+=j,x=Rn(v),v=kh(x)}}return Il({width:p,height:m,x:d,y:f})}function Dl(e,t){const n=Ll(e).scrollLeft;return t?t.left+n:ss(Ar(e)).left+n}function ST(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Dl(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function gL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Ar(r),l=t?Rl(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Sr(1);const p=Sr(0),m=Nr(r);if((m||!m&&!a)&&((io(r)!=="body"||Sa(u))&&(d=Ll(r)),Nr(r))){const y=ss(r);f=oo(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?ST(u,d):Sr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function EL(e){return Array.from(e.getClientRects())}function yL(e){const t=Ar(e),n=Ll(e),r=e.ownerDocument.body,s=Hr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Hr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Dl(e);const l=-n.scrollTop;return or(r).direction==="rtl"&&(u+=Hr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const vT=25;function TL(e,t){const n=Rn(e),r=Ar(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(s){a=s.width,u=s.height;const p=Nh();(!p||p&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=Dl(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,x=Math.abs(r.clientWidth-m.clientWidth-y);x<=vT&&(a-=x)}else f<=vT&&(a+=f);return{width:a,height:u,x:l,y:d}}const bL=new Set(["absolute","fixed"]);function _L(e,t){const n=ss(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Nr(e)?oo(e):Sr(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function AT(e,t,n){let r;if(t==="viewport")r=TL(e,n);else if(t==="document")r=yL(Ar(e));else if(sr(t))r=_L(t,n);else{const s=wT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Il(r)}function NT(e,t){const n=hi(e);return n===t||!sr(n)||so(n)?!1:or(n).position==="fixed"||NT(n,t)}function xL(e,t){const n=t.get(e);if(n)return n;let r=va(e,[],!1).filter(l=>sr(l)&&io(l)!=="body"),s=null;const a=or(e).position==="fixed";let u=a?hi(e):e;for(;sr(u)&&!so(u);){const l=or(u),d=Ah(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&bL.has(s.position)||Sa(u)&&!d&&NT(e,u))?r=r.filter(p=>p!==u):s=l,u=hi(u)}return t.set(e,r),r}function wL(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Rl(t)?[]:xL(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=AT(t,p,s);return f.top=Hr(m.top,f.top),f.right=di(m.right,f.right),f.bottom=di(m.bottom,f.bottom),f.left=Hr(m.left,f.left),f},AT(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function SL(e){const{width:t,height:n}=xT(e);return{width:t,height:n}}function vL(e,t,n){const r=Nr(t),s=Ar(t),a=n==="fixed",u=ss(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Sr(0);function f(){d.x=Dl(s)}if(r||!r&&!a)if((io(t)!=="body"||Sa(s))&&(l=Ll(t)),r){const y=ss(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?ST(s,l):Sr(0),m=u.left+l.scrollLeft-d.x-p.x,T=u.top+l.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function Oh(e){return or(e).position==="static"}function kT(e,t){if(!Nr(e)||or(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ar(e)===n&&(n=n.ownerDocument.body),n}function CT(e,t){const n=Rn(e);if(Rl(e))return n;if(!Nr(e)){let s=hi(e);for(;s&&!so(s);){if(sr(s)&&!Oh(s))return s;s=hi(s)}return n}let r=kT(e,t);for(;r&&cL(r)&&Oh(r);)r=kT(r,t);return r&&so(r)&&Oh(r)&&!Ah(r)?n:r||hL(e)||n}const AL=function(e){return ze(this,null,function*(){const t=this.getOffsetParent||CT,n=this.getDimensions,r=yield n(e.floating);return{reference:vL(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function NL(e){return or(e).direction==="rtl"}const kL={convertOffsetParentRelativeRectToViewportRelativeRect:gL,getDocumentElement:Ar,getClippingRect:wL,getOffsetParent:CT,getElementRects:AL,getClientRects:EL,getDimensions:SL,getScale:oo,isElement:sr,isRTL:NL};function OT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function CL(e,t){let n=null,r;const s=Ar(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function u(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(l||t(),!T||!y)return;const x=Cl(m),v=Cl(s.clientWidth-(p+T)),A=Cl(s.clientHeight-(m+y)),S=Cl(p),I={rootMargin:-x+"px "+-v+"px "+-A+"px "+-S+"px",threshold:Hr(0,di(1,d))||1};let j=!0;function Y(R){const W=R[0].intersectionRatio;if(W!==d){if(!j)return u();W?u(!1,W):r=setTimeout(()=>{u(!1,1e-7)},1e3)}W===1&&!OT(f,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(Y,ue(U({},I),{root:s.ownerDocument}))}catch(R){n=new IntersectionObserver(Y,I)}n.observe(e)}return u(!0),a}function OL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Ch(e),p=s||a?[...f?va(f):[],...va(t)]:[];p.forEach(S=>{s&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const m=f&&l?CL(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(S=>{let[k]=S;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let x,v=d?ss(e):null;d&&A();function A(){const S=ss(e);v&&!OT(v,S)&&n(),v=S,x=requestAnimationFrame(A)}return n(),()=>{var S;p.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),m==null||m(),(S=y)==null||S.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const IL=oL,PL=aL,RL=rL,LL=lL,DL=iL,ML=nL,FL=uL,BL=(e,t,n)=>{const r=new Map,s=U({platform:kL},n),a=ue(U({},s.platform),{_c:r});return tL(e,t,ue(U({},s),{platform:a}))};function IT(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 ue(U({},s),{toJSON:()=>s})}function UL(e){if(!e)return IT();const{x:t,y:n,width:r,height:s}=e;return IT(t,n,r,s)}function HL(e,t){return{contextElement:jt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?UL(r):n.getBoundingClientRect()}}}var Aa=e=>({variable:e,reference:`var(${e})`}),zr={arrowSize:Aa("--arrow-size"),arrowSizeHalf:Aa("--arrow-size-half"),arrowBg:Aa("--arrow-background"),transformOrigin:Aa("--transform-origin"),arrowOffset:Aa("--arrow-offset")},jL=e=>e==="top"||e==="bottom"?"y":"x";function zL(e,t){return{name:"transformOrigin",fn(n){var de,$,se,ee,xe;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=jL(d),p=((de=s.arrow)==null?void 0:de.x)||0,m=(($=s.arrow)==null?void 0:$.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+T/2,v=m+y/2,A=Math.abs(((se=s.shift)==null?void 0:se.y)||0),S=u.reference.height/2,k=y/2,I=(xe=(ee=e.offset)==null?void 0:ee.mainAxis)!=null?xe:e.gutter,j=typeof I=="number"?I+k:I!=null?I:k,Y=A>j,R={top:`${x}px calc(100% + ${j}px)`,bottom:`${x}px ${-j}px`,left:`calc(100% + ${j}px) ${v}px`,right:`${-j}px ${v}px`}[d],W=`${x}px ${u.reference.y+S-l}px`,ie=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(zr.transformOrigin.variable,ie?W:R),{data:{transformOrigin:ie?W:R}}}}}var $L={name:"rects",fn({rects:e}){return{data:e}}},VL=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% + ${zr.arrowOffset.reference})`}),{}}}};function qL(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var YL={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function PT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Ih(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function WL(e,t,n){const r=e||t.createElement("div");return ML({element:r,padding:n.arrowPadding})}function GL(e,t){var n;if(!p6((n=t.offset)!=null?n:t.gutter))return IL(({placement:r})=>{var p,m,T,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:l}=qL(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return sh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function XL(e){if(!e.flip)return;const t=Ih(e.boundary);return RL(ue(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function QL(e){if(!e.slide&&!e.overlap)return;const t=Ih(e.boundary);return PL(ue(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:FL()}))}function KL(e){return LL({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),l=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",`${l}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function JL(e){var t;if(e.hideWhenDetached)return DL({strategy:"referenceHidden",boundary:(t=Ih(e.boundary))!=null?t:"clippingAncestors"})}function ZL(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function e5(e,t,n={}){const r=HL(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},YL,n),a=t.querySelector("[data-part=arrow]"),u=[GL(a,s),XL(s),QL(s),WL(a,t.ownerDocument,s),VL(a),zL({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),KL(s),JL(s),$L],{placement:l,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>ze(null,null,function*(){var j;if(!r||!t)return;const v=yield BL(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),p==null||p({placed:!0});const A=Xs(t),S=PT(A,v.x),k=PT(A,v.y);t.style.setProperty("--x",`${S}px`),t.style.setProperty("--y",`${k}px`),s.hideWhenDetached&&(((j=v.middlewareData.hide)==null?void 0:j.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const I=t.firstElementChild;if(I){const Y=Ks(I);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>ze(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=ZL(s.listeners),x=s.listeners?OL(r,t,T,y):w6;return T(),()=>{x==null||x(),p==null||p({placed:!1})}}function RT(e,t,n={}){const l=n,{defer:r}=l,s=pn(l,["defer"]),a=r?Dt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(e5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var t5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function n5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:zr.arrowSize.reference,height:zr.arrowSize.reference,[zr.arrowSizeHalf.variable]:`calc(${zr.arrowSize.reference} / 2)`,[zr.arrowOffset.variable]:`calc(${zr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?t5[t.split("-")[0]]:void 0,background:zr.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 ao=new WeakMap,Ml=new WeakMap,Fl={},Ph=0,LT=e=>e&&(e.host||LT(e.parentNode)),r5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=LT(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),i5=new Set(["script","output","status","next-route-announcer"]),s5=e=>i5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),o5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=r5(n,Array.isArray(e)?e:[e]);Fl[r]||(Fl[r]=new WeakMap);const l=Fl[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&&jt(y)&&Yy(y,x=>{m(x)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(f.has(x))T(x);else try{if(s5(x))return;const A=x.getAttribute(s)==="true",S=(ao.get(x)||0)+1,k=(l.get(x)||0)+1;ao.set(x,S),l.set(x,k),d.push(x),S===1&&A&&Ml.set(x,!0),k===1&&x.setAttribute(r,""),A||x.setAttribute(s,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",x,v)}})};return T(n),f.clear(),Ph++,()=>{d.forEach(y=>{const x=ao.get(y)-1,v=l.get(y)-1;ao.set(y,x),l.set(y,v),x||(Ml.has(y)||y.removeAttribute(s),Ml.delete(y)),v||y.removeAttribute(r)}),Ph--,Ph||(ao=new WeakMap,ao=new WeakMap,Ml=new WeakMap,Fl={})}},a5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,u5=(e,t=a5(e),n="data-aria-hidden",r=!0)=>{if(t)return o5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},l5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function DT(e,t={}){const{defer:n=!0}=t,r=n?l5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(u5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function c5(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 d5(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 MT="pointerdown.outside",FT="focus.outside";function f5(e){for(const t of e)if(jt(t)&&wr(t))return!0;return!1}var BT=e=>"clientY"in e;function h5(e,t){if(!BT(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 p5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function UT(e,t){if(!t||!BT(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)},l={x:e.clientX,y:e.clientY};return p5(u,l)?r||a:!1}function m5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=xr(e),f=Xs(e),p=c5(f),m=d5(f);function T(I,j){if(!jt(j)||!j.isConnected||Gs(e,j)||h5(e,I)||l&&qy(e,j))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const W=ph(Y);if(UT(I,W))return!1}const R=ph(e);return UT(I,R)?!1:!(n!=null&&n(j))}const y=new Set,x=es(e==null?void 0:e.getRootNode());function v(I){function j(Y){var de,$;const R=u&&!Wy()?Dt:se=>se(),W=Y!=null?Y:I,ie=($=(de=W==null?void 0:W.composedPath)==null?void 0:de.call(W))!=null?$:[W==null?void 0:W.target];R(()=>{const se=x?ie[0]:ir(I);if(!(!e||!T(I,se))){if(s||a){const ee=ih(s,a);e.addEventListener(MT,ee,{once:!0})}HT(e,MT,{bubbles:!1,cancelable:!0,detail:{originalEvent:W,contextmenu:i4(W),focusable:f5(ie),target:se}})}})}I.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(zt(d,"click",j,{once:!0})),y.add(m.addEventListener("click",j,{once:!0})),y.add(p.addEventListener("click",j,{once:!0}))):j()}const A=new Set,S=setTimeout(()=>{A.add(zt(d,"pointerdown",v,!0)),A.add(m.addEventListener("pointerdown",v,!0)),A.add(p.addEventListener("pointerdown",v,!0))},0);function k(I){(u?Dt:Y=>Y())(()=>{var W,ie;const Y=(ie=(W=I==null?void 0:I.composedPath)==null?void 0:W.call(I))!=null?ie:[I==null?void 0:I.target],R=x?Y[0]:ir(I);if(!(!e||!T(I,R))){if(r||a){const de=ih(r,a);e.addEventListener(FT,de,{once:!0})}HT(e,FT,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:wr(R),target:R}})}})}return Wy()||(A.add(zt(d,"focusin",k,!0)),A.add(m.addEventListener("focusin",k,!0)),A.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(S),y.forEach(I=>I()),A.forEach(I=>I())}}function g5(e,t){const{defer:n}=t,r=n?Dt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(m5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function HT(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function E5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return zt(xr(e),"keydown",n,{capture:!0})}var jT="layer:request-dismiss",$n={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=>Gs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Gs(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=>$n.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];T5(e,jT,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),y5(e,jT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function y5(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 T5(e,t,n){e.addEventListener(t,n,{once:!0})}var zT;function $T(){$n.layers.forEach(({node:e})=>{e.style.pointerEvents=$n.isBelowPointerBlockingLayer(e)?"none":"auto"})}function b5(e){e.style.pointerEvents=""}function _5(e,t){const n=xr(e),r=[];return $n.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(zT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=N4(()=>{const l=s();return jt(l)?l:null},{timeout:1e3});a.then(l=>r.push(wl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{$n.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=zT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function x5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){oh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};$n.add(f),$T();function p(v){var S,k;const A=ir(v.detail.originalEvent);$n.isBelowPointerBlockingLayer(e)||$n.isInBranch(A)||((S=t.onPointerDownOutside)==null||S.call(t,v),(k=t.onInteractOutside)==null||k.call(t,v),!v.defaultPrevented&&(l&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function m(v){var S,k;const A=ir(v.detail.originalEvent);$n.isInBranch(A)||((S=t.onFocusOutside)==null||S.call(t,v),(k=t.onInteractOutside)==null||k.call(t,v),!v.defaultPrevented&&(l&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function T(v){var A;$n.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var I;if(!e)return!1;const A=typeof u=="function"?u():u,S=Array.isArray(A)?A:[A],k=(I=t.persistentElements)==null?void 0:I.map(j=>j()).filter(jt);return k&&S.push(...k),S.some(j=>Gs(j,v))||$n.isInNestedLayer(e,v)}const x=[a?_5(e,t.persistentElements):void 0,E5(e,T),g5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{$n.remove(e),$T(),b5(e),x.forEach(v=>v==null?void 0:v())}}function VT(e,t){const{defer:n}=t,r=n?Dt:a=>a(),s=[];return s.push(r(()=>{const a=Ys(e)?e():e;s.push(x5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var w5=Object.defineProperty,S5=(e,t,n)=>t in e?w5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_t=(e,t,n)=>S5(e,typeof t!="symbol"?t+"":t,n),qT={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()}},v5=[],A5=class{constructor(e,t){_t(this,"trapStack"),_t(this,"config"),_t(this,"doc"),_t(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),_t(this,"portalContainers",new Set),_t(this,"listenerCleanups",[]),_t(this,"handleFocus",r=>{const s=ir(r),a=this.findContainerIndex(s,r)>=0;if(a||Tl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!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],l=!1):p-1>=0&&(u=f[p-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>_a(f)>0))||(l=!1);else l=!1;l&&(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}),_t(this,"handlePointerDown",r=>{const s=ir(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()}}),_t(this,"handleClick",r=>{const s=ir(r);this.findContainerIndex(s,r)>=0||ka(this.config.clickOutsideDeactivates,r)||ka(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),_t(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;Na(r)&&r.preventDefault(),this.tryFocus(a)}}),_t(this,"handleEscapeKey",r=>{N5(r)&&ka(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),_t(this,"_mutationObserver"),_t(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(l=>Array.from(l.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.some(l=>l.type==="attributes"&&(l.attributeName==="aria-controls"||l.attributeName==="aria-expanded")?!0:l.type==="childList"&&l.addedNodes.length>0?Array.from(l.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return X6(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?Q6(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),_t(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)}))}),_t(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!wr(r)){const s=Qs(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}),_t(this,"tryFocus",r=>{if(r!==!1&&r!==Qs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,k5(r)&&r.select()}}),_t(this,"deactivate",r=>{if(!this.state.active)return this;const s=U({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(),qT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),l=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{YT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),_t(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}),_t(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}),_t(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),_t(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),_t(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),_t(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 l=u;if(typeof u=="string"){try{l=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!l&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return l}),_t(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||ir(s);this.updateTabbableNodes();let l=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?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=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||wr(u)&&!ts(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];l=_a(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Na(s)||(l=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||wr(u)&&!ts(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];l=_a(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Na(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||v5;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Na(r)&&!r.shiftKey},isKeyBackward(r){return Na(r)&&r.shiftKey}},t);this.doc=n.document||xr(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=>{Y6(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?qy(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Js(e,{getShadowRoot:this.config.getShadowRoot}),n=eT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let l=!1;for(let f=0;f<t.length;f++)if(_a(t[f])>0){l=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(ts(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(ts(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,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 qT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?YT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(zt(this.doc,"focusin",this.handleFocus,!0),zt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),zt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),zt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),zt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),zt(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=Qs(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)}},Na=e=>e.key==="Tab",ka=(e,...t)=>typeof e=="function"?e(...t):e,N5=e=>!e.isComposing&&e.key==="Escape",YT=e=>setTimeout(e,0),k5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function WT(e,t={}){let n;const r=Dt(()=>{const s=typeof e=="function"?e():e;if(s){n=new A5(s,ue(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:xr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Rh="data-scroll-lock";function C5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function GT(e){const t=Ks(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function XT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Rh))return;const u=GT(r)||GT(s),l=n.innerWidth-r.clientWidth;s.setAttribute(Rh,"");const d=()=>v4(r,"--scrollbar-width",`${l}px`),f=C5(r),p=()=>{const x={overflow:"hidden"};return!u&&l>0&&(x[f]=`${l}px`),wl(s,x)},m=()=>{var Y,R;const{scrollX:x,scrollY:v,visualViewport:A}=n,S=(Y=A==null?void 0:A.offsetLeft)!=null?Y:0,k=(R=A==null?void 0:A.offsetTop)!=null?R:0,I={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(k))}px`,left:`${-(x-Math.floor(S))}px`,right:"0"};!u&&l>0&&(I[f]=`${l}px`);const j=wl(s,I);return()=>{j==null||j(),n.scrollTo({left:x,top:v,behavior:"instant"})}},T=[d(),bl()?m():p()];return()=>{T.forEach(x=>x==null?void 0:x()),s.removeAttribute(Rh)}}var O5=rs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),kr=O5.build(),QT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},KT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Lh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},JT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},I5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Dh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Mh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},P5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},ZT=e=>e.getById(QT(e)),uo=e=>e.getById(KT(e)),lo=e=>e.getById(Lh(e)),eb=e=>e.getById(JT(e)),R5=e=>e.getById(Dh(e)),L5=e=>e.getById(Mh(e));function D5(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=n5(ue(U({},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(ue(U({id:I5(l)},kr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(ue(U({},kr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(ue(U({},kr.anchor.attrs),{dir:u("dir"),id:QT(l)}))},getTriggerProps(){return t.button(ue(U({},kr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:KT(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Lh(l),onPointerDown(y){Gy(y)&&n4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(ue(U({},kr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ue(U({id:JT(l)},kr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(ue(U({},kr.content.attrs),{dir:u("dir"),id:Lh(l),tabIndex:-1,role:"dialog","aria-modal":zy(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Ws(d),"aria-labelledby":m.title?Dh(l):void 0,"aria-describedby":m.description?Mh(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(ue(U({},kr.title.attrs),{id:Dh(l),dir:u("dir")}))},getDescriptionProps(){return t.element(ue(U({},kr.description.attrs),{id:Mh(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ue(U({},kr.closeTrigger.attrs),{dir:u("dir"),id:P5(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var M5={props({props:e}){return ue(U({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:U({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=ZT(n))!=null?a:uo(n);return RT(r,()=>eb(n),ue(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>lo(n);let s=!0;return VT(r,{type:"popover",pointerBlocking:t("modal"),exclude:uo(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:w4(()=>lo(t),{triggerElement:uo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?DT(()=>[lo(t),uo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return XT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?WT(()=>lo(t),{initialFocus:()=>tT({root:lo(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=ZT(n))!=null?u:uo(n);RT(s,()=>eb(n),ue(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Dt(()=>{Object.assign(e.get("renderedElements"),{title:!!R5(t),description:!!L5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Dt(()=>{const n=tT({root:lo(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||Dt(()=>{const a=uo(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})}}}};to()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[V7,Bl]=ns({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[q7,Fh]=ns({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),F5=e=>{const t=H.useId(),{getRootNode:n}=Bl(),{dir:r}=Fh(),s=U({id:t,dir:r,getRootNode:n},e),a=vl(M5,s);return D5(a,Eh)},B5=e=>{const[t,u]=cT(e),l=u,{children:n}=l,r=pn(l,["children"]),s=F5(r),a=bh(Mt({present:s.open},t));return _.jsx(B4,{value:s,children:_.jsx(aT,{value:a,children:n})})},tb=H.forwardRef((e,t)=>{const n=Th(),r=xa(),s=Mt(ue(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(rn.button,ue(U({},s),{ref:t}))});tb.displayName="PopoverTrigger";function U5(e){return ot({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 H5(e){return ot({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 nb(e){return ot({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 rb(e){return ot({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 j5(e){return ot({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 z5(e){return ot({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 Bh(e){return ot({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 ib(e){return ot({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 $5=({className:e,componentType:t,children:n})=>{const[r,s]=H.useState(!1),{globalClassName:a}=at(),u=f=>{s(f.open)},l=H.useCallback(()=>{s(!1)},[]),d=H.useMemo(()=>({closeMenu:l}),[l]);return _.jsxs(B5,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(tb,{"aria-label":`Overflow menu for ${t}`,className:F(`${C}-overflow-menu-button-trigger`,`${C}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(ib,{})}),_.jsx(lT,{children:_.jsx(uT,{className:F(`${C}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(Ly.Provider,{value:d,children:n})})})]})};function sb(e){return ot({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 ot({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[V5,os]=ns({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Uh=H.forwardRef((e,t)=>{const n=os(),r=Mt(n.getControlProps(),e);return _.jsx(rn.div,ue(U(U({},r),e),{ref:t}))});Uh.displayName="CarouselControl";const Hh=H.forwardRef((e,t)=>{const[n,r]=wa()(e,["readOnly","index"]),s=os(),a=Mt(s.getIndicatorProps(n),r);return _.jsx(rn.button,ue(U({},a),{ref:t}))});Hh.displayName="CarouselIndicator";const jh=H.forwardRef((e,t)=>{const n=os(),r=Mt(n.getIndicatorGroupProps(),e);return _.jsx(rn.div,ue(U({},r),{ref:t}))});jh.displayName="CarouselIndicatorGroup";const zh=H.forwardRef((e,t)=>{const[n,r]=wa()(e,["index","snapAlign"]),s=os(),a=Mt(s.getItemProps(n),r);return _.jsx(rn.div,ue(U({},a),{ref:t}))});zh.displayName="CarouselItem";const $h=H.forwardRef((e,t)=>{const n=os(),r=Mt(n.getItemGroupProps(),e);return _.jsx(rn.div,ue(U({},r),{ref:t}))});$h.displayName="CarouselItemGroup";const Vh=H.forwardRef((e,t)=>{const n=os(),r=Mt(n.getNextTriggerProps(),e);return _.jsx(rn.button,ue(U({},r),{ref:t}))});Vh.displayName="CarouselNextTrigger";const qh=H.forwardRef((e,t)=>{const n=os(),r=Mt(n.getPrevTriggerProps(),e);return _.jsx(rn.button,ue(U({},r),{ref:t}))});qh.displayName="CarouselPrevTrigger";function q5(e){const t=Ks(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 l(T,y){let x=parseFloat(T);return/%/.test(T)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=l(r,n.width),f=l(s,n.height),p=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function Y5(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 ab(e){let t=[];for(const n of e.children)t=t.concat(n,ab(n));return t}function ub(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?ab(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",l=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!Y5(n,m,u))continue;const T=Ks(p);let[y,x]=T.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const v=a==="x"?x:y,A=m[l]-n[l]+e[f];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+m[d]/2});break;case"end":r[a].end.push({node:p,position:A+m[d]});break}}}return r}function lb(e){const t=e.getBoundingClientRect(),n=q5(e),r=ub(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:cb([...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(db(0,s.x))),y:cb([...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(db(0,s.y)))}}function W5(e,t,n){const r=ub(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var cb=e=>[...new Set(e)],db=(e,t)=>n=>Math.max(e,Math.min(t,n)),G5=rs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),$r=G5.build(),X5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},Q5=(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}`},Ul=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},K5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},J5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},Z5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},fb=(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}`},_n=e=>e.getById(Ul(e)),hb=e=>S4(_n(e),"[data-part=item]"),eD=(e,t)=>e.getById(fb(e,t)),pb=e=>{const t=_n(e);if(!t)return;const n=Js(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function tD(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),T=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),v=l("slidesPerPage"),A=l("padding"),S=l("translations");return{isPlaying:d,isDragging:f,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return x/y.length},scrollToIndex(k,I){a({type:"INDEX.SET",index:k,instant:I})},scrollTo(k,I){a({type:"PAGE.SET",index:k,instant:I})},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(ue(U({},$r.root.attrs),{id:X5(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":v,"--slide-spacing":l("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(ue(U({},$r.itemGroup.attrs),{id:Ul(u),"data-orientation":l("orientation"),"data-dragging":Ws(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(k){Gs(k.currentTarget,ir(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){Gs(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!l("allowMouseDrag")||!Gy(k))return;const I=ir(k);wr(I)&&I!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:S6(k=>{const I=l("orientation")==="horizontal"?"deltaX":"deltaY";k[I]<0&&!s("canScrollPrev")||k[I]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",l("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:A,[T?"paddingInline":"paddingBlock"]:A,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const I=r.get("slidesInView").includes(k.index);return t.element(ue(U({},$r.item.attrs),{id:Q5(u,k.index),dir:l("dir"),role:"group","data-index":k.index,"data-inview":Ws(I),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":S.item(k.index,l("slideCount")),"aria-hidden":zy(!I),style:{scrollSnapAlign:(()=>{var ie;const j=(ie=k.snapAlign)!=null?ie:"start",Y=l("slidesPerMove"),R=Y==="auto"?Math.floor(l("slidesPerPage")):Y;return(k.index+R)%R===0?j:void 0})()}}))},getControlProps(){return t.element(ue(U({},$r.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(ue(U({},$r.prevTrigger.attrs),{id:J5(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":S.prevTrigger,"data-orientation":l("orientation"),"aria-controls":Ul(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ue(U({},$r.nextTrigger.attrs),{dir:l("dir"),id:K5(u),type:"button","aria-label":S.nextTrigger,"data-orientation":l("orientation"),"aria-controls":Ul(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ue(U({},$r.indicatorGroup.attrs),{dir:l("dir"),id:Z5(u),"data-orientation":l("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const I="indicator",j={ArrowDown(W){T||(a({type:"PAGE.NEXT",src:I}),W.preventDefault())},ArrowUp(W){T||(a({type:"PAGE.PREV",src:I}),W.preventDefault())},ArrowRight(W){T&&(a({type:"PAGE.NEXT",src:I}),W.preventDefault())},ArrowLeft(W){T&&(a({type:"PAGE.PREV",src:I}),W.preventDefault())},Home(W){a({type:"PAGE.SET",index:0,src:I}),W.preventDefault()},End(W){a({type:"PAGE.SET",index:y.length-1,src:I}),W.preventDefault()}},Y=a4(k,{dir:l("dir"),orientation:l("orientation")}),R=j[Y];R==null||R(k)}}))},getIndicatorProps(k){return t.button(ue(U({},$r.indicator.attrs),{dir:l("dir"),id:fb(u,k.index),type:"button","data-orientation":l("orientation"),"data-index":k.index,"data-readonly":Ws(k.readOnly),"data-current":Ws(k.index===x),"aria-label":S.indicator(k.index),onClick(I){I.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ue(U({},$r.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":Ws(d),"aria-label":d?S.autoplayStop:S.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var nD={props({props:e}){return O6(e,["slideCount"],"carousel"),ue(U({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:U({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:rD(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 h6(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(_n(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=_n(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),pb(e)});return pb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!_n(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Dt(()=>{s(),Dt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return hb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=_n(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?u6(d,m):l6(d,m)},n.get("slidesInView"));n.set("slidesInView",c6(l))},{root:r,threshold:t("inViewThreshold")});return hb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=_n(n);return r?zt(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 zt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return _4(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 zt(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=Hy((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=_n(n);if(!l)return;const d=r("isHorizontal")?"left":"top";s(()=>{l.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=_n(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=Fy(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=d6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=_n(r);if(!s)return;const a=W5(s,n("isHorizontal")?"x":"y",l=>l.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(l=>Math.abs(l-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=Hy(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=_n(n);if(!r)return;const s=lb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=_n(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=_n(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=_n(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=lb(r),l=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]);Dt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l: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=eD(n,e.get("page"));r&&Dt(()=>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 rD(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}to()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),to()(["index","readOnly"]),to()(["index","snapAlign"]);const iD=e=>{const t=H.useId(),{getRootNode:n}=Bl(),{dir:r}=Fh(),s=U({id:t,dir:r,getRootNode:n},e),a=vl(nD,s);return tD(a,Eh)},Yh=H.forwardRef((e,t)=>{const[n,r]=wa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=iD(n),a=Mt(s.getRootProps(),r);return _.jsx(V5,{value:s,children:_.jsx(rn.div,ue(U({},a),{ref:t}))})});Yh.displayName="CarouselRoot";const sD=180,oD=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},aD=({globalClassName:e,className:t,itemMinWidth:n=sD,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ie,de)=>({node:ie,key:H.isValidElement(ie)&&ie.key!=null?ie.key:`carousel-item-${de}`})),T=m.length,y=H.useRef(null),[x,v]=H.useState(0),{width:A}=ZA();H.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[A,T]);const S=oD(r),k=n+S,I=x>0?(x+S)/k:1,j=Math.max(1,Math.floor(I));if(T===0)return null;const Y=T>j,R=Math.ceil(T/j),W=Y?Math.max(1,I):j;return _.jsxs(Yh,{ref:y,className:F(e,t,`${C}-carousel`),slidesPerPage:W,slidesPerMove:j,spacing:r,loop:s,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":f,children:[_.jsx($h,{className:F(e,`${C}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map(({node:ie,key:de},$)=>_.jsx(zh,{index:$,className:F(e,`${C}-carousel__item`),children:ie},de))}),l&&Y&&_.jsxs(Uh,{className:F(e,`${C}-carousel__control`),children:[_.jsx(qh,{className:F(e,`${C}-carousel__prev-trigger`),"aria-label":"Previous slide",children:_.jsx(nb,{size:"16px"})}),_.jsx(Vh,{className:F(e,`${C}-carousel__next-trigger`),"aria-label":"Next slide",children:_.jsx(rb,{size:"16px"})})]}),u&&Y&&_.jsx(jh,{className:F(e,`${C}-carousel__indicator-group`),children:Array.from({length:R},(ie,de)=>_.jsx(Hh,{index:de,className:F(e,`${C}-carousel__indicator`),"aria-label":`Go to slide group ${de+1}`},de))})]})},uD=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:F(e,`${C}-close-button`),disabled:r,onClick:n,children:_.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.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"})})}),[lD,cD]=ns({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),dD=e=>wa()(e,["lazyMount","unmountOnExit"]),[fD,Ca]=ns({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),mb=H.forwardRef((e,t)=>{const n=Ca(),r=cD(),s=bh(ue(U({},r),{present:n.open})),a=Mt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:_.jsx(rn.div,ue(U({},a),{ref:Al(s.ref,t)}))});mb.displayName="DialogBackdrop";const Wh=H.forwardRef((e,t)=>{const n=Ca(),r=xa(),s=Mt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(rn.div,ue(U({},s),{ref:Al(r.ref,t)}))});Wh.displayName="DialogContent";const Gh=H.forwardRef((e,t)=>{const n=Ca(),r=Mt(n.getDescriptionProps(),e);return _.jsx(rn.div,ue(U({},r),{ref:t}))});Gh.displayName="DialogDescription";const Xh=H.forwardRef((e,t)=>{const n=Ca(),r=Mt(n.getPositionerProps(),e);return xa().unmounted?null:_.jsx(rn.div,ue(U({},r),{ref:t}))});Xh.displayName="DialogPositioner";var hD=rs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),as=hD.build(),gb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},yb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Tb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Hl=e=>e.getById(Qh(e)),pD=e=>e.getById(gb(e)),mD=e=>e.getById(Eb(e)),gD=e=>e.getById(yb(e)),ED=e=>e.getById(Kh(e)),yD=e=>e.getById(Jh(e)),TD=e=>e.getById(Tb(e));function bD(e,t){const{state:n,send:r,context:s,prop:a,scope:u}=e,l=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(ue(U({},as.trigger.attrs),{dir:a("dir"),id:yb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Qh(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ue(U({},as.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Eb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ue(U({},as.positioner.attrs),{dir:a("dir"),id:gb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(ue(U({},as.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Qh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:Kh(u),"aria-describedby":f.description?Jh(u):void 0}))},getTitleProps(){return t.element(ue(U({},as.title.attrs),{dir:a("dir"),id:Kh(u)}))},getDescriptionProps(){return t.element(ue(U({},as.description.attrs),{dir:a("dir"),id:Jh(u)}))},getCloseTriggerProps(){return t.button(ue(U({},as.closeTrigger.attrs),{dir:a("dir"),id:Tb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var _D={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>TD(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return U({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 VT(()=>Hl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[gD(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 XT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?WT(()=>Hl(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")?DT(()=>[Hl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Dt(()=>{e.set("rendered",{title:!!ED(t),description:!!yD(t)})})},syncZIndex({scope:e}){Dt(()=>{const t=Hl(e);if(!t)return;const n=Ks(t);[pD(e),mD(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})}}}};to()(["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 xD=e=>{const t=H.useId(),{getRootNode:n}=Bl(),{dir:r}=Fh(),s=U({id:t,getRootNode:n,dir:r},e),a=vl(_D,s);return bD(a,Eh)},bb=e=>{const[t,l]=cT(e),d=l,{children:n}=d,r=pn(d,["children"]),[s]=dD(t),a=xD(r),u=bh(Mt({present:a.open},t));return _.jsx(fD,{value:a,children:_.jsx(lD,{value:s,children:_.jsx(aT,{value:u,children:n})})})},_b=H.forwardRef((e,t)=>{const n=Ca(),r=Mt(n.getTitleProps(),e);return _.jsx(rn.h2,ue(U({},r),{ref:t}))});_b.displayName="DialogTitle";const wD=({children:e})=>{const[t,n]=H.useState(!1),r=H.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=H.useMemo(()=>({isOpen:t}),[t]);return _.jsx(rh.Provider,{value:r,children:_.jsx(Ry.Provider,{value:s,children:e})})},xb=()=>H.useContext(Ry),wb=()=>{const e=H.useContext(rh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},SD=`${C}-overflow-menu-button-trigger`,vD=({componentType:e,children:t})=>{const{isOpen:n}=xb(),{closeMenu:r}=wb(),{globalClassName:s}=at(),a=H.useRef(null);return H.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${SD}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",l),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",l)}},[n,r]),n?_.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:F(`${C}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},AD=({componentType:e,className:t})=>{const{toggleMenu:n}=wb(),{isOpen:r}=xb(),{globalClassName:s}=at();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:F(`${C}-overflow-menu-button-trigger`,`${C}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:_.jsx(ib,{})})};class ND{constructor(){Ge(this,"initialState",Lg);Ge(this,"promptsStateProxy");Ge(this,"promptsParamsProxy");Ge(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ge(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return OD(n,r),Reflect.set(t,n,r)});Ge(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Ge(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Ge(this,"updatePromptsParamsProxy",t=>new Proxy(U({},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 pi=new ND,kD=e=>{window.addEventListener(tf,e)},CD=e=>{window.removeEventListener(tf,e)},OD=(e,t)=>{const n=new CustomEvent(tf,{detail:{property:e,value:t}});window.dispatchEvent(n)},Sb=e=>{const t=pi.isOpen,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isOpen=n},ID=e=>{const t=pi.isInline,n=typeof e=="boolean"?e:!t;pi.promptsStateProxy.isInline=n},PD=({elementId:e,entryType:t,params:n,isInline:r})=>{pi.promptsStateProxy.elementId=e,t&&(pi.promptsStateProxy.entryType=t),typeof r=="boolean"&&ID(r),n&&pi.updatePromptsParamsProxy(n),pi.isOpen||Sb(!0)},RD=()=>{const e=H.useContext(Mg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},jl=()=>{const e=H.useContext(Dg);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},LD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),{previousComponentType:r}=ri(),s=qs(),a=()=>{$u(r||"dialog"),s()};return t?_.jsx(tr,{className:F(n,`${C}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(sb,{})}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(sb,{}),"Show ",r||"dialog"]})},DD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),{isModalFullscreen:r}=ri(),s=qs(),a=()=>{nf(!r),s()},u=r?PN:RN,l="Toggle Fullscreen";return t?_.jsx(tr,{ariaLabel:l,title:l,className:F(n,`${C}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),l]})},MD=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),{dialogPosition:r}=ri(),s=qs(),a=r==="bottom-left",u=()=>{rf(a?"bottom-right":"bottom-left"),s()},l=a?H5:U5,d=a?"Move right":"Move left";return t?_.jsx(tr,{className:F(n,`${C}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(l,{})}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(l,{}),d]})},vb=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:l}=at(),{mode:d}=ri(),f=u==="messaging"&&l&&!!r,p=d==="standalone",m=e==="modal",T=m?LD:kb,y=m?DD:MD,x=H.useMemo(()=>s?vN(s):{},[s]);return _.jsx(wD,{children:_.jsxs("div",{className:F(a,`${C}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:F(a,`${C}-${e}-header`,{standalone:p,embedded:!p}),style:x,children:[(s==null?void 0:s.logoUrl)&&_.jsx("img",{alt:"",role:"img",className:F(a,`${C}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),_.jsx(_b,{className:F(a,`${C}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),_.jsxs("div",{className:F(a,`${C}-${e}-controls`),children:[_.jsx(T,{componentType:e,isIcon:!0}),_.jsx(AD,{componentType:e}),_.jsx(uD,{className:F(a,`cim-${e}-component`),onClick:n})]})]}),_.jsxs(vD,{componentType:e,children:[_.jsx(y,{componentType:e}),_.jsx(jD,{componentType:e}),_.jsx(Dy,{componentType:e,onClearChat:t}),f&&_.jsx(My,{componentType:e,onDownloadTranscript:r})]})]})})},zl="USD",Vr=(e,t)=>{if(typeof e!="number"||Number.isNaN(e))return null;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e)}catch(n){return`${e}`}},FD=({retailPrice:e,discountPrice:t,currencyCode:n=zl})=>{const r=n||zl,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:Vr(a,r),comparePrice:Vr(u,r),hasDiscount:s}},Ab=e=>typeof e=="number"&&Number.isFinite(e),BD=({priceBreakdown:e,currencyCode:t=zl})=>{if(!e)return null;const n=t||zl,r=[e.sales,e.original],s=r.map(p=>p==null?void 0:p.min).filter(Ab),a=r.map(p=>p==null?void 0:p.max).filter(Ab);if(s.length===0||a.length===0)return null;const u=Math.min(...s),l=Math.max(...a);if(u===l)return null;const d=Vr(u,n),f=Vr(l,n);return d===null||f===null?null:{range:`${d} – ${f}`,low:d,high:f}},Zh=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=FD({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return _.jsxs("div",{className:F(s,a,`${C}-price`),style:f,children:[_.jsx("span",{className:F(s,`${C}-price__amount`),children:u}),d&&l&&_.jsx("span",{className:F(s,`${C}-price__compare`),children:l})]})},UD={sparkle:Bh,plus:j5,"paper-plane":z5},Nb=({icon:e,className:t})=>{const n=UD[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},HD=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=at(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=x=>()=>{a(x)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},T=x=>_.jsxs(_.Fragment,{children:[l&&_.jsx(Nb,{icon:l,className:`${C}-suggestion-button-icon`}),_.jsx("span",{children:x})]});return _.jsx("div",{className:F(t,`${C}-suggestion-container ${f}`,e),children:n.map(x=>s?_.jsx(Yu,{disabled:r,className:F(t,`${C}-suggestion-button standalone`,m),onClick:p(x),children:T(x)},x):_.jsx("button",{disabled:r,className:F(t,`${C}-suggestion-button embedded`,m),onClick:p(x),children:T(x)},x))})},jD=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=at();if(!r)return null;const s=()=>{Br(!1),zu(!0)};return t?_.jsx(tr,{className:F(n,`${C}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:_.jsx(Jg,{})}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(Jg,{}),"Minimize"]})},kb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=at(),r=qs(),s=()=>{$u("modal"),r()};return t?_.jsx(tr,{className:F(n,`${C}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:_.jsx(ob,{})}):_.jsxs("button",{className:F(n,`${C}-overflow-menu-button`,`${C}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[_.jsx(ob,{}),"Show modal"]})},zD=["Hey there! 👋 What can I find for you today?","Shopping for a gift? Tell me your budget and preferences","Need help? Connect to an agent"],$D=3e3,VD=400,qD=({globalClassName:e,isWidgetStandalone:t,messages:n=zD})=>{const[r,s]=H.useState(0),[a,u]=H.useState(!0);return H.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},VD)},$D);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),_.jsxs("div",{className:F(e,`${C}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[_.jsxs("div",{className:`${C}-connecting-pulse-wrapper`,children:[_.jsx("div",{className:`${C}-connecting-pulse`}),_.jsx("div",{className:`${C}-connecting-ring`})]}),_.jsx("span",{className:F(`${C}-connecting-text`,a&&`${C}-connecting-text--visible`),children:n[r]})]})},YD=({shouldShow:e,loadingText:t})=>e?_.jsx("span",{className:`${C}-processing-text`,children:t}):null,WD=({shouldShow:e})=>e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:`${C}-processing-shimmer-bar`}),_.jsx("div",{className:`${C}-processing-shimmer-bar`}),_.jsx("div",{className:`${C}-processing-shimmer-bar`})]}):null,ep=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>_.jsxs("div",{className:F(e,`${C}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[_.jsx(YD,{shouldShow:!!n,loadingText:n}),_.jsx(WD,{shouldShow:!n})]});function Cb(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 GD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function XD(e,t,n){const s=rl((n||{}).ignore||[]),a=QD(t);let u=-1;for(;++u<a.length;)hE(e,"text",l);function l(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],x=T?T.children:void 0;if(s(y,x?x.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let x=0;const A=m.children.indexOf(f);let S=!1,k=[];T.lastIndex=0;let I=T.exec(f.value);for(;I;){const j=I.index,Y={index:I.index,input:I.input,stack:[...p,f]};let R=y(...I,Y);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?T.lastIndex=j+1:(x!==j&&k.push({type:"text",value:f.value.slice(x,j)}),Array.isArray(R)?k.push(...R):R&&k.push(R),x=j+I[0].length,S=!0),!T.global)break;I=T.exec(f.value)}return S?(x<f.value.length&&k.push({type:"text",value:f.value.slice(x)}),m.children.splice(A,1,...k)):k=[f],A+k.length}}function QD(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([KD(s[0]),JD(s[1])])}return t}function KD(e){return typeof e=="string"?new RegExp(GD(e),"g"):e}function JD(e){return typeof e=="function"?e:function(){return e}}const tp="phrasing",np=["autolink","link","image","label"];function ZD(){return{transforms:[o8],enter:{literalAutolink:t8,literalAutolinkEmail:rp,literalAutolinkHttp:rp,literalAutolinkWww:rp},exit:{literalAutolink:s8,literalAutolinkEmail:i8,literalAutolinkHttp:n8,literalAutolinkWww:r8}}}function e8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:tp,notInConstruct:np},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:tp,notInConstruct:np},{character:":",before:"[ps]",after:"\\/",inConstruct:tp,notInConstruct:np}]}}function t8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function rp(e){this.config.enter.autolinkProtocol.call(this,e)}function n8(e){this.config.exit.autolinkProtocol.call(this,e)}function r8(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 i8(e){this.config.exit.autolinkEmail.call(this,e)}function s8(e){this.exit(e)}function o8(e){XD(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,a8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),u8]],{ignore:["link","linkReference"]})}function a8(e,t,n,r,s){let a="";if(!Ob(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!l8(n)))return!1;const u=c8(n+r);if(!u[0])return!1;const l={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[l,{type:"text",value:u[1]}]:l}function u8(e,t,n,r){return!Ob(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function l8(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 c8(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=Cb(e,"(");let a=Cb(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 Ob(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wi(n)||Qu(n))&&(!t||n!==47)}Ib.peek=T8;function d8(){this.buffer()}function f8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function h8(){this.buffer()}function p8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function m8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=nr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function g8(e){this.exit(e)}function E8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=nr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function y8(e){this.exit(e)}function T8(){return"["}function Ib(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),l=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),u(),a+=s.move("]"),a}function b8(){return{enter:{gfmFootnoteCallString:d8,gfmFootnoteCall:f8,gfmFootnoteDefinitionLabelString:h8,gfmFootnoteDefinition:p8},exit:{gfmFootnoteCallString:m8,gfmFootnoteCall:g8,gfmFootnoteDefinitionLabelString:E8,gfmFootnoteDefinition:y8}}}function _8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ib},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const l=a.createTracker(u);let d=l.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),d+=l.move((t?`
38
+ `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?Pb:x8))),f(),d}}function x8(e,t,n){return t===0?e:Pb(e,t,n)}function Pb(e,t,n){return(n?"":" ")+e}const w8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Rb.peek=k8;function S8(){return{canContainEols:["delete"],enter:{strikethrough:A8},exit:{strikethrough:N8}}}function v8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:w8}],handlers:{delete:Rb}}}function A8(e){this.enter({type:"delete",children:[]},e)}function N8(e){this.exit(e)}function Rb(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,ue(U({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function k8(){return"~"}function C8(e){return e.length}function O8(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||C8,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const v=[],A=[];let S=-1;for(e[p].length>f&&(f=e[p].length);++S<e[p].length;){const k=I8(e[p][S]);if(n.alignDelimiters!==!1){const I=s(k);A[S]=I,(d[S]===void 0||I>d[S])&&(d[S]=I)}v.push(k)}u[p]=v,l[p]=A}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=Lb(r[m]);else{const v=Lb(r);for(;++m<f;)a[m]=v}m=-1;const T=[],y=[];for(;++m<f;){const v=a[m];let A="",S="";v===99?(A=":",S=":"):v===108?A=":":v===114&&(S=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[m]-A.length-S.length);const I=A+"-".repeat(k)+S;n.alignDelimiters!==!1&&(k=A.length+k+S.length,k>d[m]&&(d[m]=k),y[m]=k),T[m]=I}u.splice(1,0,T),l.splice(1,0,y),p=-1;const x=[];for(;++p<u.length;){const v=u[p],A=l[p];m=-1;const S=[];for(;++m<f;){const k=v[m]||"";let I="",j="";if(n.alignDelimiters!==!1){const Y=d[m]-(A[m]||0),R=a[m];R===114?I=" ".repeat(Y):R===99?Y%2?(I=" ".repeat(Y/2+.5),j=" ".repeat(Y/2-.5)):(I=" ".repeat(Y/2),j=I):j=" ".repeat(Y)}n.delimiterStart!==!1&&!m&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&S.push(" "),n.alignDelimiters!==!1&&S.push(I),S.push(k),n.alignDelimiters!==!1&&S.push(j),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&S.push("|")}x.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return x.join(`
39
+ `)}function I8(e){return e==null?"":String(e)}function Lb(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 P8(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()),R8);return s(),u}function R8(e,t,n){return">"+(n?"":" ")+e}function L8(e,t){return Db(e,t.inConstruct,!0)&&!Db(e,t.notInConstruct,!1)}function Db(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 Mb(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
40
+ `&&L8(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
+ `}function D8(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 M8(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 F8(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 B8(e,t,n,r){const s=F8(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(M8(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,U8);return m(),T}const l=n.createTracker(r),d=s.repeat(Math.max(D8(a,s)+1,3)),f=n.enter("codeFenced");let p=l.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=l.move(n.safe(e.lang,U({before:p,after:" ",encode:["`"]},l.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=l.move(" "),p+=l.move(n.safe(e.meta,U({before:p,after:`
42
42
  `,encode:["`"]},l.current()))),m()}return p+=l.move(`
43
43
  `),a&&(p+=l.move(a+`
44
- `)),p+=l.move(d),f(),p}function B8(e,t,n){return(n?"":" ")+e}function ip(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 U8(e,t,n,r){const s=ip(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),U({before:f,after:"]"},d.current()))),f+=d.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,U({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,U({before:f,after:e.title?" ":`
45
- `},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,U({before:f,after:s},d.current()))),f+=d.move(s),l()),u(),f}function H8(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 ka(e){return"&#x"+e.toString(16).toUpperCase()+";"}function zl(e,t,n){const r=Us(e),s=Us(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}}Mb.peek=j8;function Mb(e,t,n,r){const s=H8(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(s);let d=u.move(n.containerPhrasing(e,U({after:s,before:l},u.current())));const f=d.charCodeAt(0),p=zl(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=ka(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=zl(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+ka(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function j8(e,t,n){return n.options.emphasis||"*"}function z8(e,t){let n=!1;return sl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,kf}),!!((!e.depth||e.depth<3)&&yf(e)&&(t.options.setext||n))}function $8(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(z8(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,le(U({},a.current()),{before:`
44
+ `)),p+=l.move(d),f(),p}function U8(e,t,n){return(n?"":" ")+e}function ip(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 H8(e,t,n,r){const s=ip(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),U({before:f,after:"]"},d.current()))),f+=d.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,U({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,U({before:f,after:e.title?" ":`
45
+ `},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,U({before:f,after:s},d.current()))),f+=d.move(s),l()),u(),f}function j8(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 Oa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function $l(e,t,n){const r=Us(e),s=Us(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}}Fb.peek=z8;function Fb(e,t,n,r){const s=j8(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(s);let d=u.move(n.containerPhrasing(e,U({after:s,before:l},u.current())));const f=d.charCodeAt(0),p=$l(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Oa(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=$l(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+Oa(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function z8(e,t,n){return n.options.emphasis||"*"}function $8(e,t){let n=!1;return sl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Of}),!!((!e.depth||e.depth<3)&&Tf(e)&&(t.options.setext||n))}function V8(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if($8(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,ue(U({},a.current()),{before:`
46
46
  `,after:`
47
47
  `}));return m(),p(),T+`
48
48
  `+(s===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
49
49
  `))+1))}const u="#".repeat(s),l=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,U({before:"# ",after:`
50
- `},a.current()));return/^[\t ]/.test(f)&&(f=ka(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}Fb.peek=V8;function Fb(e){return e.value||""}function V8(){return"<"}Bb.peek=q8;function Bb(e,t,n,r){const s=ip(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,U({before:f,after:"]"},d.current()))),f+=d.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,U({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,U({before:f,after:e.title?" ":")"},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,U({before:f,after:s},d.current()))),f+=d.move(s),l()),f+=d.move(")"),u(),f}function q8(){return"!"}Ub.peek=Y8;function Ub(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("![");const f=n.safe(e.alt,U({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),U({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function Y8(){return"!"}Hb.peek=W8;function Hb(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],l=n.compilePattern(u);let d;if(u.atBreak)for(;d=l.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 W8(){return"`"}function jb(e,t){const n=yf(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))}zb.peek=G8;function zb(e,t,n,r){const s=ip(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(jb(e,n)){const p=n.stack;n.stack=[],l=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,U({before:m,after:">"},u.current()))),m+=u.move(">"),l(),n.stack=p,m}l=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,U({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,U({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,U({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,U({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),l(),f}function G8(e,t,n){return jb(e,n)?"<":"["}$b.peek=X8;function $b(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("[");const f=n.containerPhrasing(e,U({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),U({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function X8(){return"["}function sp(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 Q8(e){const t=sp(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 K8(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 Vb(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 J8(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?K8(n):sp(n);const l=e.ordered?u==="."?")":".":Q8(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),Vb(n)===u&&p){let m=-1;for(;++m<e.children.length;){const T=e.children[m];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=l),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function Z8(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 eM(e,t,n,r){const s=Z8(n);let a=n.bulletCurrent||sp(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 l=n.createTracker(r);l.move(a+" ".repeat(u-a.length)),l.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),p);return d(),f;function p(m,T,y){return T?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function tM(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const nM=rl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function rM(e,t,n,r){return(e.children.some(function(u){return nM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function iM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}qb.peek=sM;function qb(e,t,n,r){const s=iM(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(s+s);let d=u.move(n.containerPhrasing(e,U({after:s,before:l},u.current())));const f=d.charCodeAt(0),p=zl(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=ka(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=zl(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+ka(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function sM(e,t,n){return n.options.strong||"*"}function oM(e,t,n,r){return n.safe(e.value,r)}function aM(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 uM(e,t,n){const r=(Vb(n)+(n.options.ruleSpaces?" ":"")).repeat(aM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Yb={blockquote:I8,break:Db,code:F8,definition:U8,emphasis:Mb,hardBreak:Db,heading:$8,html:Fb,image:Bb,imageReference:Ub,inlineCode:Hb,link:zb,linkReference:$b,list:J8,listItem:eM,paragraph:tM,root:rM,strong:qb,text:oM,thematicBreak:uM};function lM(){return{enter:{table:cM,tableData:Wb,tableHeader:Wb,tableRow:fM},exit:{codeText:hM,table:dM,tableData:op,tableHeader:op,tableRow:op}}}function cM(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 dM(e){this.exit(e),this.data.inTable=void 0}function fM(e){this.enter({type:"tableRow",children:[]},e)}function op(e){this.exit(e)}function Wb(e){this.enter({type:"tableCell",children:[]},e)}function hM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,pM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function pM(e,t){return t==="|"?t:e}function mM(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
51
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:l}};function u(y,x,v,A){return f(p(y,v,A),y.align)}function l(y,x,v,A){const S=m(y,v,A),C=f([S]);return C.slice(0,C.indexOf(`
52
- `))}function d(y,x,v,A){const S=v.enter("tableCell"),C=v.enter("phrasing"),I=v.containerPhrasing(y,le(U({},A),{before:a,after:a}));return C(),S(),I}function f(y,x){return k8(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function p(y,x,v){const A=y.children;let S=-1;const C=[],I=x.enter("table");for(;++S<A.length;)C[S]=m(A[S],x,v);return I(),C}function m(y,x,v){const A=y.children;let S=-1;const C=[],I=x.enter("tableRow");for(;++S<A.length;)C[S]=d(A[S],y,x,v);return I(),C}function T(y,x,v){let A=Yb.inlineCode(y,x,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function gM(){return{exit:{taskListCheckValueChecked:Gb,taskListCheckValueUnchecked:Gb,paragraph:yM}}}function EM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:TM}}}function Gb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function yM(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 l=s[a];if(l.type==="paragraph"){u=l;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 TM(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(u);let d=Yb.listItem(e,t,n,U(U({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function bM(){return[JD(),T8(),w8(),lM(),gM()]}function _M(e){return{extensions:[ZD(),b8(e),S8(),mM(e),EM()]}}const xM={tokenize:CM,partial:!0},Xb={tokenize:kM,partial:!0},Qb={tokenize:OM,partial:!0},Kb={tokenize:IM,partial:!0},wM={tokenize:PM,partial:!0},Jb={name:"wwwAutolink",tokenize:AM,previous:e_},Zb={name:"protocolAutolink",tokenize:NM,previous:t_},Vr={name:"emailAutolink",tokenize:vM,previous:n_},kr={};function SM(){return{text:kr}}let us=48;for(;us<123;)kr[us]=Vr,us++,us===58?us=65:us===91&&(us=97);kr[43]=Vr,kr[45]=Vr,kr[46]=Vr,kr[95]=Vr,kr[72]=[Vr,Zb],kr[104]=[Vr,Zb],kr[87]=[Vr,Jb],kr[119]=[Vr,Jb];function vM(e,t,n){const r=this;let s,a;return u;function u(m){return!ap(m)||!n_.call(r,r.previous)||up(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return ap(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(wM,p,f)(m):m===45||m===95||Zt(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&&cn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function AM(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!e_.call(r,r.previous)||up(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(xM,e.attempt(Xb,e.attempt(Qb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function NM(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&t_.call(r,r.previous)&&!up(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(cn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const T=s.toLowerCase();if(T==="http"||T==="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||Xu(m)||ct(m)||Wi(m)||Qu(m)?n(m):e.attempt(Xb,e.attempt(Qb,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function CM(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 kM(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(Kb,d,l)(f):f===null||ct(f)||Wi(f)||f!==45&&Qu(f)?d(f):(a=!0,e.consume(f),u)}function l(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 OM(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(Kb,t,a)(u):u===null||ct(u)||Wi(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function IM(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),s):l===60||l===null||ct(l)||Wi(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||ct(l)||Wi(l)?t(l):r(l)}function a(l){return cn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):cn(l)?(e.consume(l),u):n(l)}}function PM(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return Zt(a)?n(a):t(a)}}function e_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ct(e)}function t_(e){return!cn(e)}function n_(e){return!(e===47||ap(e))}function ap(e){return e===43||e===45||e===46||e===95||Zt(e)}function up(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 RM={tokenize:jM,partial:!0};function LM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:BM,continuation:{tokenize:UM},exit:HM}},text:{91:{name:"gfmFootnoteCall",tokenize:FM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:DM,resolveTo:MM}}}}function DM(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 l;function l(d){if(!u||!u._balanced)return n(d);const f=nr(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 MM(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)},l=[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,...l),e}function FM(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return l;function l(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||ct(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return s.includes(nr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ct(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 BM(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(x)}function p(x){if(u>999||x===93&&!l||x===null||x===91||ct(x))return n(x);if(x===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=nr(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return ct(x)||(l=!0),u++,e.consume(x),x===92?m:p}function m(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}function T(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),Ze(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function UM(e,t,n){return e.check(ta,t,e.attempt(RM,t,n))}function HM(e){e.exit("gfmFootnoteDefinition")}function jM(e,t,n){const r=this;return Ze(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 zM(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,l){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)},T=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&Pn(T,T.length,0,Ku(y,u.slice(f+1,d),l)),Pn(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),Pn(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,p=this.events;let m=0;return T;function T(x){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const v=Us(f);if(x===126)return m>1?d(x):(u.consume(x),m++,y);if(m<2&&!n)return d(x);const A=u.exit("strikethroughSequenceTemporary"),S=Us(x);return A._open=!S||S===2&&!!v,A._close=!v||v===2&&!!S,l(x)}}}class $M{constructor(){this.map=[]}add(t,n,r){VM(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 VM(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 qM(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 YM(){return{flow:{null:{name:"table",tokenize:WM,resolveAll:GM}}}}function WM(e,t,n){const r=this;let s=0,a=0,u;return l;function l($){let oe=r.events.length-1;for(;oe>-1;){const fe=r.events[oe][1].type;if(fe==="lineEnding"||fe==="linePrefix")oe--;else break}const ee=oe>-1?r.events[oe][1].type:null,we=ee==="tableHead"||ee==="tableRow"?R:d;return we===R&&r.parser.lazy[r.now().line]?n($):we($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):Fe($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):Ke($)?Ze(e,p,"whitespace")($):(a+=1,u&&(u=!1,s+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m($)))}function m($){return $===null||$===124||ct($)?(e.exit("data"),p($)):(e.consume($),$===92?T:m)}function T($){return $===92||$===124?(e.consume($),m):m($)}function y($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),u=!1,Ke($)?Ze(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):x($))}function x($){return $===45||$===58?A($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),v):Y($)}function v($){return Ke($)?Ze(e,A,"whitespace")($):A($)}function A($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),S):$===45?(a+=1,S($)):$===null||Fe($)?j($):Y($)}function S($){return $===45?(e.enter("tableDelimiterFiller"),C($)):Y($)}function C($){return $===45?(e.consume($),C):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I($))}function I($){return Ke($)?Ze(e,j,"whitespace")($):j($)}function j($){return $===124?x($):$===null||Fe($)?!u||s!==a?Y($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):Y($)}function Y($){return n($)}function R($){return e.enter("tableRow"),W($)}function W($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),W):$===null||Fe($)?(e.exit("tableRow"),t($)):Ke($)?Ze(e,W,"whitespace")($):(e.enter("data"),se($))}function se($){return $===null||$===124||ct($)?(e.exit("data"),W($)):(e.consume($),$===92?he:se)}function he($){return $===92||$===124?(e.consume($),se):se($)}}function GM(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,p,m;const T=new $M;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(l=!1,d!==0&&(r_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",f,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,p={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",p,t]])),s=x.type==="tableDelimiterRow"?2:p?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=$l(T,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=$l(T,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):x.type==="tableHead"?(l=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=$l(T,t,a,s,n,m)):u[1]!==0&&(m=$l(T,t,u,s,n,m)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&r_(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=qM(t.events,n))}return e}function $l(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},co(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=co(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=co(t.events,n[2]),p=co(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,v=n[3]-n[2]-1;e.add(x,v,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},co(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function r_(e,t,n,r,s){const a=[],u=co(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 co(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const XM={name:"tasklistCheck",tokenize:KM};function QM(){return{text:{91:XM}}}function KM(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 ct(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"),l):n(d)}function l(d){return Fe(d)?t(d):Ke(d)?e.check({tokenize:JM},t,n)(d):n(d)}}function JM(e,t,n){return Ze(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function ZM(e){return R1([SM(),LM(),zM(e),YM(),QM()])}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(ZM(n)),a.push(bM()),u.push(_M(n))}const n9=()=>_.jsx("span",{className:`${k}-blinking-cursor`,children:_.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Oa=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>_.jsx(SE,{remarkPlugins:[t9],rehypePlugins:[vy],components:{h1:({children:s})=>_.jsx("h1",{className:F(e,`${k}-header h1`),children:s}),h2:({children:s})=>_.jsx("h2",{className:F(e,`${k}-header h2`),children:s}),h3:({children:s})=>_.jsx("h3",{className:F(e,`${k}-header h3`),children:s}),ul:({children:s})=>_.jsx("ul",{className:F(e,`${k}-ul`),children:s}),ol:({children:s})=>_.jsx("ol",{className:F(e,`${k}-ol`),children:s}),li:({children:s})=>_.jsx("li",{className:F(e,`${k}-li`),children:s}),a:({href:s,children:a})=>_.jsx(Py,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>_.jsx("div",{className:F(e,`${k}-table-container`),children:_.jsx("table",{className:F(e,`${k}-table`),children:s})}),thead:({children:s})=>_.jsx("thead",{className:F(e,`${k}-thead`),children:s}),tbody:({children:s})=>_.jsx("tbody",{className:F(e,`${k}-tbody`),children:s}),tr:({children:s})=>_.jsx("tr",{className:F(e,`${k}-tr`),children:s}),th:({children:s})=>_.jsx("th",{className:F(e,`${k}-th`),children:s}),td:({children:s})=>_.jsx("td",{className:F(e,`${k}-td`),children:s}),span:({className:s,children:a})=>s===`${k}-blinking-cursor`?_.jsx(n9,{}):_.jsx("span",{children:a})},children:r+(n?`<span className='${k}-blinking-cursor'></span>`:"")}),Vl=()=>H.useContext(Hg),ql=()=>{const{sendMessage:e,loading:t,isConnected:n}=ln(),{mode:r,status:s}=ri();return H.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function r9(e){return e.includes("-")&&e===e.toLowerCase()}function Yl({tagName:e,props:t,label:n}){const r=H.useRef(null),s=H.useRef(null),a=H.useRef(e),u=H.useRef(null);return H.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!r9(e)){u.current!==e&&(u.current=e,kt(!0,"error",`[CimulateOverrides] ${n||"Override"} rejected: "${e}" is not a valid custom element name (must contain a hyphen and be lowercase, e.g. "product-card").`)),s.current=null,l.replaceChildren();return}const d=s.current;if(d&&d.isConnected)try{d.props=t;return}catch(f){kt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error during props update:`,f),s.current=null,l.replaceChildren();return}try{const f=document.createElement(e);f.props=t,l.replaceChildren(f);const p=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(p)?f:null}catch(f){kt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),H.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),_.jsx("div",{ref:r,"data-override":n||"custom"})}class i9 extends H.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){kt(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function s9(e){return st({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Image_Off"},child:[{tag:"path",attr:{d:"M19.937,14.218l0,-8.654c0,-0.829 -0.672,-1.5 -1.5,-1.5l-10.628,-0c-0.276,-0 -0.5,-0.225 -0.5,-0.5c0,-0.276 0.224,-0.5 0.5,-0.5l10.628,-0c1.38,-0 2.5,1.118 2.5,2.5l0,10.624c0,0.276 -0.224,0.5 -0.5,0.501c-0.276,-0 -0.5,-0.225 -0.5,-0.5l0,-0.556l-4.583,-4.584c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.162,0.162 2.37,2.37 3.876,3.876Zm-0.121,6.304c-0.395,0.262 -0.869,0.415 -1.379,0.415l-12.874,-0c-1.381,-0 -2.5,-1.119 -2.5,-2.5l0,-12.873c0,-0.51 0.153,-0.984 0.414,-1.38l-0.263,-0.263c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.088,0.088 0.176,0.176 0.263,0.263c0.245,0.245 16.095,16.094 16.339,16.338l0.263,0.263c0.455,0.456 -0.252,1.163 -0.707,0.707c-0.088,-0.087 -0.175,-0.175 -0.263,-0.263Zm-11.104,-11.103l-2.001,-2.001c-0.094,0.196 -0.146,0.415 -0.146,0.647c-0,0.829 0.672,1.5 1.5,1.5c0.232,-0 0.451,-0.052 0.647,-0.146Zm-2.733,-2.733l-1.77,-1.77c-0.093,0.196 -0.146,0.416 -0.146,0.648l0,10.717l1.926,-1.926c0.587,-0.586 1.536,-0.586 2.122,-0l0.555,0.554c0.195,0.196 0.511,0.196 0.706,0l2.415,-2.415l-2.343,-2.343c-0.395,0.262 -0.869,0.414 -1.379,0.414c-1.38,-0 -2.5,-1.119 -2.5,-2.5c-0,-0.509 0.152,-0.983 0.414,-1.379Zm-1.916,11.009l0,0.741c0,0.829 0.671,1.5 1.5,1.5l12.874,0c0.232,0 0.451,-0.052 0.647,-0.145c-0.165,-0.165 -3.264,-3.263 -6.59,-6.59l-2.414,2.415c-0.585,0.586 -1.537,0.586 -2.122,0l-0.554,-0.554c-0.195,-0.196 -0.512,-0.196 -0.708,0l-2.633,2.633Z"},child:[]}]}]})(e)}const o9=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=ln();return _.jsx("div",{className:F(t,`${k}-msg-product-card__image-wrapper`),children:e?n?_.jsx("button",{type:"button",className:F(t,`${k}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:_.jsx("img",{className:F(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,children:_.jsx("img",{className:F(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):_.jsx("img",{className:F(t,`${k}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):_.jsx("div",{className:F(t,`${k}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:_.jsx(s9,{"aria-hidden":"true"})})})},a9=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=ln();return n?_.jsx("button",{type:"button",disabled:l,onClick:u,className:F(t,`${k}-msg-product-card__title-link`),"aria-label":a,children:e}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:F(t,`${k}-msg-product-card__title-link`),"aria-label":a,children:e}):_.jsx("p",{className:F(t,`${k}-msg-product-card__title`),children:e})},u9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=ut(),{overrides:u,isInitialized:l}=Vl(),{sendMessage:d,loading:f}=ln(),p=ql(),m=l?u.ProductTile:void 0;if(m){const $={name:"ProductTile",payload:s!=null?s:{},api:p};return _.jsx(Yl,{tagName:m,props:$,label:"ProductTile"})}const{id:T,name:y,imageUrl:x,description:v,productPageUrl:A,price:S,priceBreakdown:C,discountPrice:I,listPrice:j,currencyCode:Y}=e,R=I!=null?I:S,W=MD({priceBreakdown:C,currencyCode:Y}),se=()=>{if(f)return;const $=y||"this product",oe=T?` [SKU: ${T}]`:"";d(`Show me details for ${$}${oe}`)},he=r?`View details for ${y}`:`Go to product page for ${y}`;return _.jsxs("div",{className:F(t,`${k}-msg-product-card`),children:[_.jsx(o9,{imageUrl:x||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:he,name:y,showInWidgetDetails:se}),_.jsxs("div",{className:F(t,`${k}-msg-product-card__content`),children:[_.jsxs("div",{className:F(t,`${k}-msg-product-card__content-header`),children:[_.jsx(a9,{name:y||T,globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:he,showInWidgetDetails:se}),a&&v&&_.jsx("div",{className:F(t,`${k}-msg-product-card__description`),title:v,children:_.jsx(Oa,{globalClassName:t,text:v})})]}),_.jsx("div",{className:F(t,`${k}-msg-product-card__price-row`),children:W?_.jsx("span",{className:F(t,`${k}-msg-product-card__price`),"aria-label":`Price from ${W.low} to ${W.high}`,children:W.range}):_.jsx(Zh,{globalClassName:t,retailPrice:j,discountPrice:R,currencyCode:Y})})]})]})},l9=e=>{var t,n;return{id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,listPrice:(t=e.data.listPrice)!=null?t:void 0,priceBreakdown:(n=e.data.priceBreakdown)!=null?n:void 0,currencyCode:e.data.currencyCode}},c9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=ut(),{overrides:l,isInitialized:d}=Vl(),f=ql(),p=d?l.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return _.jsx(Yl,{tagName:p,props:m,label:"ProductCarousel"})}return _.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&_.jsx("p",{className:F(n,`${k}-product-carousel-title`),children:e}),_.jsx(sD,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>_.jsxs("div",{className:F(n,`${k}-product-carousel-item`),children:[_.jsx(u9,{product:l9(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&_.jsx("p",{className:F(n,`${k}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},lp=44,d9=400,f9=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?lp:Math.min(Math.max(Math.round(t),lp),d9)},h9=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},p9="parentOrigin",m9=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(p9,t),n.toString()}catch(n){return e}},g9=(e,t,n)=>{if(!e||!t)return null;try{const r=new URL(e,window.location.href);return r.origin!==window.location.origin||!/\/Payments-Express\/?$/.test(r.pathname)?null:(r.pathname=r.pathname.replace(/\/Payments-Express\/?$/,"/Payments-ExpressProduct"),r.searchParams.set("pid",t),r.searchParams.set("quantity",String(n)),r.toString())}catch(r){return null}},i_=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=H.useRef(null),[s,a]=H.useState(!1),[u,l]=H.useState(lp),d=typeof window!="undefined"?window.location.origin:"",f=m9(e,d),p=h9(e);return H.useEffect(()=>{const m=T=>{var x,v,A;if(p&&T.origin!==p||r.current&&T.source!==r.current.contentWindow)return;const y=T.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),l(f9((x=y.payload)==null?void 0:x.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((A=(v=y.payload)==null?void 0:v.orderId)!=null?A:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),_.jsx("div",{className:F(t,`${k}-cart-express`,{[`${k}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:_.jsx("iframe",{ref:r,className:F(t,`${k}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},Wl=({code:e,globalClassName:t})=>_.jsxs("span",{className:F(t,`${k}-cart-chip`),children:[_.jsx(t1,{"aria-hidden":"true"}),_.jsx("span",{children:e})]}),xn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")n===0&&!u?f="Free":f=$r(u?-n:n,r);else if(l)f=l;else return null;return _.jsxs("div",{className:F(s,`${k}-cart-total-row`,{emphasized:a}),children:[_.jsxs("span",{className:F(s,`${k}-cart-total-label`),children:[e,t&&_.jsx("span",{className:F(s,`${k}-cart-total-badge`),children:t})]}),_.jsx("span",{className:F(s,`${k}-cart-total-value`),children:d?_.jsx("span",{className:F(s,`${k}-cart-total-shimmer`)}):f})]})},E9=({quantity:e,loading:t,globalClassName:n,onChange:r})=>{const[s,a]=H.useState(e.toString());H.useEffect(()=>{a(e.toString())},[e]);const u=f=>{const p=f.target.value;/^\d*$/.test(p)&&a(p)},l=()=>{const f=parseInt(s,10);!isNaN(f)&&f>0&&f!==e?r(f):a(e.toString())},d=f=>{f.key==="Enter"&&(f.preventDefault(),l())};return _.jsx("div",{className:F(n,`${k}-cart-qty-input-wrapper`),children:t?_.jsx(vN,{className:F(n,`${k}-cart-qty-spinner`),"aria-hidden":"true"}):_.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:F(n,`${k}-cart-qty-input`),value:s,disabled:t,onChange:u,onBlur:l,onKeyDown:d,"aria-label":"Quantity"})})},y9=({item:e,currencyCode:t,loading:n,disabled:r,globalClassName:s,onRemove:a,onQuantityChange:u})=>{var d,f,p;const l=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:F(s,`${k}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(s,`${k}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(s,`${k}-cart-item-details`),children:[_.jsx("p",{className:F(s,`${k}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(s,`${k}-cart-item-attrs`),children:[((d=e.variants)!=null?d:[]).map(m=>_.jsxs("p",{className:F(s,`${k}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((f=e.promotions)!=null?f:[]).map(m=>_.jsxs("p",{className:F(s,`${k}-cart-item-attr`),children:["Promotion: ",m]},m))]}),((p=e.coupons)!=null?p:[]).length>0&&_.jsx("div",{className:F(s,`${k}-cart-chips`),children:e.coupons.map(m=>_.jsx(Wl,{code:m,globalClassName:s},m))}),_.jsx("span",{className:F(s,`${k}-cart-item-price`),children:n?_.jsx("span",{className:F(s,`${k}-cart-total-shimmer`)}):_.jsxs(_.Fragment,{children:[l&&_.jsx("span",{className:F(s,`${k}-cart-item-original-price`),children:$r(e.originalSubtotal,t)}),_.jsx("span",{className:F(s,`${k}-cart-item-final-price`),children:$r(e.itemSubtotal,t)})]})}),_.jsxs("div",{className:F(s,`${k}-cart-item-footer`),children:[_.jsx("span",{className:F(s,`${k}-cart-qty-heading`),children:"Quantity"}),_.jsx(E9,{quantity:e.quantity,loading:n,globalClassName:s,onChange:m=>u(e,m)}),_.jsx("button",{type:"button",className:F(s,`${k}-cart-item-remove`),disabled:r,onClick:()=>a(e),children:"Remove"})]})]})]})},T9=({cart:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:s,loading:a}=ln(),[u,l]=H.useState(!0),[d,f]=H.useState(""),[p,m]=H.useState(null),{items:T=[],currencyCode:y="USD",subtotal:x,total:v,taxes:A,shippingCost:S,shippingDiscount:C,shippingPromotions:I=[],promotionsDiscount:j,promotions:Y=[],couponsDiscount:R,couponsApplied:W=[],bodyMessage:se,footerMessage:he,checkoutButtonUrl:$,expressPaymentUrl:oe}=e,ee=pe=>{a||s(`Remove ${pe.name} from my cart`)},we=pe=>{s(pe?`I completed express payment. Show my order confirmation for order ${pe}.`:"I completed express payment. Show my order confirmation.")},fe=(pe,ce)=>{p||ce<1||(m(pe.itemId),s(`Update ${pe.name} quantity to ${ce}`,{silent:!0}))};H.useEffect(()=>{if(p){const pe=setTimeout(()=>{m(null)},300);return()=>clearTimeout(pe)}},[e.total,e.subtotal]);const de=()=>{const pe=d.trim();!pe||a||(s(`Apply coupon code ${pe}`),f(""))};return _.jsxs("div",{className:F(t,`${k}-cart`),children:[_.jsxs("div",{className:F(t,`${k}-cart-box`),children:[se&&_.jsxs("button",{type:"button",className:F(t,`${k}-cart-summary`),"aria-expanded":u,onClick:()=>l(pe=>!pe),children:[_.jsx("span",{className:F(t,`${k}-cart-summary-text`),children:_.jsx(Oa,{text:se,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${k}-cart-summary-toggle`),"aria-hidden":"true",children:u?_.jsx(Zg,{}):_.jsx(e1,{})})]}),u&&_.jsxs("div",{className:F(t,`${k}-cart-expanded`,r&&`${k}-cart-expanded-standalone`),children:[_.jsxs("div",{className:F(t,`${k}-cart-items-section`),children:[_.jsx("ul",{className:F(t,`${k}-cart-items`),children:T.map(pe=>_.jsx(y9,{item:pe,currencyCode:y,loading:p===pe.itemId,disabled:a||p===pe.itemId,globalClassName:t,onRemove:ee,onQuantityChange:fe},pe.itemId))}),W.length>0&&_.jsx("div",{className:F(t,`${k}-cart-chips`,`${k}-cart-applied-coupons`),children:W.map(pe=>_.jsx(Wl,{code:pe,globalClassName:t},pe))})]}),_.jsxs("div",{className:F(t,`${k}-cart-totals`),children:[_.jsx(xn,{label:"Subtotal",value:x,currencyCode:y,globalClassName:t,loading:!!p}),_.jsx(xn,{label:"Coupon",value:R,currencyCode:y,globalClassName:t,isDiscount:!0,loading:!!p}),_.jsx(xn,{label:"Promotions",badge:Y[0],value:j,currencyCode:y,globalClassName:t,isDiscount:!0,loading:!!p}),_.jsx(xn,{label:"Shipping",value:S,currencyCode:y,globalClassName:t,fallback:"TBD",loading:!!p}),_.jsx(xn,{label:"Shipping Discount",badge:I[0],value:C,currencyCode:y,globalClassName:t,isDiscount:!0,loading:!!p}),_.jsx(xn,{label:"Tax",value:A,currencyCode:y,globalClassName:t,fallback:"TBD",loading:!!p}),_.jsx(xn,{label:"Total",value:v,currencyCode:y,globalClassName:t,emphasized:!0,loading:!!p})]})]})]}),_.jsxs("div",{className:F(t,`${k}-cart-coupon`),children:[_.jsxs("div",{className:F(t,`${k}-cart-coupon-field`),children:[_.jsx("span",{className:F(t,`${k}-cart-coupon-icon`),"aria-hidden":"true",children:_.jsx(t1,{})}),_.jsx("input",{type:"text",className:F(t,`${k}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:d,disabled:a,onChange:pe=>f(pe.target.value),onKeyDown:pe=>{pe.key==="Enter"&&(pe.preventDefault(),de())}})]}),_.jsx("button",{type:"button",className:F(t,`${k}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:a||!d.trim(),onClick:de,children:_.jsx(CN,{"aria-hidden":"true"})})]}),oe&&_.jsx(i_,{expressPaymentUrl:oe,globalClassName:t,onOrderComplete:we}),$&&_.jsxs("a",{className:F(t,`${k}-cart-checkout-button`),href:$,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[_.jsx(AN,{"aria-hidden":"true"}),_.jsx("span",{children:"Checkout"})]}),_.jsx("p",{className:F(t,`${k}-cart-footer`),children:he||"Shipping and taxes calculated at checkout."})]})},b9=({item:e,currencyCode:t,globalClassName:n})=>{var s,a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:F(n,`${k}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(n,`${k}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(n,`${k}-cart-item-details`),children:[_.jsx("p",{className:F(n,`${k}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(n,`${k}-cart-item-attrs`),children:[((s=e.variants)!=null?s:[]).map(l=>_.jsxs("p",{className:F(n,`${k}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((a=e.promotions)!=null?a:[]).map(l=>_.jsxs("p",{className:F(n,`${k}-cart-item-attr`),children:["Promotion: ",l]},l))]}),((u=e.coupons)!=null?u:[]).length>0&&_.jsx("div",{className:F(n,`${k}-cart-chips`),children:e.coupons.map(l=>_.jsx(Wl,{code:l,globalClassName:n},l))}),_.jsxs("span",{className:F(n,`${k}-cart-item-price`),children:[r&&_.jsx("span",{className:F(n,`${k}-cart-item-original-price`),children:$r(e.originalSubtotal,t)}),_.jsx("span",{className:F(n,`${k}-cart-item-final-price`),children:$r(e.itemSubtotal,t)})]}),_.jsx("div",{className:F(n,`${k}-cart-item-footer`),children:_.jsxs("span",{className:F(n,`${k}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},_9=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},x9=({order:e,globalClassName:t})=>{const[n,r]=H.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:T,shippingPromotions:y=[],promotionsDiscount:x,promotions:v=[],couponsDiscount:A,couponsApplied:S=[],bodyMessage:C,footerMessage:I}=e;return _.jsxs("div",{className:F(t,`${k}-cart`),children:[_.jsxs("div",{className:F(t,`${k}-cart-banner`),children:[_.jsx("span",{className:F(t,`${k}-cart-banner-icon`),"aria-hidden":"true",children:_.jsx(kN,{})}),_.jsx("p",{className:F(t,`${k}-cart-banner-text`),children:"Your order is confirmed!"})]}),_.jsxs("div",{className:F(t,`${k}-order-confirmation-meta`),children:[_.jsxs("span",{children:["Order No: ",s]}),_.jsxs("span",{children:["Ordered On: ",_9(a)]})]}),_.jsxs("div",{className:F(t,`${k}-cart-box`),children:[C&&_.jsxs("button",{type:"button",className:F(t,`${k}-cart-summary`),"aria-expanded":n,onClick:()=>r(j=>!j),children:[_.jsx("span",{className:F(t,`${k}-cart-summary-text`),children:_.jsx(Oa,{text:C,globalClassName:t,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${k}-cart-summary-toggle`),"aria-hidden":"true",children:n?_.jsx(Zg,{}):_.jsx(e1,{})})]}),n&&_.jsxs("div",{className:F(t,`${k}-cart-expanded`),children:[_.jsx("ul",{className:F(t,`${k}-cart-items`),children:u.map(j=>_.jsx(b9,{item:j,currencyCode:l,globalClassName:t},j.itemId))}),S.length>0&&_.jsx("div",{className:F(t,`${k}-cart-chips`,`${k}-cart-applied-coupons`),children:S.map(j=>_.jsx(Wl,{code:j,globalClassName:t},j))}),_.jsxs("div",{className:F(t,`${k}-cart-totals`),children:[_.jsx(xn,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),_.jsx(xn,{label:"Coupon",value:A,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(xn,{label:"Promotions",badge:v[0],value:x,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(xn,{label:"Shipping",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),_.jsx(xn,{label:"Shipping Discount",badge:y[0],value:T,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(xn,{label:"Tax",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),_.jsx(xn,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),_.jsx("p",{className:F(t,`${k}-cart-footer`),children:I||"Shipping and taxes calculated at checkout."})]})},w9=({image:e,alt:t,globalClassName:n})=>{const[r,s]=H.useState(e.src),[a,u]=H.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return _.jsx("img",{className:F(n,`${k}-pdp-gallery__image`,{[`${k}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},S9=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return _.jsxs(qh,{className:F(n,`${k}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[_.jsx(zh,{className:F(n,`${k}-pdp-gallery__item-group`),children:e.map((s,a)=>_.jsx(jh,{index:a,className:F(n,`${k}-pdp-gallery__item`),children:_.jsx(w9,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&_.jsxs(Bh,{className:F(n,`${k}-pdp-gallery__control`),children:[_.jsx(Vh,{className:F(n,`${k}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:_.jsx(nb,{size:"16px"})}),_.jsx($h,{className:F(n,`${k}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:_.jsx(rb,{size:"16px"})})]}),r&&_.jsx(Hh,{className:F(n,`${k}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>_.jsx(Uh,{index:a,className:F(n,`${k}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Ia="color",cp=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,v9=e=>e.replace(/(^|\/)large\//,"$1medium/"),s_=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Ia&&n.vals.includes(t)),o_=(e,t)=>{const n=v9(t),r=cp(e,n);return n===t?{src:r}:{src:r,fallbackSrc:cp(e,t)}},A9=(e,t)=>{var l,d;const n=((l=e.imgGroups)!=null?l:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>s_(f,t)),s=n.find(f=>f.vattr===null),a=r||s||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(f=>o_(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[o_(e.baseUrl,e.imageUrl)]:[]},N9=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&s_(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?cp(e.baseUrl,r):""},Gl=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(s=>{var a;return((a=s.vars)==null?void 0:a[t])!==n||s.ord===!1?!1:Object.entries(r).every(([u,l])=>{var d;return u===t||((d=s.vars)==null?void 0:d[u])===l})}),C9=(e,t)=>{const n=Object.keys(t);return n.length===0?!0:!e||e.length===0?!1:e.some(r=>r.ord!==!1&&n.every(s=>{var a;return((a=r.vars)==null?void 0:a[s])===t[s]}))},k9=(e,t,n,r,s)=>{if(!e||e.length===0)return le(U({},s),{[n]:r});const a=e.find(l=>{var d;return((d=l.vars)==null?void 0:d[n])===r&&l.ord!==!1&&Object.keys(l.vars).length>=t.length&&Object.entries(s).every(([f,p])=>{var m;return f===n||((m=l.vars)==null?void 0:m[f])===p})});if(a)return U({},a.vars);const u=e.find(l=>{var d;return((d=l.vars)==null?void 0:d[n])===r&&l.ord!==!1&&Object.keys(l.vars).length>=t.length});return u?U({},u.vars):le(U({},s),{[n]:r})},a_=(e,t)=>{var s,a,u,l;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(s=e.id)!=null?s:null;if(!e.vmat||e.vmat.length===0)return(a=e.id)!=null?a:null;const r=e.vmat.find(d=>d.ord!==!1&&Object.entries(t).every(([f,p])=>{var m;return((m=d.vars)==null?void 0:m[f])===p}));return(l=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?l:null},O9=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([s,a])=>{var u;return((u=r.vars)==null?void 0:u[s])===a}));return n!=null&&n.pr?n.pr:e.pr},I9=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>Gl(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},P9=300,R9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var P,Se,De,xe,ne,ye,ie;const{addToCart:s,sendMessage:a,loading:u}=ln(),l=e.data,d=(P=l.vattr)!=null?P:[],[f,p]=H.useState(()=>I9(l)),m=C9(l.vmat,f),T=(De=(Se=l.quantity)==null?void 0:Se.minQuantity)!=null?De:1,y=(ne=(xe=l.quantity)==null?void 0:xe.maxQuantity)!=null?ne:Number.POSITIVE_INFINITY,x=(ie=(ye=l.quantity)==null?void 0:ye.increment)!=null?ie:1,[v,A]=H.useState(T),S=f[Ia],C=H.useMemo(()=>A9(l,S),[l,S]),I=H.useMemo(()=>O9(l,f),[l,f]),j=d.find(re=>re.id===Ia),Y=d.filter(re=>re.id!==Ia),R=a_(l,f),[W,se]=H.useState(v),he=H.useRef(R),$=he.current===R?W:v;H.useEffect(()=>{if(he.current!==R){he.current=R,se(v);return}const re=window.setTimeout(()=>se(v),P9);return()=>window.clearTimeout(re)},[v,R]);const oe=v===W,ee=H.useMemo(()=>m&&(he.current!==R||oe)?g9(l.expressPaymentUrl,R,$):null,[l.expressPaymentUrl,R,$,m,oe]),we=H.useCallback(re=>{a(re?`I completed express payment. Show my order confirmation for order ${re}.`:"I completed express payment. Show my order confirmation.")},[a]),fe=(re,Ne)=>()=>{p(Ye=>{const et=!Gl(l.vmat,re,Ne,Ye);return re===Ia||et?k9(l.vmat,d,re,Ne,Ye):le(U({},Ye),{[re]:Ne})})},de=()=>{if(u)return;const re=a_(l,f);if(!re)return;const Ne=d.map(Ye=>{const et=Ye.opts.find(nn=>nn.val===f[Ye.id]);return et?{label:Ye.lbl||Ye.id,value:et.name||et.val}:null}).filter(Ye=>Ye!==null);s({productName:l.name,sku:re,quantity:v,variants:Ne})},pe=!m||v-x<T,ce=!m||v+x>y,K=re=>{var Ye;const Ne=f[re.id];return(Ye=re.opts.find(et=>et.val===Ne))==null?void 0:Ye.name},ue=()=>A(re=>Math.max(T,re-x)),N=()=>A(re=>Math.min(y,re+x)),M=re=>_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${re.id}`,className:F(t,`${k}-msg-pdp__variant-name`),children:re.lbl||re.id}),K(re)&&_.jsx("span",{className:F(t,`${k}-msg-pdp__variant-value`),children:K(re)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${re.id}`,className:F(t,`${k}-msg-pdp__chips`),children:re.opts.map(Ne=>{const Ye=Gl(l.vmat,re.id,Ne.val,f),et=f[re.id]===Ne.val;return _.jsxs("label",{className:F(`${k}-msg-pdp__chip`,{selected:et,unavailable:!Ye}),children:[_.jsx("input",{type:"radio",name:`variant-${re.id}`,value:Ne.val,checked:et,"aria-description":Ye?void 0:"unavailable",onChange:fe(re.id,Ne.val),className:`${k}-msg-pdp__radio-input`}),_.jsx("span",{children:Ne.name||Ne.val})]},Ne.val)})})]},re.id),J=re=>_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${re.id}`,className:F(t,`${k}-msg-pdp__variant-name`),children:re.lbl||"Color"}),K(re)&&_.jsx("span",{className:F(t,`${k}-msg-pdp__variant-value`),children:K(re)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${re.id}`,className:F(t,`${k}-msg-pdp__swatches`),children:re.opts.map(Ne=>{const Ye=Gl(l.vmat,re.id,Ne.val,f),et=f[re.id]===Ne.val,nn=N9(l,Ne.val);return nn?_.jsxs("label",{className:F(`${k}-msg-pdp__swatch`,{selected:et,unavailable:!Ye}),children:[_.jsx("input",{type:"radio",name:`variant-${re.id}`,value:Ne.val,checked:et,"aria-label":Ne.name||Ne.val,"aria-description":Ye?void 0:"unavailable",onChange:fe(re.id,Ne.val),className:`${k}-msg-pdp__radio-input`}),_.jsx("img",{className:F(t,`${k}-msg-pdp__swatch-image`),src:nn,alt:Ne.name||Ne.val,loading:"lazy"})]},Ne.val):_.jsxs("label",{className:F(`${k}-msg-pdp__chip`,{selected:et,unavailable:!Ye}),children:[_.jsx("input",{type:"radio",name:`variant-${re.id}`,value:Ne.val,checked:et,"aria-description":Ye?void 0:"unavailable",onChange:fe(re.id,Ne.val),className:`${k}-msg-pdp__radio-input`}),_.jsx("span",{children:Ne.name||Ne.val})]},Ne.val)})})]});return _.jsx("div",{className:F(t,`${k}-msg-pdp`),children:_.jsxs("div",{className:F(t,`${k}-msg-pdp__card`),children:[_.jsx("div",{className:F(t,`${k}-msg-pdp__gallery`),children:_.jsx(S9,{images:C,altText:l.name,globalClassName:t})}),_.jsxs("div",{className:F(t,`${k}-msg-pdp__content`),children:[l.slugUrl?_.jsx("a",{href:l.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:F(t,`${k}-msg-pdp__title-link`),"aria-label":`Go to product page for ${l.name}`,children:l.name}):_.jsx("p",{className:F(t,`${k}-msg-pdp__title`),children:l.name}),_.jsx(Zh,{globalClassName:t,className:`${k}-msg-pdp__price`,retailPrice:I==null?void 0:I.orig,discountPrice:(I==null?void 0:I.cur)||(I==null?void 0:I.prom),currencyCode:l.ccy,fontSize:"14px"}),l.dscr&&_.jsx("p",{className:F(t,`${k}-msg-pdp__description`),children:l.dscr}),j&&J(j),Y.map(M),r&&_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${k}-msg-pdp__variant-label`),children:[_.jsx("span",{className:F(t,`${k}-msg-pdp__variant-name`),children:"Quantity"}),_.jsx("span",{className:F(t,`${k}-msg-pdp__variant-value`),children:v})]}),_.jsxs("div",{className:F(t,`${k}-msg-pdp__stepper`),children:[_.jsx(tr,{className:`${k}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:_.jsx(gN,{}),disabled:pe,onClick:ue}),_.jsx("span",{className:F(t,`${k}-msg-pdp__quantity`),children:v}),_.jsx(tr,{className:`${k}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:_.jsx(EN,{}),disabled:ce,onClick:N})]})]}),r&&_.jsxs("div",{className:F(t,`${k}-msg-pdp__actions`),children:[ee&&_.jsx(i_,{expressPaymentUrl:ee,globalClassName:t,onOrderComplete:we},ee),_.jsx(Yu,{className:`${k}-msg-pdp__add-to-cart`,disabled:!m||u,onClick:de,children:"Add to cart"})]})]})]})})},L9=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},D9=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:s=!1})=>{const{addToCart:a,loading:u}=ln();if(!e.length)return null;const l=`auto repeat(${e.length}, 1fr)`,d=`${90+e.length*140}px`,f=p=>()=>{u||a({productName:p.name,sku:p.id})};return _.jsx("div",{className:F(n,`${k}-product-comparison`),children:_.jsxs("div",{className:`${k}-product-comparison__grid`,style:{gridTemplateColumns:l,minWidth:d},children:[_.jsxs("div",{className:`${k}-product-comparison__header`,children:[_.jsx("div",{className:`${k}-product-comparison__header-spacer`}),e.map(p=>{var T,y,x,v;const m=L9(p);return _.jsxs("div",{className:F(n,`${k}-product-comparison__product-col`),children:[m&&_.jsx("img",{className:F(n,`${k}-product-comparison__image`),src:m,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?_.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:F(n,`${k}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):_.jsx("span",{className:F(n,`${k}-product-comparison__name`),children:p.name}),_.jsx(Zh,{globalClassName:n,retailPrice:(T=p.pr)==null?void 0:T.orig,discountPrice:(v=(y=p.pr)==null?void 0:y.prom)!=null?v:(x=p.pr)==null?void 0:x.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),_.jsx("div",{className:`${k}-product-comparison__table`,children:t.map(p=>_.jsxs("div",{className:`${k}-product-comparison__row`,children:[_.jsx("div",{className:F(n,`${k}-product-comparison__row-label`),children:p.row_name}),e.map((m,T)=>_.jsx("div",{className:F(n,`${k}-product-comparison__row-value`),children:p.values[T]},`${p.row_name}-${m.id}`))]},p.row_name))}),s&&_.jsxs("div",{className:`${k}-product-comparison__footer`,children:[_.jsx("div",{className:`${k}-product-comparison__footer-spacer`}),e.map(p=>_.jsx("div",{className:F(n,`${k}-product-comparison__footer-cell`),children:_.jsxs(Yu,{className:`${k}-product-comparison__add-to-cart`,disabled:u,onClick:f(p),children:[_.jsx(SN,{size:"14px"}),"Add to cart"]})},`cart-${p.id}`))]})]})})},u_=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:s,loading:a}=ln(),{isCartMgmtSupported:u,logger:l}=ut(),{overrides:d,isInitialized:f}=Vl(),p=ql(),m=H.useMemo(()=>e.response.map(T=>{var x,v;if(T.type!=="markdown")return T;const y=dg((v=(x=T.data)==null?void 0:x.content)!=null?v:"");return y&&y.type!=="markdown"?y:T}),[e.response]);return _.jsx(_.Fragment,{children:m.map((T,y)=>{var x,v,A,S,C,I,j,Y,R,W,se,he,$,oe,ee,we,fe,de,pe,ce,K,ue,N,M,J;switch(T.type){case"markdown":{const P=(v=(x=T.data)==null?void 0:x.content)!=null?v:"";return T.index===ji&&fg(P)?null:_.jsx(Oa,{text:P,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1},`${T.type}-${(A=T.index)!=null?A:y}`)}case"product_carousel":return _.jsx(c9,{title:(C=(S=T.data)==null?void 0:S.title)!=null?C:"",products:(j=(I=T.data)==null?void 0:I.products)!=null?j:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(Y=T.index)!=null?Y:y}`);case"product_tile":return _.jsx(R9,{product:T.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(R=T.index)!=null?R:y}`);case"product_comparison":return _.jsx(D9,{products:(se=(W=T.data)==null?void 0:W.products)!=null?se:[],table:($=(he=T.data)==null?void 0:he.table)!=null?$:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(oe=T.index)!=null?oe:y}`);case"cart":{const P=(fe=(we=(ee=T.data)==null?void 0:ee.cart)==null?void 0:we.cartSummary)==null?void 0:fe.cartDetails;return P?_.jsx(T9,{cart:P,productsToHighlight:T.data.products_to_highlight,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${T.type}-${(de=T.index)!=null?de:y}`):null}case"order_confirmation":{const P=(ce=(pe=T.data)==null?void 0:pe.order)==null?void 0:ce.orderDetails;return P?_.jsx(x9,{order:P,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${T.type}-${(K=T.index)!=null?K:y}`):null}case"tool_results":{const P=T.data,Se=T.output_name,De=f&&Se&&Object.prototype.hasOwnProperty.call(d,Se)?d[Se]:void 0,xe=typeof De=="string"?De:void 0;if(!xe||!Se)return l!=null&&l.isDevelopment&&(Se?l.warn(`🦜 tool_results "${Se}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${Se}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(d),payload:P}):l.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:P})),null;const ne={name:Se,payload:P,api:p};return _.jsx(i9,{overrideName:Se,children:_.jsx(Yl,{tagName:xe,props:ne,label:`toolResult:${Se}`})},`${T.type}-${Se}-${(ue=T.index)!=null?ue:y}`)}case"suggestions":return _.jsx("div",{style:{marginTop:"0.5rem"},children:_.jsx(UD,{disabled:a,suggestions:(M=(N=T.data)==null?void 0:N.display_text)!=null?M:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:s})},`${T.type}-${(J=T.index)!=null?J:y}`);default:return null}})})},M9=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=ut(),a=H.useMemo(()=>{if(typeof e.content!="string")return null;try{const d=JSON.parse(e.content);if(d&&typeof d=="object"&&Array.isArray(d.response))return d}catch(d){return null}const l=dg(e.content);return l?{response:[l]}:null},[e.content]),u=H.useMemo(()=>{const l="Oops, I had trouble with your request.";if(typeof e.content!="string")return s==null||s.warn("Message content is not richtext format. Showing fallback text.",e.content),l;const d=e.content.trim();try{const f=JSON.parse(d);if(typeof f=="object"&&f!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),f.text||f.message||l}catch(f){if(d.startsWith("{")||d.startsWith("["))return s==null||s.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),l}return e.content||l},[s,e.content]);switch(e.role){case"user":return _.jsx("div",{className:F(t,`${k}-message`,r?"standalone":"embedded"),children:_.jsx("div",{className:F(t,`${k}-user-message`,r?"standalone":"embedded"),children:_.jsxs("div",{className:F(t,`${k}-user-message-row`,r?"standalone":"embedded"),children:[_.jsx("span",{className:F(t,`${k}-message-icon user-message-icon`,r?"standalone":"embedded"),children:_.jsx(NN,{})}),_.jsx("p",{className:F(t,`${k}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return _.jsx("div",{className:F(t,`${k}-message-group`,r?"standalone":"embedded"),children:_.jsx("div",{className:`${k}-message-group-child`,children:a?_.jsx(u_,{content:a,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):_.jsx(Oa,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return _.jsx("div",{className:F(t,`${k}-message`,r?"standalone":"embedded"),children:_.jsx("p",{className:F(t,`${k}-reset-message`),children:e.content})})}},F9=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>_.jsxs("div",{className:F(n,`${k}-send-error`,r?"standalone":"embedded"),role:"alert",children:[_.jsx("span",{className:F(n,`${k}-send-error-text`),children:e}),_.jsxs("button",{type:"button",className:F(n,`${k}-retry-button`),onClick:t,children:[_.jsx(PN,{"aria-hidden":"true"})," Retry"]})]}),B9="You are offline or we couldn't reach the assistant. Check connection and try again.",dp=({isWidgetStandalone:e})=>{var oe,ee;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=ut(),{messages:a,streamingBlocks:u,isAgentTyping:l,loading:d,progressMessage:f,connectionStatus:p,error:m,sendError:T,retryLastMessage:y,retryConnection:x}=ln(),v=H.useRef(null),A=a.filter(we=>!we.silent),S=A.length>0,C=u.some(nA),I=A[A.length-1];let j=!1;if(I)try{const we=JSON.parse(I.content);Array.isArray(we==null?void 0:we.response)&&(j=we.response.some(fe=>fe.type==="suggestions"))}catch(we){}const Y=S&&(d||l)&&!C&&!j,R=p==="reconnecting"&&!Y,W=p==="error";let se=null;W?se={message:m!=null?m:B9,kind:"connection",onRetry:x}:T&&(se={message:T.message,kind:"send",onRetry:y}),H.useEffect(()=>{var we;(we=v.current)==null||we.scrollIntoView({behavior:"smooth"})},[]),H.useEffect(()=>{var we;s&&((we=v.current)==null||we.scrollIntoView({behavior:"smooth"}))},[a,u,T,m,s]);const he=(oe=se==null?void 0:se.message)!=null?oe:null,$=(ee=se==null?void 0:se.kind)!=null?ee:null;return H.useEffect(()=>{he&&(r==null||r.error("Error message shown to user",{message:he,kind:$}))},[he,$,r]),_.jsxs(_.Fragment,{children:[d&&!S&&_.jsx(VD,{globalClassName:t,isWidgetStandalone:e}),A.map(we=>_.jsx(M9,{message:we,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},we.id)),se&&_.jsx(F9,{message:se.message,onRetry:se.onRetry,globalClassName:t,isWidgetStandalone:e}),C&&_.jsxs("div",{className:F(t,`${k}-message-group`,e?"standalone":"embedded"),children:[_.jsx(u_,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(d||l)&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e})]}),Y&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),R&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),_.jsx("div",{ref:v})]})},U9=()=>_.jsxs("svg",{className:`${k}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),H9=()=>_.jsx("svg",{className:`${k}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("path",{d:"M8 1v3M8 12v3M1 8h3M12 8h3M3.05 3.05l2.12 2.12M10.83 10.83l2.12 2.12M3.05 12.95l2.12-2.12M10.83 5.17l2.12-2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),j9=(e,t)=>e===0?[]:e<0?t:t.slice(-e),fp=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=ut(),s=e!=null?e:r,{overrides:a,isInitialized:u}=Vl(),l=ql();if(t.length===0||s===0)return null;const d=j9(s,t),f=u?a.ProgressSteps:void 0;if(f){const p={name:"ProgressSteps",payload:{steps:d},api:l};return _.jsx(Yl,{tagName:f,props:p,label:"ProgressSteps"})}return _.jsx("div",{className:F(n,`${k}-progress-steps-panel`),children:_.jsx("div",{className:`${k}-progress-steps`,children:_.jsx("ul",{className:`${k}-progress-steps-list`,children:d.map((p,m)=>{const T=m<d.length-1,y=m===d.length-1;return _.jsxs("li",{className:F(`${k}-progress-step`,y&&"active"),children:[y&&_.jsx("span",{className:`${k}-progress-step-arc`}),_.jsx("span",{className:`${k}-progress-step-text`,children:p}),_.jsx("span",{className:F(`${k}-progress-step-icon`,T?"done":"active"),children:T?_.jsx(U9,{}):_.jsx(H9,{})})]},`${m}-${p}`)})})})})},l_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=ut(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:l,downloadTranscript:d}=ln(),f=s;return _.jsxs("div",{className:F(e,`${k}-container`,`${k}-embedded-chat`),style:t,children:[_.jsx("div",{className:F(e,`${k}-message-container`,`container-${n}`,"embedded"),children:_.jsx(dp,{isWidgetStandalone:!0})}),_.jsx(fp,{steps:l,globalClassName:e}),_.jsx(th,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:p=>a(p)}),_.jsx("div",{className:F(`${k}-embedded-chat-menu`),children:_.jsxs(j5,{componentType:"chat",children:[_.jsx(Nb,{componentType:"chat"}),_.jsx(Dy,{componentType:"chat",onClearChat:u}),r&&_.jsx(My,{componentType:"chat",onDownloadTranscript:d})]})})]})},c_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=H.useState((d=e.container)==null?void 0:d.current),a=H.useSyncExternalStore($9,()=>!1,()=>!0),{getRootNode:u}=Bl();if(H.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const l=r!=null?r:z9(u);return _.jsx(_.Fragment,{children:H.Children.map(t,f=>Ds.createPortal(f,l))})},z9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return es(n)?n:xr(t).body},$9=()=>()=>{},d_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ut(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=ri(),{loading:d,isAgentTyping:f,sendMessage:p,resetConversation:m,progressSteps:T,downloadTranscript:y}=ln(),{isOpen:x}=s||{},v=!!s.isOpen,A=r==="standalone",S=f||d,C=()=>{ni(!1)};return v?_.jsx(bb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:v,children:_.jsx(c_,{children:_.jsx(Gh,{className:F(e,`${k}-container`,`${k}-dialog`,a,u&&"full-height"),style:U(U({},t),l&&{width:l}),children:_.jsxs(Yh,{className:F(e,`${k}-dialog-content`,{standalone:A,embedded:!A}),children:[_.jsx(vb,{componentType:"dialog",onClearChat:m,onClose:C,onDownloadTranscript:y}),_.jsx(Wh,{className:F(e,`${k}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:_.jsx(dp,{isWidgetStandalone:A,isOpen:x})}),_.jsx(fp,{steps:T,globalClassName:e}),_.jsx(th,{componentType:"dialog",isLoading:S,onSubmit:I=>p(I)})]})})})}):null},f_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ut(),{mode:r,status:s,isModalFullscreen:a}=ri(),{loading:u,isAgentTyping:l,sendMessage:d,resetConversation:f,progressSteps:p,downloadTranscript:m}=ln(),{isOpen:T}=s||{},y=!!s.isOpen,x=r==="standalone",v=l||u,A=({open:C})=>{ni(C)},S=()=>{ni(!1)};return y?_.jsx(bb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:_.jsx(c_,{children:_.jsxs("div",{className:F(e,`${k}-modal-container`),style:t,children:[_.jsx(mb,{className:F(e,`${k}-modal-backdrop`)}),_.jsx(Gh,{className:F(e,`${k}-container`,`${k}-modal`,{fullscreen:a,standalone:x,embedded:!x}),children:_.jsxs(Yh,{className:F(e,`${k}-modal-content`,{standalone:x,embedded:!x}),children:[_.jsx(vb,{componentType:"modal",onClearChat:f,onClose:S,onDownloadTranscript:m}),_.jsx(Wh,{className:F(e,`${k}-message-container`,`container-${n}`,{standalone:x,embedded:!x}),children:_.jsx(dp,{isWidgetStandalone:x,isOpen:T})}),_.jsx(fp,{steps:p,globalClassName:e}),_.jsx(th,{componentType:"modal",isLoading:v,onSubmit:C=>d(C)})]})})]})})}):null},V9=()=>{const e=ri(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(_N,{}):t==="dialog"?_.jsx(d_,{}):t==="modal"?_.jsx(f_,{}):_.jsx(l_,{})},q9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=ID();H.useEffect(()=>{const a=u=>{const{property:l,value:d}=u.detail||{};!l||d===void 0||(l==="isOpen"&&e(d),l==="isInline"&&t(d),l==="elementId"&&n(d),l==="entryType"&&r(d),l==="params"&&s(d))};return AD(a),()=>{ND(a)}},[e,t,n,r,s])};function Y9({isReady:e,hasError:t,transmit:n}){const r=H.useRef([]),s=H.useRef(e);s.current=e;const a=H.useRef(n);a.current=n;const u=H.useCallback(l=>{s.current?a.current(l):r.current.push(l)},[]);return H.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(d=>a.current(d))}},[e]),H.useEffect(()=>{t&&(r.current=[])},[t]),u}const h_={copilot:"Ask Copilot",messaging:"Ask a question"},W9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ut(),{placeholder:s,isResponseLoading:a}=Jh(),u=s||h_[r],[l,d]=H.useState(""),f=t||a,p=m=>{const T=l.trim();T&&(m.preventDefault(),e(T),d(""))};return _.jsxs("form",{className:F(n,`${k}-prompts-input-container`),name:`${k}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${k}-prompts-input`,"aria-label":u,children:_.jsx(Fh,{className:F(n,`${k}-prompts-input-icon`)})}),_.jsx("input",{id:`${k}-prompts-input`,className:F(n,`${k}-prompts-input`),name:`${k}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),_.jsx(tr,{className:F(n,`${k}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(af,{}),disabled:f})]})},G9=()=>{const{globalClassName:e,mode:t}=ut(),{placeholder:n}=Jh(),r=n||h_[t];return _.jsxs("div",{className:F(e,`${k}-prompts-header`),children:[_.jsx(Fh,{className:F(e,`${k}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:F(e,`${k}-prompts-header-text`),children:r})]})},X9=()=>{const{globalClassName:e,themeVariables:t}=ut(),{isOpen:n,elementId:r,promptsDisplay:s}=Jh(),{isConnected:a,sendMessage:u,connectionStatus:l}=ln(),d=s!=="buttons",[f,p]=H.useState(null),m=l==="error",T=l==="connecting",y=Y9({isReady:a,hasError:m,transmit:u});H.useEffect(()=>{if(!r||f)return;const v=document.getElementById(r);v&&p(v)},[r,f]);const x=H.useCallback(v=>{ni(!0),y(v)},[y]);return!n||!f?null:Ds.createPortal(_.jsxs("div",{className:F(e,`${k}-prompts-extension-container`),style:t,children:[d&&_.jsx(W9,{onSubmit:x,disabled:m}),!d&&_.jsx(G9,{}),!m&&T&&_.jsx("p",{className:F(e,`${k}-prompts-connecting-message`),children:"Connecting to agent..."}),m&&_.jsx("p",{className:F(e,`${k}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),f)},Q9=()=>(q9(),_.jsx(X9,{})),p_=e=>_.jsxs(jg,le(U({},e),{children:[_.jsx(V9,{}),_.jsx(Q9,{})]}));var Xl={},m_;function K9(){if(m_)return Xl;m_=1;var e=Yg();return Xl.createRoot=e.createRoot,Xl.hydrateRoot=e.hydrateRoot,Xl}var J9=K9();const g_=(e,t,n,r)=>{J9.createRoot(e).render(_.jsx(p_,le(U({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},Z9=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=pn(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let l;const d=(p,m)=>{for(const T of p)if(T.type==="childList"&&T.addedNodes.length)for(const y of T.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(kt(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(l),g_(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),kt(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},eF=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=pn(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){kt(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){kt(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){kt(!0,"warn","Container element not found for id:",t),kt(!0,"warn","Beginning observation for element"),Z9(U({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}g_(l,s,n,r)};class tF extends HTMLElement{constructor(){super(...arguments);We(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const nF={components:{setEntryType:Bg,toggleWidgetOpen:ni,toggleWidgetMinimized:zu,toggleModalFullscreen:tf,setWidgetType:$u,setWidgetDialogPosition:nf,loadPromptsComponent:OD,togglePromptsExtensionOpen:Sb}};Le.AgentForceWidget=p_,Le.AgentforceWidgetProvider=jg,Le.CIMULATE_WIDGET_READY_EVENT=yg,Le.MessagingDialog=d_,Le.MessagingEmbed=l_,Le.MessagingModal=f_,Le.MessagingProvider=xg,Le.OverrideElement=tF,Le.eventHandlers=nF,Le.injectMessagingWidget=eF,Le.useMessaging=ln,Object.defineProperty(Le,Symbol.toStringTag,{value:"Module"})}));
50
+ `},a.current()));return/^[\t ]/.test(f)&&(f=Oa(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}Bb.peek=q8;function Bb(e){return e.value||""}function q8(){return"<"}Ub.peek=Y8;function Ub(e,t,n,r){const s=ip(n),a=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,U({before:f,after:"]"},d.current()))),f+=d.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,U({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,U({before:f,after:e.title?" ":")"},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,U({before:f,after:s},d.current()))),f+=d.move(s),l()),f+=d.move(")"),u(),f}function Y8(){return"!"}Hb.peek=W8;function Hb(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("![");const f=n.safe(e.alt,U({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),U({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function W8(){return"!"}jb.peek=G8;function jb(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],l=n.compilePattern(u);let d;if(u.atBreak)for(;d=l.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 G8(){return"`"}function zb(e,t){const n=Tf(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=X8;function $b(e,t,n,r){const s=ip(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(zb(e,n)){const p=n.stack;n.stack=[],l=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,U({before:m,after:">"},u.current()))),m+=u.move(">"),l(),n.stack=p,m}l=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,U({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,U({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,U({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,U({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),l(),f}function X8(e,t,n){return zb(e,n)?"<":"["}Vb.peek=Q8;function Vb(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("[");const f=n.containerPhrasing(e,U({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),U({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=l.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function Q8(){return"["}function sp(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 K8(e){const t=sp(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 J8(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 qb(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 Z8(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?J8(n):sp(n);const l=e.ordered?u==="."?")":".":K8(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),qb(n)===u&&p){let m=-1;for(;++m<e.children.length;){const T=e.children[m];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=l),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,s(),f}function eM(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 tM(e,t,n,r){const s=eM(n);let a=n.bulletCurrent||sp(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 l=n.createTracker(r);l.move(a+" ".repeat(u-a.length)),l.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),p);return d(),f;function p(m,T,y){return T?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function nM(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const rM=rl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function iM(e,t,n,r){return(e.children.some(function(u){return rM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function sM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Yb.peek=oM;function Yb(e,t,n,r){const s=sM(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(s+s);let d=u.move(n.containerPhrasing(e,U({after:s,before:l},u.current())));const f=d.charCodeAt(0),p=$l(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Oa(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=$l(r.after.charCodeAt(0),m,s);T.inside&&(d=d.slice(0,-1)+Oa(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function oM(e,t,n){return n.options.strong||"*"}function aM(e,t,n,r){return n.safe(e.value,r)}function uM(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 lM(e,t,n){const r=(qb(n)+(n.options.ruleSpaces?" ":"")).repeat(uM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Wb={blockquote:P8,break:Mb,code:B8,definition:H8,emphasis:Fb,hardBreak:Mb,heading:V8,html:Bb,image:Ub,imageReference:Hb,inlineCode:jb,link:$b,linkReference:Vb,list:Z8,listItem:tM,paragraph:nM,root:iM,strong:Yb,text:aM,thematicBreak:lM};function cM(){return{enter:{table:dM,tableData:Gb,tableHeader:Gb,tableRow:hM},exit:{codeText:pM,table:fM,tableData:op,tableHeader:op,tableRow:op}}}function dM(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 fM(e){this.exit(e),this.data.inTable=void 0}function hM(e){this.enter({type:"tableRow",children:[]},e)}function op(e){this.exit(e)}function Gb(e){this.enter({type:"tableCell",children:[]},e)}function pM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,mM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function mM(e,t){return t==="|"?t:e}function gM(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
51
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:u,tableCell:d,tableRow:l}};function u(y,x,v,A){return f(p(y,v,A),y.align)}function l(y,x,v,A){const S=m(y,v,A),k=f([S]);return k.slice(0,k.indexOf(`
52
+ `))}function d(y,x,v,A){const S=v.enter("tableCell"),k=v.enter("phrasing"),I=v.containerPhrasing(y,ue(U({},A),{before:a,after:a}));return k(),S(),I}function f(y,x){return O8(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function p(y,x,v){const A=y.children;let S=-1;const k=[],I=x.enter("table");for(;++S<A.length;)k[S]=m(A[S],x,v);return I(),k}function m(y,x,v){const A=y.children;let S=-1;const k=[],I=x.enter("tableRow");for(;++S<A.length;)k[S]=d(A[S],y,x,v);return I(),k}function T(y,x,v){let A=Wb.inlineCode(y,x,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function EM(){return{exit:{taskListCheckValueChecked:Xb,taskListCheckValueUnchecked:Xb,paragraph:TM}}}function yM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:bM}}}function Xb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function TM(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 l=s[a];if(l.type==="paragraph"){u=l;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 bM(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(u);let d=Wb.listItem(e,t,n,U(U({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function _M(){return[ZD(),b8(),S8(),cM(),EM()]}function xM(e){return{extensions:[e8(),_8(e),v8(),gM(e),yM()]}}const wM={tokenize:CM,partial:!0},Qb={tokenize:OM,partial:!0},Kb={tokenize:IM,partial:!0},Jb={tokenize:PM,partial:!0},SM={tokenize:RM,partial:!0},Zb={name:"wwwAutolink",tokenize:NM,previous:t_},e_={name:"protocolAutolink",tokenize:kM,previous:n_},qr={name:"emailAutolink",tokenize:AM,previous:r_},Cr={};function vM(){return{text:Cr}}let us=48;for(;us<123;)Cr[us]=qr,us++,us===58?us=65:us===91&&(us=97);Cr[43]=qr,Cr[45]=qr,Cr[46]=qr,Cr[95]=qr,Cr[72]=[qr,e_],Cr[104]=[qr,e_],Cr[87]=[qr,Zb],Cr[119]=[qr,Zb];function AM(e,t,n){const r=this;let s,a;return u;function u(m){return!ap(m)||!r_.call(r,r.previous)||up(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return ap(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(SM,p,f)(m):m===45||m===95||tn(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&&dn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function NM(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!t_.call(r,r.previous)||up(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(wM,e.attempt(Qb,e.attempt(Kb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function kM(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&n_.call(r,r.previous)&&!up(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(dn(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const T=s.toLowerCase();if(T==="http"||T==="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||Xu(m)||dt(m)||Wi(m)||Qu(m)?n(m):e.attempt(Qb,e.attempt(Kb,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function CM(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 OM(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(Jb,d,l)(f):f===null||dt(f)||Wi(f)||f!==45&&Qu(f)?d(f):(a=!0,e.consume(f),u)}function l(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 IM(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(Jb,t,a)(u):u===null||dt(u)||Wi(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function PM(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),s):l===60||l===null||dt(l)||Wi(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||dt(l)||Wi(l)?t(l):r(l)}function a(l){return dn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):dn(l)?(e.consume(l),u):n(l)}}function RM(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return tn(a)?n(a):t(a)}}function t_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||dt(e)}function n_(e){return!dn(e)}function r_(e){return!(e===47||ap(e))}function ap(e){return e===43||e===45||e===46||e===95||tn(e)}function up(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 LM={tokenize:zM,partial:!0};function DM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:UM,continuation:{tokenize:HM},exit:jM}},text:{91:{name:"gfmFootnoteCall",tokenize:BM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:MM,resolveTo:FM}}}}function MM(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 l;function l(d){if(!u||!u._balanced)return n(d);const f=nr(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 FM(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)},l=[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,...l),e}function BM(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return l;function l(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||dt(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return s.includes(nr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return dt(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 UM(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(x)}function p(x){if(u>999||x===93&&!l||x===null||x===91||dt(x))return n(x);if(x===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=nr(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return dt(x)||(l=!0),u++,e.consume(x),x===92?m:p}function m(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}function T(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),tt(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function HM(e,t,n){return e.check(na,t,e.attempt(LM,t,n))}function jM(e){e.exit("gfmFootnoteDefinition")}function zM(e,t,n){const r=this;return tt(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 $M(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,l){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)},T=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&Pn(T,T.length,0,Ku(y,u.slice(f+1,d),l)),Pn(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),Pn(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,p=this.events;let m=0;return T;function T(x){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const v=Us(f);if(x===126)return m>1?d(x):(u.consume(x),m++,y);if(m<2&&!n)return d(x);const A=u.exit("strikethroughSequenceTemporary"),S=Us(x);return A._open=!S||S===2&&!!v,A._close=!v||v===2&&!!S,l(x)}}}class VM{constructor(){this.map=[]}add(t,n,r){qM(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 qM(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 YM(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 WM(){return{flow:{null:{name:"table",tokenize:GM,resolveAll:XM}}}}function GM(e,t,n){const r=this;let s=0,a=0,u;return l;function l($){let se=r.events.length-1;for(;se>-1;){const fe=r.events[se][1].type;if(fe==="lineEnding"||fe==="linePrefix")se--;else break}const ee=se>-1?r.events[se][1].type:null,xe=ee==="tableHead"||ee==="tableRow"?R:d;return xe===R&&r.parser.lazy[r.now().line]?n($):xe($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):Be($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):Je($)?tt(e,p,"whitespace")($):(a+=1,u&&(u=!1,s+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m($)))}function m($){return $===null||$===124||dt($)?(e.exit("data"),p($)):(e.consume($),$===92?T:m)}function T($){return $===92||$===124?(e.consume($),m):m($)}function y($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),u=!1,Je($)?tt(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):x($))}function x($){return $===45||$===58?A($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),v):Y($)}function v($){return Je($)?tt(e,A,"whitespace")($):A($)}function A($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),S):$===45?(a+=1,S($)):$===null||Be($)?j($):Y($)}function S($){return $===45?(e.enter("tableDelimiterFiller"),k($)):Y($)}function k($){return $===45?(e.consume($),k):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I($))}function I($){return Je($)?tt(e,j,"whitespace")($):j($)}function j($){return $===124?x($):$===null||Be($)?!u||s!==a?Y($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):Y($)}function Y($){return n($)}function R($){return e.enter("tableRow"),W($)}function W($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),W):$===null||Be($)?(e.exit("tableRow"),t($)):Je($)?tt(e,W,"whitespace")($):(e.enter("data"),ie($))}function ie($){return $===null||$===124||dt($)?(e.exit("data"),W($)):(e.consume($),$===92?de:ie)}function de($){return $===92||$===124?(e.consume($),ie):ie($)}}function XM(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,p,m;const T=new VM;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(l=!1,d!==0&&(i_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",f,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,p={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},T.add(n,0,[["enter",p,t]])),s=x.type==="tableDelimiterRow"?2:p?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=Vl(T,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=Vl(T,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):x.type==="tableHead"?(l=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=Vl(T,t,a,s,n,m)):u[1]!==0&&(m=Vl(T,t,u,s,n,m)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&i_(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=YM(t.events,n))}return e}function Vl(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},co(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=co(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=co(t.events,n[2]),p=co(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,v=n[3]-n[2]-1;e.add(x,v,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},co(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function i_(e,t,n,r,s){const a=[],u=co(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 co(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const QM={name:"tasklistCheck",tokenize:JM};function KM(){return{text:{91:QM}}}function JM(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 dt(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"),l):n(d)}function l(d){return Be(d)?t(d):Je(d)?e.check({tokenize:ZM},t,n)(d):n(d)}}function ZM(e,t,n){return tt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function e9(e){return R1([vM(),DM(),$M(e),WM(),KM()])}const t9={};function n9(e){const t=this,n=e||t9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(e9(n)),a.push(_M()),u.push(xM(n))}const r9=()=>_.jsx("span",{className:`${C}-blinking-cursor`,children:_.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),fo=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>_.jsx(SE,{remarkPlugins:[n9],rehypePlugins:[vy],components:{h1:({children:s})=>_.jsx("h1",{className:F(e,`${C}-header h1`),children:s}),h2:({children:s})=>_.jsx("h2",{className:F(e,`${C}-header h2`),children:s}),h3:({children:s})=>_.jsx("h3",{className:F(e,`${C}-header h3`),children:s}),ul:({children:s})=>_.jsx("ul",{className:F(e,`${C}-ul`),children:s}),ol:({children:s})=>_.jsx("ol",{className:F(e,`${C}-ol`),children:s}),li:({children:s})=>_.jsx("li",{className:F(e,`${C}-li`),children:s}),a:({href:s,children:a})=>_.jsx(Py,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>_.jsx("div",{className:F(e,`${C}-table-container`),children:_.jsx("table",{className:F(e,`${C}-table`),children:s})}),thead:({children:s})=>_.jsx("thead",{className:F(e,`${C}-thead`),children:s}),tbody:({children:s})=>_.jsx("tbody",{className:F(e,`${C}-tbody`),children:s}),tr:({children:s})=>_.jsx("tr",{className:F(e,`${C}-tr`),children:s}),th:({children:s})=>_.jsx("th",{className:F(e,`${C}-th`),children:s}),td:({children:s})=>_.jsx("td",{className:F(e,`${C}-td`),children:s}),span:({className:s,children:a})=>s===`${C}-blinking-cursor`?_.jsx(r9,{}):_.jsx("span",{children:a})},children:r+(n?`<span className='${C}-blinking-cursor'></span>`:"")}),ql=()=>H.useContext(Hg),Yl=()=>{const{sendMessage:e,loading:t,isConnected:n}=cn(),{mode:r,status:s}=ri();return H.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function i9(e){return e.includes("-")&&e===e.toLowerCase()}function Wl({tagName:e,props:t,label:n}){const r=H.useRef(null),s=H.useRef(null),a=H.useRef(e),u=H.useRef(null);return H.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!i9(e)){u.current!==e&&(u.current=e,Pt(!0,"error",`[CimulateOverrides] ${n||"Override"} rejected: "${e}" is not a valid custom element name (must contain a hyphen and be lowercase, e.g. "product-card").`)),s.current=null,l.replaceChildren();return}const d=s.current;if(d&&d.isConnected)try{d.props=t;return}catch(f){Pt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error during props update:`,f),s.current=null,l.replaceChildren();return}try{const f=document.createElement(e);f.props=t,l.replaceChildren(f);const p=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(p)?f:null}catch(f){Pt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),H.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),_.jsx("div",{ref:r,"data-override":n||"custom"})}class s9 extends H.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){Pt(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function o9(e){return ot({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Image_Off"},child:[{tag:"path",attr:{d:"M19.937,14.218l0,-8.654c0,-0.829 -0.672,-1.5 -1.5,-1.5l-10.628,-0c-0.276,-0 -0.5,-0.225 -0.5,-0.5c0,-0.276 0.224,-0.5 0.5,-0.5l10.628,-0c1.38,-0 2.5,1.118 2.5,2.5l0,10.624c0,0.276 -0.224,0.5 -0.5,0.501c-0.276,-0 -0.5,-0.225 -0.5,-0.5l0,-0.556l-4.583,-4.584c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.162,0.162 2.37,2.37 3.876,3.876Zm-0.121,6.304c-0.395,0.262 -0.869,0.415 -1.379,0.415l-12.874,-0c-1.381,-0 -2.5,-1.119 -2.5,-2.5l0,-12.873c0,-0.51 0.153,-0.984 0.414,-1.38l-0.263,-0.263c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.088,0.088 0.176,0.176 0.263,0.263c0.245,0.245 16.095,16.094 16.339,16.338l0.263,0.263c0.455,0.456 -0.252,1.163 -0.707,0.707c-0.088,-0.087 -0.175,-0.175 -0.263,-0.263Zm-11.104,-11.103l-2.001,-2.001c-0.094,0.196 -0.146,0.415 -0.146,0.647c-0,0.829 0.672,1.5 1.5,1.5c0.232,-0 0.451,-0.052 0.647,-0.146Zm-2.733,-2.733l-1.77,-1.77c-0.093,0.196 -0.146,0.416 -0.146,0.648l0,10.717l1.926,-1.926c0.587,-0.586 1.536,-0.586 2.122,-0l0.555,0.554c0.195,0.196 0.511,0.196 0.706,0l2.415,-2.415l-2.343,-2.343c-0.395,0.262 -0.869,0.414 -1.379,0.414c-1.38,-0 -2.5,-1.119 -2.5,-2.5c-0,-0.509 0.152,-0.983 0.414,-1.379Zm-1.916,11.009l0,0.741c0,0.829 0.671,1.5 1.5,1.5l12.874,0c0.232,0 0.451,-0.052 0.647,-0.145c-0.165,-0.165 -3.264,-3.263 -6.59,-6.59l-2.414,2.415c-0.585,0.586 -1.537,0.586 -2.122,0l-0.554,-0.554c-0.195,-0.196 -0.512,-0.196 -0.708,0l-2.633,2.633Z"},child:[]}]}]})(e)}const a9=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=cn();return _.jsx("div",{className:F(t,`${C}-msg-product-card__image-wrapper`),children:e?n?_.jsx("button",{type:"button",className:F(t,`${C}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:_.jsx("img",{className:F(t,`${C}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,children:_.jsx("img",{className:F(t,`${C}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):_.jsx("img",{className:F(t,`${C}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):_.jsx("div",{className:F(t,`${C}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:_.jsx(o9,{"aria-hidden":"true"})})})},u9=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=cn();return n?_.jsx("button",{type:"button",disabled:l,onClick:u,className:F(t,`${C}-msg-product-card__title-link`),"aria-label":a,children:e}):r?_.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:F(t,`${C}-msg-product-card__title-link`),"aria-label":a,children:e}):_.jsx("p",{className:F(t,`${C}-msg-product-card__title`),children:e})},l9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=at(),{overrides:u,isInitialized:l}=ql(),{sendMessage:d,loading:f}=cn(),p=Yl(),m=l?u.ProductTile:void 0;if(m){const $={name:"ProductTile",payload:s!=null?s:{},api:p};return _.jsx(Wl,{tagName:m,props:$,label:"ProductTile"})}const{id:T,name:y,imageUrl:x,description:v,productPageUrl:A,price:S,priceBreakdown:k,discountPrice:I,listPrice:j,currencyCode:Y}=e,R=I!=null?I:S,W=BD({priceBreakdown:k,currencyCode:Y}),ie=()=>{if(f)return;const $=y||"this product",se=T?` [SKU: ${T}]`:"";d(`Show me details for ${$}${se}`)},de=r?`View details for ${y}`:`Go to product page for ${y}`;return _.jsxs("div",{className:F(t,`${C}-msg-product-card`),children:[_.jsx(a9,{imageUrl:x||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:de,name:y,showInWidgetDetails:ie}),_.jsxs("div",{className:F(t,`${C}-msg-product-card__content`),children:[_.jsxs("div",{className:F(t,`${C}-msg-product-card__content-header`),children:[_.jsx(u9,{name:y||T,globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:de,showInWidgetDetails:ie}),a&&v&&_.jsx("div",{className:F(t,`${C}-msg-product-card__description`),title:v,children:_.jsx(fo,{globalClassName:t,text:v})})]}),_.jsx("div",{className:F(t,`${C}-msg-product-card__price-row`),children:W?_.jsx("span",{className:F(t,`${C}-msg-product-card__price`),"aria-label":`Price from ${W.low} to ${W.high}`,children:W.range}):_.jsx(Zh,{globalClassName:t,retailPrice:j,discountPrice:R,currencyCode:Y})})]})]})},c9=e=>{var t,n;return{id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,listPrice:(t=e.data.listPrice)!=null?t:void 0,priceBreakdown:(n=e.data.priceBreakdown)!=null?n:void 0,currencyCode:e.data.currencyCode}},d9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=at(),{overrides:l,isInitialized:d}=ql(),f=Yl(),p=d?l.ProductCarousel:void 0;if(p){const m={name:"ProductCarousel",payload:{title:e,products:t},api:f};return _.jsx(Wl,{tagName:p,props:m,label:"ProductCarousel"})}return _.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&_.jsx("p",{className:F(n,`${C}-product-carousel-title`),children:e}),_.jsx(aD,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(m=>_.jsxs("div",{className:F(n,`${C}-product-carousel-item`),children:[_.jsx(l9,{product:c9(m),rawProduct:m,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&_.jsx("p",{className:F(n,`${C}-product-carousel-caption`),title:m.caption,children:m.caption})]},m.id))})]})},lp=44,f9=400,h9=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?lp:Math.min(Math.max(Math.round(t),lp),f9)},p9=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},m9="parentOrigin",g9=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(m9,t),n.toString()}catch(n){return e}},E9=(e,t,n)=>{if(!e||!t)return null;try{const r=new URL(e,window.location.href);return r.origin!==window.location.origin||!/\/Payments-Express\/?$/.test(r.pathname)?null:(r.pathname=r.pathname.replace(/\/Payments-Express\/?$/,"/Payments-ExpressProduct"),r.searchParams.set("pid",t),r.searchParams.set("quantity",String(n)),r.toString())}catch(r){return null}},s_=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=H.useRef(null),[s,a]=H.useState(!1),[u,l]=H.useState(lp),d=typeof window!="undefined"?window.location.origin:"",f=g9(e,d),p=p9(e);return H.useEffect(()=>{const m=T=>{var x,v,A;if(p&&T.origin!==p||r.current&&T.source!==r.current.contentWindow)return;const y=T.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),l(h9((x=y.payload)==null?void 0:x.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((A=(v=y.payload)==null?void 0:v.orderId)!=null?A:null);break}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[p,n]),_.jsx("div",{className:F(t,`${C}-cart-express`,{[`${C}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:_.jsx("iframe",{ref:r,className:F(t,`${C}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},Gl=({code:e,globalClassName:t})=>_.jsxs("span",{className:F(t,`${C}-cart-chip`),children:[_.jsx(t1,{"aria-hidden":"true"}),_.jsx("span",{children:e})]}),xn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")n===0&&!u?f="Free":f=Vr(u?-n:n,r);else if(l)f=l;else return null;return _.jsxs("div",{className:F(s,`${C}-cart-total-row`,{emphasized:a}),children:[_.jsxs("span",{className:F(s,`${C}-cart-total-label`),children:[e,t&&_.jsx("span",{className:F(s,`${C}-cart-total-badge`),children:t})]}),_.jsx("span",{className:F(s,`${C}-cart-total-value`),children:d?_.jsx("span",{className:F(s,`${C}-cart-total-shimmer`)}):f})]})},y9=({quantity:e,loading:t,globalClassName:n,onChange:r})=>{const[s,a]=H.useState(e.toString());H.useEffect(()=>{a(e.toString())},[e]);const u=f=>{const p=f.target.value;/^\d*$/.test(p)&&a(p)},l=()=>{const f=parseInt(s,10);!isNaN(f)&&f>0&&f!==e?r(f):a(e.toString())},d=f=>{f.key==="Enter"&&(f.preventDefault(),l())};return _.jsx("div",{className:F(n,`${C}-cart-qty-input-wrapper`),children:t?_.jsx(NN,{className:F(n,`${C}-cart-qty-spinner`),"aria-hidden":"true"}):_.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:F(n,`${C}-cart-qty-input`),value:s,disabled:t,onChange:u,onBlur:l,onKeyDown:d,"aria-label":"Quantity"})})},T9=({item:e,currencyCode:t,loading:n,disabled:r,globalClassName:s,onRemove:a,onQuantityChange:u})=>{var d,f,p;const l=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:F(s,`${C}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(s,`${C}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(s,`${C}-cart-item-details`),children:[_.jsx("p",{className:F(s,`${C}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(s,`${C}-cart-item-attrs`),children:[((d=e.variants)!=null?d:[]).map(m=>_.jsxs("p",{className:F(s,`${C}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((f=e.promotions)!=null?f:[]).map(m=>_.jsxs("p",{className:F(s,`${C}-cart-item-attr`),children:["Promotion: ",m]},m))]}),((p=e.coupons)!=null?p:[]).length>0&&_.jsx("div",{className:F(s,`${C}-cart-chips`),children:e.coupons.map(m=>_.jsx(Gl,{code:m,globalClassName:s},m))}),_.jsx("span",{className:F(s,`${C}-cart-item-price`),children:n?_.jsx("span",{className:F(s,`${C}-cart-total-shimmer`)}):_.jsxs(_.Fragment,{children:[l&&_.jsx("span",{className:F(s,`${C}-cart-item-original-price`),children:Vr(e.originalSubtotal,t)}),_.jsx("span",{className:F(s,`${C}-cart-item-final-price`),children:Vr(e.itemSubtotal,t)})]})}),_.jsxs("div",{className:F(s,`${C}-cart-item-footer`),children:[_.jsx("span",{className:F(s,`${C}-cart-qty-heading`),children:"Quantity"}),_.jsx(y9,{quantity:e.quantity,loading:n,globalClassName:s,onChange:m=>u(e,m)}),_.jsx("button",{type:"button",className:F(s,`${C}-cart-item-remove`),disabled:r,onClick:()=>a(e),children:"Remove"})]})]})]})},b9=({cart:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:s,loading:a}=cn(),[u,l]=H.useState(!0),[d,f]=H.useState(""),[p,m]=H.useState(null),{items:T=[],currencyCode:y="USD",subtotal:x,total:v,taxes:A,shippingCost:S,shippingDiscount:k,shippingPromotions:I=[],promotionsDiscount:j,promotions:Y=[],couponsDiscount:R,couponsApplied:W=[],bodyMessage:ie,footerMessage:de,checkoutButtonUrl:$,expressPaymentUrl:se}=e,ee=he=>{a||s(`Remove ${he.name} from my cart`)},xe=he=>{s(he?`I completed express payment. Show my order confirmation for order ${he}.`:"I completed express payment. Show my order confirmation.")},fe=(he,le)=>{p||le<1||(m(he.itemId),s(`Update ${he.name} quantity to ${le}`,{silent:!0}))};H.useEffect(()=>{if(p){const he=setTimeout(()=>{m(null)},300);return()=>clearTimeout(he)}},[e.total,e.subtotal]);const ce=()=>{const he=d.trim();!he||a||(s(`Apply coupon code ${he}`),f(""))};return _.jsxs("div",{className:F(t,`${C}-cart`),children:[_.jsxs("div",{className:F(t,`${C}-cart-box`),children:[ie&&_.jsxs("button",{type:"button",className:F(t,`${C}-cart-summary`),"aria-expanded":u,onClick:()=>l(he=>!he),children:[_.jsx("span",{className:F(t,`${C}-cart-summary-text`),children:_.jsx(fo,{text:ie,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${C}-cart-summary-toggle`),"aria-hidden":"true",children:u?_.jsx(Zg,{}):_.jsx(e1,{})})]}),u&&_.jsxs("div",{className:F(t,`${C}-cart-expanded`,r&&`${C}-cart-expanded-standalone`),children:[_.jsxs("div",{className:F(t,`${C}-cart-items-section`),children:[_.jsx("ul",{className:F(t,`${C}-cart-items`),children:T.map(he=>_.jsx(T9,{item:he,currencyCode:y,loading:p===he.itemId,disabled:a||p===he.itemId,globalClassName:t,onRemove:ee,onQuantityChange:fe},he.itemId))}),W.length>0&&_.jsx("div",{className:F(t,`${C}-cart-chips`,`${C}-cart-applied-coupons`),children:W.map(he=>_.jsx(Gl,{code:he,globalClassName:t},he))})]}),_.jsxs("div",{className:F(t,`${C}-cart-totals`),children:[_.jsx(xn,{label:"Subtotal",value:x,currencyCode:y,globalClassName:t,loading:!!p}),_.jsx(xn,{label:"Coupon",value:R,currencyCode:y,globalClassName:t,isDiscount:!0,loading:!!p}),_.jsx(xn,{label:"Promotions",badge:Y[0],value:j,currencyCode:y,globalClassName:t,isDiscount:!0,loading:!!p}),_.jsx(xn,{label:"Shipping",value:S,currencyCode:y,globalClassName:t,fallback:"TBD",loading:!!p}),_.jsx(xn,{label:"Shipping Discount",badge:I[0],value:k,currencyCode:y,globalClassName:t,isDiscount:!0,loading:!!p}),_.jsx(xn,{label:"Tax",value:A,currencyCode:y,globalClassName:t,fallback:"TBD",loading:!!p}),_.jsx(xn,{label:"Total",value:v,currencyCode:y,globalClassName:t,emphasized:!0,loading:!!p})]})]})]}),_.jsxs("div",{className:F(t,`${C}-cart-coupon`),children:[_.jsxs("div",{className:F(t,`${C}-cart-coupon-field`),children:[_.jsx("span",{className:F(t,`${C}-cart-coupon-icon`),"aria-hidden":"true",children:_.jsx(t1,{})}),_.jsx("input",{type:"text",className:F(t,`${C}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:d,disabled:a,onChange:he=>f(he.target.value),onKeyDown:he=>{he.key==="Enter"&&(he.preventDefault(),ce())}})]}),_.jsx("button",{type:"button",className:F(t,`${C}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:a||!d.trim(),onClick:ce,children:_.jsx(ON,{"aria-hidden":"true"})})]}),se&&_.jsx(s_,{expressPaymentUrl:se,globalClassName:t,onOrderComplete:xe}),$&&_.jsxs("a",{className:F(t,`${C}-cart-checkout-button`),href:$,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[_.jsx(kN,{"aria-hidden":"true"}),_.jsx("span",{children:"Checkout"})]}),_.jsx("p",{className:F(t,`${C}-cart-footer`),children:de||"Shipping and taxes calculated at checkout."})]})},_9=({item:e,currencyCode:t,globalClassName:n})=>{var s,a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:F(n,`${C}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:F(n,`${C}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:F(n,`${C}-cart-item-details`),children:[_.jsx("p",{className:F(n,`${C}-cart-item-name`),children:e.name}),_.jsxs("div",{className:F(n,`${C}-cart-item-attrs`),children:[((s=e.variants)!=null?s:[]).map(l=>_.jsxs("p",{className:F(n,`${C}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((a=e.promotions)!=null?a:[]).map(l=>_.jsxs("p",{className:F(n,`${C}-cart-item-attr`),children:["Promotion: ",l]},l))]}),((u=e.coupons)!=null?u:[]).length>0&&_.jsx("div",{className:F(n,`${C}-cart-chips`),children:e.coupons.map(l=>_.jsx(Gl,{code:l,globalClassName:n},l))}),_.jsxs("span",{className:F(n,`${C}-cart-item-price`),children:[r&&_.jsx("span",{className:F(n,`${C}-cart-item-original-price`),children:Vr(e.originalSubtotal,t)}),_.jsx("span",{className:F(n,`${C}-cart-item-final-price`),children:Vr(e.itemSubtotal,t)})]}),_.jsx("div",{className:F(n,`${C}-cart-item-footer`),children:_.jsxs("span",{className:F(n,`${C}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},x9=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},w9=({order:e,globalClassName:t})=>{const[n,r]=H.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:p,shippingCost:m,shippingDiscount:T,shippingPromotions:y=[],promotionsDiscount:x,promotions:v=[],couponsDiscount:A,couponsApplied:S=[],bodyMessage:k,footerMessage:I}=e;return _.jsxs("div",{className:F(t,`${C}-cart`),children:[_.jsxs("div",{className:F(t,`${C}-cart-banner`),children:[_.jsx("span",{className:F(t,`${C}-cart-banner-icon`),"aria-hidden":"true",children:_.jsx(IN,{})}),_.jsx("p",{className:F(t,`${C}-cart-banner-text`),children:"Your order is confirmed!"})]}),_.jsxs("div",{className:F(t,`${C}-order-confirmation-meta`),children:[_.jsxs("span",{children:["Order No: ",s]}),_.jsxs("span",{children:["Ordered On: ",x9(a)]})]}),_.jsxs("div",{className:F(t,`${C}-cart-box`),children:[k&&_.jsxs("button",{type:"button",className:F(t,`${C}-cart-summary`),"aria-expanded":n,onClick:()=>r(j=>!j),children:[_.jsx("span",{className:F(t,`${C}-cart-summary-text`),children:_.jsx(fo,{text:k,globalClassName:t,showIsLoading:!1})}),_.jsx("span",{className:F(t,`${C}-cart-summary-toggle`),"aria-hidden":"true",children:n?_.jsx(Zg,{}):_.jsx(e1,{})})]}),n&&_.jsxs("div",{className:F(t,`${C}-cart-expanded`),children:[_.jsx("ul",{className:F(t,`${C}-cart-items`),children:u.map(j=>_.jsx(_9,{item:j,currencyCode:l,globalClassName:t},j.itemId))}),S.length>0&&_.jsx("div",{className:F(t,`${C}-cart-chips`,`${C}-cart-applied-coupons`),children:S.map(j=>_.jsx(Gl,{code:j,globalClassName:t},j))}),_.jsxs("div",{className:F(t,`${C}-cart-totals`),children:[_.jsx(xn,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),_.jsx(xn,{label:"Coupon",value:A,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(xn,{label:"Promotions",badge:v[0],value:x,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(xn,{label:"Shipping",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),_.jsx(xn,{label:"Shipping Discount",badge:y[0],value:T,currencyCode:l,globalClassName:t,isDiscount:!0}),_.jsx(xn,{label:"Tax",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),_.jsx(xn,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),_.jsx("p",{className:F(t,`${C}-cart-footer`),children:I||"Shipping and taxes calculated at checkout."})]})},S9=({image:e,alt:t,globalClassName:n})=>{const[r,s]=H.useState(e.src),[a,u]=H.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return _.jsx("img",{className:F(n,`${C}-pdp-gallery__image`,{[`${C}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},v9=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return _.jsxs(Yh,{className:F(n,`${C}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[_.jsx($h,{className:F(n,`${C}-pdp-gallery__item-group`),children:e.map((s,a)=>_.jsx(zh,{index:a,className:F(n,`${C}-pdp-gallery__item`),children:_.jsx(S9,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&_.jsxs(Uh,{className:F(n,`${C}-pdp-gallery__control`),children:[_.jsx(qh,{className:F(n,`${C}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:_.jsx(nb,{size:"16px"})}),_.jsx(Vh,{className:F(n,`${C}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:_.jsx(rb,{size:"16px"})})]}),r&&_.jsx(jh,{className:F(n,`${C}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>_.jsx(Hh,{index:a,className:F(n,`${C}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Ia="color",cp=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,A9=e=>e.replace(/(^|\/)large\//,"$1medium/"),o_=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Ia&&n.vals.includes(t)),a_=(e,t)=>{const n=A9(t),r=cp(e,n);return n===t?{src:r}:{src:r,fallbackSrc:cp(e,t)}},N9=(e,t)=>{var l,d;const n=((l=e.imgGroups)!=null?l:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>o_(f,t)),s=n.find(f=>f.vattr===null),a=r||s||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(f=>a_(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[a_(e.baseUrl,e.imageUrl)]:[]},k9=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&o_(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?cp(e.baseUrl,r):""},Xl=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(s=>{var a;return((a=s.vars)==null?void 0:a[t])!==n||s.ord===!1?!1:Object.entries(r).every(([u,l])=>{var d;return u===t||((d=s.vars)==null?void 0:d[u])===l})}),C9=(e,t)=>{const n=Object.keys(t);return n.length===0?!0:!e||e.length===0?!1:e.some(r=>r.ord!==!1&&n.every(s=>{var a;return((a=r.vars)==null?void 0:a[s])===t[s]}))},O9=(e,t,n,r,s)=>{if(!e||e.length===0)return ue(U({},s),{[n]:r});const a=e.find(l=>{var d;return((d=l.vars)==null?void 0:d[n])===r&&l.ord!==!1&&Object.keys(l.vars).length>=t.length&&Object.entries(s).every(([f,p])=>{var m;return f===n||((m=l.vars)==null?void 0:m[f])===p})});if(a)return U({},a.vars);const u=e.find(l=>{var d;return((d=l.vars)==null?void 0:d[n])===r&&l.ord!==!1&&Object.keys(l.vars).length>=t.length});return u?U({},u.vars):ue(U({},s),{[n]:r})},u_=(e,t)=>{var s,a,u,l;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(s=e.id)!=null?s:null;if(!e.vmat||e.vmat.length===0)return(a=e.id)!=null?a:null;const r=e.vmat.find(d=>d.ord!==!1&&Object.entries(t).every(([f,p])=>{var m;return((m=d.vars)==null?void 0:m[f])===p}));return(l=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?l:null},I9=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([s,a])=>{var u;return((u=r.vars)==null?void 0:u[s])===a}));return n!=null&&n.pr?n.pr:e.pr},P9=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>Xl(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},R9=300,L9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var _e,ne,Ee,re,ve,$e,gt;const{addToCart:s,sendMessage:a,loading:u}=cn(),l=e.data,d=(_e=l.vattr)!=null?_e:[],[f,p]=H.useState(()=>P9(l)),m=C9(l.vmat,f),T=(Ee=(ne=l.quantity)==null?void 0:ne.minQuantity)!=null?Ee:1,y=(ve=(re=l.quantity)==null?void 0:re.maxQuantity)!=null?ve:Number.POSITIVE_INFINITY,x=(gt=($e=l.quantity)==null?void 0:$e.increment)!=null?gt:1,[v,A]=H.useState(T),[S,k]=H.useState(!1),I=H.useRef(!1);H.useEffect(()=>{S&&(u?I.current=!0:I.current&&(I.current=!1,k(!1)))},[S,u]);const j=f[Ia],Y=H.useMemo(()=>N9(l,j),[l,j]),R=H.useMemo(()=>I9(l,f),[l,f]),W=d.find(Ce=>Ce.id===Ia),ie=d.filter(Ce=>Ce.id!==Ia),de=u_(l,f),[$,se]=H.useState(v),ee=H.useRef(de),xe=ee.current===de?$:v;H.useEffect(()=>{if(ee.current!==de){ee.current=de,se(v);return}const Ce=window.setTimeout(()=>se(v),R9);return()=>window.clearTimeout(Ce)},[v,de]);const fe=v===$,ce=H.useMemo(()=>m&&(ee.current!==de||fe)?E9(l.expressPaymentUrl,de,xe):null,[l.expressPaymentUrl,de,xe,m,fe]),he=H.useCallback(Ce=>{a(Ce?`I completed express payment. Show my order confirmation for order ${Ce}.`:"I completed express payment. Show my order confirmation.")},[a]),le=(Ce,We)=>()=>{p(Ze=>{const Pe=!Xl(l.vmat,Ce,We,Ze);return Ce===Ia||Pe?O9(l.vmat,d,Ce,We,Ze):ue(U({},Ze),{[Ce]:We})})},K=()=>{if(u)return;const Ce=u_(l,f);if(!Ce)return;const We=d.map(Ze=>{const Pe=Ze.opts.find(Et=>Et.val===f[Ze.id]);return Pe?{label:Ze.lbl||Ze.id,value:Pe.name||Pe.val}:null}).filter(Ze=>Ze!==null);k(!0),s({productName:l.name,sku:Ce,quantity:v,variants:We})},ae=!m||v-x<T,N=!m||v+x>y,D=Ce=>{var Ze;const We=f[Ce.id];return(Ze=Ce.opts.find(Pe=>Pe.val===We))==null?void 0:Ze.name},J=()=>A(Ce=>Math.max(T,Ce-x)),P=()=>A(Ce=>Math.min(y,Ce+x)),Se=Ce=>_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${Ce.id}`,className:F(t,`${C}-msg-pdp__variant-name`),children:Ce.lbl||Ce.id}),D(Ce)&&_.jsx("span",{className:F(t,`${C}-msg-pdp__variant-value`),children:D(Ce)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ce.id}`,className:F(t,`${C}-msg-pdp__chips`),children:Ce.opts.map(We=>{const Ze=Xl(l.vmat,Ce.id,We.val,f),Pe=f[Ce.id]===We.val;return _.jsxs("label",{className:F(`${C}-msg-pdp__chip`,{selected:Pe,unavailable:!Ze}),children:[_.jsx("input",{type:"radio",name:`variant-${Ce.id}`,value:We.val,checked:Pe,"aria-description":Ze?void 0:"unavailable",onChange:le(Ce.id,We.val),className:`${C}-msg-pdp__radio-input`}),_.jsx("span",{children:We.name||We.val})]},We.val)})})]},Ce.id),Me=Ce=>_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${Ce.id}`,className:F(t,`${C}-msg-pdp__variant-name`),children:Ce.lbl||"Color"}),D(Ce)&&_.jsx("span",{className:F(t,`${C}-msg-pdp__variant-value`),children:D(Ce)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ce.id}`,className:F(t,`${C}-msg-pdp__swatches`),children:Ce.opts.map(We=>{const Ze=Xl(l.vmat,Ce.id,We.val,f),Pe=f[Ce.id]===We.val,Et=k9(l,We.val);return Et?_.jsxs("label",{className:F(`${C}-msg-pdp__swatch`,{selected:Pe,unavailable:!Ze}),children:[_.jsx("input",{type:"radio",name:`variant-${Ce.id}`,value:We.val,checked:Pe,"aria-label":We.name||We.val,"aria-description":Ze?void 0:"unavailable",onChange:le(Ce.id,We.val),className:`${C}-msg-pdp__radio-input`}),_.jsx("img",{className:F(t,`${C}-msg-pdp__swatch-image`),src:Et,alt:We.name||We.val,loading:"lazy"})]},We.val):_.jsxs("label",{className:F(`${C}-msg-pdp__chip`,{selected:Pe,unavailable:!Ze}),children:[_.jsx("input",{type:"radio",name:`variant-${Ce.id}`,value:We.val,checked:Pe,"aria-description":Ze?void 0:"unavailable",onChange:le(Ce.id,We.val),className:`${C}-msg-pdp__radio-input`}),_.jsx("span",{children:We.name||We.val})]},We.val)})})]});return _.jsx("div",{className:F(t,`${C}-msg-pdp`),children:_.jsxs("div",{className:F(t,`${C}-msg-pdp__card`),children:[_.jsx("div",{className:F(t,`${C}-msg-pdp__gallery`),children:_.jsx(v9,{images:Y,altText:l.name,globalClassName:t})}),_.jsxs("div",{className:F(t,`${C}-msg-pdp__content`),children:[l.slugUrl?_.jsx("a",{href:l.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:F(t,`${C}-msg-pdp__title-link`),"aria-label":`Go to product page for ${l.name}`,children:l.name}):_.jsx("p",{className:F(t,`${C}-msg-pdp__title`),children:l.name}),_.jsx(Zh,{globalClassName:t,className:`${C}-msg-pdp__price`,retailPrice:R==null?void 0:R.orig,discountPrice:(R==null?void 0:R.cur)||(R==null?void 0:R.prom),currencyCode:l.ccy,fontSize:"14px"}),l.dscr&&_.jsx("div",{className:F(t,`${C}-msg-pdp__description`),children:_.jsx(fo,{globalClassName:t,text:l.dscr})}),W&&Me(W),ie.map(Se),r&&_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant`),children:[_.jsxs("div",{className:F(t,`${C}-msg-pdp__variant-label`),children:[_.jsx("span",{className:F(t,`${C}-msg-pdp__variant-name`),children:"Quantity"}),_.jsx("span",{className:F(t,`${C}-msg-pdp__variant-value`),children:v})]}),_.jsxs("div",{className:F(t,`${C}-msg-pdp__stepper`),children:[_.jsx(tr,{className:`${C}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:_.jsx(yN,{}),disabled:ae,onClick:J}),_.jsx("span",{className:F(t,`${C}-msg-pdp__quantity`),children:v}),_.jsx(tr,{className:`${C}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:_.jsx(TN,{}),disabled:N,onClick:P})]})]}),r&&_.jsxs("div",{className:F(t,`${C}-msg-pdp__actions`),children:[ce&&_.jsx(s_,{expressPaymentUrl:ce,globalClassName:t,onOrderComplete:he},ce),_.jsx(Yu,{className:`${C}-msg-pdp__add-to-cart`,disabled:!m||u||S,onClick:K,children:S?"Adding...":"Add to cart"})]})]})]})})},D9=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},M9=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:s=!1})=>{const{addToCart:a,loading:u}=cn();if(!e.length)return null;const l=`auto repeat(${e.length}, 1fr)`,d=`${90+e.length*140}px`,f=p=>()=>{u||a({productName:p.name,sku:p.id})};return _.jsx("div",{className:F(n,`${C}-product-comparison`),children:_.jsxs("div",{className:`${C}-product-comparison__grid`,style:{gridTemplateColumns:l,minWidth:d},children:[_.jsxs("div",{className:`${C}-product-comparison__header`,children:[_.jsx("div",{className:`${C}-product-comparison__header-spacer`}),e.map(p=>{var T,y,x,v;const m=D9(p);return _.jsxs("div",{className:F(n,`${C}-product-comparison__product-col`),children:[m&&_.jsx("img",{className:F(n,`${C}-product-comparison__image`),src:m,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?_.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:F(n,`${C}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):_.jsx("span",{className:F(n,`${C}-product-comparison__name`),children:p.name}),_.jsx(Zh,{globalClassName:n,retailPrice:(T=p.pr)==null?void 0:T.orig,discountPrice:(v=(y=p.pr)==null?void 0:y.prom)!=null?v:(x=p.pr)==null?void 0:x.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),_.jsx("div",{className:`${C}-product-comparison__table`,children:t.map(p=>_.jsxs("div",{className:`${C}-product-comparison__row`,children:[_.jsx("div",{className:F(n,`${C}-product-comparison__row-label`),children:p.row_name}),e.map((m,T)=>_.jsx("div",{className:F(n,`${C}-product-comparison__row-value`),children:p.values[T]},`${p.row_name}-${m.id}`))]},p.row_name))}),s&&_.jsxs("div",{className:`${C}-product-comparison__footer`,children:[_.jsx("div",{className:`${C}-product-comparison__footer-spacer`}),e.map(p=>_.jsx("div",{className:F(n,`${C}-product-comparison__footer-cell`),children:_.jsxs(Yu,{className:`${C}-product-comparison__add-to-cart`,disabled:u,onClick:f(p),children:[_.jsx(AN,{size:"14px"}),"Add to cart"]})},`cart-${p.id}`))]})]})})},l_=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:s,loading:a}=cn(),{isCartMgmtSupported:u,logger:l}=at(),{overrides:d,isInitialized:f}=ql(),p=Yl(),m=H.useMemo(()=>e.response.map(T=>{var x,v;if(T.type!=="markdown")return T;const y=dg((v=(x=T.data)==null?void 0:x.content)!=null?v:"");return y&&y.type!=="markdown"?y:T}),[e.response]);return _.jsx(_.Fragment,{children:m.map((T,y)=>{var x,v,A,S,k,I,j,Y,R,W,ie,de,$,se,ee,xe,fe,ce,he,le,K,ae,N,D,J;switch(T.type){case"markdown":{const P=(v=(x=T.data)==null?void 0:x.content)!=null?v:"";return T.index===ji&&fg(P)?null:_.jsx(fo,{text:P,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1},`${T.type}-${(A=T.index)!=null?A:y}`)}case"product_carousel":return _.jsx(d9,{title:(k=(S=T.data)==null?void 0:S.title)!=null?k:"",products:(j=(I=T.data)==null?void 0:I.products)!=null?j:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(Y=T.index)!=null?Y:y}`);case"product_tile":return _.jsx(L9,{product:T.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(R=T.index)!=null?R:y}`);case"product_comparison":return _.jsx(M9,{products:(ie=(W=T.data)==null?void 0:W.products)!=null?ie:[],table:($=(de=T.data)==null?void 0:de.table)!=null?$:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${T.type}-${(se=T.index)!=null?se:y}`);case"cart":{const P=(fe=(xe=(ee=T.data)==null?void 0:ee.cart)==null?void 0:xe.cartSummary)==null?void 0:fe.cartDetails;return P?_.jsx(b9,{cart:P,productsToHighlight:T.data.products_to_highlight,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${T.type}-${(ce=T.index)!=null?ce:y}`):null}case"order_confirmation":{const P=(le=(he=T.data)==null?void 0:he.order)==null?void 0:le.orderDetails;return P?_.jsx(w9,{order:P,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${T.type}-${(K=T.index)!=null?K:y}`):null}case"tool_results":{const P=T.data,Se=T.output_name,Me=f&&Se&&Object.prototype.hasOwnProperty.call(d,Se)?d[Se]:void 0,_e=typeof Me=="string"?Me:void 0;if(!_e||!Se)return l!=null&&l.isDevelopment&&(Se?l.warn(`🦜 tool_results "${Se}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${Se}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(d),payload:P}):l.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:P})),null;const ne={name:Se,payload:P,api:p};return _.jsx(s9,{overrideName:Se,children:_.jsx(Wl,{tagName:_e,props:ne,label:`toolResult:${Se}`})},`${T.type}-${Se}-${(ae=T.index)!=null?ae:y}`)}case"suggestions":return _.jsx("div",{style:{marginTop:"0.5rem"},children:_.jsx(HD,{disabled:a,suggestions:(D=(N=T.data)==null?void 0:N.display_text)!=null?D:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:s})},`${T.type}-${(J=T.index)!=null?J:y}`);default:return null}})})},F9=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=at(),a=H.useMemo(()=>{if(typeof e.content!="string")return null;try{const d=JSON.parse(e.content);if(d&&typeof d=="object"&&Array.isArray(d.response))return d}catch(d){return null}const l=dg(e.content);return l?{response:[l]}:null},[e.content]),u=H.useMemo(()=>{const l="Oops, I had trouble with your request.";if(typeof e.content!="string")return s==null||s.warn("Message content is not richtext format. Showing fallback text.",e.content),l;const d=e.content.trim();try{const f=JSON.parse(d);if(typeof f=="object"&&f!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),f.text||f.message||l}catch(f){if(d.startsWith("{")||d.startsWith("["))return s==null||s.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),l}return e.content||l},[s,e.content]);switch(e.role){case"user":return _.jsx("div",{className:F(t,`${C}-message`,r?"standalone":"embedded"),children:_.jsx("div",{className:F(t,`${C}-user-message`,r?"standalone":"embedded"),children:_.jsxs("div",{className:F(t,`${C}-user-message-row`,r?"standalone":"embedded"),children:[_.jsx("span",{className:F(t,`${C}-message-icon user-message-icon`,r?"standalone":"embedded"),children:_.jsx(CN,{})}),_.jsx("p",{className:F(t,`${C}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return _.jsx("div",{className:F(t,`${C}-message-group`,r?"standalone":"embedded"),children:_.jsx("div",{className:`${C}-message-group-child`,children:a?_.jsx(l_,{content:a,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):_.jsx(fo,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return _.jsx("div",{className:F(t,`${C}-message`,r?"standalone":"embedded"),children:_.jsx("p",{className:F(t,`${C}-reset-message`),children:e.content})})}},B9=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>_.jsxs("div",{className:F(n,`${C}-send-error`,r?"standalone":"embedded"),role:"alert",children:[_.jsx("span",{className:F(n,`${C}-send-error-text`),children:e}),_.jsxs("button",{type:"button",className:F(n,`${C}-retry-button`),onClick:t,children:[_.jsx(LN,{"aria-hidden":"true"})," Retry"]})]}),U9="You are offline or we couldn't reach the assistant. Check connection and try again.",dp=({isWidgetStandalone:e})=>{var se,ee;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=at(),{messages:a,streamingBlocks:u,isAgentTyping:l,loading:d,progressMessage:f,connectionStatus:p,error:m,sendError:T,retryLastMessage:y,retryConnection:x}=cn(),v=H.useRef(null),A=a.filter(xe=>!xe.silent),S=A.length>0,k=u.some(iA),I=A[A.length-1];let j=!1;if(I)try{const xe=JSON.parse(I.content);Array.isArray(xe==null?void 0:xe.response)&&(j=xe.response.some(fe=>fe.type==="suggestions"))}catch(xe){}const Y=S&&(d||l)&&!k&&!j,R=p==="reconnecting"&&!Y,W=p==="error";let ie=null;W?ie={message:m!=null?m:U9,kind:"connection",onRetry:x}:T&&(ie={message:T.message,kind:"send",onRetry:y}),H.useEffect(()=>{var xe;(xe=v.current)==null||xe.scrollIntoView({behavior:"smooth"})},[]),H.useEffect(()=>{var xe;s&&((xe=v.current)==null||xe.scrollIntoView({behavior:"smooth"}))},[a,u,T,m,s]);const de=(se=ie==null?void 0:ie.message)!=null?se:null,$=(ee=ie==null?void 0:ie.kind)!=null?ee:null;return H.useEffect(()=>{de&&(r==null||r.error("Error message shown to user",{message:de,kind:$}))},[de,$,r]),_.jsxs(_.Fragment,{children:[d&&!S&&_.jsx(qD,{globalClassName:t,isWidgetStandalone:e}),A.map(xe=>_.jsx(F9,{message:xe,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},xe.id)),ie&&_.jsx(B9,{message:ie.message,onRetry:ie.onRetry,globalClassName:t,isWidgetStandalone:e}),k&&_.jsxs("div",{className:F(t,`${C}-message-group`,e?"standalone":"embedded"),children:[_.jsx(l_,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(d||l)&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e})]}),Y&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),R&&_.jsx(ep,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),_.jsx("div",{ref:v})]})},H9=()=>_.jsxs("svg",{className:`${C}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),j9=()=>_.jsx("svg",{className:`${C}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("path",{d:"M8 1v3M8 12v3M1 8h3M12 8h3M3.05 3.05l2.12 2.12M10.83 10.83l2.12 2.12M3.05 12.95l2.12-2.12M10.83 5.17l2.12-2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),z9=(e,t)=>e===0?[]:e<0?t:t.slice(-e),fp=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=at(),s=e!=null?e:r,{overrides:a,isInitialized:u}=ql(),l=Yl();if(t.length===0||s===0)return null;const d=z9(s,t),f=u?a.ProgressSteps:void 0;if(f){const p={name:"ProgressSteps",payload:{steps:d},api:l};return _.jsx(Wl,{tagName:f,props:p,label:"ProgressSteps"})}return _.jsx("div",{className:F(n,`${C}-progress-steps-panel`),children:_.jsx("div",{className:`${C}-progress-steps`,children:_.jsx("ul",{className:`${C}-progress-steps-list`,children:d.map((p,m)=>{const T=m<d.length-1,y=m===d.length-1;return _.jsxs("li",{className:F(`${C}-progress-step`,y&&"active"),children:[y&&_.jsx("span",{className:`${C}-progress-step-arc`}),_.jsx("span",{className:`${C}-progress-step-text`,children:p}),_.jsx("span",{className:F(`${C}-progress-step-icon`,T?"done":"active"),children:T?_.jsx(H9,{}):_.jsx(j9,{})})]},`${m}-${p}`)})})})})},c_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=at(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:l,downloadTranscript:d}=cn(),f=s;return _.jsxs("div",{className:F(e,`${C}-container`,`${C}-embedded-chat`),style:t,children:[_.jsx("div",{className:F(e,`${C}-message-container`,`container-${n}`,"embedded"),children:_.jsx(dp,{isWidgetStandalone:!0})}),_.jsx(fp,{steps:l,globalClassName:e}),_.jsx(nh,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:p=>a(p)}),_.jsx("div",{className:F(`${C}-embedded-chat-menu`),children:_.jsxs($5,{componentType:"chat",children:[_.jsx(kb,{componentType:"chat"}),_.jsx(Dy,{componentType:"chat",onClearChat:u}),r&&_.jsx(My,{componentType:"chat",onDownloadTranscript:d})]})})]})},d_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=H.useState((d=e.container)==null?void 0:d.current),a=H.useSyncExternalStore(V9,()=>!1,()=>!0),{getRootNode:u}=Bl();if(H.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const l=r!=null?r:$9(u);return _.jsx(_.Fragment,{children:H.Children.map(t,f=>Ds.createPortal(f,l))})},$9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return es(n)?n:xr(t).body},V9=()=>()=>{},f_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=at(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=ri(),{loading:d,isAgentTyping:f,sendMessage:p,resetConversation:m,progressSteps:T,downloadTranscript:y}=cn(),{isOpen:x}=s||{},v=!!s.isOpen,A=r==="standalone",S=f||d,k=()=>{Br(!1)};return v?_.jsx(bb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:v,children:_.jsx(d_,{children:_.jsx(Xh,{className:F(e,`${C}-container`,`${C}-dialog`,a,u&&"full-height"),style:U(U({},t),l&&{width:l}),children:_.jsxs(Wh,{className:F(e,`${C}-dialog-content`,{standalone:A,embedded:!A}),children:[_.jsx(vb,{componentType:"dialog",onClearChat:m,onClose:k,onDownloadTranscript:y}),_.jsx(Gh,{className:F(e,`${C}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:_.jsx(dp,{isWidgetStandalone:A,isOpen:x})}),_.jsx(fp,{steps:T,globalClassName:e}),_.jsx(nh,{componentType:"dialog",isLoading:S,onSubmit:I=>p(I)})]})})})}):null},h_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=at(),{mode:r,status:s,isModalFullscreen:a}=ri(),{loading:u,isAgentTyping:l,sendMessage:d,resetConversation:f,progressSteps:p,downloadTranscript:m}=cn(),{isOpen:T}=s||{},y=!!s.isOpen,x=r==="standalone",v=l||u,A=({open:k})=>{Br(k)},S=()=>{Br(!1)};return y?_.jsx(bb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:_.jsx(d_,{children:_.jsxs("div",{className:F(e,`${C}-modal-container`),style:t,children:[_.jsx(mb,{className:F(e,`${C}-modal-backdrop`)}),_.jsx(Xh,{className:F(e,`${C}-container`,`${C}-modal`,{fullscreen:a,standalone:x,embedded:!x}),children:_.jsxs(Wh,{className:F(e,`${C}-modal-content`,{standalone:x,embedded:!x}),children:[_.jsx(vb,{componentType:"modal",onClearChat:f,onClose:S,onDownloadTranscript:m}),_.jsx(Gh,{className:F(e,`${C}-message-container`,`container-${n}`,{standalone:x,embedded:!x}),children:_.jsx(dp,{isWidgetStandalone:x,isOpen:T})}),_.jsx(fp,{steps:p,globalClassName:e}),_.jsx(nh,{componentType:"modal",isLoading:v,onSubmit:k=>d(k)})]})})]})})}):null},q9=()=>{const e=ri(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(wN,{}):t==="dialog"?_.jsx(f_,{}):t==="modal"?_.jsx(h_,{}):_.jsx(c_,{})},Y9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=RD();H.useEffect(()=>{const a=u=>{const{property:l,value:d}=u.detail||{};!l||d===void 0||(l==="isOpen"&&e(d),l==="isInline"&&t(d),l==="elementId"&&n(d),l==="entryType"&&r(d),l==="params"&&s(d))};return kD(a),()=>{CD(a)}},[e,t,n,r,s])};function W9({isReady:e,hasError:t,transmit:n}){const r=H.useRef([]),s=H.useRef(e);s.current=e;const a=H.useRef(n);a.current=n;const u=H.useCallback(l=>{s.current?a.current(l):r.current.push(l)},[]);return H.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(d=>a.current(d))}},[e]),H.useEffect(()=>{t&&(r.current=[])},[t]),u}const p_={copilot:"Ask Copilot",messaging:"Ask a question"},G9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=at(),{placeholder:s,isResponseLoading:a}=jl(),u=s||p_[r],[l,d]=H.useState(""),f=t||a,p=m=>{const T=l.trim();T&&(m.preventDefault(),e(T),d(""))};return _.jsxs("form",{className:F(n,`${C}-prompts-input-container`),name:`${C}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${C}-prompts-input`,"aria-label":u,children:_.jsx(Bh,{className:F(n,`${C}-prompts-input-icon`)})}),_.jsx("input",{id:`${C}-prompts-input`,className:F(n,`${C}-prompts-input`),name:`${C}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:m=>d(m.target.value)}),_.jsx(tr,{className:F(n,`${C}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(uf,{}),disabled:f})]})},X9=()=>{const{globalClassName:e,mode:t}=at(),{placeholder:n}=jl(),r=n||p_[t];return _.jsxs("div",{className:F(e,`${C}-prompts-header`),children:[_.jsx(Bh,{className:F(e,`${C}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:F(e,`${C}-prompts-header-text`),children:r})]})},m_=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:s}=at(),a=s==null?void 0:s.icon,u=(l=s==null?void 0:s.iconPosition)!=null?l:"left";return _.jsxs("button",{className:F(r,`${C}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&_.jsx(Nb,{icon:a,className:`${C}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},Q9="Ask me something else",K9=({label:e,disabled:t=!1})=>_.jsx(m_,{label:e||Q9,disabled:t,onClick:()=>Br(!0)}),J9=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),Z9=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=at(),{staticQuestions:r,askElseButtonLabel:s,disableAskElseButton:a}=jl(),u=J9(r);if(u.length===0)return null;const l=d=>()=>{const f=d.trim();f&&e(f)};return _.jsxs("div",{className:F(n,`${C}-prompts-button-group`),children:[u.map(d=>_.jsx(m_,{label:d,disabled:t,onClick:l(d)},d)),!a&&_.jsx(K9,{label:s,disabled:t})]})},eF=()=>{const{globalClassName:e,themeVariables:t}=at(),{isOpen:n,elementId:r,promptsDisplay:s}=jl(),{isConnected:a,sendMessage:u,connectionStatus:l}=cn(),d=s!=="buttons",f=s!=="input",[p,m]=H.useState(null),T=l==="error",y=l==="connecting",x=W9({isReady:a,hasError:T,transmit:u});H.useEffect(()=>{if(!r||p)return;const A=document.getElementById(r);A&&m(A)},[r,p]);const v=H.useCallback(A=>{Br(!0),x(A)},[x]);return!n||!p?null:Ds.createPortal(_.jsxs("div",{className:F(e,`${C}-prompts-extension-container`),style:t,children:[d&&_.jsx(G9,{onSubmit:v,disabled:T}),!d&&_.jsx(X9,{}),f&&_.jsx(Z9,{onPromptClick:v,disabled:T}),!T&&y&&_.jsx("p",{className:F(e,`${C}-prompts-connecting-message`),children:"Connecting to agent..."}),T&&_.jsx("p",{className:F(e,`${C}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),p)},tF=()=>(Y9(),_.jsx(eF,{})),g_=e=>_.jsxs(jg,ue(U({},e),{children:[_.jsx(q9,{}),_.jsx(tF,{})]}));var Ql={},E_;function nF(){if(E_)return Ql;E_=1;var e=Yg();return Ql.createRoot=e.createRoot,Ql.hydrateRoot=e.hydrateRoot,Ql}var rF=nF();const y_=(e,t,n,r)=>{rF.createRoot(e).render(_.jsx(g_,ue(U({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},iF=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=pn(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let l;const d=(p,m)=>{for(const T of p)if(T.type==="childList"&&T.addedNodes.length)for(const y of T.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(Pt(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(l),y_(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),Pt(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},sF=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=pn(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){Pt(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){Pt(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){Pt(!0,"warn","Container element not found for id:",t),Pt(!0,"warn","Beginning observation for element"),iF(U({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}y_(l,s,n,r)};class oF extends HTMLElement{constructor(){super(...arguments);Ge(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const aF={components:{setEntryType:Bg,toggleWidgetOpen:Br,toggleWidgetMinimized:zu,toggleModalFullscreen:nf,setWidgetType:$u,setWidgetDialogPosition:rf,loadPromptsComponent:PD,togglePromptsExtensionOpen:Sb}};De.AgentForceWidget=g_,De.AgentforceWidgetProvider=jg,De.CIMULATE_WIDGET_READY_EVENT=yg,De.MessagingDialog=f_,De.MessagingEmbed=c_,De.MessagingModal=h_,De.MessagingProvider=xg,De.OverrideElement=oF,De.eventHandlers=aF,De.injectMessagingWidget=sF,De.useMessaging=cn,Object.defineProperty(De,Symbol.toStringTag,{value:"Module"})}));