@cimulate/copilot-widget 1.34.0 → 1.34.1

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(Ue,Ge){typeof exports=="object"&&typeof module!="undefined"?Ge(exports):typeof define=="function"&&define.amd?define(["exports"],Ge):(Ue=typeof globalThis!="undefined"?globalThis:Ue||self,Ge(Ue.CimulateMessaging={}))})(this,(function(Ue){"use strict";var aU=Object.defineProperty,uU=Object.defineProperties;var lU=Object.getOwnPropertyDescriptors;var Td=Object.getOwnPropertySymbols;var R2=Object.prototype.hasOwnProperty,L2=Object.prototype.propertyIsEnumerable;var Xo=(Ue,Ge)=>(Ge=Symbol[Ue])?Ge:Symbol.for("Symbol."+Ue),cU=Ue=>{throw TypeError(Ue)},bd=Math.pow,m0=(Ue,Ge,rt)=>Ge in Ue?aU(Ue,Ge,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Ue[Ge]=rt,U=(Ue,Ge)=>{for(var rt in Ge||(Ge={}))R2.call(Ge,rt)&&m0(Ue,rt,Ge[rt]);if(Td)for(var rt of Td(Ge))L2.call(Ge,rt)&&m0(Ue,rt,Ge[rt]);return Ue},ue=(Ue,Ge)=>uU(Ue,lU(Ge));var vn=(Ue,Ge)=>{var rt={};for(var gt in Ue)R2.call(Ue,gt)&&Ge.indexOf(gt)<0&&(rt[gt]=Ue[gt]);if(Ue!=null&&Td)for(var gt of Td(Ue))Ge.indexOf(gt)<0&&L2.call(Ue,gt)&&(rt[gt]=Ue[gt]);return rt};var Je=(Ue,Ge,rt)=>m0(Ue,typeof Ge!="symbol"?Ge+"":Ge,rt);var Fe=(Ue,Ge,rt)=>new Promise((gt,Rt)=>{var wt=xt=>{try{rn(rt.next(xt))}catch(Tn){Rt(Tn)}},ze=xt=>{try{rn(rt.throw(xt))}catch(Tn){Rt(Tn)}},rn=xt=>xt.done?gt(xt.value):Promise.resolve(xt.value).then(wt,ze);rn((rt=rt.apply(Ue,Ge)).next())}),Os=function(Ue,Ge){this[0]=Ue,this[1]=Ge},g0=(Ue,Ge,rt)=>{var gt=(rn,xt,Tn,sr)=>{try{var zi=rt[rn](xt),Is=(xt=zi.value)instanceof Os,Ps=zi.done;Promise.resolve(Is?xt[0]:xt).then(An=>Is?gt(rn==="return"?rn:"next",xt[1]?{done:An.done,value:An.value}:An,Tn,sr):Tn({value:An,done:Ps})).catch(An=>gt("throw",An,Tn,sr))}catch(An){sr(An)}},Rt=(rn,xt,Tn,sr)=>ze[rn]=zi=>(xt=new Promise((Is,Ps,An)=>(An=()=>gt(rn,zi,Is,Ps),wt?wt.then(An):An())),sr=()=>wt===Tn&&(wt=0),wt=Tn=xt.then(sr,sr),xt),wt,ze={};return rt=rt.apply(Ue,Ge),ze[Xo("asyncIterator")]=()=>ze,Rt("next"),Rt("throw"),Rt("return"),ze},E0=Ue=>{var Ge=Ue[Xo("asyncIterator")],rt=!1,gt,Rt={};return Ge==null?(Ge=Ue[Xo("iterator")](),gt=wt=>Rt[wt]=ze=>Ge[wt](ze)):(Ge=Ge.call(Ue),gt=wt=>Rt[wt]=ze=>{if(rt){if(rt=!1,wt==="throw")throw ze;return ze}return rt=!0,{done:!1,value:new Os(new Promise(rn=>{var xt=Ge[wt](ze);xt instanceof Object||cU("Object expected"),rn(xt)}),1)}}),Rt[Xo("iterator")]=()=>Rt,gt("next"),"throw"in Ge?gt("throw"):Rt.throw=wt=>{throw wt},"return"in Ge&&gt("return"),Rt},D2=(Ue,Ge,rt)=>(Ge=Ue[Xo("asyncIterator")])?Ge.call(Ue):(Ue=Ue[Xo("iterator")](),Ge={},rt=(gt,Rt)=>(Rt=Ue[gt])&&(Ge[gt]=wt=>new Promise((ze,rn,xt)=>(wt=Rt.call(Ue,wt),xt=wt.done,Promise.resolve(wt.value).then(Tn=>ze({value:Tn,done:xt}),rn)))),rt("next"),rt("return"),Ge);var Ge=document.createElement("style");Ge.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:var(--cim-widget-border-radius);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-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.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;min-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:var(--cim-widget-border-radius);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.cim-widget-cart-busy{opacity:.7}.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:.875rem;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-embedded-chat .cim-widget-cart-expanded,.cim-widget-modal.standalone .cim-widget-cart-expanded{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-items-section,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-totals,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-total-row,.cim-widget-modal.standalone .cim-widget-cart-expanded .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:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-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:var(--cim-widget-border-radius);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-chip.inactive{opacity:.5}.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:var(--cim-widget-border-radius);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-primary-color, #3182ce);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-primary-color, #3182ce);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-primary-color, #3182ce) 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: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 #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-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-font-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-font-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:var(--cim-widget-border-radius);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:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;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:var(--cim-widget-border-radius);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:var(--cim-widget-border-radius);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(Ge);function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gt={exports:{}},Rt={},wt={exports:{}},ze={};var rn;function xt(){if(rn)return ze;rn=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"),m=Symbol.for("react.lazy"),p=Symbol.iterator;function b(M){return M===null||typeof M!="object"?null:(M=p&&M[p]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function A(M,Z,P){this.props=M,this.context=Z,this.refs=S,this.updater=P||y}A.prototype.isReactComponent={},A.prototype.setState=function(M,Z){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,Z,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function _(){}_.prototype=A.prototype;function C(M,Z,P){this.props=M,this.context=Z,this.refs=S,this.updater=P||y}var O=C.prototype=new _;O.constructor=C,x(O,A.prototype),O.isPureReactComponent=!0;var z=Array.isArray,W=Object.prototype.hasOwnProperty,D={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function K(M,Z,P){var ve,Pe={},he=null,ke=null;if(Z!=null)for(ve in Z.ref!==void 0&&(ke=Z.ref),Z.key!==void 0&&(he=""+Z.key),Z)W.call(Z,ve)&&!V.hasOwnProperty(ve)&&(Pe[ve]=Z[ve]);var Me=arguments.length-2;if(Me===1)Pe.children=P;else if(1<Me){for(var He=Array(Me),nt=0;nt<Me;nt++)He[nt]=arguments[nt+2];Pe.children=He}if(M&&M.defaultProps)for(ve in Me=M.defaultProps,Me)Pe[ve]===void 0&&(Pe[ve]=Me[ve]);return{$$typeof:e,type:M,key:he,ref:ke,props:Pe,_owner:D.current}}function ae(M,Z){return{$$typeof:e,type:M.type,key:Z,ref:M.ref,props:M.props,_owner:M._owner}}function j(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function se(M){var Z={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(P){return Z[P]})}var ie=/\/+/g;function ce(M,Z){return typeof M=="object"&&M!==null&&M.key!=null?se(""+M.key):Z.toString(36)}function fe(M,Z,P,ve,Pe){var he=typeof M;(he==="undefined"||he==="boolean")&&(M=null);var ke=!1;if(M===null)ke=!0;else switch(he){case"string":case"number":ke=!0;break;case"object":switch(M.$$typeof){case e:case t:ke=!0}}if(ke)return ke=M,Pe=Pe(ke),M=ve===""?"."+ce(ke,0):ve,z(Pe)?(P="",M!=null&&(P=M.replace(ie,"$&/")+"/"),fe(Pe,Z,P,"",function(nt){return nt})):Pe!=null&&(j(Pe)&&(Pe=ae(Pe,P+(!Pe.key||ke&&ke.key===Pe.key?"":(""+Pe.key).replace(ie,"$&/")+"/")+M)),Z.push(Pe)),1;if(ke=0,ve=ve===""?".":ve+":",z(M))for(var Me=0;Me<M.length;Me++){he=M[Me];var He=ve+ce(he,Me);ke+=fe(he,Z,P,He,Pe)}else if(He=b(M),typeof He=="function")for(M=He.call(M),Me=0;!(he=M.next()).done;)he=he.value,He=ve+ce(he,Me++),ke+=fe(he,Z,P,He,Pe);else if(he==="object")throw Z=String(M),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return ke}function ne(M,Z,P){if(M==null)return M;var ve=[],Pe=0;return fe(M,ve,"","",function(he){return Z.call(P,he,Pe++)}),ve}function Se(M){if(M._status===-1){var Z=M._result;Z=Z(),Z.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=Z)}if(M._status===1)return M._result.default;throw M._result}var de={current:null},J={transition:null},le={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:J,ReactCurrentOwner:D};function k(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:ne,forEach:function(M,Z,P){ne(M,function(){Z.apply(this,arguments)},P)},count:function(M){var Z=0;return ne(M,function(){Z++}),Z},toArray:function(M){return ne(M,function(Z){return Z})||[]},only:function(M){if(!j(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},ze.Component=A,ze.Fragment=n,ze.Profiler=s,ze.PureComponent=C,ze.StrictMode=r,ze.Suspense=d,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,ze.act=k,ze.cloneElement=function(M,Z,P){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var ve=x({},M.props),Pe=M.key,he=M.ref,ke=M._owner;if(Z!=null){if(Z.ref!==void 0&&(he=Z.ref,ke=D.current),Z.key!==void 0&&(Pe=""+Z.key),M.type&&M.type.defaultProps)var Me=M.type.defaultProps;for(He in Z)W.call(Z,He)&&!V.hasOwnProperty(He)&&(ve[He]=Z[He]===void 0&&Me!==void 0?Me[He]:Z[He])}var He=arguments.length-2;if(He===1)ve.children=P;else if(1<He){Me=Array(He);for(var nt=0;nt<He;nt++)Me[nt]=arguments[nt+2];ve.children=Me}return{$$typeof:e,type:M.type,key:Pe,ref:he,props:ve,_owner:ke}},ze.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},ze.createElement=K,ze.createFactory=function(M){var Z=K.bind(null,M);return Z.type=M,Z},ze.createRef=function(){return{current:null}},ze.forwardRef=function(M){return{$$typeof:l,render:M}},ze.isValidElement=j,ze.lazy=function(M){return{$$typeof:m,_payload:{_status:-1,_result:M},_init:Se}},ze.memo=function(M,Z){return{$$typeof:f,type:M,compare:Z===void 0?null:Z}},ze.startTransition=function(M){var Z=J.transition;J.transition={};try{M()}finally{J.transition=Z}},ze.unstable_act=k,ze.useCallback=function(M,Z){return de.current.useCallback(M,Z)},ze.useContext=function(M){return de.current.useContext(M)},ze.useDebugValue=function(){},ze.useDeferredValue=function(M){return de.current.useDeferredValue(M)},ze.useEffect=function(M,Z){return de.current.useEffect(M,Z)},ze.useId=function(){return de.current.useId()},ze.useImperativeHandle=function(M,Z,P){return de.current.useImperativeHandle(M,Z,P)},ze.useInsertionEffect=function(M,Z){return de.current.useInsertionEffect(M,Z)},ze.useLayoutEffect=function(M,Z){return de.current.useLayoutEffect(M,Z)},ze.useMemo=function(M,Z){return de.current.useMemo(M,Z)},ze.useReducer=function(M,Z,P){return de.current.useReducer(M,Z,P)},ze.useRef=function(M){return de.current.useRef(M)},ze.useState=function(M){return de.current.useState(M)},ze.useSyncExternalStore=function(M,Z,P){return de.current.useSyncExternalStore(M,Z,P)},ze.useTransition=function(){return de.current.useTransition()},ze.version="18.3.1",ze}var Tn;function sr(){return Tn||(Tn=1,wt.exports=xt()),wt.exports}var zi;function Is(){if(zi)return Rt;zi=1;var e=sr(),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 m,p={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(m in d)r.call(d,m)&&!a.hasOwnProperty(m)&&(p[m]=d[m]);if(l&&l.defaultProps)for(m in d=l.defaultProps,d)p[m]===void 0&&(p[m]=d[m]);return{$$typeof:t,type:l,key:b,ref:y,props:p,_owner:s.current}}return Rt.Fragment=n,Rt.jsx=u,Rt.jsxs=u,Rt}var Ps;function An(){return Ps||(Ps=1,gt.exports=Is()),gt.exports}var w=An(),R=sr();const $i=rt(R),xr=Object.create(null);xr.open="0",xr.close="1",xr.ping="2",xr.pong="3",xr.message="4",xr.upgrade="5",xr.noop="6";const Nu=Object.create(null);Object.keys(xr).forEach(e=>{Nu[xr[e]]=e});const wd={type:"error",data:"parser error"},y0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",T0=typeof ArrayBuffer=="function",b0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,xd=({type:e,data:t},n,r)=>y0&&t instanceof Blob?n?r(t):w0(t,r):T0&&(t instanceof ArrayBuffer||b0(t))?n?r(t):w0(new Blob([t]),r):r(xr[e]+(t||"")),w0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function x0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let _d;function U2(e,t){if(y0&&e.data instanceof Blob)return e.data.arrayBuffer().then(x0).then(t);if(T0&&(e.data instanceof ArrayBuffer||b0(e.data)))return t(x0(e.data));xd(e,!1,n=>{_d||(_d=new TextEncoder),t(_d.encode(n))})}const _0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ko=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<_0.length;e++)Ko[_0.charCodeAt(e)]=e;const H2=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),m=new Uint8Array(f);for(r=0;r<n;r+=4)a=Ko[e.charCodeAt(r)],u=Ko[e.charCodeAt(r+1)],l=Ko[e.charCodeAt(r+2)],d=Ko[e.charCodeAt(r+3)],m[s++]=a<<2|u>>4,m[s++]=(u&15)<<4|l>>2,m[s++]=(l&3)<<6|d&63;return f},j2=typeof ArrayBuffer=="function",Sd=(e,t)=>{if(typeof e!="string")return{type:"message",data:S0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:z2(e.substring(1),t)}:Nu[n]?e.length>1?{type:Nu[n],data:e.substring(1)}:{type:Nu[n]}:wd},z2=(e,t)=>{if(j2){const n=H2(e);return S0(n,t)}else return{base64:!0,data:e}},S0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,v0="",$2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{xd(a,!1,l=>{r[u]=l,++s===n&&t(r.join(v0))})})},V2=(e,t)=>{const n=e.split(v0),r=[];for(let s=0;s<n.length;s++){const a=Sd(n[s],t);if(r.push(a),a.type==="error")break}return r};function q2(){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 vd;function Ou(e){return e.reduce((t,n)=>t+n.length,0)}function Iu(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 Y2(e,t){vd||(vd=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(Ou(n)<1)break;const d=Iu(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(Ou(n)<2)break;const d=Iu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Ou(n)<8)break;const d=Iu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),m=f.getUint32(0);if(m>Math.pow(2,21)-1){l.enqueue(wd);break}s=m*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Ou(n)<s)break;const d=Iu(n,s);l.enqueue(Sd(a?d:vd.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(wd);break}}}})}const A0=4;function jt(e){if(e)return W2(e)}function W2(e){for(var t in jt.prototype)e[t]=jt.prototype[t];return e}jt.prototype.on=jt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},jt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},jt.prototype.off=jt.prototype.removeListener=jt.prototype.removeAllListeners=jt.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},jt.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},jt.prototype.emitReserved=jt.prototype.emit,jt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},jt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Pu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Gn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),G2="arraybuffer";function dU(){}function k0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const X2=Gn.setTimeout,K2=Gn.clearTimeout;function Ru(e,t){t.useNativeTimers?(e.setTimeoutFn=X2.bind(Gn),e.clearTimeoutFn=K2.bind(Gn)):(e.setTimeoutFn=Gn.setTimeout.bind(Gn),e.clearTimeoutFn=Gn.clearTimeout.bind(Gn))}const Q2=1.33;function J2(e){return typeof e=="string"?Z2(e):Math.ceil((e.byteLength||e.size)*Q2)}function Z2(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 C0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function eS(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function tS(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 nS extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Ad extends jt{constructor(t){super(),this.writable=!1,Ru(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 nS(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=Sd(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=eS(t);return n.length?"?"+n:""}}class rS extends Ad{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)};V2(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,$2(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]=C0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let N0=!1;try{N0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const iS=N0;function sS(){}class oS extends rS{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 _r extends jt{constructor(t,n,r){super(),this.createRequest=t,Ru(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=k0(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=_r.requestsCount++,_r.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=sS,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete _r.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(_r.requestsCount=0,_r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",O0);else if(typeof addEventListener=="function"){const e="onpagehide"in Gn?"pagehide":"unload";addEventListener(e,O0,!1)}}function O0(){for(let e in _r.requests)_r.requests.hasOwnProperty(e)&&_r.requests[e].abort()}const aS=(function(){const e=I0({xdomain:!1});return e&&e.responseType!==null})();class uS extends oS{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=aS&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _r(I0,this.uri(),t)}}function I0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||iS))return new XMLHttpRequest}catch(n){}if(!t)try{return new Gn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const P0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class lS extends Ad{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=P0?{}:k0(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;xd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Pu(()=>{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]=C0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const kd=Gn.WebSocket||Gn.MozWebSocket;class cS extends lS{createSocket(t,n,r){return P0?new kd(t,n,r):n?new kd(t,n):new kd(t)}doWrite(t,n){this.ws.send(n)}}class dS extends Ad{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=Y2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=q2();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&&Pu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const fS={websocket:cS,webtransport:dS,polling:uS},hS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pS=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Cd(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=hS.exec(e||""),a={},u=14;for(;u--;)a[pS[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=mS(a,a.path),a.queryKey=gS(a,a.query),a}function mS(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 gS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Nd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Lu=[];Nd&&addEventListener("offline",()=>{Lu.forEach(e=>e())},!1);class ai extends jt{constructor(t,n){if(super(),this.binaryType=G2,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=Cd(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=Cd(n.host).host);Ru(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=tS(this.opts.query)),Nd&&(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"})},Lu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=A0,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&&ai.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",ai.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+=J2(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,Pu(()=>{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(ai.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(),Nd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Lu.indexOf(this._offlineEventListener);r!==-1&&Lu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ai.protocol=A0;class ES extends ai{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;ai.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ai.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(m(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,m(),n.close(),n=null)}const u=p=>{const b=new Error("probe error: "+p);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function l(){u("transport closed")}function d(){u("socket closed")}function f(p){n&&p.name!==n.name&&a()}const m=()=>{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 yS=class extends ES{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=>fS[a]).filter(a=>!!a)),super(r?s:t,s)}};function TS(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=Cd(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 bS=typeof ArrayBuffer=="function",wS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,R0=Object.prototype.toString,xS=typeof Blob=="function"||typeof Blob!="undefined"&&R0.call(Blob)==="[object BlobConstructor]",_S=typeof File=="function"||typeof File!="undefined"&&R0.call(File)==="[object FileConstructor]";function Od(e){return bS&&(e instanceof ArrayBuffer||wS(e))||xS&&e instanceof Blob||_S&&e instanceof File}function Du(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Du(e[n]))return!0;return!1}if(Od(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Du(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Du(e[n]))return!0;return!1}function SS(e){const t=[],n=e.data,r=e;return r.data=Mu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Mu(e,t,n){if(!e)return e;if(Od(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]=Mu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Mu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Mu(e[s],t));return r}return e}function vS(e,t){return e.data=Id(e.data,t),delete e.attachments,e}function Id(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]=Id(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Id(e[n],t));return e}const AS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var st;(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"})(st||(st={}));class kS{constructor(t){this.replacer=t}encode(t){return(t.type===st.EVENT||t.type===st.ACK)&&Du(t)?this.encodeAsBinary({type:t.type===st.EVENT?st.BINARY_EVENT:st.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===st.BINARY_EVENT||t.type===st.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=SS(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Pd extends jt{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===st.BINARY_EVENT;r||n.type===st.BINARY_ACK?(n.type=r?st.EVENT:st.ACK,this.reconstructor=new CS(n)):super.emitReserved("decoded",n)}else if(Od(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(st[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===st.BINARY_EVENT||r.type===st.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(!NS(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(Pd.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 st.CONNECT:return L0(n);case st.DISCONNECT:return n===void 0;case st.CONNECT_ERROR:return typeof n=="string"||L0(n);case st.EVENT:case st.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&AS.indexOf(n[0])===-1);case st.ACK:case st.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class CS{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=vS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const NS=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function L0(e){return Object.prototype.toString.call(e)==="[object Object]"}const OS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Pd,Encoder:kS,get PacketType(){return st}},Symbol.toStringTag,{value:"Module"}));function or(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const IS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class D0 extends jt{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=[or(t,"open",this.onopen.bind(this)),or(t,"packet",this.onpacket.bind(this)),or(t,"error",this.onerror.bind(this)),or(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(IS.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:st.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,p=n.pop();this._registerAckCallback(m,p),u.id=m}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:st.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 st.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 st.EVENT:case st.BINARY_EVENT:this.onevent(t);break;case st.ACK:case st.BINARY_ACK:this.onack(t);break;case st.DISCONNECT:this.ondisconnect();break;case st.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:st.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:st.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 Rs(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}Rs.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},Rs.prototype.reset=function(){this.attempts=0},Rs.prototype.setMin=function(e){this.ms=e},Rs.prototype.setMax=function(e){this.max=e},Rs.prototype.setJitter=function(e){this.jitter=e};class Rd extends jt{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,Ru(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 Rs({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||OS;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 yS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=or(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=or(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(or(t,"ping",this.onping.bind(this)),or(t,"data",this.ondata.bind(this)),or(t,"error",this.onerror.bind(this)),or(t,"close",this.onclose.bind(this)),or(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){Pu(()=>{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 D0(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 Qo={};function Ld(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=TS(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Qo[s]&&a in Qo[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new Rd(r,t):(Qo[s]||(Qo[s]=new Rd(r,t)),d=Qo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Ld,{Manager:Rd,Socket:D0,io:Ld,connect:Ld});const M0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&M0.call(Blob),typeof File=="function"||typeof File!="undefined"&&M0.call(File);var F0;(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"})(F0||(F0={}));const Dd="cimulate",Md=`${Dd}:pdp-update`,Fd=`${Dd}:ui-state-update`,Bd=`${Dd}:prompts-state-update`,PS=e=>{window.addEventListener(Md,e)},RS=e=>{window.removeEventListener(Md,e)},LS=(e,t,n)=>{const r=new CustomEvent(Md,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class DS{constructor(){Je(this,"initialParams",{productId:"",productName:"",pdpLink:""});Je(this,"proxy");Je(this,"_fullGet",(t,n)=>Reflect.get(t,n));Je(this,"_fullSet",(t,n,r)=>(LS(n,r),Reflect.set(t,n,r)));Je(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const Jo=new DS,B0=["ask_cim","search","browse","pdp"],U0=e=>B0.includes(e),H0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(H0)),new Map(Object.entries(H0).map(([e,t])=>[t,e]));const _t=(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 MS{constructor(t=!1){Je(this,"isDevelopment");Je(this,"_log",(t,n,...r)=>{_t(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 FS=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!U0(e.type)){_t(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&_t(n,"warn",`initialEntry.type "${e.type}" conflicts with the deprecated entryType "${t}". entryType wins for the UI entry type; initialEntry params are still seeded. Prefer initialEntry on its own.`),e.type==="pdp"){if(!((r=e.params)!=null&&r.productId)){_t(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}Jo.updateProxy(e.params);return}_t(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}};let BS=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 US{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 Fe(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 Fe(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(Ue,Ge){typeof exports=="object"&&typeof module!="undefined"?Ge(exports):typeof define=="function"&&define.amd?define(["exports"],Ge):(Ue=typeof globalThis!="undefined"?globalThis:Ue||self,Ge(Ue.CimulateMessaging={}))})(this,(function(Ue){"use strict";var lU=Object.defineProperty,cU=Object.defineProperties;var dU=Object.getOwnPropertyDescriptors;var Td=Object.getOwnPropertySymbols;var R2=Object.prototype.hasOwnProperty,L2=Object.prototype.propertyIsEnumerable;var Xo=(Ue,Ge)=>(Ge=Symbol[Ue])?Ge:Symbol.for("Symbol."+Ue),fU=Ue=>{throw TypeError(Ue)},bd=Math.pow,m0=(Ue,Ge,rt)=>Ge in Ue?lU(Ue,Ge,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Ue[Ge]=rt,H=(Ue,Ge)=>{for(var rt in Ge||(Ge={}))R2.call(Ge,rt)&&m0(Ue,rt,Ge[rt]);if(Td)for(var rt of Td(Ge))L2.call(Ge,rt)&&m0(Ue,rt,Ge[rt]);return Ue},oe=(Ue,Ge)=>cU(Ue,dU(Ge));var vn=(Ue,Ge)=>{var rt={};for(var gt in Ue)R2.call(Ue,gt)&&Ge.indexOf(gt)<0&&(rt[gt]=Ue[gt]);if(Ue!=null&&Td)for(var gt of Td(Ue))Ge.indexOf(gt)<0&&L2.call(Ue,gt)&&(rt[gt]=Ue[gt]);return rt};var Je=(Ue,Ge,rt)=>m0(Ue,typeof Ge!="symbol"?Ge+"":Ge,rt);var Fe=(Ue,Ge,rt)=>new Promise((gt,Rt)=>{var wt=xt=>{try{rn(rt.next(xt))}catch(Tn){Rt(Tn)}},ze=xt=>{try{rn(rt.throw(xt))}catch(Tn){Rt(Tn)}},rn=xt=>xt.done?gt(xt.value):Promise.resolve(xt.value).then(wt,ze);rn((rt=rt.apply(Ue,Ge)).next())}),Os=function(Ue,Ge){this[0]=Ue,this[1]=Ge},g0=(Ue,Ge,rt)=>{var gt=(rn,xt,Tn,sr)=>{try{var zi=rt[rn](xt),Is=(xt=zi.value)instanceof Os,Ps=zi.done;Promise.resolve(Is?xt[0]:xt).then(An=>Is?gt(rn==="return"?rn:"next",xt[1]?{done:An.done,value:An.value}:An,Tn,sr):Tn({value:An,done:Ps})).catch(An=>gt("throw",An,Tn,sr))}catch(An){sr(An)}},Rt=(rn,xt,Tn,sr)=>ze[rn]=zi=>(xt=new Promise((Is,Ps,An)=>(An=()=>gt(rn,zi,Is,Ps),wt?wt.then(An):An())),sr=()=>wt===Tn&&(wt=0),wt=Tn=xt.then(sr,sr),xt),wt,ze={};return rt=rt.apply(Ue,Ge),ze[Xo("asyncIterator")]=()=>ze,Rt("next"),Rt("throw"),Rt("return"),ze},E0=Ue=>{var Ge=Ue[Xo("asyncIterator")],rt=!1,gt,Rt={};return Ge==null?(Ge=Ue[Xo("iterator")](),gt=wt=>Rt[wt]=ze=>Ge[wt](ze)):(Ge=Ge.call(Ue),gt=wt=>Rt[wt]=ze=>{if(rt){if(rt=!1,wt==="throw")throw ze;return ze}return rt=!0,{done:!1,value:new Os(new Promise(rn=>{var xt=Ge[wt](ze);xt instanceof Object||fU("Object expected"),rn(xt)}),1)}}),Rt[Xo("iterator")]=()=>Rt,gt("next"),"throw"in Ge?gt("throw"):Rt.throw=wt=>{throw wt},"return"in Ge&&gt("return"),Rt},D2=(Ue,Ge,rt)=>(Ge=Ue[Xo("asyncIterator")])?Ge.call(Ue):(Ue=Ue[Xo("iterator")](),Ge={},rt=(gt,Rt)=>(Rt=Ue[gt])&&(Ge[gt]=wt=>new Promise((ze,rn,xt)=>(wt=Rt.call(Ue,wt),xt=wt.done,Promise.resolve(wt.value).then(Tn=>ze({value:Tn,done:xt}),rn)))),rt("next"),rt("return"),Ge);var Ge=document.createElement("style");Ge.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:var(--cim-widget-border-radius);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-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.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;min-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:var(--cim-widget-border-radius);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.cim-widget-cart-busy{opacity:.7}.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:.875rem;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-embedded-chat .cim-widget-cart-expanded,.cim-widget-modal.standalone .cim-widget-cart-expanded{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-items-section,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-totals,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-total-row,.cim-widget-modal.standalone .cim-widget-cart-expanded .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:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-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:var(--cim-widget-border-radius);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-chip.inactive{opacity:.5}.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:var(--cim-widget-border-radius);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-primary-color, #3182ce);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-primary-color, #3182ce);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-primary-color, #3182ce) 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: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 #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-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-font-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-font-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:var(--cim-widget-border-radius);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:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;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:var(--cim-widget-border-radius);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:var(--cim-widget-border-radius);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(Ge);function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gt={exports:{}},Rt={},wt={exports:{}},ze={};var rn;function xt(){if(rn)return ze;rn=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"),m=Symbol.for("react.lazy"),p=Symbol.iterator;function b(M){return M===null||typeof M!="object"?null:(M=p&&M[p]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function A(M,Z,P){this.props=M,this.context=Z,this.refs=S,this.updater=P||y}A.prototype.isReactComponent={},A.prototype.setState=function(M,Z){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,Z,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function _(){}_.prototype=A.prototype;function k(M,Z,P){this.props=M,this.context=Z,this.refs=S,this.updater=P||y}var O=k.prototype=new _;O.constructor=k,x(O,A.prototype),O.isPureReactComponent=!0;var z=Array.isArray,W=Object.prototype.hasOwnProperty,D={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function J(M,Z,P){var ve,Pe={},he=null,Ce=null;if(Z!=null)for(ve in Z.ref!==void 0&&(Ce=Z.ref),Z.key!==void 0&&(he=""+Z.key),Z)W.call(Z,ve)&&!V.hasOwnProperty(ve)&&(Pe[ve]=Z[ve]);var Me=arguments.length-2;if(Me===1)Pe.children=P;else if(1<Me){for(var He=Array(Me),nt=0;nt<Me;nt++)He[nt]=arguments[nt+2];Pe.children=He}if(M&&M.defaultProps)for(ve in Me=M.defaultProps,Me)Pe[ve]===void 0&&(Pe[ve]=Me[ve]);return{$$typeof:e,type:M,key:he,ref:Ce,props:Pe,_owner:D.current}}function ce(M,Z){return{$$typeof:e,type:M.type,key:Z,ref:M.ref,props:M.props,_owner:M._owner}}function U(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function ie(M){var Z={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(P){return Z[P]})}var se=/\/+/g;function ue(M,Z){return typeof M=="object"&&M!==null&&M.key!=null?ie(""+M.key):Z.toString(36)}function fe(M,Z,P,ve,Pe){var he=typeof M;(he==="undefined"||he==="boolean")&&(M=null);var Ce=!1;if(M===null)Ce=!0;else switch(he){case"string":case"number":Ce=!0;break;case"object":switch(M.$$typeof){case e:case t:Ce=!0}}if(Ce)return Ce=M,Pe=Pe(Ce),M=ve===""?"."+ue(Ce,0):ve,z(Pe)?(P="",M!=null&&(P=M.replace(se,"$&/")+"/"),fe(Pe,Z,P,"",function(nt){return nt})):Pe!=null&&(U(Pe)&&(Pe=ce(Pe,P+(!Pe.key||Ce&&Ce.key===Pe.key?"":(""+Pe.key).replace(se,"$&/")+"/")+M)),Z.push(Pe)),1;if(Ce=0,ve=ve===""?".":ve+":",z(M))for(var Me=0;Me<M.length;Me++){he=M[Me];var He=ve+ue(he,Me);Ce+=fe(he,Z,P,He,Pe)}else if(He=b(M),typeof He=="function")for(M=He.call(M),Me=0;!(he=M.next()).done;)he=he.value,He=ve+ue(he,Me++),Ce+=fe(he,Z,P,He,Pe);else if(he==="object")throw Z=String(M),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return Ce}function ne(M,Z,P){if(M==null)return M;var ve=[],Pe=0;return fe(M,ve,"","",function(he){return Z.call(P,he,Pe++)}),ve}function Se(M){if(M._status===-1){var Z=M._result;Z=Z(),Z.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=Z)}if(M._status===1)return M._result.default;throw M._result}var de={current:null},Q={transition:null},le={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:Q,ReactCurrentOwner:D};function C(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:ne,forEach:function(M,Z,P){ne(M,function(){Z.apply(this,arguments)},P)},count:function(M){var Z=0;return ne(M,function(){Z++}),Z},toArray:function(M){return ne(M,function(Z){return Z})||[]},only:function(M){if(!U(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},ze.Component=A,ze.Fragment=n,ze.Profiler=s,ze.PureComponent=k,ze.StrictMode=r,ze.Suspense=d,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,ze.act=C,ze.cloneElement=function(M,Z,P){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var ve=x({},M.props),Pe=M.key,he=M.ref,Ce=M._owner;if(Z!=null){if(Z.ref!==void 0&&(he=Z.ref,Ce=D.current),Z.key!==void 0&&(Pe=""+Z.key),M.type&&M.type.defaultProps)var Me=M.type.defaultProps;for(He in Z)W.call(Z,He)&&!V.hasOwnProperty(He)&&(ve[He]=Z[He]===void 0&&Me!==void 0?Me[He]:Z[He])}var He=arguments.length-2;if(He===1)ve.children=P;else if(1<He){Me=Array(He);for(var nt=0;nt<He;nt++)Me[nt]=arguments[nt+2];ve.children=Me}return{$$typeof:e,type:M.type,key:Pe,ref:he,props:ve,_owner:Ce}},ze.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},ze.createElement=J,ze.createFactory=function(M){var Z=J.bind(null,M);return Z.type=M,Z},ze.createRef=function(){return{current:null}},ze.forwardRef=function(M){return{$$typeof:l,render:M}},ze.isValidElement=U,ze.lazy=function(M){return{$$typeof:m,_payload:{_status:-1,_result:M},_init:Se}},ze.memo=function(M,Z){return{$$typeof:f,type:M,compare:Z===void 0?null:Z}},ze.startTransition=function(M){var Z=Q.transition;Q.transition={};try{M()}finally{Q.transition=Z}},ze.unstable_act=C,ze.useCallback=function(M,Z){return de.current.useCallback(M,Z)},ze.useContext=function(M){return de.current.useContext(M)},ze.useDebugValue=function(){},ze.useDeferredValue=function(M){return de.current.useDeferredValue(M)},ze.useEffect=function(M,Z){return de.current.useEffect(M,Z)},ze.useId=function(){return de.current.useId()},ze.useImperativeHandle=function(M,Z,P){return de.current.useImperativeHandle(M,Z,P)},ze.useInsertionEffect=function(M,Z){return de.current.useInsertionEffect(M,Z)},ze.useLayoutEffect=function(M,Z){return de.current.useLayoutEffect(M,Z)},ze.useMemo=function(M,Z){return de.current.useMemo(M,Z)},ze.useReducer=function(M,Z,P){return de.current.useReducer(M,Z,P)},ze.useRef=function(M){return de.current.useRef(M)},ze.useState=function(M){return de.current.useState(M)},ze.useSyncExternalStore=function(M,Z,P){return de.current.useSyncExternalStore(M,Z,P)},ze.useTransition=function(){return de.current.useTransition()},ze.version="18.3.1",ze}var Tn;function sr(){return Tn||(Tn=1,wt.exports=xt()),wt.exports}var zi;function Is(){if(zi)return Rt;zi=1;var e=sr(),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 m,p={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(m in d)r.call(d,m)&&!a.hasOwnProperty(m)&&(p[m]=d[m]);if(l&&l.defaultProps)for(m in d=l.defaultProps,d)p[m]===void 0&&(p[m]=d[m]);return{$$typeof:t,type:l,key:b,ref:y,props:p,_owner:s.current}}return Rt.Fragment=n,Rt.jsx=u,Rt.jsxs=u,Rt}var Ps;function An(){return Ps||(Ps=1,gt.exports=Is()),gt.exports}var w=An(),R=sr();const $i=rt(R),xr=Object.create(null);xr.open="0",xr.close="1",xr.ping="2",xr.pong="3",xr.message="4",xr.upgrade="5",xr.noop="6";const ku=Object.create(null);Object.keys(xr).forEach(e=>{ku[xr[e]]=e});const wd={type:"error",data:"parser error"},y0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",T0=typeof ArrayBuffer=="function",b0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,xd=({type:e,data:t},n,r)=>y0&&t instanceof Blob?n?r(t):w0(t,r):T0&&(t instanceof ArrayBuffer||b0(t))?n?r(t):w0(new Blob([t]),r):r(xr[e]+(t||"")),w0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function x0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let _d;function U2(e,t){if(y0&&e.data instanceof Blob)return e.data.arrayBuffer().then(x0).then(t);if(T0&&(e.data instanceof ArrayBuffer||b0(e.data)))return t(x0(e.data));xd(e,!1,n=>{_d||(_d=new TextEncoder),t(_d.encode(n))})}const _0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ko=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<_0.length;e++)Ko[_0.charCodeAt(e)]=e;const H2=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),m=new Uint8Array(f);for(r=0;r<n;r+=4)a=Ko[e.charCodeAt(r)],u=Ko[e.charCodeAt(r+1)],l=Ko[e.charCodeAt(r+2)],d=Ko[e.charCodeAt(r+3)],m[s++]=a<<2|u>>4,m[s++]=(u&15)<<4|l>>2,m[s++]=(l&3)<<6|d&63;return f},j2=typeof ArrayBuffer=="function",Sd=(e,t)=>{if(typeof e!="string")return{type:"message",data:S0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:z2(e.substring(1),t)}:ku[n]?e.length>1?{type:ku[n],data:e.substring(1)}:{type:ku[n]}:wd},z2=(e,t)=>{if(j2){const n=H2(e);return S0(n,t)}else return{base64:!0,data:e}},S0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,v0="",$2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{xd(a,!1,l=>{r[u]=l,++s===n&&t(r.join(v0))})})},V2=(e,t)=>{const n=e.split(v0),r=[];for(let s=0;s<n.length;s++){const a=Sd(n[s],t);if(r.push(a),a.type==="error")break}return r};function q2(){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 vd;function Nu(e){return e.reduce((t,n)=>t+n.length,0)}function Ou(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 Y2(e,t){vd||(vd=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(Nu(n)<1)break;const d=Ou(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(Nu(n)<2)break;const d=Ou(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Nu(n)<8)break;const d=Ou(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),m=f.getUint32(0);if(m>Math.pow(2,21)-1){l.enqueue(wd);break}s=m*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Nu(n)<s)break;const d=Ou(n,s);l.enqueue(Sd(a?d:vd.decode(d),t)),r=0}if(s===0||s>e){l.enqueue(wd);break}}}})}const A0=4;function jt(e){if(e)return W2(e)}function W2(e){for(var t in jt.prototype)e[t]=jt.prototype[t];return e}jt.prototype.on=jt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},jt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},jt.prototype.off=jt.prototype.removeListener=jt.prototype.removeAllListeners=jt.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},jt.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},jt.prototype.emitReserved=jt.prototype.emit,jt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},jt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Iu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Gn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),G2="arraybuffer";function hU(){}function C0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const X2=Gn.setTimeout,K2=Gn.clearTimeout;function Pu(e,t){t.useNativeTimers?(e.setTimeoutFn=X2.bind(Gn),e.clearTimeoutFn=K2.bind(Gn)):(e.setTimeoutFn=Gn.setTimeout.bind(Gn),e.clearTimeoutFn=Gn.clearTimeout.bind(Gn))}const Q2=1.33;function J2(e){return typeof e=="string"?Z2(e):Math.ceil((e.byteLength||e.size)*Q2)}function Z2(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 k0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function eS(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function tS(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 nS extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Ad extends jt{constructor(t){super(),this.writable=!1,Pu(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 nS(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=Sd(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=eS(t);return n.length?"?"+n:""}}class rS extends Ad{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)};V2(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,$2(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]=k0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let N0=!1;try{N0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const iS=N0;function sS(){}class oS extends rS{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 _r extends jt{constructor(t,n,r){super(),this.createRequest=t,Pu(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=_r.requestsCount++,_r.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=sS,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete _r.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(_r.requestsCount=0,_r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",O0);else if(typeof addEventListener=="function"){const e="onpagehide"in Gn?"pagehide":"unload";addEventListener(e,O0,!1)}}function O0(){for(let e in _r.requests)_r.requests.hasOwnProperty(e)&&_r.requests[e].abort()}const aS=(function(){const e=I0({xdomain:!1});return e&&e.responseType!==null})();class uS extends oS{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=aS&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _r(I0,this.uri(),t)}}function I0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||iS))return new XMLHttpRequest}catch(n){}if(!t)try{return new Gn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const P0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class lS extends Ad{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=P0?{}: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;xd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Iu(()=>{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]=k0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Cd=Gn.WebSocket||Gn.MozWebSocket;class cS extends lS{createSocket(t,n,r){return P0?new Cd(t,n,r):n?new Cd(t,n):new Cd(t)}doWrite(t,n){this.ws.send(n)}}class dS extends Ad{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=Y2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=q2();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&&Iu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const fS={websocket:cS,webtransport:dS,polling:uS},hS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pS=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function kd(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=hS.exec(e||""),a={},u=14;for(;u--;)a[pS[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=mS(a,a.path),a.queryKey=gS(a,a.query),a}function mS(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 gS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Nd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ru=[];Nd&&addEventListener("offline",()=>{Ru.forEach(e=>e())},!1);class ai extends jt{constructor(t,n){if(super(),this.binaryType=G2,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=kd(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=kd(n.host).host);Pu(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=tS(this.opts.query)),Nd&&(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"})},Ru.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=A0,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&&ai.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",ai.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+=J2(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,Iu(()=>{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(ai.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(),Nd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ru.indexOf(this._offlineEventListener);r!==-1&&Ru.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ai.protocol=A0;class ES extends ai{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;ai.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ai.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(m(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,m(),n.close(),n=null)}const u=p=>{const b=new Error("probe error: "+p);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function l(){u("transport closed")}function d(){u("socket closed")}function f(p){n&&p.name!==n.name&&a()}const m=()=>{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 yS=class extends ES{constructor(t,n={}){const r=typeof t=="object",s=r?H({},t):H({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>fS[a]).filter(a=>!!a)),super(r?s:t,s)}};function TS(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=kd(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 bS=typeof ArrayBuffer=="function",wS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,R0=Object.prototype.toString,xS=typeof Blob=="function"||typeof Blob!="undefined"&&R0.call(Blob)==="[object BlobConstructor]",_S=typeof File=="function"||typeof File!="undefined"&&R0.call(File)==="[object FileConstructor]";function Od(e){return bS&&(e instanceof ArrayBuffer||wS(e))||xS&&e instanceof Blob||_S&&e instanceof File}function Lu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Lu(e[n]))return!0;return!1}if(Od(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Lu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Lu(e[n]))return!0;return!1}function SS(e){const t=[],n=e.data,r=e;return r.data=Du(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Du(e,t,n){if(!e)return e;if(Od(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]=Du(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Du(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Du(e[s],t));return r}return e}function vS(e,t){return e.data=Id(e.data,t),delete e.attachments,e}function Id(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]=Id(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Id(e[n],t));return e}const AS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var st;(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"})(st||(st={}));class CS{constructor(t){this.replacer=t}encode(t){return(t.type===st.EVENT||t.type===st.ACK)&&Lu(t)?this.encodeAsBinary({type:t.type===st.EVENT?st.BINARY_EVENT:st.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===st.BINARY_EVENT||t.type===st.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=SS(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Pd extends jt{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===st.BINARY_EVENT;r||n.type===st.BINARY_ACK?(n.type=r?st.EVENT:st.ACK,this.reconstructor=new kS(n)):super.emitReserved("decoded",n)}else if(Od(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(st[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===st.BINARY_EVENT||r.type===st.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(!NS(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(Pd.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 st.CONNECT:return L0(n);case st.DISCONNECT:return n===void 0;case st.CONNECT_ERROR:return typeof n=="string"||L0(n);case st.EVENT:case st.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&AS.indexOf(n[0])===-1);case st.ACK:case st.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class kS{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=vS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const NS=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function L0(e){return Object.prototype.toString.call(e)==="[object Object]"}const OS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Pd,Encoder:CS,get PacketType(){return st}},Symbol.toStringTag,{value:"Module"}));function or(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const IS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class D0 extends jt{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=[or(t,"open",this.onopen.bind(this)),or(t,"packet",this.onpacket.bind(this)),or(t,"error",this.onerror.bind(this)),or(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(IS.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:st.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,p=n.pop();this._registerAckCallback(m,p),u.id=m}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:st.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 st.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 st.EVENT:case st.BINARY_EVENT:this.onevent(t);break;case st.ACK:case st.BINARY_ACK:this.onack(t);break;case st.DISCONNECT:this.ondisconnect();break;case st.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:st.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:st.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 Rs(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}Rs.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},Rs.prototype.reset=function(){this.attempts=0},Rs.prototype.setMin=function(e){this.ms=e},Rs.prototype.setMax=function(e){this.max=e},Rs.prototype.setJitter=function(e){this.jitter=e};class Rd extends jt{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,Pu(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 Rs({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||OS;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 yS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=or(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=or(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(or(t,"ping",this.onping.bind(this)),or(t,"data",this.ondata.bind(this)),or(t,"error",this.onerror.bind(this)),or(t,"close",this.onclose.bind(this)),or(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){Iu(()=>{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 D0(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 Qo={};function Ld(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=TS(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Qo[s]&&a in Qo[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new Rd(r,t):(Qo[s]||(Qo[s]=new Rd(r,t)),d=Qo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Ld,{Manager:Rd,Socket:D0,io:Ld,connect:Ld});const M0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&M0.call(Blob),typeof File=="function"||typeof File!="undefined"&&M0.call(File);var F0;(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"})(F0||(F0={}));const Dd="cimulate",Md=`${Dd}:pdp-update`,Fd=`${Dd}:ui-state-update`,Bd=`${Dd}:prompts-state-update`,PS=e=>{window.addEventListener(Md,e)},RS=e=>{window.removeEventListener(Md,e)},LS=(e,t,n)=>{const r=new CustomEvent(Md,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class DS{constructor(){Je(this,"initialParams",{productId:"",productName:"",pdpLink:""});Je(this,"proxy");Je(this,"_fullGet",(t,n)=>Reflect.get(t,n));Je(this,"_fullSet",(t,n,r)=>(LS(n,r),Reflect.set(t,n,r)));Je(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const Jo=new DS,B0=["ask_cim","search","browse","pdp"],U0=e=>B0.includes(e),H0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(H0)),new Map(Object.entries(H0).map(([e,t])=>[t,e]));const _t=(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 MS{constructor(t=!1){Je(this,"isDevelopment");Je(this,"_log",(t,n,...r)=>{_t(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 FS=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!U0(e.type)){_t(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&_t(n,"warn",`initialEntry.type "${e.type}" conflicts with the deprecated entryType "${t}". entryType wins for the UI entry type; initialEntry params are still seeded. Prefer initialEntry on its own.`),e.type==="pdp"){if(!((r=e.params)!=null&&r.productId)){_t(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}Jo.updateProxy(e.params);return}_t(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}};let BS=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 US{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 Fe(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:oe(H({},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 Fe(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 zr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let j0=class extends zr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class z0 extends zr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let Ud=class extends zr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class HS{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)}}const jS="0Mw";let zS=class extends BS{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,l,d,f,m,p,b;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:(m=s.enableLogging)!=null?m:!1,platform:(p=s.platform)!=null?p:"Web",capabilitiesVersion:(b=s.capabilitiesVersion)!=null?b:"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 HS(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 Fe(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 Fe(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 Fe(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new zr("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 Fe(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 Fe(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 Fe(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 Fe(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new zr("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 zr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return Fe(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})}getAuthLinkKey(){return Fe(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/authlink");if(!t||!t.authLinkKey)throw new j0("Auth link response did not contain an authLinkKey",200,t);return this.logger.info("Auth link key retrieved"),t.authLinkKey})}openSSE(t){return Fe(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 US(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(()=>Fe(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,messagingSessionId:this.extractMessagingSessionId(n)})}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 m=this.getNestedString(l,"tokenType");m&&(s=m)}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((m,p)=>{var A,_,C;const b=m.participant,y=m.displayName||(b==null?void 0:b.displayName)||((A=t.conversationEntry)==null?void 0:A.senderDisplayName)||"Agent",x=(b==null?void 0:b.role)||((C=(_=t.conversationEntry)==null?void 0:_.sender)==null?void 0:C.role)||"",S=m.operation||m.event||"";this.emit("participant_changed",U({conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(S)},s?{entryId:r.length>1?`${s}:${p}`:s}:{}))});else{const m=((u=t.conversationEntry)==null?void 0:u.senderDisplayName)||n.participantName||((l=n.participant)==null?void 0:l.displayName)||"Agent",p=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:m},action:this.normalizeParticipantAction(p)},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 Fe(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 Ud("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,s){return Fe(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 m={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(m.body=JSON.stringify(r));const p=yield fetch(`${this.baseURL}${n}`,m);if(clearTimeout(l),!p.ok){const b=yield p.text().catch(()=>p.statusText);if(p.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new Ud(`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 Ud(`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 j0(`Request ${t} ${n} failed (${p.status}): ${b}`,p.status,b)}return p.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield p.blob():p.text().then(b=>b?JSON.parse(b):null)}catch(d){if(clearTimeout(l),d instanceof zr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new z0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),m=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${m.toFixed(0)}ms...`),yield new Promise(p=>setTimeout(p,m));continue}throw new z0(`Network error: ${d.message}`,u,{cause:d})}throw new zr(`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 zr("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}}extractMessagingSessionId(t){var n;return(n=t.relatedRecords)==null?void 0:n.find(r=>r.startsWith(jS))}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 $0="onCimulateWidgetReady",N="cim-widget",Un=`--${N}`,ui={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},$S=(e=ui)=>({[`${Un}-primary-color`]:e.primaryColor||ui.primaryColor,[`${Un}-secondary-color`]:e.secondaryColor||ui.secondaryColor,[`${Un}-font-color`]:e.fontColor||ui.fontColor,[`${Un}-font-family`]:e.fontFamily||ui.fontFamily,[`${Un}-background-color`]:e.backgroundColor||ui.backgroundColor,[`${Un}-border-color`]:e.borderColor||ui.borderColor,[`${Un}-border-radius`]:e.borderRadius||ui.borderRadius});class VS{constructor(){Je(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}});Je(this,"connectedProxy");Je(this,"modeProxy");Je(this,"entryTypeProxy");Je(this,"statusProxy");Je(this,"dialogProxy");Je(this,"modalProxy",{isFullscreen:!1});Je(this,"_fullGet",(t,n)=>Reflect.get(t,n));Je(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return KS(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 lt=new VS,Fu="cimulate.widget.minimizedOnNav";function qS(){try{sessionStorage.setItem(Fu,"1")}catch(e){return}}function YS(){try{const e=sessionStorage.getItem(Fu)==="1";return sessionStorage.removeItem(Fu),e}catch(e){return!1}}function WS(){try{sessionStorage.removeItem(Fu)}catch(e){return}}const GS=e=>{window.addEventListener(Fd,e)},XS=e=>{window.removeEventListener(Fd,e)},KS=(e,t)=>{const n=new CustomEvent(Fd,{detail:{property:e,value:t}});window.dispatchEvent(n)},V0=e=>{lt.connectedProxy.connected=e},q0=e=>{if(!U0(e)){const t=B0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}lt.entryTypeProxy.entryType=e},$r=e=>{const t=lt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;lt.statusProxy.isOpen=n,n&&(lt.statusProxy.isMinimized=!1,WS())},Ls=e=>{const t=lt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;lt.statusProxy.isMinimized=n,n&&(lt.statusProxy.isOpen=!1)},Hd=e=>{lt.modalProxy.isFullscreen=e},Bu=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);lt.statusProxy.type=e,e==="dialog"||e==="chat"?lt.modeProxy.mode="embedded":lt.modeProxy.mode="standalone"},jd=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(", ")}.`);lt.dialogProxy.position=e},QS=e=>{const t=lt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;lt.dialogProxy.isFullHeight=n};function JS(){var e=R.useRef(!0);return e.current?(e.current=!1,!0):e.current}function ZS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function ev(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",Uu=function(e){R.useEffect(e,[])},tv=function(e){var t=R.useRef(e);t.current=e,Uu(function(){return function(){return t.current()}})},nv=function(e){var t=R.useRef(0),n=R.useState(e),r=n[0],s=n[1],a=R.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return tv(function(){cancelAnimationFrame(t.current)}),[r,a]},rv=function(e,t){return e===t};function iv(e,t){t===void 0&&(t=rv);var n=R.useRef(),r=R.useRef(e),s=JS();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var sv=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=nv({width:zd?window.innerWidth:r,height:zd?window.innerHeight:a}),d=l[0],f=l[1];return R.useEffect(function(){if(zd){var m=function(){var p=window.innerWidth,b=window.innerHeight;f({width:p,height:b}),u&&u(p,b)};return ZS(window,"resize",m),function(){ev(window,"resize",m)}}},[]),d};const Y0=R.createContext({mode:lt.modeProxy.mode,entryType:lt.entryType,status:lt.statusProxy,dialogPosition:lt.dialogProxy.position,isDialogFullHeight:lt.dialogProxy.isFullHeight,dialogWidth:lt.dialogProxy.width,isModalFullscreen:lt.modalProxy.isFullscreen,previousComponentType:lt.statusProxy.type}),ov=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=R.useState(e!=null?e:lt.entryTypeProxy.entryType),[u,l]=R.useState(lt.modeProxy.mode),[d,f]=R.useState({type:n||lt.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:lt.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:lt.statusProxy.isMinimized}),[m,p]=R.useState(lt.dialogProxy.position),[b,y]=R.useState(lt.dialogProxy.isFullHeight),[x,S]=R.useState(lt.dialogProxy.width),[A,_]=R.useState(lt.modalProxy.isFullscreen),C=R.useRef(!1),O=iv(d.type);R.useEffect(()=>{const W=D=>{const{property:V,value:K}=D.detail||{};if(!(!V||K===void 0)){if(V==="mode"){l(K);return}if(V==="entryType"){a(K);return}if(V==="isMinimized"){f(ae=>ue(U({},ae),{isMinimized:K}));return}if(V==="isOpen"){f(ae=>ue(U({},ae),{isOpen:K}));return}if(V==="type"){f(ae=>ue(U({},ae),{type:K}));return}if(V==="position"){p(K);return}if(V==="isFullHeight"){y(K);return}if(V==="width"){S(K);return}if(V==="isFullscreen"){_(K);return}}};return GS(W),()=>{XS(W)}},[]),Uu(()=>{e&&q0(e)}),Uu(()=>{if(C.current)return;C.current=!0;const W=n||(t==null?void 0:t.type);W&&Bu(W);const D=YS();t&&"isOpen"in t&&$r(!!t.isOpen),t&&"isMinimized"in t&&Ls(!!t.isMinimized),D&&Ls(!0)}),Uu(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:W}=t.options;W&&jd(W),"dialogFullHeight"in t.options&&QS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&S(t.options.dialogWidth),"isModalFullscreen"in t.options&&Hd(!!t.options.isModalFullscreen)});const z=R.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:O||"dialog",dialogPosition:m,isDialogFullHeight:b,dialogWidth:x,isModalFullscreen:A}),[u,s,d,O,m,b,x,A]);return w.jsx(Y0.Provider,{value:z,children:r})},Vr=()=>{const e=R.useContext(Y0);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},Tt={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"},W0={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};function G0(e,t){return function(){return e.apply(t,arguments)}}const{toString:av}=Object.prototype,{getPrototypeOf:Ds}=Object,{iterator:Zo,toStringTag:X0}=Symbol,Hu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ea=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Hu(n,t))return!0;n=Ds(n)}return!1},uv=(e,t)=>e!=null&&ea(e,t)?e[t]:void 0,$d=(e=>t=>{const n=av.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ar=e=>(e=e.toLowerCase(),t=>$d(t)===e),ju=e=>t=>typeof t===e,{isArray:Vi}=Array,Ms=ju("undefined");function Fs(e){return e!==null&&!Ms(e)&&e.constructor!==null&&!Ms(e.constructor)&&kn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const K0=ar("ArrayBuffer");function lv(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&K0(e.buffer),t}const cv=ju("string"),kn=ju("function"),Q0=ju("number"),Bs=e=>e!==null&&typeof e=="object",dv=e=>e===!0||e===!1,zu=e=>{if(!Bs(e))return!1;const t=Ds(e);return(t===null||t===Object.prototype||Ds(t)===null)&&!ea(e,X0)&&!ea(e,Zo)},fv=e=>{if(!Bs(e)||Fs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},hv=ar("Date"),pv=ar("File"),mv=e=>!!(e&&typeof e.uri!="undefined"),gv=e=>e&&typeof e.getParts!="undefined",Ev=ar("Blob"),yv=ar("FileList"),Tv=e=>Bs(e)&&kn(e.pipe);function bv(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const J0=bv(),Z0=typeof J0.FormData!="undefined"?J0.FormData:void 0,wv=e=>{if(!e)return!1;if(Z0&&e instanceof Z0)return!0;const t=Ds(e);if(!t||t===Object.prototype||!kn(e.append))return!1;const n=$d(e);return n==="formdata"||n==="object"&&kn(e.toString)&&e.toString()==="[object FormData]"},xv=ar("URLSearchParams"),[_v,Sv,vv,Av]=["ReadableStream","Request","Response","Headers"].map(ar),kv=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ta(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Vi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Fs(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 eg(e,t){if(Fs(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 qi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,tg=e=>!Ms(e)&&e!==qi;function Vd(...e){const{caseless:t,skipUndefined:n}=tg(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&eg(r,u)||u,d=Hu(r,l)?r[l]:void 0;zu(d)&&zu(a)?r[l]=Vd(d,a):zu(a)?r[l]=Vd({},a):Vi(a)?r[l]=a.slice():(!n||!Ms(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||Fs(l)||(ta(l,s),typeof l!="object"||Vi(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const m=d[f];Uv.call(l,m)&&s(l[m],m)}}return r}const Cv=(e,t,n,{allOwnKeys:r}={})=>(ta(t,(s,a)=>{n&&kn(s)?Object.defineProperty(e,a,{__proto__:null,value:G0(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),Nv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ov=(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)},Iv=(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&&Ds(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Pv=(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},Rv=e=>{if(!e)return null;if(Vi(e))return e;let t=e.length;if(!Q0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Lv=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ds(Uint8Array)),Dv=(e,t)=>{const r=(e&&e[Zo]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},Mv=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Fv=ar("HTMLFormElement"),Bv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:Uv}=Object.prototype,Hv=ar("RegExp"),ng=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ta(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},jv=e=>{ng(e,(t,n)=>{if(kn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(kn(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+"'")})}})},zv=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Vi(e)?r(e):r(String(e).split(t)),n},$v=()=>{},Vv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function qv(e){return!!(e&&kn(e.append)&&e[X0]==="FormData"&&e[Zo])}const Yv=e=>{const t=new WeakSet,n=r=>{if(Bs(r)){if(t.has(r))return;if(Fs(r))return r;if(!("toJSON"in r)){t.add(r);const s=Vi(r)?[]:{};return ta(r,(a,u)=>{const l=n(a);!Ms(l)&&(s[u]=l)}),t.delete(r),s}}return r};return n(e)},Wv=ar("AsyncFunction"),Gv=e=>e&&(Bs(e)||kn(e))&&kn(e.then)&&kn(e.catch),rg=((e,t)=>e?setImmediate:t?((n,r)=>(qi.addEventListener("message",({source:s,data:a})=>{s===qi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),qi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",kn(qi.postMessage)),Xv=typeof queueMicrotask!="undefined"?queueMicrotask.bind(qi):typeof process!="undefined"&&process.nextTick||rg,ig=e=>e!=null&&kn(e[Zo]),Y={isArray:Vi,isArrayBuffer:K0,isBuffer:Fs,isFormData:wv,isArrayBufferView:lv,isString:cv,isNumber:Q0,isBoolean:dv,isObject:Bs,isPlainObject:zu,isEmptyObject:fv,isReadableStream:_v,isRequest:Sv,isResponse:vv,isHeaders:Av,isUndefined:Ms,isDate:hv,isFile:pv,isReactNativeBlob:mv,isReactNative:gv,isBlob:Ev,isRegExp:Hv,isFunction:kn,isStream:Tv,isURLSearchParams:xv,isTypedArray:Lv,isFileList:yv,forEach:ta,merge:Vd,extend:Cv,trim:kv,stripBOM:Nv,inherits:Ov,toFlatObject:Iv,kindOf:$d,kindOfTest:ar,endsWith:Pv,toArray:Rv,forEachEntry:Dv,matchAll:Mv,isHTMLForm:Fv,hasOwnProperty:Hu,hasOwnProp:Hu,hasOwnInPrototypeChain:ea,getSafeProp:uv,reduceDescriptors:ng,freezeMethods:jv,toObjectSet:zv,toCamelCase:Bv,noop:$v,toFiniteNumber:Vv,findKey:eg,global:qi,isContextDefined:tg,isSpecCompliantForm:qv,toJSONObject:Yv,isAsyncFn:Wv,isThenable:Gv,setImmediate:rg,asap:Xv,isIterable:ig,isSafeIterable:e=>e!=null&&ea(e,Zo)&&ig(e)},Kv=Y.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"]),Qv=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]&&Kv[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function Jv(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 Zv=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),eA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function qd(e,t){return Y.isArray(e)?e.map(n=>qd(n,t)):Jv(String(e).replace(t,""))}const tA=e=>qd(e,Zv),nA=e=>qd(e,eA);function sg(e){const t=Object.create(null);return Y.forEach(e.toJSON(),(n,r)=>{t[r]=nA(n)}),t}const og=Symbol("internals");function na(e){return e&&String(e).trim().toLowerCase()}function $u(e){return e===!1||e==null?e:Y.isArray(e)?e.map($u):tA(String(e))}function rA(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 iA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Yd(e,t,n,r,s){if(Y.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!Y.isString(t)){if(Y.isString(r))return t.indexOf(r)!==-1;if(Y.isRegExp(r))return r.test(t)}}function sA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function oA(e,t){const n=Y.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 un=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(l,d,f){const m=na(d);if(!m)return;const p=Y.findKey(s,m);(!p||s[p]===void 0||f===!0||f===void 0&&s[p]!==!1)&&(s[p||d]=$u(l))}const u=(l,d)=>Y.forEach(l,(f,m)=>a(f,m,d));if(Y.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(Y.isString(t)&&(t=t.trim())&&!iA(t))u(Qv(t),n);else if(Y.isObject(t)&&Y.isSafeIterable(t)){let l=Object.create(null),d,f;for(const m of t){if(!Y.isArray(m))throw new TypeError("Object iterator must return a key-value pair");f=m[0],Y.hasOwnProp(l,f)?(d=l[f],l[f]=Y.isArray(d)?[...d,m[1]]:[d,m[1]]):l[f]=m[1]}u(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=na(t),t){const r=Y.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return rA(s);if(Y.isFunction(n))return n.call(this,s,r);if(Y.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=na(t),t){const r=Y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Yd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=na(u),u){const l=Y.findKey(r,u);l&&(!n||Yd(r,r[l],l,n))&&(delete r[l],s=!0)}}return Y.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||Yd(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return Y.forEach(this,(s,a)=>{const u=Y.findKey(r,a);if(u){n[u]=$u(s),delete n[a];return}const l=t?sA(a):String(a).trim();l!==a&&delete n[a],n[l]=$u(s),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&Y.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[og]=this[og]={accessors:{}}).accessors,s=this.prototype;function a(u){const l=na(u);r[l]||(oA(s,u),r[l]=!0)}return Y.isArray(t)?t.forEach(a):a(t),this}};un.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(un.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Y.freezeMethods(un);const aA="[REDACTED ****]";function uA(e){if(Y.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Y.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function lA(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||Y.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof un&&(a=a.toJSON()),r.push(a);let u;if(Y.isArray(a))u=[],a.forEach((l,d)=>{const f=s(l);Y.isUndefined(f)||(u[d]=f)});else{if(!Y.isPlainObject(a)&&uA(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?aA:s(d);Y.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return s(e)}let Ce=class M2 extends Error{static from(t,n,r,s,a,u){const l=new M2(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&&Y.hasOwnProp(t,"redact")?t.redact:void 0,r=Y.isArray(n)&&n.length>0?lA(t,n):Y.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 cA=null,ag=100;function Wd(e){return Y.isPlainObject(e)||Y.isArray(e)}function ug(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function Gd(e,t,n){return e?e.concat(t).map(function(s,a){return s=ug(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function dA(e){return Y.isArray(e)&&!e.some(Wd)}const fA=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function Vu(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,O){return!Y.isUndefined(O[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?ag:n.maxDepth,f=l&&Y.isSpecCompliantForm(t),m=[];if(!Y.isFunction(s))throw new TypeError("visitor must be a function");function p(_){if(_===null)return"";if(Y.isDate(_))return _.toISOString();if(Y.isBoolean(_))return _.toString();if(!f&&Y.isBlob(_))throw new Ce("Blob is not supported. Use a Buffer instead.");if(Y.isArrayBuffer(_)||Y.isTypedArray(_)){if(f&&typeof l=="function")return new l([_]);if(typeof Buffer!="undefined")return Buffer.from(_);throw new Ce("Blob is not supported. Use a Buffer instead.",Ce.ERR_NOT_SUPPORT)}return _}function b(_){if(_>d)throw new Ce("Object is too deeply nested ("+_+" levels). Max depth: "+d,Ce.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(_,C){if(d===1/0)return JSON.stringify(_);const O=[];return JSON.stringify(_,function(W,D){if(!Y.isObject(D))return D;for(;O.length&&O[O.length-1]!==this;)O.pop();return O.push(D),b(C+O.length-1),D})}function x(_,C,O){let z=_;if(Y.isReactNative(t)&&Y.isReactNativeBlob(_))return t.append(Gd(O,C,a),p(_)),!1;if(_&&!O&&typeof _=="object"){if(Y.endsWith(C,"{}"))C=r?C:C.slice(0,-2),_=y(_,1);else if(Y.isArray(_)&&dA(_)||(Y.isFileList(_)||Y.endsWith(C,"[]"))&&(z=Y.toArray(_)))return C=ug(C),z.forEach(function(D,V){!(Y.isUndefined(D)||D===null)&&t.append(u===!0?Gd([C],V,a):u===null?C:C+"[]",p(D))}),!1}return Wd(_)?!0:(t.append(Gd(O,C,a),p(_)),!1)}const S=Object.assign(fA,{defaultVisitor:x,convertValue:p,isVisitable:Wd});function A(_,C,O=0){if(!Y.isUndefined(_)){if(b(O),m.indexOf(_)!==-1)throw new Error("Circular reference detected in "+C.join("."));m.push(_),Y.forEach(_,function(W,D){(!(Y.isUndefined(W)||W===null)&&s.call(t,W,Y.isString(D)?D.trim():D,C,S))===!0&&A(W,C?C.concat(D):[D],O+1)}),m.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return A(e),t}function lg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Xd(e,t){this._pairs=[],e&&Vu(e,this,t)}const cg=Xd.prototype;cg.append=function(t,n){this._pairs.push([t,n])},cg.toString=function(t){const n=t?r=>t.call(this,r,lg):lg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function hA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dg(e,t,n){if(!t)return e;e=e||"";const r=Y.isFunction(n)?{serialize:n}:n,s=Y.getSafeProp(r,"encode")||hA,a=Y.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=Y.isURLSearchParams(t)?t.toString():new Xd(t,r).toString(s),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class fg{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){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Kd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},pA={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Xd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Qd=typeof window!="undefined"&&typeof document!="undefined",Jd=typeof navigator=="object"&&navigator||void 0,mA=Qd&&(!Jd||["ReactNative","NativeScript","NS"].indexOf(Jd.product)<0),gA=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",EA=Qd&&window.location.href||"http://localhost",sn=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qd,hasStandardBrowserEnv:mA,hasStandardBrowserWebWorkerEnv:gA,navigator:Jd,origin:EA},Symbol.toStringTag,{value:"Module"}))),pA);function yA(e,t){return Vu(e,new sn.classes.URLSearchParams,U({visitor:function(n,r,s,a){return sn.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const hg=ag;function pg(e){if(e>hg)throw new Ce("FormData field is too deeply nested ("+e+" levels). Max depth: "+hg,Ce.ERR_FORM_DATA_DEPTH_EXCEEDED)}function TA(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)pg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function bA(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 mg(e){function t(n,r,s,a){pg(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&Y.isArray(s)?s.length:u,d?(Y.hasOwnProp(s,u)?s[u]=Y.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!l):((!Y.hasOwnProp(s,u)||!Y.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&Y.isArray(s[u])&&(s[u]=bA(s[u])),!l)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,s)=>{t(TA(r),s,n,0)}),n}return null}const Us=(e,t)=>e!=null&&Y.hasOwnProp(e,t)?e[t]:void 0;function wA(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ra={transitional:Kd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=Y.isObject(t);if(a&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return s?JSON.stringify(mg(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t)||Y.isReadableStream(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Us(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return yA(t,d).toString();if((l=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Us(this,"env"),m=f&&f.FormData;return Vu(l?{"files[]":t}:t,m&&new m,d)}}return a||s?(n.setContentType("application/json",!1),wA(t)):t}],transformResponse:[function(t){const n=Us(this,"transitional")||ra.transitional,r=n&&n.forcedJSONParsing,s=Us(this,"responseType"),a=s==="json";if(Y.isResponse(t)||Y.isReadableStream(t))return t;if(t&&Y.isString(t)&&(r&&!s||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Us(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Ce.from(d,Ce.ERR_BAD_RESPONSE,this,null,Us(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sn.classes.FormData,Blob:sn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch","query"],e=>{ra.headers[e]={}});function Zd(e,t){const n=this||ra,r=t||n,s=un.from(r.headers);let a=r.data;return Y.forEach(e,function(l){a=l.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function gg(e){return!!(e&&e.__CANCEL__)}let ia=class extends Ce{constructor(t,n,r){super(t==null?"canceled":t,Ce.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Eg(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 xA(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function _A(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(),m=r[a];u||(u=f),n[s]=d,r[s]=f;let p=a,b=0;for(;p!==s;)b+=n[p++],p=p%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=m&&f-m;return y?Math.round(b*1e3/y):void 0}}function SA(e,t){let n=0,r=1e3/t,s,a;const u=(f,m=Date.now())=>{n=m,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const m=Date.now(),p=m-n;p>=r?u(f,m):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-p)))},()=>s&&u(s)]}const qu=(e,t,n=3)=>{let r=0;const s=_A(50,250);return SA(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),m=s(f);r=Math.max(r,d);const p={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:m||void 0,estimated:m&&l?(l-d)/m:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},n)},yg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Tg=e=>(...t)=>Y.asap(()=>e(...t)),vA=sn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,sn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(sn.origin),sn.navigator&&/(msie|trident)/i.test(sn.navigator.userAgent)):()=>!0,AA=sn.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];Y.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),Y.isString(r)&&l.push(`path=${r}`),Y.isString(s)&&l.push(`domain=${s}`),a===!0&&l.push("secure"),Y.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 kA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function CA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const NA=/^https?:(?!\/\/)/i,OA=/[\t\n\r]/g;function IA(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function PA(e){return IA(e).replace(OA,"")}function bg(e,t){if(typeof e=="string"&&NA.test(PA(e)))throw new Ce('Invalid URL: missing "//" after protocol',Ce.ERR_INVALID_URL,t)}function wg(e,t,n,r){bg(t,r);let s=!kA(t);return e&&(s||n===!1)?(bg(e,r),CA(e,t)):t}const xg=e=>e instanceof un?U({},e):e;function Yi(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(m,p,b,y){return Y.isPlainObject(m)&&Y.isPlainObject(p)?Y.merge.call({caseless:y},m,p):Y.isPlainObject(p)?Y.merge({},p):Y.isArray(p)?p.slice():p}function s(m,p,b,y){if(Y.isUndefined(p)){if(!Y.isUndefined(m))return r(void 0,m,b,y)}else return r(m,p,b,y)}function a(m,p){if(!Y.isUndefined(p))return r(void 0,p)}function u(m,p){if(Y.isUndefined(p)){if(!Y.isUndefined(m))return r(void 0,m)}else return r(void 0,p)}function l(m){const p=Y.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Y.isUndefined(p))if(Y.isPlainObject(p)){if(Y.hasOwnProp(p,m))return p[m]}else return;const b=Y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Y.isPlainObject(b)&&Y.hasOwnProp(b,m))return b[m]}function d(m,p,b){if(Y.hasOwnProp(t,b))return r(m,p);if(Y.hasOwnProp(e,b))return r(void 0,m)}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:(m,p,b)=>s(xg(m),xg(p),b,!0)};return Y.forEach(Object.keys(U(U({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const b=Y.hasOwnProp(f,p)?f[p]:s,y=Y.hasOwnProp(e,p)?e[p]:void 0,x=Y.hasOwnProp(t,p)?t[p]:void 0,S=b(y,x,p);Y.isUndefined(S)&&b!==d||(n[p]=S)}),Y.hasOwnProp(t,"validateStatus")&&Y.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(Y.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const RA=["content-type","content-length"];function LA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{RA.includes(r.toLowerCase())&&e.set(r,s)})}const DA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function _g(e){const t=Yi({},e),n=b=>Y.hasOwnProp(t,b)?t[b]: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"),m=n("allowAbsoluteUrls"),p=n("url");if(t.headers=l=un.from(l),t.url=dg(wg(f,p,m,t),n("params"),n("paramsSerializer")),d){const b=Y.getSafeProp(d,"username")||"",y=Y.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(b+":"+(y?DA(y):"")))}catch(x){throw Ce.from(x,Ce.ERR_BAD_OPTION_VALUE,e)}}if(Y.isFormData(r)&&(sn.hasStandardBrowserEnv||sn.hasStandardBrowserWebWorkerEnv||Y.isReactNative(r)?l.setContentType(void 0):Y.isFunction(r.getHeaders)&&LA(l,r.getHeaders(),n("formDataHeaderPolicy"))),sn.hasStandardBrowserEnv&&(Y.isFunction(s)&&(s=s(t)),s===!0||s==null&&vA(t.url))){const y=a&&u&&AA.read(u);y&&l.set(a,y)}return t}const MA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=_g(e);let a=s.data;const u=un.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=s,m,p,b,y,x;function S(){y&&y(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(m),s.signal&&s.signal.removeEventListener("abort",m)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function _(){if(!A)return;const O=un.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),W={data:!l||l==="text"||l==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:O,config:e,request:A};Eg(function(V){n(V),S()},function(V){r(V),S()},W),A=null}"onloadend"in A?A.onloadend=_:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(_)},A.onabort=function(){A&&(r(new Ce("Request aborted",Ce.ECONNABORTED,e,A)),S(),A=null)},A.onerror=function(z){const W=z&&z.message?z.message:"Network Error",D=new Ce(W,Ce.ERR_NETWORK,e,A);D.event=z||null,r(D),S(),A=null},A.ontimeout=function(){let z=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const W=s.transitional||Kd;s.timeoutErrorMessage&&(z=s.timeoutErrorMessage),r(new Ce(z,W.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,A)),S(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&Y.forEach(sg(u),function(z,W){A.setRequestHeader(W,z)}),Y.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),l&&l!=="json"&&(A.responseType=s.responseType),f&&([b,x]=qu(f,!0),A.addEventListener("progress",b)),d&&A.upload&&([p,y]=qu(d),A.upload.addEventListener("progress",p),A.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(m=O=>{A&&(r(!O||O.type?new ia(null,e,A):O),A.abort(),S(),A=null)},s.cancelToken&&s.cancelToken.subscribe(m),s.signal&&(s.signal.aborted?m():s.signal.addEventListener("abort",m)));const C=xA(s.url);if(C&&!sn.protocols.includes(C)){r(new Ce("Unsupported protocol "+C+":",Ce.ERR_BAD_REQUEST,e)),S();return}A.send(a||null)})},FA=(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 ia(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=()=>Y.asap(u),l},BA=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},UA=function(e,t){return g0(this,null,function*(){try{for(var n=D2(HA(e)),r,s,a;r=!(s=yield new Os(n.next())).done;r=!1){const u=s.value;yield*E0(BA(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Os(s.call(n)))}finally{if(a)throw a[0]}}})},HA=function(e){return g0(this,null,function*(){if(e[Symbol.asyncIterator]){yield*E0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Os(t.read());if(n)break;yield r}}finally{yield new Os(t.cancel())}})},Sg=(e,t,n,r)=>{const s=UA(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Fe(this,null,function*(){try{const{done:m,value:p}=yield s.next();if(m){l(),f.close();return}let b=p.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(p))}catch(m){throw l(m),m}})},cancel(f){return l(f),s.return()}},{highWaterMark:2})},Yu=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,jA=(e,t,n)=>t+2<n&&Yu(e.charCodeAt(t+1))&&Yu(e.charCodeAt(t+2));function zA(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),S=r.charCodeAt(y+2);Yu(x)&&Yu(S)&&(u-=2,y+=2)}let d=0,f=l-1;const m=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--):m(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||m(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}let a=0;for(let u=0,l=r.length;u<l;u++){const d=r.charCodeAt(u);if(d===37&&jA(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 ef="1.18.1",vg=64*1024,{isFunction:Wu}=Y,$A=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Ag=e=>{if(!Y.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},kg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},VA=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},qA=e=>{const t=Y.global!==void 0&&Y.global!==null?Y.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Y.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,l=s?Wu(s):typeof fetch=="function",d=Wu(a),f=Wu(u);if(!l)return!1;const m=l&&Wu(n),p=l&&(typeof r=="function"?(_=>C=>_.encode(C))(new r):_=>Fe(null,null,function*(){return new Uint8Array(yield new a(_).arrayBuffer())})),b=d&&m&&kg(()=>{let _=!1;const C=new a(sn.origin,{body:new n,method:"POST",get duplex(){return _=!0,"half"}}),O=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),_&&!O}),y=f&&m&&kg(()=>Y.isReadableStream(new u("").body)),x={stream:y&&(_=>_.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!x[_]&&(x[_]=(C,O)=>{let z=C&&C[_];if(z)return z.call(C);throw new Ce(`Response type '${_}' is not supported`,Ce.ERR_NOT_SUPPORT,O)})});const S=_=>Fe(null,null,function*(){if(_==null)return 0;if(Y.isBlob(_))return _.size;if(Y.isSpecCompliantForm(_))return(yield new a(sn.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(Y.isArrayBufferView(_)||Y.isArrayBuffer(_))return _.byteLength;if(Y.isURLSearchParams(_)&&(_=_+""),Y.isString(_))return(yield p(_)).byteLength}),A=(_,C)=>Fe(null,null,function*(){const O=Y.toFiniteNumber(_.getContentLength());return O==null?S(C):O});return _=>Fe(null,null,function*(){let{url:C,method:O,data:z,signal:W,cancelToken:D,timeout:V,onDownloadProgress:K,onUploadProgress:ae,responseType:j,headers:se,withCredentials:ie="same-origin",fetchOptions:ce,maxContentLength:fe,maxBodyLength:ne}=_g(_);const Se=Y.isNumber(fe)&&fe>-1,de=Y.isNumber(ne)&&ne>-1,J=he=>Y.hasOwnProp(_,he)?_[he]:void 0;let le=s||fetch;j=j?(j+"").toLowerCase():"text";let k=FA([W,D&&D.toAbortSignal()],V),M=null;const Z=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let P,ve=null;const Pe=()=>new Ce("Request body larger than maxBodyLength limit",Ce.ERR_BAD_REQUEST,_,M);try{let he;const ke=J("auth");if(ke){const $e=Y.getSafeProp(ke,"username")||"",St=Y.getSafeProp(ke,"password")||"";he={username:$e,password:St}}if(VA(C)){const $e=new URL(C,sn.origin);if(!he&&($e.username||$e.password)){const St=Ag($e.username),Wt=Ag($e.password);he={username:St,password:Wt}}($e.username||$e.password)&&($e.username="",$e.password="",C=$e.href)}if(he&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa($A((he.username||"")+":"+(he.password||""))))),Se&&typeof C=="string"&&C.startsWith("data:")&&zA(C)>fe)throw new Ce("maxContentLength size of "+fe+" exceeded",Ce.ERR_BAD_RESPONSE,_,M);if(de&&O!=="get"&&O!=="head"){const $e=yield S(z);if(typeof $e=="number"&&isFinite($e)&&(P=$e,$e>ne))throw Pe()}const Me=de&&(Y.isReadableStream(z)||Y.isStream(z)),He=($e,St,Wt)=>Sg($e,vg,Ie=>{if(de&&Ie>ne)throw ve=Pe();St&&St(Ie)},Wt);if(b&&O!=="get"&&O!=="head"&&(ae||Me)){if(P=P==null?yield A(se,z):P,P!==0||Me){let $e=new a(C,{method:"POST",body:z,duplex:"half"}),St;if(Y.isFormData(z)&&(St=$e.headers.get("content-type"))&&se.setContentType(St),$e.body){const[Wt,Ie]=ae&&yg(P,qu(Tg(ae)))||[];z=He($e.body,Wt,Ie)}}}else if(Me&&!d&&m&&O!=="get"&&O!=="head")z=He(z);else if(Me&&d&&!b&&O!=="get"&&O!=="head")throw new Ce("Stream request bodies are not supported by the current fetch implementation",Ce.ERR_NOT_SUPPORT,_,M);Y.isString(ie)||(ie=ie?"include":"omit");const nt=d&&"credentials"in a.prototype;if(Y.isFormData(z)){const $e=se.getContentType();$e&&/^multipart\/form-data/i.test($e)&&!/boundary=/i.test($e)&&se.delete("content-type")}se.set("User-Agent","axios/"+ef,!1);const Nt=ue(U({},ce),{signal:k,method:O.toUpperCase(),headers:sg(se.normalize()),body:z,duplex:"half",credentials:nt?ie:void 0});M=d&&new a(C,Nt);let Ft=yield d?le(M,ce):le(C,Nt);const xn=un.from(Ft.headers);if(Se){const $e=Y.toFiniteNumber(xn.getContentLength());if($e!=null&&$e>fe)throw new Ce("maxContentLength size of "+fe+" exceeded",Ce.ERR_BAD_RESPONSE,_,M)}const pn=y&&(j==="stream"||j==="response");if(y&&Ft.body&&(K||Se||pn&&Z)){const $e={};["status","statusText","headers"].forEach(ft=>{$e[ft]=Ft[ft]});const St=Y.toFiniteNumber(xn.getContentLength()),[Wt,Ie]=K&&yg(St,qu(Tg(K),!0))||[];let Xe=0;const ot=ft=>{if(Se&&(Xe=ft,Xe>fe))throw new Ce("maxContentLength size of "+fe+" exceeded",Ce.ERR_BAD_RESPONSE,_,M);Wt&&Wt(ft)};Ft=new u(Sg(Ft.body,vg,ot,()=>{Ie&&Ie(),Z&&Z()}),$e)}j=j||"text";let Bt=yield x[Y.findKey(x,j)||"text"](Ft,_);if(Se&&!y&&!pn){let $e;if(Bt!=null&&(typeof Bt.byteLength=="number"?$e=Bt.byteLength:typeof Bt.size=="number"?$e=Bt.size:typeof Bt=="string"&&($e=typeof r=="function"?new r().encode(Bt).byteLength:Bt.length)),typeof $e=="number"&&$e>fe)throw new Ce("maxContentLength size of "+fe+" exceeded",Ce.ERR_BAD_RESPONSE,_,M)}return!pn&&Z&&Z(),yield new Promise(($e,St)=>{Eg($e,St,{data:Bt,headers:un.from(Ft.headers),status:Ft.status,statusText:Ft.statusText,config:_,request:M})})}catch(he){if(Z&&Z(),k&&k.aborted&&k.reason instanceof Ce){const ke=k.reason;throw ke.config=_,M&&(ke.request=M),he!==ke&&Object.defineProperty(ke,"cause",{__proto__:null,value:he,writable:!0,enumerable:!1,configurable:!0}),ke}if(ve)throw M&&!ve.request&&(ve.request=M),ve;if(he instanceof Ce)throw M&&!he.request&&(he.request=M),he;if(he&&he.name==="TypeError"&&/Load failed|fetch/i.test(he.message)){const ke=new Ce("Network Error",Ce.ERR_NETWORK,_,M,he&&he.response);throw Object.defineProperty(ke,"cause",{__proto__:null,value:he.cause||he,writable:!0,enumerable:!1,configurable:!0}),ke}throw Ce.from(he,he&&he.code,_,M,he&&he.response)}})},YA=new Map,Cg=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,m=YA;for(;l--;)d=a[l],f=m.get(d),f===void 0&&m.set(d,f=l?new Map:qA(t)),m=f;return f};Cg();const tf={http:cA,xhr:MA,fetch:{get:Cg}};Y.forEach(tf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Ng=e=>`- ${e}`,WA=e=>Y.isFunction(e)||e===null||e===!1;function GA(e,t){e=Y.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,!WA(r)&&(s=tf[(l=String(r)).toLowerCase()],s===void 0))throw new Ce(`Unknown adapter '${l}'`);if(s&&(Y.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 zr extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let j0=class extends zr{constructor(t,n,r,s){super(t,"api",s),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class z0 extends zr{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let Ud=class extends zr{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class HS{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)}}const jS="0Mw";let zS=class extends BS{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:s={}}){var u,l,d,f,m,p,b;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:(m=s.enableLogging)!=null?m:!1,platform:(p=s.platform)!=null?p:"Web",capabilitiesVersion:(b=s.capabilitiesVersion)!=null?b:"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 HS(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 Fe(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 Fe(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 Fe(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new zr("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 Fe(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 Fe(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 Fe(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 Fe(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new zr("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 zr("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return Fe(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})}getAuthLinkKey(){return Fe(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/authlink");if(!t||!t.authLinkKey)throw new j0("Auth link response did not contain an authLinkKey",200,t);return this.logger.info("Auth link key retrieved"),t.authLinkKey})}openSSE(t){return Fe(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 US(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(()=>Fe(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,messagingSessionId:this.extractMessagingSessionId(n)})}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 m=this.getNestedString(l,"tokenType");m&&(s=m)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",H(H(H({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((m,p)=>{var A,_,k;const b=m.participant,y=m.displayName||(b==null?void 0:b.displayName)||((A=t.conversationEntry)==null?void 0:A.senderDisplayName)||"Agent",x=(b==null?void 0:b.role)||((k=(_=t.conversationEntry)==null?void 0:_.sender)==null?void 0:k.role)||"",S=m.operation||m.event||"";this.emit("participant_changed",H({conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(S)},s?{entryId:r.length>1?`${s}:${p}`:s}:{}))});else{const m=((u=t.conversationEntry)==null?void 0:u.senderDisplayName)||n.participantName||((l=n.participant)==null?void 0:l.displayName)||"Agent",p=n.operation||n.event||"";this.emit("participant_changed",H({conversationId:this._conversationId||"",participant:{role:((f=(d=t.conversationEntry)==null?void 0:d.sender)==null?void 0:f.role)||"",name:m},action:this.normalizeParticipantAction(p)},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 Fe(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 Ud("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,s){return Fe(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=H({"Content-Type":"application/json"},s==null?void 0:s.headers);a&&this._accessToken&&(f.Authorization=`Bearer ${this._accessToken}`);const m={method:t,headers:f,signal:(s==null?void 0:s.signal)||d.signal};r&&t==="POST"&&(m.body=JSON.stringify(r));const p=yield fetch(`${this.baseURL}${n}`,m);if(clearTimeout(l),!p.ok){const b=yield p.text().catch(()=>p.statusText);if(p.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new Ud(`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 Ud(`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 j0(`Request ${t} ${n} failed (${p.status}): ${b}`,p.status,b)}return p.status===204||t==="DELETE"?{}:(s==null?void 0:s.responseType)==="blob"?yield p.blob():p.text().then(b=>b?JSON.parse(b):null)}catch(d){if(clearTimeout(l),d instanceof zr)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new z0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const f=100*Math.random(),m=300*Math.pow(2,u-1)+f;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${m.toFixed(0)}ms...`),yield new Promise(p=>setTimeout(p,m));continue}throw new z0(`Network error: ${d.message}`,u,{cause:d})}throw new zr(`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 zr("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}}extractMessagingSessionId(t){var n;return(n=t.relatedRecords)==null?void 0:n.find(r=>r.startsWith(jS))}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 $0="onCimulateWidgetReady",N="cim-widget",Un=`--${N}`,ui={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},$S=(e=ui)=>({[`${Un}-primary-color`]:e.primaryColor||ui.primaryColor,[`${Un}-secondary-color`]:e.secondaryColor||ui.secondaryColor,[`${Un}-font-color`]:e.fontColor||ui.fontColor,[`${Un}-font-family`]:e.fontFamily||ui.fontFamily,[`${Un}-background-color`]:e.backgroundColor||ui.backgroundColor,[`${Un}-border-color`]:e.borderColor||ui.borderColor,[`${Un}-border-radius`]:e.borderRadius||ui.borderRadius});class VS{constructor(){Je(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}});Je(this,"connectedProxy");Je(this,"modeProxy");Je(this,"entryTypeProxy");Je(this,"statusProxy");Je(this,"dialogProxy");Je(this,"modalProxy",{isFullscreen:!1});Je(this,"_fullGet",(t,n)=>Reflect.get(t,n));Je(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return KS(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 lt=new VS,Mu="cimulate.widget.minimizedOnNav";function qS(){try{sessionStorage.setItem(Mu,"1")}catch(e){return}}function YS(){try{const e=sessionStorage.getItem(Mu)==="1";return sessionStorage.removeItem(Mu),e}catch(e){return!1}}function WS(){try{sessionStorage.removeItem(Mu)}catch(e){return}}const GS=e=>{window.addEventListener(Fd,e)},XS=e=>{window.removeEventListener(Fd,e)},KS=(e,t)=>{const n=new CustomEvent(Fd,{detail:{property:e,value:t}});window.dispatchEvent(n)},V0=e=>{lt.connectedProxy.connected=e},q0=e=>{if(!U0(e)){const t=B0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}lt.entryTypeProxy.entryType=e},$r=e=>{const t=lt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;lt.statusProxy.isOpen=n,n&&(lt.statusProxy.isMinimized=!1,WS())},Ls=e=>{const t=lt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;lt.statusProxy.isMinimized=n,n&&(lt.statusProxy.isOpen=!1)},Hd=e=>{lt.modalProxy.isFullscreen=e},Fu=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);lt.statusProxy.type=e,e==="dialog"||e==="chat"?lt.modeProxy.mode="embedded":lt.modeProxy.mode="standalone"},jd=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(", ")}.`);lt.dialogProxy.position=e},QS=e=>{const t=lt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;lt.dialogProxy.isFullHeight=n};function JS(){var e=R.useRef(!0);return e.current?(e.current=!1,!0):e.current}function ZS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function ev(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",Bu=function(e){R.useEffect(e,[])},tv=function(e){var t=R.useRef(e);t.current=e,Bu(function(){return function(){return t.current()}})},nv=function(e){var t=R.useRef(0),n=R.useState(e),r=n[0],s=n[1],a=R.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return tv(function(){cancelAnimationFrame(t.current)}),[r,a]},rv=function(e,t){return e===t};function iv(e,t){t===void 0&&(t=rv);var n=R.useRef(),r=R.useRef(e),s=JS();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var sv=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=nv({width:zd?window.innerWidth:r,height:zd?window.innerHeight:a}),d=l[0],f=l[1];return R.useEffect(function(){if(zd){var m=function(){var p=window.innerWidth,b=window.innerHeight;f({width:p,height:b}),u&&u(p,b)};return ZS(window,"resize",m),function(){ev(window,"resize",m)}}},[]),d};const Y0=R.createContext({mode:lt.modeProxy.mode,entryType:lt.entryType,status:lt.statusProxy,dialogPosition:lt.dialogProxy.position,isDialogFullHeight:lt.dialogProxy.isFullHeight,dialogWidth:lt.dialogProxy.width,isModalFullscreen:lt.modalProxy.isFullscreen,previousComponentType:lt.statusProxy.type}),ov=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=R.useState(e!=null?e:lt.entryTypeProxy.entryType),[u,l]=R.useState(lt.modeProxy.mode),[d,f]=R.useState({type:n||lt.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:lt.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:lt.statusProxy.isMinimized}),[m,p]=R.useState(lt.dialogProxy.position),[b,y]=R.useState(lt.dialogProxy.isFullHeight),[x,S]=R.useState(lt.dialogProxy.width),[A,_]=R.useState(lt.modalProxy.isFullscreen),k=R.useRef(!1),O=iv(d.type);R.useEffect(()=>{const W=D=>{const{property:V,value:J}=D.detail||{};if(!(!V||J===void 0)){if(V==="mode"){l(J);return}if(V==="entryType"){a(J);return}if(V==="isMinimized"){f(ce=>oe(H({},ce),{isMinimized:J}));return}if(V==="isOpen"){f(ce=>oe(H({},ce),{isOpen:J}));return}if(V==="type"){f(ce=>oe(H({},ce),{type:J}));return}if(V==="position"){p(J);return}if(V==="isFullHeight"){y(J);return}if(V==="width"){S(J);return}if(V==="isFullscreen"){_(J);return}}};return GS(W),()=>{XS(W)}},[]),Bu(()=>{e&&q0(e)}),Bu(()=>{if(k.current)return;k.current=!0;const W=n||(t==null?void 0:t.type);W&&Fu(W);const D=YS();t&&"isOpen"in t&&$r(!!t.isOpen),t&&"isMinimized"in t&&Ls(!!t.isMinimized),D&&Ls(!0)}),Bu(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:W}=t.options;W&&jd(W),"dialogFullHeight"in t.options&&QS(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&S(t.options.dialogWidth),"isModalFullscreen"in t.options&&Hd(!!t.options.isModalFullscreen)});const z=R.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:O||"dialog",dialogPosition:m,isDialogFullHeight:b,dialogWidth:x,isModalFullscreen:A}),[u,s,d,O,m,b,x,A]);return w.jsx(Y0.Provider,{value:z,children:r})},Vr=()=>{const e=R.useContext(Y0);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},Tt={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"},W0={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};function G0(e,t){return function(){return e.apply(t,arguments)}}const{toString:av}=Object.prototype,{getPrototypeOf:Ds}=Object,{iterator:Zo,toStringTag:X0}=Symbol,Uu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ea=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Uu(n,t))return!0;n=Ds(n)}return!1},uv=(e,t)=>e!=null&&ea(e,t)?e[t]:void 0,$d=(e=>t=>{const n=av.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ar=e=>(e=e.toLowerCase(),t=>$d(t)===e),Hu=e=>t=>typeof t===e,{isArray:Vi}=Array,Ms=Hu("undefined");function Fs(e){return e!==null&&!Ms(e)&&e.constructor!==null&&!Ms(e.constructor)&&Cn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const K0=ar("ArrayBuffer");function lv(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&K0(e.buffer),t}const cv=Hu("string"),Cn=Hu("function"),Q0=Hu("number"),Bs=e=>e!==null&&typeof e=="object",dv=e=>e===!0||e===!1,ju=e=>{if(!Bs(e))return!1;const t=Ds(e);return(t===null||t===Object.prototype||Ds(t)===null)&&!ea(e,X0)&&!ea(e,Zo)},fv=e=>{if(!Bs(e)||Fs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},hv=ar("Date"),pv=ar("File"),mv=e=>!!(e&&typeof e.uri!="undefined"),gv=e=>e&&typeof e.getParts!="undefined",Ev=ar("Blob"),yv=ar("FileList"),Tv=e=>Bs(e)&&Cn(e.pipe);function bv(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const J0=bv(),Z0=typeof J0.FormData!="undefined"?J0.FormData:void 0,wv=e=>{if(!e)return!1;if(Z0&&e instanceof Z0)return!0;const t=Ds(e);if(!t||t===Object.prototype||!Cn(e.append))return!1;const n=$d(e);return n==="formdata"||n==="object"&&Cn(e.toString)&&e.toString()==="[object FormData]"},xv=ar("URLSearchParams"),[_v,Sv,vv,Av]=["ReadableStream","Request","Response","Headers"].map(ar),Cv=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ta(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Vi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Fs(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 eg(e,t){if(Fs(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 qi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,tg=e=>!Ms(e)&&e!==qi;function Vd(...e){const{caseless:t,skipUndefined:n}=tg(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&eg(r,u)||u,d=Uu(r,l)?r[l]:void 0;ju(d)&&ju(a)?r[l]=Vd(d,a):ju(a)?r[l]=Vd({},a):Vi(a)?r[l]=a.slice():(!n||!Ms(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||Fs(l)||(ta(l,s),typeof l!="object"||Vi(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const m=d[f];Uv.call(l,m)&&s(l[m],m)}}return r}const kv=(e,t,n,{allOwnKeys:r}={})=>(ta(t,(s,a)=>{n&&Cn(s)?Object.defineProperty(e,a,{__proto__:null,value:G0(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),Nv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ov=(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)},Iv=(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&&Ds(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Pv=(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},Rv=e=>{if(!e)return null;if(Vi(e))return e;let t=e.length;if(!Q0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Lv=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Ds(Uint8Array)),Dv=(e,t)=>{const r=(e&&e[Zo]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},Mv=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Fv=ar("HTMLFormElement"),Bv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:Uv}=Object.prototype,Hv=ar("RegExp"),ng=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ta(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},jv=e=>{ng(e,(t,n)=>{if(Cn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Cn(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+"'")})}})},zv=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Vi(e)?r(e):r(String(e).split(t)),n},$v=()=>{},Vv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function qv(e){return!!(e&&Cn(e.append)&&e[X0]==="FormData"&&e[Zo])}const Yv=e=>{const t=new WeakSet,n=r=>{if(Bs(r)){if(t.has(r))return;if(Fs(r))return r;if(!("toJSON"in r)){t.add(r);const s=Vi(r)?[]:{};return ta(r,(a,u)=>{const l=n(a);!Ms(l)&&(s[u]=l)}),t.delete(r),s}}return r};return n(e)},Wv=ar("AsyncFunction"),Gv=e=>e&&(Bs(e)||Cn(e))&&Cn(e.then)&&Cn(e.catch),rg=((e,t)=>e?setImmediate:t?((n,r)=>(qi.addEventListener("message",({source:s,data:a})=>{s===qi&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),qi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Cn(qi.postMessage)),Xv=typeof queueMicrotask!="undefined"?queueMicrotask.bind(qi):typeof process!="undefined"&&process.nextTick||rg,ig=e=>e!=null&&Cn(e[Zo]),Y={isArray:Vi,isArrayBuffer:K0,isBuffer:Fs,isFormData:wv,isArrayBufferView:lv,isString:cv,isNumber:Q0,isBoolean:dv,isObject:Bs,isPlainObject:ju,isEmptyObject:fv,isReadableStream:_v,isRequest:Sv,isResponse:vv,isHeaders:Av,isUndefined:Ms,isDate:hv,isFile:pv,isReactNativeBlob:mv,isReactNative:gv,isBlob:Ev,isRegExp:Hv,isFunction:Cn,isStream:Tv,isURLSearchParams:xv,isTypedArray:Lv,isFileList:yv,forEach:ta,merge:Vd,extend:kv,trim:Cv,stripBOM:Nv,inherits:Ov,toFlatObject:Iv,kindOf:$d,kindOfTest:ar,endsWith:Pv,toArray:Rv,forEachEntry:Dv,matchAll:Mv,isHTMLForm:Fv,hasOwnProperty:Uu,hasOwnProp:Uu,hasOwnInPrototypeChain:ea,getSafeProp:uv,reduceDescriptors:ng,freezeMethods:jv,toObjectSet:zv,toCamelCase:Bv,noop:$v,toFiniteNumber:Vv,findKey:eg,global:qi,isContextDefined:tg,isSpecCompliantForm:qv,toJSONObject:Yv,isAsyncFn:Wv,isThenable:Gv,setImmediate:rg,asap:Xv,isIterable:ig,isSafeIterable:e=>e!=null&&ea(e,Zo)&&ig(e)},Kv=Y.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"]),Qv=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]&&Kv[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function Jv(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 Zv=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),eA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function qd(e,t){return Y.isArray(e)?e.map(n=>qd(n,t)):Jv(String(e).replace(t,""))}const tA=e=>qd(e,Zv),nA=e=>qd(e,eA);function sg(e){const t=Object.create(null);return Y.forEach(e.toJSON(),(n,r)=>{t[r]=nA(n)}),t}const og=Symbol("internals");function na(e){return e&&String(e).trim().toLowerCase()}function zu(e){return e===!1||e==null?e:Y.isArray(e)?e.map(zu):tA(String(e))}function rA(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 iA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Yd(e,t,n,r,s){if(Y.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!Y.isString(t)){if(Y.isString(r))return t.indexOf(r)!==-1;if(Y.isRegExp(r))return r.test(t)}}function sA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function oA(e,t){const n=Y.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 un=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(l,d,f){const m=na(d);if(!m)return;const p=Y.findKey(s,m);(!p||s[p]===void 0||f===!0||f===void 0&&s[p]!==!1)&&(s[p||d]=zu(l))}const u=(l,d)=>Y.forEach(l,(f,m)=>a(f,m,d));if(Y.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(Y.isString(t)&&(t=t.trim())&&!iA(t))u(Qv(t),n);else if(Y.isObject(t)&&Y.isSafeIterable(t)){let l=Object.create(null),d,f;for(const m of t){if(!Y.isArray(m))throw new TypeError("Object iterator must return a key-value pair");f=m[0],Y.hasOwnProp(l,f)?(d=l[f],l[f]=Y.isArray(d)?[...d,m[1]]:[d,m[1]]):l[f]=m[1]}u(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=na(t),t){const r=Y.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return rA(s);if(Y.isFunction(n))return n.call(this,s,r);if(Y.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=na(t),t){const r=Y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Yd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=na(u),u){const l=Y.findKey(r,u);l&&(!n||Yd(r,r[l],l,n))&&(delete r[l],s=!0)}}return Y.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||Yd(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return Y.forEach(this,(s,a)=>{const u=Y.findKey(r,a);if(u){n[u]=zu(s),delete n[a];return}const l=t?sA(a):String(a).trim();l!==a&&delete n[a],n[l]=zu(s),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&Y.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[og]=this[og]={accessors:{}}).accessors,s=this.prototype;function a(u){const l=na(u);r[l]||(oA(s,u),r[l]=!0)}return Y.isArray(t)?t.forEach(a):a(t),this}};un.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(un.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Y.freezeMethods(un);const aA="[REDACTED ****]";function uA(e){if(Y.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Y.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function lA(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||Y.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof un&&(a=a.toJSON()),r.push(a);let u;if(Y.isArray(a))u=[],a.forEach((l,d)=>{const f=s(l);Y.isUndefined(f)||(u[d]=f)});else{if(!Y.isPlainObject(a)&&uA(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?aA:s(d);Y.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return s(e)}let ke=class M2 extends Error{static from(t,n,r,s,a,u){const l=new M2(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&&Y.hasOwnProp(t,"redact")?t.redact:void 0,r=Y.isArray(n)&&n.length>0?lA(t,n):Y.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}}};ke.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ke.ERR_BAD_OPTION="ERR_BAD_OPTION",ke.ECONNABORTED="ECONNABORTED",ke.ETIMEDOUT="ETIMEDOUT",ke.ECONNREFUSED="ECONNREFUSED",ke.ERR_NETWORK="ERR_NETWORK",ke.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ke.ERR_DEPRECATED="ERR_DEPRECATED",ke.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ke.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ke.ERR_CANCELED="ERR_CANCELED",ke.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ke.ERR_INVALID_URL="ERR_INVALID_URL",ke.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const cA=null,ag=100;function Wd(e){return Y.isPlainObject(e)||Y.isArray(e)}function ug(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function Gd(e,t,n){return e?e.concat(t).map(function(s,a){return s=ug(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function dA(e){return Y.isArray(e)&&!e.some(Wd)}const fA=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function $u(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,O){return!Y.isUndefined(O[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?ag:n.maxDepth,f=l&&Y.isSpecCompliantForm(t),m=[];if(!Y.isFunction(s))throw new TypeError("visitor must be a function");function p(_){if(_===null)return"";if(Y.isDate(_))return _.toISOString();if(Y.isBoolean(_))return _.toString();if(!f&&Y.isBlob(_))throw new ke("Blob is not supported. Use a Buffer instead.");if(Y.isArrayBuffer(_)||Y.isTypedArray(_)){if(f&&typeof l=="function")return new l([_]);if(typeof Buffer!="undefined")return Buffer.from(_);throw new ke("Blob is not supported. Use a Buffer instead.",ke.ERR_NOT_SUPPORT)}return _}function b(_){if(_>d)throw new ke("Object is too deeply nested ("+_+" levels). Max depth: "+d,ke.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(_,k){if(d===1/0)return JSON.stringify(_);const O=[];return JSON.stringify(_,function(W,D){if(!Y.isObject(D))return D;for(;O.length&&O[O.length-1]!==this;)O.pop();return O.push(D),b(k+O.length-1),D})}function x(_,k,O){let z=_;if(Y.isReactNative(t)&&Y.isReactNativeBlob(_))return t.append(Gd(O,k,a),p(_)),!1;if(_&&!O&&typeof _=="object"){if(Y.endsWith(k,"{}"))k=r?k:k.slice(0,-2),_=y(_,1);else if(Y.isArray(_)&&dA(_)||(Y.isFileList(_)||Y.endsWith(k,"[]"))&&(z=Y.toArray(_)))return k=ug(k),z.forEach(function(D,V){!(Y.isUndefined(D)||D===null)&&t.append(u===!0?Gd([k],V,a):u===null?k:k+"[]",p(D))}),!1}return Wd(_)?!0:(t.append(Gd(O,k,a),p(_)),!1)}const S=Object.assign(fA,{defaultVisitor:x,convertValue:p,isVisitable:Wd});function A(_,k,O=0){if(!Y.isUndefined(_)){if(b(O),m.indexOf(_)!==-1)throw new Error("Circular reference detected in "+k.join("."));m.push(_),Y.forEach(_,function(W,D){(!(Y.isUndefined(W)||W===null)&&s.call(t,W,Y.isString(D)?D.trim():D,k,S))===!0&&A(W,k?k.concat(D):[D],O+1)}),m.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return A(e),t}function lg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Xd(e,t){this._pairs=[],e&&$u(e,this,t)}const cg=Xd.prototype;cg.append=function(t,n){this._pairs.push([t,n])},cg.toString=function(t){const n=t?r=>t.call(this,r,lg):lg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function hA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dg(e,t,n){if(!t)return e;e=e||"";const r=Y.isFunction(n)?{serialize:n}:n,s=Y.getSafeProp(r,"encode")||hA,a=Y.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=Y.isURLSearchParams(t)?t.toString():new Xd(t,r).toString(s),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class fg{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){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Kd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},pA={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Xd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Qd=typeof window!="undefined"&&typeof document!="undefined",Jd=typeof navigator=="object"&&navigator||void 0,mA=Qd&&(!Jd||["ReactNative","NativeScript","NS"].indexOf(Jd.product)<0),gA=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",EA=Qd&&window.location.href||"http://localhost",sn=H(H({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qd,hasStandardBrowserEnv:mA,hasStandardBrowserWebWorkerEnv:gA,navigator:Jd,origin:EA},Symbol.toStringTag,{value:"Module"}))),pA);function yA(e,t){return $u(e,new sn.classes.URLSearchParams,H({visitor:function(n,r,s,a){return sn.isNode&&Y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const hg=ag;function pg(e){if(e>hg)throw new ke("FormData field is too deeply nested ("+e+" levels). Max depth: "+hg,ke.ERR_FORM_DATA_DEPTH_EXCEEDED)}function TA(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)pg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function bA(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 mg(e){function t(n,r,s,a){pg(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&Y.isArray(s)?s.length:u,d?(Y.hasOwnProp(s,u)?s[u]=Y.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!l):((!Y.hasOwnProp(s,u)||!Y.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&Y.isArray(s[u])&&(s[u]=bA(s[u])),!l)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(r,s)=>{t(TA(r),s,n,0)}),n}return null}const Us=(e,t)=>e!=null&&Y.hasOwnProp(e,t)?e[t]:void 0;function wA(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ra={transitional:Kd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=Y.isObject(t);if(a&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return s?JSON.stringify(mg(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t)||Y.isReadableStream(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Us(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return yA(t,d).toString();if((l=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Us(this,"env"),m=f&&f.FormData;return $u(l?{"files[]":t}:t,m&&new m,d)}}return a||s?(n.setContentType("application/json",!1),wA(t)):t}],transformResponse:[function(t){const n=Us(this,"transitional")||ra.transitional,r=n&&n.forcedJSONParsing,s=Us(this,"responseType"),a=s==="json";if(Y.isResponse(t)||Y.isReadableStream(t))return t;if(t&&Y.isString(t)&&(r&&!s||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Us(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?ke.from(d,ke.ERR_BAD_RESPONSE,this,null,Us(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sn.classes.FormData,Blob:sn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch","query"],e=>{ra.headers[e]={}});function Zd(e,t){const n=this||ra,r=t||n,s=un.from(r.headers);let a=r.data;return Y.forEach(e,function(l){a=l.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function gg(e){return!!(e&&e.__CANCEL__)}let ia=class extends ke{constructor(t,n,r){super(t==null?"canceled":t,ke.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Eg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ke("Request failed with status code "+n.status,n.status>=400&&n.status<500?ke.ERR_BAD_REQUEST:ke.ERR_BAD_RESPONSE,n.config,n.request,n))}function xA(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function _A(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(),m=r[a];u||(u=f),n[s]=d,r[s]=f;let p=a,b=0;for(;p!==s;)b+=n[p++],p=p%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=m&&f-m;return y?Math.round(b*1e3/y):void 0}}function SA(e,t){let n=0,r=1e3/t,s,a;const u=(f,m=Date.now())=>{n=m,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const m=Date.now(),p=m-n;p>=r?u(f,m):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-p)))},()=>s&&u(s)]}const Vu=(e,t,n=3)=>{let r=0;const s=_A(50,250);return SA(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),m=s(f);r=Math.max(r,d);const p={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:m||void 0,estimated:m&&l?(l-d)/m:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},n)},yg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Tg=e=>(...t)=>Y.asap(()=>e(...t)),vA=sn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,sn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(sn.origin),sn.navigator&&/(msie|trident)/i.test(sn.navigator.userAgent)):()=>!0,AA=sn.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];Y.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),Y.isString(r)&&l.push(`path=${r}`),Y.isString(s)&&l.push(`domain=${s}`),a===!0&&l.push("secure"),Y.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 CA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function kA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const NA=/^https?:(?!\/\/)/i,OA=/[\t\n\r]/g;function IA(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function PA(e){return IA(e).replace(OA,"")}function bg(e,t){if(typeof e=="string"&&NA.test(PA(e)))throw new ke('Invalid URL: missing "//" after protocol',ke.ERR_INVALID_URL,t)}function wg(e,t,n,r){bg(t,r);let s=!CA(t);return e&&(s||n===!1)?(bg(e,r),kA(e,t)):t}const xg=e=>e instanceof un?H({},e):e;function Yi(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(m,p,b,y){return Y.isPlainObject(m)&&Y.isPlainObject(p)?Y.merge.call({caseless:y},m,p):Y.isPlainObject(p)?Y.merge({},p):Y.isArray(p)?p.slice():p}function s(m,p,b,y){if(Y.isUndefined(p)){if(!Y.isUndefined(m))return r(void 0,m,b,y)}else return r(m,p,b,y)}function a(m,p){if(!Y.isUndefined(p))return r(void 0,p)}function u(m,p){if(Y.isUndefined(p)){if(!Y.isUndefined(m))return r(void 0,m)}else return r(void 0,p)}function l(m){const p=Y.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Y.isUndefined(p))if(Y.isPlainObject(p)){if(Y.hasOwnProp(p,m))return p[m]}else return;const b=Y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Y.isPlainObject(b)&&Y.hasOwnProp(b,m))return b[m]}function d(m,p,b){if(Y.hasOwnProp(t,b))return r(m,p);if(Y.hasOwnProp(e,b))return r(void 0,m)}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:(m,p,b)=>s(xg(m),xg(p),b,!0)};return Y.forEach(Object.keys(H(H({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const b=Y.hasOwnProp(f,p)?f[p]:s,y=Y.hasOwnProp(e,p)?e[p]:void 0,x=Y.hasOwnProp(t,p)?t[p]:void 0,S=b(y,x,p);Y.isUndefined(S)&&b!==d||(n[p]=S)}),Y.hasOwnProp(t,"validateStatus")&&Y.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(Y.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const RA=["content-type","content-length"];function LA(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{RA.includes(r.toLowerCase())&&e.set(r,s)})}const DA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function _g(e){const t=Yi({},e),n=b=>Y.hasOwnProp(t,b)?t[b]: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"),m=n("allowAbsoluteUrls"),p=n("url");if(t.headers=l=un.from(l),t.url=dg(wg(f,p,m,t),n("params"),n("paramsSerializer")),d){const b=Y.getSafeProp(d,"username")||"",y=Y.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(b+":"+(y?DA(y):"")))}catch(x){throw ke.from(x,ke.ERR_BAD_OPTION_VALUE,e)}}if(Y.isFormData(r)&&(sn.hasStandardBrowserEnv||sn.hasStandardBrowserWebWorkerEnv||Y.isReactNative(r)?l.setContentType(void 0):Y.isFunction(r.getHeaders)&&LA(l,r.getHeaders(),n("formDataHeaderPolicy"))),sn.hasStandardBrowserEnv&&(Y.isFunction(s)&&(s=s(t)),s===!0||s==null&&vA(t.url))){const y=a&&u&&AA.read(u);y&&l.set(a,y)}return t}const MA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=_g(e);let a=s.data;const u=un.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=s,m,p,b,y,x;function S(){y&&y(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(m),s.signal&&s.signal.removeEventListener("abort",m)}let A=new XMLHttpRequest;A.open(s.method.toUpperCase(),s.url,!0),A.timeout=s.timeout;function _(){if(!A)return;const O=un.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),W={data:!l||l==="text"||l==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:O,config:e,request:A};Eg(function(V){n(V),S()},function(V){r(V),S()},W),A=null}"onloadend"in A?A.onloadend=_:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(_)},A.onabort=function(){A&&(r(new ke("Request aborted",ke.ECONNABORTED,e,A)),S(),A=null)},A.onerror=function(z){const W=z&&z.message?z.message:"Network Error",D=new ke(W,ke.ERR_NETWORK,e,A);D.event=z||null,r(D),S(),A=null},A.ontimeout=function(){let z=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const W=s.transitional||Kd;s.timeoutErrorMessage&&(z=s.timeoutErrorMessage),r(new ke(z,W.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,A)),S(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&Y.forEach(sg(u),function(z,W){A.setRequestHeader(W,z)}),Y.isUndefined(s.withCredentials)||(A.withCredentials=!!s.withCredentials),l&&l!=="json"&&(A.responseType=s.responseType),f&&([b,x]=Vu(f,!0),A.addEventListener("progress",b)),d&&A.upload&&([p,y]=Vu(d),A.upload.addEventListener("progress",p),A.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(m=O=>{A&&(r(!O||O.type?new ia(null,e,A):O),A.abort(),S(),A=null)},s.cancelToken&&s.cancelToken.subscribe(m),s.signal&&(s.signal.aborted?m():s.signal.addEventListener("abort",m)));const k=xA(s.url);if(k&&!sn.protocols.includes(k)){r(new ke("Unsupported protocol "+k+":",ke.ERR_BAD_REQUEST,e)),S();return}A.send(a||null)})},FA=(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 ke?f:new ia(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new ke(`timeout of ${t}ms exceeded`,ke.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=()=>Y.asap(u),l},BA=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},UA=function(e,t){return g0(this,null,function*(){try{for(var n=D2(HA(e)),r,s,a;r=!(s=yield new Os(n.next())).done;r=!1){const u=s.value;yield*E0(BA(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Os(s.call(n)))}finally{if(a)throw a[0]}}})},HA=function(e){return g0(this,null,function*(){if(e[Symbol.asyncIterator]){yield*E0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Os(t.read());if(n)break;yield r}}finally{yield new Os(t.cancel())}})},Sg=(e,t,n,r)=>{const s=UA(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Fe(this,null,function*(){try{const{done:m,value:p}=yield s.next();if(m){l(),f.close();return}let b=p.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(p))}catch(m){throw l(m),m}})},cancel(f){return l(f),s.return()}},{highWaterMark:2})},qu=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,jA=(e,t,n)=>t+2<n&&qu(e.charCodeAt(t+1))&&qu(e.charCodeAt(t+2));function zA(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),S=r.charCodeAt(y+2);qu(x)&&qu(S)&&(u-=2,y+=2)}let d=0,f=l-1;const m=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--):m(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||m(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}let a=0;for(let u=0,l=r.length;u<l;u++){const d=r.charCodeAt(u);if(d===37&&jA(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 ef="1.18.1",vg=64*1024,{isFunction:Yu}=Y,$A=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Ag=e=>{if(!Y.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Cg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},VA=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},qA=e=>{const t=Y.global!==void 0&&Y.global!==null?Y.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Y.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,l=s?Yu(s):typeof fetch=="function",d=Yu(a),f=Yu(u);if(!l)return!1;const m=l&&Yu(n),p=l&&(typeof r=="function"?(_=>k=>_.encode(k))(new r):_=>Fe(null,null,function*(){return new Uint8Array(yield new a(_).arrayBuffer())})),b=d&&m&&Cg(()=>{let _=!1;const k=new a(sn.origin,{body:new n,method:"POST",get duplex(){return _=!0,"half"}}),O=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),_&&!O}),y=f&&m&&Cg(()=>Y.isReadableStream(new u("").body)),x={stream:y&&(_=>_.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!x[_]&&(x[_]=(k,O)=>{let z=k&&k[_];if(z)return z.call(k);throw new ke(`Response type '${_}' is not supported`,ke.ERR_NOT_SUPPORT,O)})});const S=_=>Fe(null,null,function*(){if(_==null)return 0;if(Y.isBlob(_))return _.size;if(Y.isSpecCompliantForm(_))return(yield new a(sn.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(Y.isArrayBufferView(_)||Y.isArrayBuffer(_))return _.byteLength;if(Y.isURLSearchParams(_)&&(_=_+""),Y.isString(_))return(yield p(_)).byteLength}),A=(_,k)=>Fe(null,null,function*(){const O=Y.toFiniteNumber(_.getContentLength());return O==null?S(k):O});return _=>Fe(null,null,function*(){let{url:k,method:O,data:z,signal:W,cancelToken:D,timeout:V,onDownloadProgress:J,onUploadProgress:ce,responseType:U,headers:ie,withCredentials:se="same-origin",fetchOptions:ue,maxContentLength:fe,maxBodyLength:ne}=_g(_);const Se=Y.isNumber(fe)&&fe>-1,de=Y.isNumber(ne)&&ne>-1,Q=he=>Y.hasOwnProp(_,he)?_[he]:void 0;let le=s||fetch;U=U?(U+"").toLowerCase():"text";let C=FA([W,D&&D.toAbortSignal()],V),M=null;const Z=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let P,ve=null;const Pe=()=>new ke("Request body larger than maxBodyLength limit",ke.ERR_BAD_REQUEST,_,M);try{let he;const Ce=Q("auth");if(Ce){const $e=Y.getSafeProp(Ce,"username")||"",St=Y.getSafeProp(Ce,"password")||"";he={username:$e,password:St}}if(VA(k)){const $e=new URL(k,sn.origin);if(!he&&($e.username||$e.password)){const St=Ag($e.username),Wt=Ag($e.password);he={username:St,password:Wt}}($e.username||$e.password)&&($e.username="",$e.password="",k=$e.href)}if(he&&(ie.delete("authorization"),ie.set("Authorization","Basic "+btoa($A((he.username||"")+":"+(he.password||""))))),Se&&typeof k=="string"&&k.startsWith("data:")&&zA(k)>fe)throw new ke("maxContentLength size of "+fe+" exceeded",ke.ERR_BAD_RESPONSE,_,M);if(de&&O!=="get"&&O!=="head"){const $e=yield S(z);if(typeof $e=="number"&&isFinite($e)&&(P=$e,$e>ne))throw Pe()}const Me=de&&(Y.isReadableStream(z)||Y.isStream(z)),He=($e,St,Wt)=>Sg($e,vg,Ie=>{if(de&&Ie>ne)throw ve=Pe();St&&St(Ie)},Wt);if(b&&O!=="get"&&O!=="head"&&(ce||Me)){if(P=P==null?yield A(ie,z):P,P!==0||Me){let $e=new a(k,{method:"POST",body:z,duplex:"half"}),St;if(Y.isFormData(z)&&(St=$e.headers.get("content-type"))&&ie.setContentType(St),$e.body){const[Wt,Ie]=ce&&yg(P,Vu(Tg(ce)))||[];z=He($e.body,Wt,Ie)}}}else if(Me&&!d&&m&&O!=="get"&&O!=="head")z=He(z);else if(Me&&d&&!b&&O!=="get"&&O!=="head")throw new ke("Stream request bodies are not supported by the current fetch implementation",ke.ERR_NOT_SUPPORT,_,M);Y.isString(se)||(se=se?"include":"omit");const nt=d&&"credentials"in a.prototype;if(Y.isFormData(z)){const $e=ie.getContentType();$e&&/^multipart\/form-data/i.test($e)&&!/boundary=/i.test($e)&&ie.delete("content-type")}ie.set("User-Agent","axios/"+ef,!1);const Nt=oe(H({},ue),{signal:C,method:O.toUpperCase(),headers:sg(ie.normalize()),body:z,duplex:"half",credentials:nt?se:void 0});M=d&&new a(k,Nt);let Ft=yield d?le(M,ue):le(k,Nt);const xn=un.from(Ft.headers);if(Se){const $e=Y.toFiniteNumber(xn.getContentLength());if($e!=null&&$e>fe)throw new ke("maxContentLength size of "+fe+" exceeded",ke.ERR_BAD_RESPONSE,_,M)}const pn=y&&(U==="stream"||U==="response");if(y&&Ft.body&&(J||Se||pn&&Z)){const $e={};["status","statusText","headers"].forEach(ft=>{$e[ft]=Ft[ft]});const St=Y.toFiniteNumber(xn.getContentLength()),[Wt,Ie]=J&&yg(St,Vu(Tg(J),!0))||[];let Xe=0;const ot=ft=>{if(Se&&(Xe=ft,Xe>fe))throw new ke("maxContentLength size of "+fe+" exceeded",ke.ERR_BAD_RESPONSE,_,M);Wt&&Wt(ft)};Ft=new u(Sg(Ft.body,vg,ot,()=>{Ie&&Ie(),Z&&Z()}),$e)}U=U||"text";let Bt=yield x[Y.findKey(x,U)||"text"](Ft,_);if(Se&&!y&&!pn){let $e;if(Bt!=null&&(typeof Bt.byteLength=="number"?$e=Bt.byteLength:typeof Bt.size=="number"?$e=Bt.size:typeof Bt=="string"&&($e=typeof r=="function"?new r().encode(Bt).byteLength:Bt.length)),typeof $e=="number"&&$e>fe)throw new ke("maxContentLength size of "+fe+" exceeded",ke.ERR_BAD_RESPONSE,_,M)}return!pn&&Z&&Z(),yield new Promise(($e,St)=>{Eg($e,St,{data:Bt,headers:un.from(Ft.headers),status:Ft.status,statusText:Ft.statusText,config:_,request:M})})}catch(he){if(Z&&Z(),C&&C.aborted&&C.reason instanceof ke){const Ce=C.reason;throw Ce.config=_,M&&(Ce.request=M),he!==Ce&&Object.defineProperty(Ce,"cause",{__proto__:null,value:he,writable:!0,enumerable:!1,configurable:!0}),Ce}if(ve)throw M&&!ve.request&&(ve.request=M),ve;if(he instanceof ke)throw M&&!he.request&&(he.request=M),he;if(he&&he.name==="TypeError"&&/Load failed|fetch/i.test(he.message)){const Ce=new ke("Network Error",ke.ERR_NETWORK,_,M,he&&he.response);throw Object.defineProperty(Ce,"cause",{__proto__:null,value:he.cause||he,writable:!0,enumerable:!1,configurable:!0}),Ce}throw ke.from(he,he&&he.code,_,M,he&&he.response)}})},YA=new Map,kg=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,m=YA;for(;l--;)d=a[l],f=m.get(d),f===void 0&&m.set(d,f=l?new Map:qA(t)),m=f;return f};kg();const tf={http:cA,xhr:MA,fetch:{get:kg}};Y.forEach(tf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Ng=e=>`- ${e}`,WA=e=>Y.isFunction(e)||e===null||e===!1;function GA(e,t){e=Y.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,!WA(r)&&(s=tf[(l=String(r)).toLowerCase()],s===void 0))throw new ke(`Unknown adapter '${l}'`);if(s&&(Y.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(Ng).join(`
12
- `):" "+Ng(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 Og={getAdapter:GA,adapters:tf};function nf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ia(null,e)}function Ig(e){return nf(e),e.headers=un.from(e.headers),e.data=Zd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Og.getAdapter(e.adapter||ra.adapter,e)(e).then(function(r){nf(e),e.response=r;try{r.data=Zd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=un.from(r.headers),r},function(r){if(!gg(r)&&(nf(e),r&&r.response)){e.response=r.response;try{r.response.data=Zd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=un.from(r.response.headers)}return Promise.reject(r)})}const Gu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Pg={};Gu.transitional=function(t,n,r){function s(a,u){return"[Axios v"+ef+"] 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&&!Pg[u]&&(Pg[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}},Gu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function XA(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 Xu={assertOptions:XA,validators:Gu},ln=Xu.validators;let Wi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new fg,response:new fg}}request(t,n){return Fe(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
+ `):" "+Ng(u[0]):"as no adapter specified";throw new ke("There is no suitable adapter to dispatch the request "+l,ke.ERR_NOT_SUPPORT)}return s}const Og={getAdapter:GA,adapters:tf};function nf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ia(null,e)}function Ig(e){return nf(e),e.headers=un.from(e.headers),e.data=Zd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Og.getAdapter(e.adapter||ra.adapter,e)(e).then(function(r){nf(e),e.response=r;try{r.data=Zd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=un.from(r.headers),r},function(r){if(!gg(r)&&(nf(e),r&&r.response)){e.response=r.response;try{r.response.data=Zd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=un.from(r.response.headers)}return Promise.reject(r)})}const Wu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Wu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Pg={};Wu.transitional=function(t,n,r){function s(a,u){return"[Axios v"+ef+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new ke(s(u," has been removed"+(n?" in "+n:"")),ke.ERR_DEPRECATED);return n&&!Pg[u]&&(Pg[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}},Wu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function XA(e,t,n){if(typeof e!="object"||e===null)throw new ke("options must be an object",ke.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 ke("option "+a+" must be "+d,ke.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ke("Unknown option "+a,ke.ERR_BAD_OPTION)}}const Gu={assertOptions:XA,validators:Wu},ln=Gu.validators;let Wi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new fg,response:new fg}}request(t,n){return Fe(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=Yi(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Xu.assertOptions(r,{silentJSONParsing:ln.transitional(ln.boolean),forcedJSONParsing:ln.transitional(ln.boolean),clarifyTimeoutError:ln.transitional(ln.boolean),legacyInterceptorReqResOrdering:ln.transitional(ln.boolean),advertiseZstdAcceptEncoding:ln.transitional(ln.boolean),validateStatusUndefinedResolves:ln.transitional(ln.boolean)},!1),s!=null&&(Y.isFunction(s)?n.paramsSerializer={serialize:s}:Xu.assertOptions(s,{encode:ln.function,serialize:ln.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Xu.assertOptions(n,{baseUrl:ln.spelling("baseURL"),withXsrfToken:ln.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Y.merge(a.common,a[n.method]);a&&Y.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=un.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;d=d&&S.synchronous;const A=n.transitional||Kd;A&&A.legacyInterceptorReqResOrdering?l.unshift(S.fulfilled,S.rejected):l.push(S.fulfilled,S.rejected)});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let m,p=0,b;if(!d){const x=[Ig.bind(this),void 0];for(x.unshift(...l),x.push(...f),b=x.length,m=Promise.resolve(n);p<b;)m=m.then(x[p++],x[p++]);return m}b=l.length;let y=n;for(;p<b;){const x=l[p++],S=l[p++];try{y=x(y)}catch(A){S.call(this,A);break}}try{m=Ig.call(this,y)}catch(x){return Promise.reject(x)}for(p=0,b=f.length;p<b;)m=m.then(f[p++],f[p++]);return m}getUri(t){t=Yi(this.defaults,t);const n=wg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return dg(n,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){Wi.prototype[t]=function(n,r){return this.request(Yi(r||{},{method:t,url:n,data:r&&Y.hasOwnProp(r,"data")?r.data:void 0}))}}),Y.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(Yi(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Wi.prototype[t]=n(),t!=="query"&&(Wi.prototype[t+"Form"]=n(!0))});let KA=class F2{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 ia(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 F2(function(s){t=s}),cancel:t}}};function QA(e){return function(n){return e.apply(null,n)}}function JA(e){return Y.isObject(e)&&e.isAxiosError===!0}const rf={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(rf).forEach(([e,t])=>{rf[t]=e});function Rg(e){const t=new Wi(e),n=G0(Wi.prototype.request,t);return Y.extend(n,Wi.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Rg(Yi(e,s))},n}const Dt=Rg(ra);Dt.Axios=Wi,Dt.CanceledError=ia,Dt.CancelToken=KA,Dt.isCancel=gg,Dt.VERSION=ef,Dt.toFormData=Vu,Dt.AxiosError=Ce,Dt.Cancel=Dt.CanceledError,Dt.all=function(t){return Promise.all(t)},Dt.spread=QA,Dt.isAxiosError=JA,Dt.mergeConfig=Yi,Dt.AxiosHeaders=un,Dt.formToJSON=e=>mg(Y.isHTMLForm(e)?new FormData(e):e),Dt.getAdapter=Og.getAdapter,Dt.HttpStatusCode=rf,Dt.default=Dt;const{Axios:yU,AxiosError:TU,CanceledError:bU,isCancel:wU,CancelToken:xU,VERSION:_U,all:SU,Cancel:vU,isAxiosError:AU,spread:kU,toFormData:CU,AxiosHeaders:NU,HttpStatusCode:OU,formToJSON:IU,getAdapter:PU,mergeConfig:RU,create:LU}=Dt;class ZA{constructor(t,n,r,s=!1,a,u){Je(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Je(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Je(this,"CIMULATE_SEARCH_API_PATH","api/v1");Je(this,"baseApiUrl");Je(this,"headers",{});Je(this,"fetchConfig",()=>Fe(this,null,function*(){try{const t=yield Dt.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}}));Je(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 ek{constructor(t,n,r,s=!1,a,u){Je(this,"apiService");Je(this,"config",null);Je(this,"getConfig",()=>Fe(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}}));Je(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Je(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Je(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Je(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Je(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Je(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Je(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Je(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Je(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Je(this,"getProductField",t=>this.config?this.config[t]:"");Je(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new ZA(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 tk={copilot:"Your Search Assistant",messaging:"Commerce Client"},Lg=R.createContext(null),nk=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:m,searchPlaceholder:p,searchButtonLabel:b,searchConfig:y,suggestionButtonConfig:x,progressStepsLimit:S=3,messageAlignment:A="start",autoScroll:_=!0,showProductDescription:C=!1,componentConfig:O,conversationHistory:z,resetConversationMessage:W="",apiKey:D,apiToken:V,baseUrl:K,customerId:ae,tenantId:j,theme:se,isDevelopment:ie,__features:ce,routingAttributes:fe,enableDownloadTranscript:ne=!0,enableEscalationToAgent:Se=!1,showProductCaptions:de=!1,staticQuestions:J,staticQuestionsStrategy:le="append",children:k})=>{const M=e==="messaging",Z=R.useMemo(()=>{const He=fe==null?void 0:fe.isCartMgmtSupported;return He===!0||He==="true"},[fe]),P=R.useMemo(()=>M?{config:null}:new ek(K,D,V,ie,ae,j),[M,K,D,V,ie,ae,j]),ve=R.useMemo(()=>new MS(ie),[ie]);R.useEffect(()=>{M||!P||P.config||P.getConfig()},[P,M]);const Pe=R.useMemo(()=>$S(se),[se]),he=R.useMemo(()=>{const He=(y==null?void 0:y.placeholder)||p,nt=(y==null?void 0:y.buttonLabel)||b;let Nt="icon";return y!=null&&y.buttonType?Nt=y.buttonType:b&&(Nt="text"),ue(U({},y||{}),{placeholder:He,buttonLabel:nt,buttonType:Nt})},[y,p,b]),ke=R.useMemo(()=>ue(U({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||tk[e!=null?e:"copilot"]}),[r,t,n,e]),Me=R.useMemo(()=>({configModule:P,mode:e!=null?e:"copilot",headerConfig:ke,entryMessage:a,staticQuestions:J||[],staticQuestionsStrategy:le,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:m,themeVariables:Pe,logger:ve,searchConfig:he,suggestionButtonConfig:x,progressStepsLimit:S,messageAlignment:A,autoScroll:_,showProductDescription:!!C,enableMinimize:!!(O!=null&&O.enableMinimize),enableDownloadTranscript:ne,enableEscalationToAgent:Se,showProductCaptions:!!de,resetConversationMessage:W,conversationHistory:{sinceHours:typeof(z==null?void 0:z.sinceHours)=="number"?z.sinceHours:M?24:1,limit:z==null?void 0:z.limit},features:ce,isCartMgmtSupported:Z}),[P,e,ke,a,J,le,s,f,m,l,d,u,he,x,A,_,C,O,ne,Se,S,de,W,ve,Pe,z,ce,Z]);return w.jsx(Lg.Provider,{value:Me,children:k})},ct=()=>{const e=R.useContext(Lg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},Dg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],li=-1;function Mg(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e,n=typeof t.text=="string"?t.text:"",r=typeof t.message=="string"?t.message:"";return n||r||null}function Fg(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"){if(!Array.isArray(t)&&typeof t.type=="string"&&typeof t.index=="number"&&Dg.includes(t.type))return t;const n=Mg(t);return n?{type:"markdown",index:li,data:{content:n}}:null}}catch(t){}return{type:"markdown",index:li,data:{content:e}}}function Bg(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"||!Dg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return ue(U({},n),{type:n.type,index:r})}function Ku(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function rk(e){var s,a;if(e.type!=="markdown")return[e];const t=(a=(s=e.data)==null?void 0:s.content)!=null?a:"",n=Ku(t);if(n)return n.response;const r=Bg(t);return[r&&r.type!=="markdown"?r:e]}function Ug(e,t){var n,r;return(r=(n=Ku(e))==null?void 0:n.response.some(s=>s.type===t))!=null?r:!1}function ik(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.role==="agent"&&Ug(r.content,t))return r.id}}function Hg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function sk(e){return e.type==="markdown"&&e.index===li?!Hg(e.data.content):!0}function ok(e){var s;const t=(s=Ku(e))==null?void 0:s.response;if(!t)return null;const n=t.find(a=>a.type==="product_carousel");if(n)return{kind:"search",productIds:n.data.products.map(a=>a.id)};const r=t.find(a=>a.type==="product_tile");return r?{kind:"detail",productIds:[r.data.id]}:null}function ak(e,t){if(t.index===li){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===li&&t.type==="markdown"){const a={type:"markdown",index:li,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 jg(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const zg={connectionStatus:"disconnected",loading:!1,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function uk(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 jg(e.messages,t.message)?e:ue(U({},e),{messages:[...e.messages,ue(U({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=Fg(t.token);return n?ue(U({},e),{streamingBlocks:ak(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(jg(e.messages,t.message))return U(U({},e),n);const r=ue(U({},t.message),{type:"FLUSH_STREAMING"}),s=t.replaceMessageId?e.messages.findIndex(a=>a.id===t.replaceMessageId):-1;if(s>=0){const a=[...e.messages];return a[s]=ue(U({},r),{id:e.messages[s].id}),U(ue(U({},e),{messages:a}),n)}return U(ue(U({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return ue(U({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return U(ue(U({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return 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"RESET":return ue(U({},zg),{connectionStatus:e.connectionStatus});default:return e}}const $g=R.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,canInitialize:!0,sendMessage:()=>Fe(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>Fe(null,null,function*(){}),retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>Fe(null,null,function*(){}),getAuthLinkKey:()=>Fe(null,null,function*(){throw new Error("getAuthLinkKey called without a MessagingProvider")})}),lk=4320*60*1e3;function sf(e,t){return`cim_af_conv_${e}_${t}`}function of(e,t){return Date.now()-e>t}function ck(e,t,n){try{const r=sf(e,t),s=localStorage.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"||of(u.storedAt,n)?(localStorage.removeItem(r),null):u}catch(r){return null}}function Qu(e,t,n){try{const r=sf(e,t),s={conversationId:n,storedAt:Date.now()};localStorage.setItem(r,JSON.stringify(s))}catch(r){}}function af(e,t){try{const n=sf(e,t);localStorage.removeItem(n)}catch(n){}}function uf(e,t){return`cim_af_ct_${e}_${t}`}function dk(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(hk(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function fk(e){const t=dk(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function hk(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function Vg(e,t){try{const n=uf(e,t),r=localStorage.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:fk(a.accessToken)==="expired"?(localStorage.removeItem(n),null):a}catch(n){return null}}function pk(e,t,n,r){try{const s=uf(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};localStorage.setItem(s,JSON.stringify(a))}catch(s){}}function mk(e,t){try{const n=uf(e,t);localStorage.removeItem(n)}catch(n){}}function gk(e,t){return`cim_af_conv_${e}_${t}`}function Ek(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=gk(e,t);return new BroadcastChannel(n)}catch(n){return null}}function yk(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 Tk(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 bk(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function wk(e){if(e)try{e.close()}catch(t){}}function xk(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function _k(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function qg(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 Sk(e){if(e.entryType!=="Message")return null;const n=_k(e.entryPayload).abstractMessage;if(!n)return null;const r=qg(n,"staticContent","text")||qg(n,"content","text")||"";if(!r)return null;const s=xk(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 vk(e){const t=[];for(const n of e){const r=Sk(n);r&&t.push(r)}return t}const Ak=5e3,sa=Symbol("cimulate-abort-conversation");function Ju(e={}){const{routingAttributes:t,timeoutMs:n=Ak}=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)},d={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u,abort:()=>{a.settled||(a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer),s(sa))}},f=new CustomEvent($0,{detail:d,cancelable:!0});if(!!window.dispatchEvent(f)){u();return}a.timer=setTimeout(u,n)})}const kk=200,Ck=1e3;function Nk(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=R.useRef(null),u=R.useRef(null),l=R.useRef(null),d=s.sinceHours*60*60*1e3,f=lk,m=R.useCallback(()=>(l.current||(l.current=yk(a.current)),l.current),[]);R.useEffect(()=>{const _=Ek(t,n);a.current=_,l.current=null;const C=Tk(_,()=>{const O=u.current;if(!O)return null;const z=Vg(t,n);return{conversationId:O,continuationToken:z==null?void 0:z.accessToken,lastEventId:z==null?void 0:z.lastEventId}},()=>{af(t,n),u.current=null});return()=>{C(),wk(_),a.current=null}},[t,n]);const p=R.useCallback((_,C)=>Fe(null,null,function*(){var D,V,K;const O=(D=C==null?void 0:C.createIfMissing)!=null?D:!0,z=(V=C==null?void 0:C.isCurrent)!=null?V:(()=>!0);let W=ck(t,n,f);if(!W){const ae=yield m();ae&&!of(ae.storedAt,f)&&(W=ae)}if(!W){if(!O)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const ae=yield Ju({routingAttributes:r});if(ae===sa)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!z())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const j=yield _.createConversation(ae);return z()?(Qu(t,n,j),u.current=j,{conversationId:j,restoredMessages:[],resumed:!1,outcome:"created"}):(yield _.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}try{const ae=yield _.listConversations({conversationId:W.conversationId,startTimestamp:Date.now()-f});if(!z())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const j=ae.conversations.find(ie=>ie.conversationId===W.conversationId&&!ie.isConversationClosed);if(!j){if(af(t,n),!O)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const ie=yield Ju({routingAttributes:r});if(ie===sa)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!z())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const ce=yield _.createConversation(ie);return z()?(Qu(t,n,ce),u.current=ce,{conversationId:ce,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}):(yield _.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}_.resumeConversation(j.conversationId),u.current=j.conversationId,Qu(t,n,j.conversationId);let se=[];try{const ie=yield _.listConversationEntries(j.conversationId,{limit:Math.min((K=s.limit)!=null?K:kk,Ck),startTimestamp:Date.now()-d,direction:"FromEnd"});se=vk(ie.conversationEntries).reverse()}catch(ie){}return{conversationId:j.conversationId,restoredMessages:se,resumed:!0,outcome:"resumed"}}catch(ae){return{conversationId:W.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:ae}}}),[t,n,r,s,d,f,m]),b=R.useCallback(_=>{Qu(t,n,_),u.current=_},[t,n]),y=R.useCallback(()=>{af(t,n),mk(t,n),bk(a.current),u.current=null},[t,n]),x=R.useCallback(()=>{const _=Vg(t,n);return _?{continuationToken:_.accessToken,lastEventId:_.lastEventId}:null},[t,n]),S=R.useCallback(()=>Fe(null,null,function*(){const _=yield m();return!(_!=null&&_.continuationToken)||of(_.storedAt,f)?null:{continuationToken:_.continuationToken,lastEventId:_.lastEventId}}),[f,m]),A=R.useCallback((_,C=()=>!0)=>Fe(null,null,function*(){try{const{accessToken:O,lastEventId:z}=yield _.generateContinuationToken();if(!C())return;pk(t,n,O,z)}catch(O){}}),[t,n]);return{initializeConversation:p,persistConversationId:b,clearPersistedConversation:y,getStoredConnectOptions:x,getPeerConnectOptions:S,persistContinuationToken:A}}const Ok="Your session ended due to inactivity. Starting a new session…",Ik=300*1e3,Pk=2e3,Rk=1e4,Lk=15e3,Dk=2;function Yg(e,t,n){return e||t||n===!0}function oa(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function Mk(e){const t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{const n=JSON.parse(t);return typeof n=="object"&&n!==null}catch(n){return!1}}function Wg(e){if(!e||typeof e!="object")return!1;const t=e,n=t.type==="auth",r=t.type==="api"&&(t.statusCode===401||t.statusCode===403);return n||r}function lf(e){if(Wg(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function Fk(e){var b;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((b=e.variants)!=null?b:[]).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}]`:"",m=`${d} ${t} to my cart${u}${f}`,p=`Add ${n?`${n} × `:""}${t} to cart${l}`;return{prompt:m,display:p}}function Bk({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:s,resumeUsedLastEventId:a,recoverySteps:u,onExhausted:l,timeoutMs:d=Lk,logger:f,isRecoveryInFlight:m}){const p=R.useRef(u);p.current=u;const b=R.useRef(l);b.current=l;const y=R.useRef(f);y.current=f;const x=R.useRef(m);x.current=m;const S=R.useRef(0),A=R.useRef(!1),_=R.useRef(0),[C,O]=R.useState(0);R.useEffect(()=>{if(!t||n){S.current=0,A.current=!1,_.current=0;return}const z=a||S.current>0;if(!(s&&z&&e==="connected"&&!r&&!A.current))return;const D=setTimeout(()=>{Fe(null,null,function*(){var j,se;if((j=x.current)!=null&&j.call(x)){if(_.current+=1,_.current>Dk){A.current=!0,b.current();return}O(ie=>ie+1);return}const V=S.current,K=p.current;if(V>=K.length){A.current=!0,b.current();return}_.current=0,(se=y.current)==null||se.warn("🦜 connect bootstrap stalled",{attempt:V});let ae;try{yield Promise.race([Promise.resolve(K[V]()),new Promise((ie,ce)=>{ae=setTimeout(()=>{ce(new Error("connect bootstrap step timed out"))},d)})])}catch(ie){}finally{ae!==void 0&&clearTimeout(ae),S.current=V+1,O(ie=>ie+1)}})},d);return()=>{clearTimeout(D)}},[e,t,n,r,s,a,d,C])}const Sr={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 Uk(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 ci(e){const{type:t,statusCode:n}=Uk(e);if(t==="api"&&typeof n=="number")return n===429?Sr.rateLimit:n>=500?Sr.server:Sr.default;switch(t){case"network":return Sr.network;case"sse":return Sr.interrupted;case"auth":return Sr.connect;default:return Sr.default}}function Gg(e){switch(e.code){case"MAX_RECONNECT":return Sr.lost;case"ROUTING_FAILED":return Sr.routing;default:return Sr.connect}}let Gi=null;function Hk(e){Gi&&Gi!==e&&console.warn("[CimulateMessaging] A messaging API is already registered; overwriting it. Mounting more than one messaging widget per page is not supported."),Gi=e}function jk(e){Gi===e&&(Gi=null)}function zk(){if(!Gi)throw new Error("Cimulate messaging widget is not ready. Call this after injectMessagingWidget() has run and the widget has mounted.");return Gi}const Hs=Symbol("initialization-cancelled"),Xg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,onProductResult:f,children:m})=>{const{logger:p,conversationHistory:b}=ct(),{status:{isOpen:y}}=Vr(),[x,S]=R.useReducer(uk,zg),[A,_]=R.useState(!1),[C,O]=R.useState(!1),[z,W]=R.useState(!1),D=R.useRef(x);D.current=x;const V=Nk({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:b}),K=R.useRef(null),ae=R.useRef(l),j=R.useRef(d),se=R.useRef(u),ie=R.useRef(f),ce=R.useRef(!1),fe=R.useRef(!1),ne=R.useRef(!1),Se=R.useRef(0),de=R.useRef(0),J=R.useRef(0),le=R.useRef(null),k=R.useRef(null),M=R.useRef(null),Z=R.useRef(0),P=R.useRef(!1),ve=R.useRef(0),Pe=R.useRef(0),he=R.useRef(()=>Promise.reject(new Error("Messaging is unavailable"))),ke=R.useRef([]),Me=R.useRef(null),He=R.useCallback((ee,_e)=>{_e.outcome==="timeout"?(ee.timedOut=!0,ke.current=ke.current.filter(Ne=>Ne===ee||!Ne.timedOut)):ke.current=ke.current.filter(Ne=>Ne!==ee),clearTimeout(ee.timeoutId),ee.resolve(_e)},[]);ae.current=l,j.current=d,se.current=u,ie.current=f,R.useEffect(()=>{const ee=new zS({baseURL:e,orgId:t,esDeveloperName:n,options:U({enableLogging:a},s?{capabilitiesVersion:s}:{})});K.current=ee,P.current=!1,W(!1),_(!1),O(!1),S({type:"RESET"}),ee.on("connected",()=>{var ge;S({type:"SET_CONNECTION_STATUS",status:"connected"}),(ge=se.current)==null||ge.call(se)}),ee.on("disconnected",()=>{S({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),ee.on("reconnecting",()=>{S({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),ee.on("message",ge=>{var vo,Jr;const je=ue(U({id:ge.messageId||crypto.randomUUID()},ge.messageId?{serverId:ge.messageId}:{}),{role:"agent",content:ge.content,timestamp:ge.timestamp,sender:ge.sender,raw:ge});p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:je.id,tokensBeforeFlush:Se.current,streamedFinalOnly:Se.current===0}),Se.current=0;const Ke=oa(ke.current),$t=Ke==null?void 0:Ke.options.reconcileMessageId;S({type:"FLUSH_STREAMING",message:je,replaceMessageId:$t}),(vo=ae.current)==null||vo.call(ae,je),Ke&&He(Ke,{outcome:"success"});const{messagingSessionId:ht}=ge,Mr=ht?ok(ge.content):null;ht&&Mr&&((Jr=ie.current)==null||Jr.call(ie,{agentSessionId:ht,kind:Mr.kind,productIds:Mr.productIds}))}),ee.on("streaming_token",ge=>{var je;if(!((je=oa(ke.current))!=null&&je.options.silent)){if(Se.current+=1,p!=null&&p.isDevelopment){const Ke=Fg(ge.token);Ke?Ke.index===li?p.debug("🦜 streaming_token → markdown fallback",{token:ge.token}):p.debug("🦜 streaming_token parsed",{type:Ke.type,index:Ke.index,outputName:Ke.type==="tool_results"?Ke.output_name:void 0}):p.debug("🦜 streaming_token dropped (empty or unrecognized payload shape)",{token:ge.token})}S({type:"APPEND_STREAMING_TOKEN",token:ge.token})}}),ee.on("typing_started",()=>{var ge;(ge=oa(ke.current))!=null&&ge.options.silent||S({type:"SET_AGENT_TYPING",isTyping:!0})}),ee.on("typing_stopped",()=>{var ge;(ge=oa(ke.current))!=null&&ge.options.silent||S({type:"SET_AGENT_TYPING",isTyping:!1})}),ee.on("progress_indicator",ge=>{var je;(je=oa(ke.current))!=null&&je.options.silent||S({type:"ADD_PROGRESS_STEP",message:ge.message})}),ee.on("routing_result",ge=>{var je;if(S({type:"SET_ROUTING_RESULT",result:ge}),!ge.isSuccessful){const Ke=`Routing failed: ${ge.failureType||"unknown"}`;S({type:"SET_ERROR",error:Gg({code:"ROUTING_FAILED"})}),S({type:"SET_CONNECTION_STATUS",status:"error"}),(je=j.current)==null||je.call(j,Ke)}}),ee.on("participant_changed",ge=>{if(ge.participant.name==="Automated Process")return;const je=ue(U({id:crypto.randomUUID()},ge.entryId?{serverId:ge.entryId}:{}),{role:"system",content:ge.action==="add"?`${ge.participant.name||"Agent"} joined the conversation`:`${ge.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:ge}),S({type:"ADD_MESSAGE",message:je})}),ee.on("conversation_closed",()=>{const ge={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};S({type:"ADD_MESSAGE",message:ge}),S({type:"SET_CONVERSATION_ID",id:null}),V.clearPersistedConversation()}),ee.on("error",ge=>{var je;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:ge}),ge.code==="SESSION_EXPIRED"){ne.current=!0,S({type:"SET_SESSION_EXPIRED",expired:!0}),S({type:"SET_CONNECTION_STATUS",status:"disconnected"}),S({type:"SET_LOADING",isLoading:!1});return}S({type:"SET_ERROR",error:Gg(ge)}),ge.recoverable||S({type:"SET_CONNECTION_STATUS",status:"error"}),(je=j.current)==null||je.call(j,ge.message)});const _e=ge=>{if(ge!==ve.current)throw Hs},Ne=ge=>ge===ve.current,Ae=ge=>Fe(null,null,function*(){_(!1);let je=V.getStoredConnectOptions(),Ke=!1;je||(je=yield V.getPeerConnectOptions(),_e(ge),Ke=!!je);let $t=!1;try{if(yield ee.connect(je!=null?je:void 0),!Ne(ge))throw ee.disconnect(),Hs;$t=!!(je!=null&&je.lastEventId)}catch(Mr){if(_e(ge),je&&lf(Mr)){if(p==null||p.log("Stored token expired on connect — falling back to fresh connect"),Ke||V.clearPersistedConversation(),yield ee.connect(),!Ne(ge))throw ee.disconnect(),Hs;$t=!1}else throw Mr}O($t),yield V.persistContinuationToken(ee,()=>Ne(ge)),_e(ge);const ht=yield V.initializeConversation(ee,{isCurrent:()=>Ne(ge)});if(_e(ge),p==null||p.log("🦜 initial connect complete",{conversationId:ht.conversationId,resumed:ht.resumed,outcome:ht.outcome,restoredMessages:ht.restoredMessages.length}),ht.outcome==="aborted")throw S({type:"SET_LOADING",isLoading:!1}),S({type:"SET_CONNECTION_STATUS",status:"disconnected"}),Hs;if(ht.outcome==="unverified-error"){ht.conversationId&&(ee.resumeConversation(ht.conversationId),S({type:"SET_CONVERSATION_ID",id:ht.conversationId})),_(!0);return}S({type:"SET_CONVERSATION_ID",id:ht.conversationId}),ht.resumed&&S({type:"LOAD_HISTORY",messages:ht.restoredMessages}),_(!0),S({type:"SET_LOADING",isLoading:!1})});return k.current=Ae,()=>{ve.current+=1,Pe.current+=1,ee.disconnect(),ee.off(),K.current=null,k.current=null,M.current=null,P.current=!1}},[e,t,n,s,He]);const nt=R.useCallback(()=>{if(P.current)return Promise.resolve();if(M.current)return Z.current===ve.current?M.current:M.current.catch(Ae=>{if(Ae!==Hs)throw Ae}).then(()=>he.current());const ee=k.current;if(!ee)return Promise.reject(new Error("Messaging is unavailable"));S({type:"SET_LOADING",isLoading:!0}),S({type:"SET_CONNECTION_STATUS",status:"connecting"});const _e=++ve.current;Z.current=_e;const Ne=ee(_e).then(()=>{P.current=!0,W(!0)}).catch(Ae=>{var je;if(Ae===Hs)throw Ae;const ge=Ae instanceof Error?Ae.message:String(Ae);throw S({type:"SET_CONNECTION_STATUS",status:"error"}),S({type:"SET_ERROR",error:ci(Ae)}),(je=j.current)==null||je.call(j,ge),Ae}).finally(()=>{M.current===Ne&&(M.current=null)});return M.current=Ne,Ne},[]);he.current=nt,R.useEffect(()=>{y&&nt().catch(()=>{})},[y,e,t,n,s,nt]);const Nt=R.useCallback(()=>Fe(null,null,function*(){const ee=K.current;if(!ee)return!1;const _e=V.getStoredConnectOptions();if(!_e)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{ee.disconnect(),yield ee.connect(_e)}catch(Ae){if(lf(Ae))return p==null||p.log("🦜 attemptResume: token expired (401) — will start fresh",{error:Ae instanceof Error?Ae.message:String(Ae)}),!1;throw p==null||p.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:Ae instanceof Error?Ae.message:String(Ae)}),Ae}yield V.persistContinuationToken(ee);const Ne=yield V.initializeConversation(ee,{createIfMissing:!1});return Ne.outcome==="not-found-or-closed"||!Ne.conversationId?(p==null||p.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(Ne.outcome==="unverified-error"&&(p==null||p.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:Ne.conversationId}),ee.resumeConversation(Ne.conversationId)),p==null||p.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:Ne.conversationId}),S({type:"SET_CONVERSATION_ID",id:Ne.conversationId}),S({type:"SET_CONNECTION_STATUS",status:"connected"}),V.persistConversationId(Ne.conversationId),ne.current=!1,S({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[V,p]),Ft=R.useCallback(ee=>Fe(null,null,function*(){var Ne;const _e=K.current;if(_e){ee.options.silent||(S({type:"SET_LOADING",isLoading:!0}),S({type:"SET_PROGRESS_MESSAGE",message:""}));try{yield _e.sendMessage(ee.text)}catch(Ae){const ge=ci(Ae);S({type:"SET_SEND_ERROR",error:{text:ee.text,displayContent:ee.displayContent,options:ee.options,message:ge}}),(Ne=j.current)==null||Ne.call(j,Ae instanceof Error?Ae.message:String(Ae)),He(ee,{outcome:"failure",message:ge})}}}),[He]),xn=R.useCallback(ee=>Fe(null,null,function*(){var Ne;const _e=K.current;if(!(!_e||ce.current)){ce.current=!0,fe.current=!0;try{if(yield Nt()){ee&&(yield Ft(ee));return}p==null||p.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),ne.current=!1,S({type:"SET_SESSION_EXPIRED",expired:!1}),S({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:Ok,timestamp:new Date().toISOString()}}),V.clearPersistedConversation(),S({type:"SET_CONNECTION_STATUS",status:"connecting"}),_e.disconnect(),yield _e.connect(),yield V.persistContinuationToken(_e);const Ae=yield Ju({routingAttributes:r});if(Ae===sa){S({type:"SET_CONNECTION_STATUS",status:"disconnected"});return}const ge=yield _e.createConversation(Ae);p==null||p.log("🦜 recoverExpiredSession: new conversation created",{conversationId:ge}),S({type:"SET_CONVERSATION_ID",id:ge}),S({type:"SET_CONNECTION_STATUS",status:"connected"}),V.persistConversationId(ge),ee&&(yield Ft(ee))}catch(Ae){const ge=Ae instanceof Error?Ae.message:String(Ae);S({type:"SET_ERROR",error:ci(Ae)}),S({type:"SET_CONNECTION_STATUS",status:"error"}),(Ne=j.current)==null||Ne.call(j,ge),ee&&He(ee,{outcome:"failure",message:ci(Ae)})}finally{ce.current=!1,fe.current=!1}}}),[r,V,Nt,Ft,p,He]),pn=R.useRef(xn);pn.current=xn;const Bt=R.useCallback(()=>Fe(null,null,function*(){const ee=K.current;if(!ee||!P.current||ce.current)return;if(!D.current.conversationId&&!ne.current){ee.reconnect();return}ce.current=!0;const _e=Fe(null,null,function*(){try{(yield Nt())||(ne.current=!0,S({type:"SET_SESSION_EXPIRED",expired:!0}),S({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(Ne){ne.current=!0,S({type:"SET_SESSION_EXPIRED",expired:!0}),S({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{ce.current=!1,le.current=null}});le.current=_e,yield _e}),[Nt]),$e=R.useRef(Bt);$e.current=Bt;const St=R.useCallback(()=>Fe(null,null,function*(){const ee=K.current;if(!ee||ce.current)return;const _e=V.getStoredConnectOptions(),Ne=_e==null?void 0:_e.continuationToken;if(Ne){ce.current=!0;try{ee.disconnect(),yield ee.connect({continuationToken:Ne}),yield V.persistContinuationToken(ee);const Ae=D.current.conversationId;Ae&&ee.resumeConversation(Ae)}catch(Ae){if(lf(Ae)){ne.current=!0,S({type:"SET_SESSION_EXPIRED",expired:!0}),S({type:"SET_CONNECTION_STATUS",status:"disconnected"}),S({type:"SET_LOADING",isLoading:!1});return}p==null||p.log("🦜 reconnectOmittingLastEventId: transient connect failure — session kept",{error:Ae instanceof Error?Ae.message:String(Ae)})}finally{ce.current=!1}}}),[V,p]);R.useEffect(()=>{const ee=()=>{const Ke=Date.now();Ke-J.current<Pk||(J.current=Ke,$e.current())},_e=()=>{if(document.visibilityState==="hidden"){de.current=Date.now();return}const Ke=K.current;if(!Ke)return;const $t=de.current?Date.now()-de.current:0;de.current=0,(ne.current||!Ke.isConnected||$t>Ik)&&ee()},Ne=Ke=>{Ke.persisted&&ee()},Ae=()=>{de.current=Date.now()},ge=()=>ee(),je=()=>ee();return document.addEventListener("visibilitychange",_e),window.addEventListener("pageshow",Ne),window.addEventListener("pagehide",Ae),document.addEventListener("resume",ge),window.addEventListener("online",je),()=>{document.removeEventListener("visibilitychange",_e),window.removeEventListener("pageshow",Ne),window.removeEventListener("pagehide",Ae),document.removeEventListener("resume",ge),window.removeEventListener("online",je)}},[]);const Wt=R.useCallback((ee,_e)=>Fe(null,null,function*(){var Ae;const Ne=K.current;if(!Ne){He(ee,{outcome:"failure",message:"Messaging is unavailable"});return}if(ne.current){yield pn.current(ee);return}try{yield Ne.sendMessage(ee.text)}catch(ge){if(Wg(ge)){yield pn.current(ee);return}const je=ci(ge);S({type:"SET_SEND_ERROR",error:_e(je)}),(Ae=j.current)==null||Ae.call(j,ge instanceof Error?ge.message:String(ge)),He(ee,{outcome:"failure",message:je})}}),[He]),Ie=R.useCallback(ee=>Fe(null,null,function*(){const _e=le.current;_e&&(yield _e),yield ee()}),[]),Xe=R.useCallback((ee,_e,Ne={})=>new Promise(Ae=>{if(!K.current){Ae({outcome:"failure",message:"Messaging is unavailable"});return}const je={};Object.assign(je,{text:ee,displayContent:_e,options:Ne,resolve:Ae,timeoutId:setTimeout(()=>{S({type:"SET_LOADING",isLoading:!1}),He(je,{outcome:"timeout"})},Rk)}),ke.current.push(je),S({type:"CLEAR_SEND_ERROR"}),Ne.silent||(S({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"user",content:_e!=null?_e:ee,timestamp:new Date().toISOString()}}),S({type:"SET_LOADING",isLoading:!0}),S({type:"SET_PROGRESS_MESSAGE",message:""})),Ie(()=>Wt(je,Ke=>({text:ee,displayContent:_e,options:Ne,message:Ke})))}),[Wt,Ie,He]),ot=R.useCallback((ee,_e)=>{if(!ee.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});const Ne=Pe.current,Ae=()=>{const Ke=()=>Ne!==Pe.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):Xe(ee,_e==null?void 0:_e.displayContent,_e);return P.current?Ke():nt().then(Ke,$t=>({outcome:"failure",message:ci($t)}))},ge=Me.current?Me.current.then(Ae):Ae(),je=ge.then(()=>{});return Me.current=je,je.finally(()=>{Me.current===je&&(Me.current=null)}),ge},[Xe,nt]),ft=R.useCallback(ee=>{if(!K.current)return;const _e=Pe.current,{prompt:Ne,display:Ae}=Fk(ee);nt().then(()=>{if(_e===Pe.current)return Xe(Ne,Ae)}).catch(()=>{})},[Xe,nt]),Jn=R.useCallback(()=>{const ee=K.current,_e=D.current.sendError;if(!ee||!_e)return;const Ne=()=>fe.current?Promise.resolve({outcome:"failure",message:_e.message}):Xe(_e.text,_e.displayContent,_e.options),Ae=Me.current?Me.current.then(Ne):Ne(),ge=Ae.then(()=>{});return Me.current=ge,ge.finally(()=>{Me.current===ge&&(Me.current=null)}),Ae},[Xe]),gs=R.useCallback(()=>{const ee=K.current;ee&&(M.current||(ne.current=!1,P.current=!1,W(!1),ee.disconnect(),S({type:"SET_CONNECTION_STATUS",status:"connecting"}),nt().catch(()=>{})))},[nt]),xi=R.useCallback(()=>{const ee=K.current;if(!ee)return Promise.resolve();if(!P.current)return ve.current+=1,Pe.current+=1,ee.disconnect(),V.clearPersistedConversation(),S({type:"RESET"}),Promise.resolve();const _e=++Pe.current;return ne.current=!1,O(!1),V.clearPersistedConversation(),S({type:"RESET"}),S({type:"SET_LOADING",isLoading:!0}),S({type:"SET_CONNECTION_STATUS",status:"connecting"}),ee.endConversation().then(()=>_e!==Pe.current||K.current!==ee?null:(ee.disconnect(),ee.connect().then(()=>ee))).then(Ne=>Fe(null,null,function*(){if(!Ne||_e!==Pe.current||(yield V.persistContinuationToken(Ne,()=>_e===Pe.current&&K.current===Ne),_e!==Pe.current||K.current!==Ne))return null;const Ae=yield Ju({routingAttributes:r});return Ae===sa?null:ee.createConversation(Ae)})).then(Ne=>{!Ne||_e!==Pe.current||K.current!==ee||(S({type:"SET_CONVERSATION_ID",id:Ne}),S({type:"SET_CONNECTION_STATUS",status:"connected"}),V.persistConversationId(Ne))}).catch(Ne=>{var Ae;_e!==Pe.current||K.current!==ee||(S({type:"SET_ERROR",error:ci(Ne)}),S({type:"SET_CONNECTION_STATUS",status:"error"}),(Ae=j.current)==null||Ae.call(j,Ne.message))})},[r,V]);Bk({connectionStatus:x.connectionStatus,loading:x.loading,hasMessages:x.messages.length>0,sessionExpired:x.sessionExpired,bootstrapSettled:A,resumeUsedLastEventId:C,recoverySteps:[St,xi],onExhausted:()=>{var _e;const ee=ci({type:"network"});S({type:"SET_ERROR",error:ee}),S({type:"SET_CONNECTION_STATUS",status:"error"}),(_e=j.current)==null||_e.call(j,ee)},logger:p,isRecoveryInFlight:()=>ce.current||le.current!==null});const oe=R.useCallback(()=>Fe(null,null,function*(){var Ae;const ee=K.current;if(!ee||!D.current.conversationId)return;const _e=yield ee.retrieveConversationTranscript(),Ne=URL.createObjectURL(_e);try{const ge=document.createElement("a");ge.href=Ne,ge.download=`transcript-${(Ae=ee.conversationId)!=null?Ae:"conversation"}.pdf`,document.body.appendChild(ge),ge.click(),ge.remove()}finally{URL.revokeObjectURL(Ne)}}),[]),xe=R.useCallback(()=>Fe(null,null,function*(){const ee=K.current;if(!ee)throw new Error("getAuthLinkKey called before the messaging client connected");return p==null||p.debug("🦜 getAuthLinkKey: requesting single-use auth link key"),ee.getAuthLinkKey()}),[p]);R.useEffect(()=>{const ee={getAuthLinkKey:xe};return Hk(ee),()=>jk(ee)},[xe]);const Ve=x.connectionStatus==="connected"&&x.conversationId!==null;R.useEffect(()=>{V0(Ve)},[Ve]),R.useEffect(()=>()=>V0(!1),[]);const et=R.useMemo(()=>({connectionStatus:x.connectionStatus,isConnected:Ve,isAgentTyping:x.isAgentTyping,conversationId:x.conversationId,messages:x.messages,streamingBlocks:x.streamingBlocks,progressMessage:x.progressMessage,progressSteps:x.progressSteps,error:x.error,sendError:x.sendError,canInitialize:!z&&x.error===null,loading:x.loading,sessionExpired:x.sessionExpired,sendMessage:ot,addToCart:ft,resetConversation:xi,retryLastMessage:Jn,retryConnection:gs,downloadTranscript:oe,getAuthLinkKey:xe}),[x,Ve,z,ot,ft,xi,Jn,gs,oe,xe]);return w.jsx($g.Provider,{value:et,children:m})};var Kg=Symbol.for("immer-nothing"),Qg=Symbol.for("immer-draftable"),Hn=Symbol.for("immer-state");function ur(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var js=Object.getPrototypeOf;function zs(e){return!!e&&!!e[Hn]}function Xi(e){var t;return e?Jg(e)||Array.isArray(e)||!!e[Qg]||!!((t=e.constructor)!=null&&t[Qg])||aa(e)||tl(e):!1}var $k=Object.prototype.constructor.toString();function Jg(e){if(!e||typeof e!="object")return!1;const t=js(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)===$k}function Zu(e,t){el(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function el(e){const t=e[Hn];return t?t.type_:Array.isArray(e)?1:aa(e)?2:tl(e)?3:0}function cf(e,t){return el(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Zg(e,t,n){const r=el(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Vk(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function aa(e){return e instanceof Map}function tl(e){return e instanceof Set}function Ki(e){return e.copy_||e.base_}function df(e,t){if(aa(e))return new Map(e);if(tl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Jg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Hn];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(js(e),r)}else{const r=js(e);if(r!==null&&n)return U({},e);const s=Object.create(r);return Object.assign(s,e)}}function ff(e,t=!1){return rl(e)||zs(e)||!Xi(e)||(el(e)>1&&Object.defineProperties(e,{set:{value:nl},add:{value:nl},clear:{value:nl},delete:{value:nl}}),Object.freeze(e),t&&Object.values(e).forEach(n=>ff(n,!0))),e}function nl(){ur(2)}function rl(e){return Object.isFrozen(e)}var qk={};function Qi(e){const t=qk[e];return t||ur(0,e),t}var ua;function e1(){return ua}function Yk(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function t1(e,t){t&&(Qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function hf(e){pf(e),e.drafts_.forEach(Wk),e.drafts_=null}function pf(e){e===ua&&(ua=e.parent_)}function n1(e){return ua=Yk(ua,e)}function Wk(e){const t=e[Hn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function r1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Hn].modified_&&(hf(t),ur(4)),Xi(e)&&(e=il(t,e),t.parent_||sl(t,e)),t.patches_&&Qi("Patches").generateReplacementPatches_(n[Hn].base_,e,t.patches_,t.inversePatches_)):e=il(t,n,[]),hf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Kg?e:void 0}function il(e,t,n){if(rl(t))return t;const r=t[Hn];if(!r)return Zu(t,(s,a)=>i1(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return sl(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),Zu(a,(l,d)=>i1(e,r,s,l,d,n,u)),sl(e,s,!1),n&&e.patches_&&Qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function i1(e,t,n,r,s,a,u){if(zs(s)){const l=a&&t&&t.type_!==3&&!cf(t.assigned_,r)?a.concat(r):void 0,d=il(e,s,l);if(Zg(n,r,d),zs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Xi(s)&&!rl(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;il(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(aa(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&sl(e,s)}}function sl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ff(t,n)}function Gk(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:e1(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=mf;n&&(s=[r],a=la);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var mf={get(e,t){if(t===Hn)return e;const n=Ki(e);if(!cf(n,t))return Xk(e,n,t);const r=n[t];return e.finalized_||!Xi(r)?r:r===gf(e.base_,t)?(yf(e),e.copy_[t]=Tf(r,e)):r},has(e,t){return t in Ki(e)},ownKeys(e){return Reflect.ownKeys(Ki(e))},set(e,t,n){const r=s1(Ki(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=gf(Ki(e),t),a=s==null?void 0:s[Hn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Vk(n,s)&&(n!==void 0||cf(e.base_,t)))return!0;yf(e),Ef(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 gf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,yf(e),Ef(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ki(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ur(11)},getPrototypeOf(e){return js(e.base_)},setPrototypeOf(){ur(12)}},la={};Zu(mf,(e,t)=>{la[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),la.deleteProperty=function(e,t){return la.set.call(this,e,t,void 0)},la.set=function(e,t,n){return mf.set.call(this,e[0],t,n,e[0])};function gf(e,t){const n=e[Hn];return(n?Ki(n):e)[t]}function Xk(e,t,n){var s;const r=s1(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function s1(e,t){if(!(t in e))return;let n=js(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=js(n)}}function Ef(e){e.modified_||(e.modified_=!0,e.parent_&&Ef(e.parent_))}function yf(e){e.copy_||(e.copy_=df(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Kk=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,m=>n.call(this,m,...f))}}typeof n!="function"&&ur(6),r!==void 0&&typeof r!="function"&&ur(7);let s;if(Xi(t)){const a=n1(this),u=Tf(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?hf(a):pf(a)}return t1(a,r),r1(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===Kg&&(s=void 0),this.autoFreeze_&&ff(s,!0),r){const a=[],u=[];Qi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else ur(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){Xi(e)||ur(8),zs(e)&&(e=Qk(e));const t=n1(this),n=Tf(e,void 0);return n[Hn].isManual_=!0,pf(t),n}finishDraft(e,t){const n=e&&e[Hn];(!n||!n.isManual_)&&ur(9);const{scope_:r}=n;return t1(r,t),r1(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=Qi("Patches").applyPatches_;return zs(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Tf(e,t){const n=aa(e)?Qi("MapSet").proxyMap_(e,t):tl(e)?Qi("MapSet").proxySet_(e,t):Gk(e,t);return(t?t.scope_:e1()).drafts_.push(n),n}function Qk(e){return zs(e)||ur(10,e),o1(e)}function o1(e){if(!Xi(e)||rl(e))return e;const t=e[Hn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=df(e,t.scope_.immer_.useStrictShallowCopy_)}else n=df(e,!0);return Zu(n,(r,s)=>{Zg(n,r,o1(s))}),t&&(t.finalized_=!1),n}var Jk=new Kk,Zk=Jk.produce;function eC(e,t,n){var r=R.useMemo(function(){return Zk(e)},[e]);return R.useReducer(r,t,n)}const tC=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),a1=R.createContext(null),u1=R.createContext(null),nC=({children:e,dispatch:t})=>{const n=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),s=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),l=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),f=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),m=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),p=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),b=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=R.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:m,setResponseMessage:p,setIsResponseLoading:b}),[n,r,s,a,u,l,d,f,m,p,b]);return w.jsx(u1.Provider,{value:y,children:e})},rC=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Tt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case Tt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case Tt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case Tt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case Tt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case Tt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case Tt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case Tt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case Tt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case Tt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case Tt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case Tt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case Tt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case Tt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case Tt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},iC=({promptsConfig:e,children:t})=>{const[n,r]=eC(rC,ue(U(U({},W0),e||{}),{staticQuestions:tC((e==null?void 0:e.staticQuestions)||[])}));return w.jsx(a1.Provider,{value:n,children:w.jsx(nC,{dispatch:r,children:t})})},sC={productId:Jo.productId,pdpLink:Jo.pdpLink},l1=R.createContext(sC),oC=({children:e})=>{const[t,n]=R.useState(Jo.productId),[r,s]=R.useState(Jo.pdpLink);R.useEffect(()=>{const u=({detail:l})=>{if((l==null?void 0:l.property)==="pdp-context"){const d=l.value;n(d.productId),s(d.pdpLink);return}(l==null?void 0:l.property)==="productId"&&n(l.value),(l==null?void 0:l.property)==="pdpLink"&&s(l.value)};return PS(u),()=>{RS(u)}},[]);const a=R.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(l1.Provider,{value:a,children:e})},aC=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){_t(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){_t(!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"?(_t(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(_t(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),_t(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,_t(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),c1=R.createContext({overrides:{},isInitialized:!1}),uC=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=R.useState({}),[a,u]=R.useState(!1);R.useEffect(()=>{Fe(null,null,function*(){let f={};e?(_t(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield aC(e)):t&&typeof t=="object"?(_t(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(_t(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=R.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return w.jsx(c1.Provider,{value:l,children:n})},d1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:l,openLinksInNewTab:d,globalClassName:f,isDevelopment:m=!1,componentType:p,componentConfig:b,entryType:y,initialEntry:x,entryMessage:S,disclaimerText:A,disclaimerMarkdown:_,clientContext:C,searchPlaceholder:O,searchButtonLabel:z,searchConfig:W,suggestionButtonConfig:D,messageAlignment:V,autoScroll:K,promptsConfig:ae,showProductDescription:j,resetConversationMessage:se,conversationHistory:ie,messagingConfig:ce,overrides:fe,overridesUrl:ne,inlineOverrides:Se,__features:de,children:J})=>{const le=R.useRef(!1);return le.current||(le.current=!0,FS({initialEntry:x,entryType:y,isDevelopment:m})),w.jsx(nk,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:S,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:O,searchButtonLabel:z,searchConfig:W,suggestionButtonConfig:D,messageAlignment:V,autoScroll:K,showProductDescription:j,componentConfig:b,clientContext:C,disclaimerMarkdown:_,disclaimerText:A,resetConversationMessage:se,conversationHistory:ie,isDevelopment:m,__features:de,progressStepsLimit:ce==null?void 0:ce.progressStepsLimit,routingAttributes:ce==null?void 0:ce.routingAttributes,enableDownloadTranscript:ce==null?void 0:ce.enableDownloadTranscript,enableEscalationToAgent:ce==null?void 0:ce.enableEscalationToAgent,showProductCaptions:ce==null?void 0:ce.showProductCaptions,children:w.jsx(ov,{entryType:y!=null?y:x==null?void 0:x.type,componentConfig:b,componentType:p,children:w.jsx(oC,{children:w.jsx(iC,{promptsConfig:ae,children:w.jsx(uC,{overridesUrl:ne,inlineOverrides:Se||fe,children:w.jsx(Xg,{scrt2Url:(ce==null?void 0:ce.scrt2Url)||"",orgId:(ce==null?void 0:ce.orgId)||"",esDeveloperName:(ce==null?void 0:ce.esDeveloperName)||"",routingAttributes:(ce==null?void 0:ce.routingAttributes)||{},capabilitiesVersion:ce==null?void 0:ce.capabilitiesVersion,enableLogging:m,onProductResult:ce==null?void 0:ce.onProductResult,children:J})})})})})})};var bf={exports:{}},Cn={},wf={exports:{}},xf={};var f1;function lC(){return f1||(f1=1,(function(e){function t(J,le){var k=J.length;J.push(le);e:for(;0<k;){var M=k-1>>>1,Z=J[M];if(0<s(Z,le))J[M]=le,J[k]=Z,k=M;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var le=J[0],k=J.pop();if(k!==le){J[0]=k;e:for(var M=0,Z=J.length,P=Z>>>1;M<P;){var ve=2*(M+1)-1,Pe=J[ve],he=ve+1,ke=J[he];if(0>s(Pe,k))he<Z&&0>s(ke,Pe)?(J[M]=ke,J[he]=k,M=he):(J[M]=Pe,J[ve]=k,M=ve);else if(he<Z&&0>s(ke,k))J[M]=ke,J[he]=k,M=he;else break e}}return le}function s(J,le){var k=J.sortIndex-le.sortIndex;return k!==0?k:J.id-le.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=[],m=1,p=null,b=3,y=!1,x=!1,S=!1,A=typeof setTimeout=="function"?setTimeout:null,_=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 O(J){for(var le=n(f);le!==null;){if(le.callback===null)r(f);else if(le.startTime<=J)r(f),le.sortIndex=le.expirationTime,t(d,le);else break;le=n(f)}}function z(J){if(S=!1,O(J),!x)if(n(d)!==null)x=!0,Se(W);else{var le=n(f);le!==null&&de(z,le.startTime-J)}}function W(J,le){x=!1,S&&(S=!1,_(K),K=-1),y=!0;var k=b;try{for(O(le),p=n(d);p!==null&&(!(p.expirationTime>le)||J&&!se());){var M=p.callback;if(typeof M=="function"){p.callback=null,b=p.priorityLevel;var Z=M(p.expirationTime<=le);le=e.unstable_now(),typeof Z=="function"?p.callback=Z:p===n(d)&&r(d),O(le)}else r(d);p=n(d)}if(p!==null)var P=!0;else{var ve=n(f);ve!==null&&de(z,ve.startTime-le),P=!1}return P}finally{p=null,b=k,y=!1}}var D=!1,V=null,K=-1,ae=5,j=-1;function se(){return!(e.unstable_now()-j<ae)}function ie(){if(V!==null){var J=e.unstable_now();j=J;var le=!0;try{le=V(!0,J)}finally{le?ce():(D=!1,V=null)}}else D=!1}var ce;if(typeof C=="function")ce=function(){C(ie)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,ne=fe.port2;fe.port1.onmessage=ie,ce=function(){ne.postMessage(null)}}else ce=function(){A(ie,0)};function Se(J){V=J,D||(D=!0,ce())}function de(J,le){K=A(function(){J(e.unstable_now())},le)}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(J){J.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,Se(W))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(J){switch(b){case 1:case 2:case 3:var le=3;break;default:le=b}var k=b;b=le;try{return J()}finally{b=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,le){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var k=b;b=J;try{return le()}finally{b=k}},e.unstable_scheduleCallback=function(J,le,k){var M=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?M+k:M):k=M,J){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=k+Z,J={id:m++,callback:le,priorityLevel:J,startTime:k,expirationTime:Z,sortIndex:-1},k>M?(J.sortIndex=k,t(f,J),n(d)===null&&J===n(f)&&(S?(_(K),K=-1):S=!0,de(z,k-M))):(J.sortIndex=Z,t(d,J),x||y||(x=!0,Se(W))),J},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(J){var le=b;return function(){var k=b;b=le;try{return J.apply(this,arguments)}finally{b=k}}}})(xf)),xf}var h1;function cC(){return h1||(h1=1,wf.exports=lC()),wf.exports}var p1;function dC(){if(p1)return Cn;p1=1;var e=sr(),t=cC();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]*$/,m={},p={};function b(i){return d.call(p,i)?!0:d.call(m,i)?!1:f.test(i)?p[i]=!0:(m[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 S(i,o,c,h,E,T,v){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=T,this.removeEmptyString=v}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new S(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 S(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new S(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 S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var _=/[\-:]([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(_,C);A[o]=new S(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(_,C);A[o]=new S(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(_,C);A[o]=new S(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function O(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?b(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 z=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),D=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),se=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),Se=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),J=Symbol.iterator;function le(i){return i===null||typeof i!="object"?null:(i=J&&i[J]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,M;function Z(i){if(M===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);M=o&&o[1]||""}return`
16
+ `+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Yi(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&Gu.assertOptions(r,{silentJSONParsing:ln.transitional(ln.boolean),forcedJSONParsing:ln.transitional(ln.boolean),clarifyTimeoutError:ln.transitional(ln.boolean),legacyInterceptorReqResOrdering:ln.transitional(ln.boolean),advertiseZstdAcceptEncoding:ln.transitional(ln.boolean),validateStatusUndefinedResolves:ln.transitional(ln.boolean)},!1),s!=null&&(Y.isFunction(s)?n.paramsSerializer={serialize:s}:Gu.assertOptions(s,{encode:ln.function,serialize:ln.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Gu.assertOptions(n,{baseUrl:ln.spelling("baseURL"),withXsrfToken:ln.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Y.merge(a.common,a[n.method]);a&&Y.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=un.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;d=d&&S.synchronous;const A=n.transitional||Kd;A&&A.legacyInterceptorReqResOrdering?l.unshift(S.fulfilled,S.rejected):l.push(S.fulfilled,S.rejected)});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let m,p=0,b;if(!d){const x=[Ig.bind(this),void 0];for(x.unshift(...l),x.push(...f),b=x.length,m=Promise.resolve(n);p<b;)m=m.then(x[p++],x[p++]);return m}b=l.length;let y=n;for(;p<b;){const x=l[p++],S=l[p++];try{y=x(y)}catch(A){S.call(this,A);break}}try{m=Ig.call(this,y)}catch(x){return Promise.reject(x)}for(p=0,b=f.length;p<b;)m=m.then(f[p++],f[p++]);return m}getUri(t){t=Yi(this.defaults,t);const n=wg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return dg(n,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){Wi.prototype[t]=function(n,r){return this.request(Yi(r||{},{method:t,url:n,data:r&&Y.hasOwnProp(r,"data")?r.data:void 0}))}}),Y.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(Yi(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Wi.prototype[t]=n(),t!=="query"&&(Wi.prototype[t+"Form"]=n(!0))});let KA=class F2{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 ia(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 F2(function(s){t=s}),cancel:t}}};function QA(e){return function(n){return e.apply(null,n)}}function JA(e){return Y.isObject(e)&&e.isAxiosError===!0}const rf={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(rf).forEach(([e,t])=>{rf[t]=e});function Rg(e){const t=new Wi(e),n=G0(Wi.prototype.request,t);return Y.extend(n,Wi.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Rg(Yi(e,s))},n}const Dt=Rg(ra);Dt.Axios=Wi,Dt.CanceledError=ia,Dt.CancelToken=KA,Dt.isCancel=gg,Dt.VERSION=ef,Dt.toFormData=$u,Dt.AxiosError=ke,Dt.Cancel=Dt.CanceledError,Dt.all=function(t){return Promise.all(t)},Dt.spread=QA,Dt.isAxiosError=JA,Dt.mergeConfig=Yi,Dt.AxiosHeaders=un,Dt.formToJSON=e=>mg(Y.isHTMLForm(e)?new FormData(e):e),Dt.getAdapter=Og.getAdapter,Dt.HttpStatusCode=rf,Dt.default=Dt;const{Axios:bU,AxiosError:wU,CanceledError:xU,isCancel:_U,CancelToken:SU,VERSION:vU,all:AU,Cancel:CU,isAxiosError:kU,spread:NU,toFormData:OU,AxiosHeaders:IU,HttpStatusCode:PU,formToJSON:RU,getAdapter:LU,mergeConfig:DU,create:MU}=Dt;class ZA{constructor(t,n,r,s=!1,a,u){Je(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Je(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Je(this,"CIMULATE_SEARCH_API_PATH","api/v1");Je(this,"baseApiUrl");Je(this,"headers",{});Je(this,"fetchConfig",()=>Fe(this,null,function*(){try{const t=yield Dt.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}}));Je(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 eC{constructor(t,n,r,s=!1,a,u){Je(this,"apiService");Je(this,"config",null);Je(this,"getConfig",()=>Fe(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}}));Je(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Je(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Je(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Je(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Je(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Je(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Je(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Je(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Je(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Je(this,"getProductField",t=>this.config?this.config[t]:"");Je(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new ZA(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 tC={copilot:"Your Search Assistant",messaging:"Commerce Client"},Lg=R.createContext(null),nC=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:m,searchPlaceholder:p,searchButtonLabel:b,searchConfig:y,suggestionButtonConfig:x,progressStepsLimit:S=3,messageAlignment:A="start",autoScroll:_=!0,showProductDescription:k=!1,componentConfig:O,conversationHistory:z,resetConversationMessage:W="",apiKey:D,apiToken:V,baseUrl:J,customerId:ce,tenantId:U,theme:ie,isDevelopment:se,__features:ue,routingAttributes:fe,enableDownloadTranscript:ne=!0,enableEscalationToAgent:Se=!1,showProductCaptions:de=!1,staticQuestions:Q,staticQuestionsStrategy:le="append",children:C})=>{const M=e==="messaging",Z=R.useMemo(()=>{const He=fe==null?void 0:fe.isCartMgmtSupported;return He===!0||He==="true"},[fe]),P=R.useMemo(()=>M?{config:null}:new eC(J,D,V,se,ce,U),[M,J,D,V,se,ce,U]),ve=R.useMemo(()=>new MS(se),[se]);R.useEffect(()=>{M||!P||P.config||P.getConfig()},[P,M]);const Pe=R.useMemo(()=>$S(ie),[ie]),he=R.useMemo(()=>{const He=(y==null?void 0:y.placeholder)||p,nt=(y==null?void 0:y.buttonLabel)||b;let Nt="icon";return y!=null&&y.buttonType?Nt=y.buttonType:b&&(Nt="text"),oe(H({},y||{}),{placeholder:He,buttonLabel:nt,buttonType:Nt})},[y,p,b]),Ce=R.useMemo(()=>oe(H({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||tC[e!=null?e:"copilot"]}),[r,t,n,e]),Me=R.useMemo(()=>({configModule:P,mode:e!=null?e:"copilot",headerConfig:Ce,entryMessage:a,staticQuestions:Q||[],staticQuestionsStrategy:le,globalClassName:s,openLinksInNewTab:u,disclaimerText:l,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:m,themeVariables:Pe,logger:ve,searchConfig:he,suggestionButtonConfig:x,progressStepsLimit:S,messageAlignment:A,autoScroll:_,showProductDescription:!!k,enableMinimize:!!(O!=null&&O.enableMinimize),enableDownloadTranscript:ne,enableEscalationToAgent:Se,showProductCaptions:!!de,resetConversationMessage:W,conversationHistory:{sinceHours:typeof(z==null?void 0:z.sinceHours)=="number"?z.sinceHours:M?24:1,limit:z==null?void 0:z.limit},features:ue,isCartMgmtSupported:Z}),[P,e,Ce,a,Q,le,s,f,m,l,d,u,he,x,A,_,k,O,ne,Se,S,de,W,ve,Pe,z,ue,Z]);return w.jsx(Lg.Provider,{value:Me,children:C})},ct=()=>{const e=R.useContext(Lg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},Dg=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],li=-1;function Mg(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e,n=typeof t.text=="string"?t.text:"",r=typeof t.message=="string"?t.message:"";return n||r||null}function Fg(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"){if(!Array.isArray(t)&&typeof t.type=="string"&&typeof t.index=="number"&&Dg.includes(t.type))return t;const n=Mg(t);return n?{type:"markdown",index:li,data:{content:n}}:null}}catch(t){}return{type:"markdown",index:li,data:{content:e}}}function Bg(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"||!Dg.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return oe(H({},n),{type:n.type,index:r})}function Xu(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function rC(e){var s,a;if(e.type!=="markdown")return[e];const t=(a=(s=e.data)==null?void 0:s.content)!=null?a:"",n=Xu(t);if(n)return n.response;const r=Bg(t);return[r&&r.type!=="markdown"?r:e]}function Ug(e,t){var n,r;return(r=(n=Xu(e))==null?void 0:n.response.some(s=>s.type===t))!=null?r:!1}function iC(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.role==="agent"&&Ug(r.content,t))return r.id}}function Hg(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function sC(e){return e.type==="markdown"&&e.index===li?!Hg(e.data.content):!0}function oC(e){var s;const t=(s=Xu(e))==null?void 0:s.response;if(!t)return null;const n=t.find(a=>a.type==="product_carousel");if(n)return{kind:"search",productIds:n.data.products.map(a=>a.id)};const r=t.find(a=>a.type==="product_tile");return r?{kind:"detail",productIds:[r.data.id]}:null}function aC(e,t){if(t.index===li){const s=e[e.length-1];if(s&&s.type==="markdown"&&s.index===li&&t.type==="markdown"){const a={type:"markdown",index:li,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 jg(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const zg={connectionStatus:"disconnected",loading:!1,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function uC(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return H(oe(H({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return oe(H({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return oe(H({},e),{conversationId:t.id});case"ADD_MESSAGE":return jg(e.messages,t.message)?e:oe(H({},e),{messages:[...e.messages,oe(H({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=Fg(t.token);return n?oe(H({},e),{streamingBlocks:aC(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(jg(e.messages,t.message))return H(H({},e),n);const r=oe(H({},t.message),{type:"FLUSH_STREAMING"}),s=t.replaceMessageId?e.messages.findIndex(a=>a.id===t.replaceMessageId):-1;if(s>=0){const a=[...e.messages];return a[s]=oe(H({},r),{id:e.messages[s].id}),H(oe(H({},e),{messages:a}),n)}return H(oe(H({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return oe(H({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return H(oe(H({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:oe(H({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return oe(H({},e),{routingResult:t.result});case"SET_ERROR":return oe(H({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return oe(H({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return oe(H({},e),{sendError:null});case"LOAD_HISTORY":return oe(H({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return oe(H({},e),{sessionExpired:t.expired});case"RESET":return oe(H({},zg),{connectionStatus:e.connectionStatus});default:return e}}const $g=R.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,canInitialize:!0,sendMessage:()=>Fe(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>Fe(null,null,function*(){}),retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>Fe(null,null,function*(){}),getAuthLinkKey:()=>Fe(null,null,function*(){throw new Error("getAuthLinkKey called without a MessagingProvider")})}),lC=4320*60*1e3;function sf(e,t){return`cim_af_conv_${e}_${t}`}function of(e,t){return Date.now()-e>t}function cC(e,t,n){try{const r=sf(e,t),s=localStorage.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"||of(u.storedAt,n)?(localStorage.removeItem(r),null):u}catch(r){return null}}function Ku(e,t,n){try{const r=sf(e,t),s={conversationId:n,storedAt:Date.now()};localStorage.setItem(r,JSON.stringify(s))}catch(r){}}function af(e,t){try{const n=sf(e,t);localStorage.removeItem(n)}catch(n){}}function uf(e,t){return`cim_af_ct_${e}_${t}`}function dC(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(hC(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function fC(e){const t=dC(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function hC(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function Vg(e,t){try{const n=uf(e,t),r=localStorage.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:fC(a.accessToken)==="expired"?(localStorage.removeItem(n),null):a}catch(n){return null}}function pC(e,t,n,r){try{const s=uf(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};localStorage.setItem(s,JSON.stringify(a))}catch(s){}}function mC(e,t){try{const n=uf(e,t);localStorage.removeItem(n)}catch(n){}}function gC(e,t){return`cim_af_conv_${e}_${t}`}function EC(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=gC(e,t);return new BroadcastChannel(n)}catch(n){return null}}function yC(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 TC(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 bC(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function wC(e){if(e)try{e.close()}catch(t){}}function xC(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function _C(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function qg(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 SC(e){if(e.entryType!=="Message")return null;const n=_C(e.entryPayload).abstractMessage;if(!n)return null;const r=qg(n,"staticContent","text")||qg(n,"content","text")||"";if(!r)return null;const s=xC(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 vC(e){const t=[];for(const n of e){const r=SC(n);r&&t.push(r)}return t}const AC=5e3,sa=Symbol("cimulate-abort-conversation");function Qu(e={}){const{routingAttributes:t,timeoutMs:n=AC}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=H({},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)},d={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u,abort:()=>{a.settled||(a.settled=!0,a.timer!==void 0&&clearTimeout(a.timer),s(sa))}},f=new CustomEvent($0,{detail:d,cancelable:!0});if(!!window.dispatchEvent(f)){u();return}a.timer=setTimeout(u,n)})}const CC=200,kC=1e3;function NC(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:s}=e,a=R.useRef(null),u=R.useRef(null),l=R.useRef(null),d=s.sinceHours*60*60*1e3,f=lC,m=R.useCallback(()=>(l.current||(l.current=yC(a.current)),l.current),[]);R.useEffect(()=>{const _=EC(t,n);a.current=_,l.current=null;const k=TC(_,()=>{const O=u.current;if(!O)return null;const z=Vg(t,n);return{conversationId:O,continuationToken:z==null?void 0:z.accessToken,lastEventId:z==null?void 0:z.lastEventId}},()=>{af(t,n),u.current=null});return()=>{k(),wC(_),a.current=null}},[t,n]);const p=R.useCallback((_,k)=>Fe(null,null,function*(){var D,V,J;const O=(D=k==null?void 0:k.createIfMissing)!=null?D:!0,z=(V=k==null?void 0:k.isCurrent)!=null?V:(()=>!0);let W=cC(t,n,f);if(!W){const ce=yield m();ce&&!of(ce.storedAt,f)&&(W=ce)}if(!W){if(!O)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const ce=yield Qu({routingAttributes:r});if(ce===sa)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!z())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const U=yield _.createConversation(ce);return z()?(Ku(t,n,U),u.current=U,{conversationId:U,restoredMessages:[],resumed:!1,outcome:"created"}):(yield _.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}try{const ce=yield _.listConversations({conversationId:W.conversationId,startTimestamp:Date.now()-f});if(!z())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const U=ce.conversations.find(se=>se.conversationId===W.conversationId&&!se.isConversationClosed);if(!U){if(af(t,n),!O)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const se=yield Qu({routingAttributes:r});if(se===sa)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!z())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const ue=yield _.createConversation(se);return z()?(Ku(t,n,ue),u.current=ue,{conversationId:ue,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}):(yield _.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}_.resumeConversation(U.conversationId),u.current=U.conversationId,Ku(t,n,U.conversationId);let ie=[];try{const se=yield _.listConversationEntries(U.conversationId,{limit:Math.min((J=s.limit)!=null?J:CC,kC),startTimestamp:Date.now()-d,direction:"FromEnd"});ie=vC(se.conversationEntries).reverse()}catch(se){}return{conversationId:U.conversationId,restoredMessages:ie,resumed:!0,outcome:"resumed"}}catch(ce){return{conversationId:W.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:ce}}}),[t,n,r,s,d,f,m]),b=R.useCallback(_=>{Ku(t,n,_),u.current=_},[t,n]),y=R.useCallback(()=>{af(t,n),mC(t,n),bC(a.current),u.current=null},[t,n]),x=R.useCallback(()=>{const _=Vg(t,n);return _?{continuationToken:_.accessToken,lastEventId:_.lastEventId}:null},[t,n]),S=R.useCallback(()=>Fe(null,null,function*(){const _=yield m();return!(_!=null&&_.continuationToken)||of(_.storedAt,f)?null:{continuationToken:_.continuationToken,lastEventId:_.lastEventId}}),[f,m]),A=R.useCallback((_,k=()=>!0)=>Fe(null,null,function*(){try{const{accessToken:O,lastEventId:z}=yield _.generateContinuationToken();if(!k())return;pC(t,n,O,z)}catch(O){}}),[t,n]);return{initializeConversation:p,persistConversationId:b,clearPersistedConversation:y,getStoredConnectOptions:x,getPeerConnectOptions:S,persistContinuationToken:A}}const OC="Your session ended due to inactivity. Starting a new session…",IC=300*1e3,PC=2e3,RC=1e4,LC=15e3,DC=2;function Yg(e,t,n){return e||t||n===!0}function oa(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function MC(e){const t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{const n=JSON.parse(t);return typeof n=="object"&&n!==null}catch(n){return!1}}function Wg(e){if(!e||typeof e!="object")return!1;const t=e,n=t.type==="auth",r=t.type==="api"&&(t.statusCode===401||t.statusCode===403);return n||r}function lf(e){if(Wg(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function FC(e){var b;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((b=e.variants)!=null?b:[]).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}]`:"",m=`${d} ${t} to my cart${u}${f}`,p=`Add ${n?`${n} × `:""}${t} to cart${l}`;return{prompt:m,display:p}}function BC({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:s,resumeUsedLastEventId:a,recoverySteps:u,onExhausted:l,timeoutMs:d=LC,logger:f,isRecoveryInFlight:m}){const p=R.useRef(u);p.current=u;const b=R.useRef(l);b.current=l;const y=R.useRef(f);y.current=f;const x=R.useRef(m);x.current=m;const S=R.useRef(0),A=R.useRef(!1),_=R.useRef(0),[k,O]=R.useState(0);R.useEffect(()=>{if(!t||n){S.current=0,A.current=!1,_.current=0;return}const z=a||S.current>0;if(!(s&&z&&e==="connected"&&!r&&!A.current))return;const D=setTimeout(()=>{Fe(null,null,function*(){var U,ie;if((U=x.current)!=null&&U.call(x)){if(_.current+=1,_.current>DC){A.current=!0,b.current();return}O(se=>se+1);return}const V=S.current,J=p.current;if(V>=J.length){A.current=!0,b.current();return}_.current=0,(ie=y.current)==null||ie.warn("🦜 connect bootstrap stalled",{attempt:V});let ce;try{yield Promise.race([Promise.resolve(J[V]()),new Promise((se,ue)=>{ce=setTimeout(()=>{ue(new Error("connect bootstrap step timed out"))},d)})])}catch(se){}finally{ce!==void 0&&clearTimeout(ce),S.current=V+1,O(se=>se+1)}})},d);return()=>{clearTimeout(D)}},[e,t,n,r,s,a,d,k])}const Sr={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 UC(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 ci(e){const{type:t,statusCode:n}=UC(e);if(t==="api"&&typeof n=="number")return n===429?Sr.rateLimit:n>=500?Sr.server:Sr.default;switch(t){case"network":return Sr.network;case"sse":return Sr.interrupted;case"auth":return Sr.connect;default:return Sr.default}}function Gg(e){switch(e.code){case"MAX_RECONNECT":return Sr.lost;case"ROUTING_FAILED":return Sr.routing;default:return Sr.connect}}let Gi=null;function HC(e){Gi&&Gi!==e&&console.warn("[CimulateMessaging] A messaging API is already registered; overwriting it. Mounting more than one messaging widget per page is not supported."),Gi=e}function jC(e){Gi===e&&(Gi=null)}function zC(){if(!Gi)throw new Error("Cimulate messaging widget is not ready. Call this after injectMessagingWidget() has run and the widget has mounted.");return Gi}const Hs=Symbol("initialization-cancelled"),Xg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:s,enableLogging:a=!1,onConnect:u,onMessage:l,onError:d,onProductResult:f,children:m})=>{const{logger:p,conversationHistory:b}=ct(),{status:{isOpen:y}}=Vr(),[x,S]=R.useReducer(uC,zg),[A,_]=R.useState(!1),[k,O]=R.useState(!1),[z,W]=R.useState(!1),D=R.useRef(x);D.current=x;const V=NC({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:b}),J=R.useRef(null),ce=R.useRef(l),U=R.useRef(d),ie=R.useRef(u),se=R.useRef(f),ue=R.useRef(!1),fe=R.useRef(!1),ne=R.useRef(!1),Se=R.useRef(0),de=R.useRef(0),Q=R.useRef(0),le=R.useRef(null),C=R.useRef(null),M=R.useRef(null),Z=R.useRef(0),P=R.useRef(!1),ve=R.useRef(0),Pe=R.useRef(0),he=R.useRef(()=>Promise.reject(new Error("Messaging is unavailable"))),Ce=R.useRef([]),Me=R.useRef(null),He=R.useCallback((ee,_e)=>{_e.outcome==="timeout"?(ee.timedOut=!0,Ce.current=Ce.current.filter(Ne=>Ne===ee||!Ne.timedOut)):Ce.current=Ce.current.filter(Ne=>Ne!==ee),clearTimeout(ee.timeoutId),ee.resolve(_e)},[]);ce.current=l,U.current=d,ie.current=u,se.current=f,R.useEffect(()=>{const ee=new zS({baseURL:e,orgId:t,esDeveloperName:n,options:H({enableLogging:a},s?{capabilitiesVersion:s}:{})});J.current=ee,P.current=!1,W(!1),_(!1),O(!1),S({type:"RESET"}),ee.on("connected",()=>{var ge;S({type:"SET_CONNECTION_STATUS",status:"connected"}),(ge=ie.current)==null||ge.call(ie)}),ee.on("disconnected",()=>{S({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),ee.on("reconnecting",()=>{S({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),ee.on("message",ge=>{var vo,Jr;const je=oe(H({id:ge.messageId||crypto.randomUUID()},ge.messageId?{serverId:ge.messageId}:{}),{role:"agent",content:ge.content,timestamp:ge.timestamp,sender:ge.sender,raw:ge});p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:je.id,tokensBeforeFlush:Se.current,streamedFinalOnly:Se.current===0}),Se.current=0;const Ke=oa(Ce.current),$t=Ke==null?void 0:Ke.options.reconcileMessageId;S({type:"FLUSH_STREAMING",message:je,replaceMessageId:$t}),(vo=ce.current)==null||vo.call(ce,je),Ke&&He(Ke,{outcome:"success"});const{messagingSessionId:ht}=ge,Mr=ht?oC(ge.content):null;ht&&Mr&&((Jr=se.current)==null||Jr.call(se,{agentSessionId:ht,kind:Mr.kind,productIds:Mr.productIds}))}),ee.on("streaming_token",ge=>{var je;if(!((je=oa(Ce.current))!=null&&je.options.silent)){if(Se.current+=1,p!=null&&p.isDevelopment){const Ke=Fg(ge.token);Ke?Ke.index===li?p.debug("🦜 streaming_token → markdown fallback",{token:ge.token}):p.debug("🦜 streaming_token parsed",{type:Ke.type,index:Ke.index,outputName:Ke.type==="tool_results"?Ke.output_name:void 0}):p.debug("🦜 streaming_token dropped (empty or unrecognized payload shape)",{token:ge.token})}S({type:"APPEND_STREAMING_TOKEN",token:ge.token})}}),ee.on("typing_started",()=>{var ge;(ge=oa(Ce.current))!=null&&ge.options.silent||S({type:"SET_AGENT_TYPING",isTyping:!0})}),ee.on("typing_stopped",()=>{var ge;(ge=oa(Ce.current))!=null&&ge.options.silent||S({type:"SET_AGENT_TYPING",isTyping:!1})}),ee.on("progress_indicator",ge=>{var je;(je=oa(Ce.current))!=null&&je.options.silent||S({type:"ADD_PROGRESS_STEP",message:ge.message})}),ee.on("routing_result",ge=>{var je;if(S({type:"SET_ROUTING_RESULT",result:ge}),!ge.isSuccessful){const Ke=`Routing failed: ${ge.failureType||"unknown"}`;S({type:"SET_ERROR",error:Gg({code:"ROUTING_FAILED"})}),S({type:"SET_CONNECTION_STATUS",status:"error"}),(je=U.current)==null||je.call(U,Ke)}}),ee.on("participant_changed",ge=>{if(ge.participant.name==="Automated Process")return;const je=oe(H({id:crypto.randomUUID()},ge.entryId?{serverId:ge.entryId}:{}),{role:"system",content:ge.action==="add"?`${ge.participant.name||"Agent"} joined the conversation`:`${ge.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:ge}),S({type:"ADD_MESSAGE",message:je})}),ee.on("conversation_closed",()=>{const ge={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};S({type:"ADD_MESSAGE",message:ge}),S({type:"SET_CONVERSATION_ID",id:null}),V.clearPersistedConversation()}),ee.on("error",ge=>{var je;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:ge}),ge.code==="SESSION_EXPIRED"){ne.current=!0,S({type:"SET_SESSION_EXPIRED",expired:!0}),S({type:"SET_CONNECTION_STATUS",status:"disconnected"}),S({type:"SET_LOADING",isLoading:!1});return}S({type:"SET_ERROR",error:Gg(ge)}),ge.recoverable||S({type:"SET_CONNECTION_STATUS",status:"error"}),(je=U.current)==null||je.call(U,ge.message)});const _e=ge=>{if(ge!==ve.current)throw Hs},Ne=ge=>ge===ve.current,Ae=ge=>Fe(null,null,function*(){_(!1);let je=V.getStoredConnectOptions(),Ke=!1;je||(je=yield V.getPeerConnectOptions(),_e(ge),Ke=!!je);let $t=!1;try{if(yield ee.connect(je!=null?je:void 0),!Ne(ge))throw ee.disconnect(),Hs;$t=!!(je!=null&&je.lastEventId)}catch(Mr){if(_e(ge),je&&lf(Mr)){if(p==null||p.log("Stored token expired on connect — falling back to fresh connect"),Ke||V.clearPersistedConversation(),yield ee.connect(),!Ne(ge))throw ee.disconnect(),Hs;$t=!1}else throw Mr}O($t),yield V.persistContinuationToken(ee,()=>Ne(ge)),_e(ge);const ht=yield V.initializeConversation(ee,{isCurrent:()=>Ne(ge)});if(_e(ge),p==null||p.log("🦜 initial connect complete",{conversationId:ht.conversationId,resumed:ht.resumed,outcome:ht.outcome,restoredMessages:ht.restoredMessages.length}),ht.outcome==="aborted")throw S({type:"SET_LOADING",isLoading:!1}),S({type:"SET_CONNECTION_STATUS",status:"disconnected"}),Hs;if(ht.outcome==="unverified-error"){ht.conversationId&&(ee.resumeConversation(ht.conversationId),S({type:"SET_CONVERSATION_ID",id:ht.conversationId})),_(!0);return}S({type:"SET_CONVERSATION_ID",id:ht.conversationId}),ht.resumed&&S({type:"LOAD_HISTORY",messages:ht.restoredMessages}),_(!0),S({type:"SET_LOADING",isLoading:!1})});return C.current=Ae,()=>{ve.current+=1,Pe.current+=1,ee.disconnect(),ee.off(),J.current=null,C.current=null,M.current=null,P.current=!1}},[e,t,n,s,He]);const nt=R.useCallback(()=>{if(P.current)return Promise.resolve();if(M.current)return Z.current===ve.current?M.current:M.current.catch(Ae=>{if(Ae!==Hs)throw Ae}).then(()=>he.current());const ee=C.current;if(!ee)return Promise.reject(new Error("Messaging is unavailable"));S({type:"SET_LOADING",isLoading:!0}),S({type:"SET_CONNECTION_STATUS",status:"connecting"});const _e=++ve.current;Z.current=_e;const Ne=ee(_e).then(()=>{P.current=!0,W(!0)}).catch(Ae=>{var je;if(Ae===Hs)throw Ae;const ge=Ae instanceof Error?Ae.message:String(Ae);throw S({type:"SET_CONNECTION_STATUS",status:"error"}),S({type:"SET_ERROR",error:ci(Ae)}),(je=U.current)==null||je.call(U,ge),Ae}).finally(()=>{M.current===Ne&&(M.current=null)});return M.current=Ne,Ne},[]);he.current=nt,R.useEffect(()=>{y&&nt().catch(()=>{})},[y,e,t,n,s,nt]);const Nt=R.useCallback(()=>Fe(null,null,function*(){const ee=J.current;if(!ee)return!1;const _e=V.getStoredConnectOptions();if(!_e)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{ee.disconnect(),yield ee.connect(_e)}catch(Ae){if(lf(Ae))return p==null||p.log("🦜 attemptResume: token expired (401) — will start fresh",{error:Ae instanceof Error?Ae.message:String(Ae)}),!1;throw p==null||p.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:Ae instanceof Error?Ae.message:String(Ae)}),Ae}yield V.persistContinuationToken(ee);const Ne=yield V.initializeConversation(ee,{createIfMissing:!1});return Ne.outcome==="not-found-or-closed"||!Ne.conversationId?(p==null||p.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(Ne.outcome==="unverified-error"&&(p==null||p.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:Ne.conversationId}),ee.resumeConversation(Ne.conversationId)),p==null||p.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:Ne.conversationId}),S({type:"SET_CONVERSATION_ID",id:Ne.conversationId}),S({type:"SET_CONNECTION_STATUS",status:"connected"}),V.persistConversationId(Ne.conversationId),ne.current=!1,S({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[V,p]),Ft=R.useCallback(ee=>Fe(null,null,function*(){var Ne;const _e=J.current;if(_e){ee.options.silent||(S({type:"SET_LOADING",isLoading:!0}),S({type:"SET_PROGRESS_MESSAGE",message:""}));try{yield _e.sendMessage(ee.text)}catch(Ae){const ge=ci(Ae);S({type:"SET_SEND_ERROR",error:{text:ee.text,displayContent:ee.displayContent,options:ee.options,message:ge}}),(Ne=U.current)==null||Ne.call(U,Ae instanceof Error?Ae.message:String(Ae)),He(ee,{outcome:"failure",message:ge})}}}),[He]),xn=R.useCallback(ee=>Fe(null,null,function*(){var Ne;const _e=J.current;if(!(!_e||ue.current)){ue.current=!0,fe.current=!0;try{if(yield Nt()){ee&&(yield Ft(ee));return}p==null||p.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),ne.current=!1,S({type:"SET_SESSION_EXPIRED",expired:!1}),S({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:OC,timestamp:new Date().toISOString()}}),V.clearPersistedConversation(),S({type:"SET_CONNECTION_STATUS",status:"connecting"}),_e.disconnect(),yield _e.connect(),yield V.persistContinuationToken(_e);const Ae=yield Qu({routingAttributes:r});if(Ae===sa){S({type:"SET_CONNECTION_STATUS",status:"disconnected"});return}const ge=yield _e.createConversation(Ae);p==null||p.log("🦜 recoverExpiredSession: new conversation created",{conversationId:ge}),S({type:"SET_CONVERSATION_ID",id:ge}),S({type:"SET_CONNECTION_STATUS",status:"connected"}),V.persistConversationId(ge),ee&&(yield Ft(ee))}catch(Ae){const ge=Ae instanceof Error?Ae.message:String(Ae);S({type:"SET_ERROR",error:ci(Ae)}),S({type:"SET_CONNECTION_STATUS",status:"error"}),(Ne=U.current)==null||Ne.call(U,ge),ee&&He(ee,{outcome:"failure",message:ci(Ae)})}finally{ue.current=!1,fe.current=!1}}}),[r,V,Nt,Ft,p,He]),pn=R.useRef(xn);pn.current=xn;const Bt=R.useCallback(()=>Fe(null,null,function*(){const ee=J.current;if(!ee||!P.current||ue.current)return;if(!D.current.conversationId&&!ne.current){ee.reconnect();return}ue.current=!0;const _e=Fe(null,null,function*(){try{(yield Nt())||(ne.current=!0,S({type:"SET_SESSION_EXPIRED",expired:!0}),S({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(Ne){ne.current=!0,S({type:"SET_SESSION_EXPIRED",expired:!0}),S({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{ue.current=!1,le.current=null}});le.current=_e,yield _e}),[Nt]),$e=R.useRef(Bt);$e.current=Bt;const St=R.useCallback(()=>Fe(null,null,function*(){const ee=J.current;if(!ee||ue.current)return;const _e=V.getStoredConnectOptions(),Ne=_e==null?void 0:_e.continuationToken;if(Ne){ue.current=!0;try{ee.disconnect(),yield ee.connect({continuationToken:Ne}),yield V.persistContinuationToken(ee);const Ae=D.current.conversationId;Ae&&ee.resumeConversation(Ae)}catch(Ae){if(lf(Ae)){ne.current=!0,S({type:"SET_SESSION_EXPIRED",expired:!0}),S({type:"SET_CONNECTION_STATUS",status:"disconnected"}),S({type:"SET_LOADING",isLoading:!1});return}p==null||p.log("🦜 reconnectOmittingLastEventId: transient connect failure — session kept",{error:Ae instanceof Error?Ae.message:String(Ae)})}finally{ue.current=!1}}}),[V,p]);R.useEffect(()=>{const ee=()=>{const Ke=Date.now();Ke-Q.current<PC||(Q.current=Ke,$e.current())},_e=()=>{if(document.visibilityState==="hidden"){de.current=Date.now();return}const Ke=J.current;if(!Ke)return;const $t=de.current?Date.now()-de.current:0;de.current=0,(ne.current||!Ke.isConnected||$t>IC)&&ee()},Ne=Ke=>{Ke.persisted&&ee()},Ae=()=>{de.current=Date.now()},ge=()=>ee(),je=()=>ee();return document.addEventListener("visibilitychange",_e),window.addEventListener("pageshow",Ne),window.addEventListener("pagehide",Ae),document.addEventListener("resume",ge),window.addEventListener("online",je),()=>{document.removeEventListener("visibilitychange",_e),window.removeEventListener("pageshow",Ne),window.removeEventListener("pagehide",Ae),document.removeEventListener("resume",ge),window.removeEventListener("online",je)}},[]);const Wt=R.useCallback((ee,_e)=>Fe(null,null,function*(){var Ae;const Ne=J.current;if(!Ne){He(ee,{outcome:"failure",message:"Messaging is unavailable"});return}if(ne.current){yield pn.current(ee);return}try{yield Ne.sendMessage(ee.text)}catch(ge){if(Wg(ge)){yield pn.current(ee);return}const je=ci(ge);S({type:"SET_SEND_ERROR",error:_e(je)}),(Ae=U.current)==null||Ae.call(U,ge instanceof Error?ge.message:String(ge)),He(ee,{outcome:"failure",message:je})}}),[He]),Ie=R.useCallback(ee=>Fe(null,null,function*(){const _e=le.current;_e&&(yield _e),yield ee()}),[]),Xe=R.useCallback((ee,_e,Ne={})=>new Promise(Ae=>{if(!J.current){Ae({outcome:"failure",message:"Messaging is unavailable"});return}const je={};Object.assign(je,{text:ee,displayContent:_e,options:Ne,resolve:Ae,timeoutId:setTimeout(()=>{S({type:"SET_LOADING",isLoading:!1}),He(je,{outcome:"timeout"})},RC)}),Ce.current.push(je),S({type:"CLEAR_SEND_ERROR"}),Ne.silent||(S({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"user",content:_e!=null?_e:ee,timestamp:new Date().toISOString()}}),S({type:"SET_LOADING",isLoading:!0}),S({type:"SET_PROGRESS_MESSAGE",message:""})),Ie(()=>Wt(je,Ke=>({text:ee,displayContent:_e,options:Ne,message:Ke})))}),[Wt,Ie,He]),ot=R.useCallback((ee,_e)=>{if(!ee.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});const Ne=Pe.current,Ae=()=>{const Ke=()=>Ne!==Pe.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):Xe(ee,_e==null?void 0:_e.displayContent,_e);return P.current?Ke():nt().then(Ke,$t=>({outcome:"failure",message:ci($t)}))},ge=Me.current?Me.current.then(Ae):Ae(),je=ge.then(()=>{});return Me.current=je,je.finally(()=>{Me.current===je&&(Me.current=null)}),ge},[Xe,nt]),ft=R.useCallback(ee=>{if(!J.current)return;const _e=Pe.current,{prompt:Ne,display:Ae}=FC(ee);nt().then(()=>{if(_e===Pe.current)return Xe(Ne,Ae)}).catch(()=>{})},[Xe,nt]),Jn=R.useCallback(()=>{const ee=J.current,_e=D.current.sendError;if(!ee||!_e)return;const Ne=()=>fe.current?Promise.resolve({outcome:"failure",message:_e.message}):Xe(_e.text,_e.displayContent,_e.options),Ae=Me.current?Me.current.then(Ne):Ne(),ge=Ae.then(()=>{});return Me.current=ge,ge.finally(()=>{Me.current===ge&&(Me.current=null)}),Ae},[Xe]),gs=R.useCallback(()=>{const ee=J.current;ee&&(M.current||(ne.current=!1,P.current=!1,W(!1),ee.disconnect(),S({type:"SET_CONNECTION_STATUS",status:"connecting"}),nt().catch(()=>{})))},[nt]),xi=R.useCallback(()=>{const ee=J.current;if(!ee)return Promise.resolve();if(!P.current)return ve.current+=1,Pe.current+=1,ee.disconnect(),V.clearPersistedConversation(),S({type:"RESET"}),Promise.resolve();const _e=++Pe.current;return ne.current=!1,O(!1),V.clearPersistedConversation(),S({type:"RESET"}),S({type:"SET_LOADING",isLoading:!0}),S({type:"SET_CONNECTION_STATUS",status:"connecting"}),ee.endConversation().then(()=>_e!==Pe.current||J.current!==ee?null:(ee.disconnect(),ee.connect().then(()=>ee))).then(Ne=>Fe(null,null,function*(){if(!Ne||_e!==Pe.current||(yield V.persistContinuationToken(Ne,()=>_e===Pe.current&&J.current===Ne),_e!==Pe.current||J.current!==Ne))return null;const Ae=yield Qu({routingAttributes:r});return Ae===sa?null:ee.createConversation(Ae)})).then(Ne=>{!Ne||_e!==Pe.current||J.current!==ee||(S({type:"SET_CONVERSATION_ID",id:Ne}),S({type:"SET_CONNECTION_STATUS",status:"connected"}),V.persistConversationId(Ne))}).catch(Ne=>{var Ae;_e!==Pe.current||J.current!==ee||(S({type:"SET_ERROR",error:ci(Ne)}),S({type:"SET_CONNECTION_STATUS",status:"error"}),(Ae=U.current)==null||Ae.call(U,Ne.message))})},[r,V]);BC({connectionStatus:x.connectionStatus,loading:x.loading,hasMessages:x.messages.length>0,sessionExpired:x.sessionExpired,bootstrapSettled:A,resumeUsedLastEventId:k,recoverySteps:[St,xi],onExhausted:()=>{var _e;const ee=ci({type:"network"});S({type:"SET_ERROR",error:ee}),S({type:"SET_CONNECTION_STATUS",status:"error"}),(_e=U.current)==null||_e.call(U,ee)},logger:p,isRecoveryInFlight:()=>ue.current||le.current!==null});const ae=R.useCallback(()=>Fe(null,null,function*(){var Ae;const ee=J.current;if(!ee||!D.current.conversationId)return;const _e=yield ee.retrieveConversationTranscript(),Ne=URL.createObjectURL(_e);try{const ge=document.createElement("a");ge.href=Ne,ge.download=`transcript-${(Ae=ee.conversationId)!=null?Ae:"conversation"}.pdf`,document.body.appendChild(ge),ge.click(),ge.remove()}finally{URL.revokeObjectURL(Ne)}}),[]),xe=R.useCallback(()=>Fe(null,null,function*(){const ee=J.current;if(!ee)throw new Error("getAuthLinkKey called before the messaging client connected");return p==null||p.debug("🦜 getAuthLinkKey: requesting single-use auth link key"),ee.getAuthLinkKey()}),[p]);R.useEffect(()=>{const ee={getAuthLinkKey:xe};return HC(ee),()=>jC(ee)},[xe]);const Ve=x.connectionStatus==="connected"&&x.conversationId!==null;R.useEffect(()=>{V0(Ve)},[Ve]),R.useEffect(()=>()=>V0(!1),[]);const et=R.useMemo(()=>({connectionStatus:x.connectionStatus,isConnected:Ve,isAgentTyping:x.isAgentTyping,conversationId:x.conversationId,messages:x.messages,streamingBlocks:x.streamingBlocks,progressMessage:x.progressMessage,progressSteps:x.progressSteps,error:x.error,sendError:x.sendError,canInitialize:!z&&x.error===null,loading:x.loading,sessionExpired:x.sessionExpired,sendMessage:ot,addToCart:ft,resetConversation:xi,retryLastMessage:Jn,retryConnection:gs,downloadTranscript:ae,getAuthLinkKey:xe}),[x,Ve,z,ot,ft,xi,Jn,gs,ae,xe]);return w.jsx($g.Provider,{value:et,children:m})};var Kg=Symbol.for("immer-nothing"),Qg=Symbol.for("immer-draftable"),Hn=Symbol.for("immer-state");function ur(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var js=Object.getPrototypeOf;function zs(e){return!!e&&!!e[Hn]}function Xi(e){var t;return e?Jg(e)||Array.isArray(e)||!!e[Qg]||!!((t=e.constructor)!=null&&t[Qg])||aa(e)||el(e):!1}var $C=Object.prototype.constructor.toString();function Jg(e){if(!e||typeof e!="object")return!1;const t=js(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)===$C}function Ju(e,t){Zu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Zu(e){const t=e[Hn];return t?t.type_:Array.isArray(e)?1:aa(e)?2:el(e)?3:0}function cf(e,t){return Zu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Zg(e,t,n){const r=Zu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function VC(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function aa(e){return e instanceof Map}function el(e){return e instanceof Set}function Ki(e){return e.copy_||e.base_}function df(e,t){if(aa(e))return new Map(e);if(el(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Jg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Hn];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(js(e),r)}else{const r=js(e);if(r!==null&&n)return H({},e);const s=Object.create(r);return Object.assign(s,e)}}function ff(e,t=!1){return nl(e)||zs(e)||!Xi(e)||(Zu(e)>1&&Object.defineProperties(e,{set:{value:tl},add:{value:tl},clear:{value:tl},delete:{value:tl}}),Object.freeze(e),t&&Object.values(e).forEach(n=>ff(n,!0))),e}function tl(){ur(2)}function nl(e){return Object.isFrozen(e)}var qC={};function Qi(e){const t=qC[e];return t||ur(0,e),t}var ua;function e1(){return ua}function YC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function t1(e,t){t&&(Qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function hf(e){pf(e),e.drafts_.forEach(WC),e.drafts_=null}function pf(e){e===ua&&(ua=e.parent_)}function n1(e){return ua=YC(ua,e)}function WC(e){const t=e[Hn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function r1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Hn].modified_&&(hf(t),ur(4)),Xi(e)&&(e=rl(t,e),t.parent_||il(t,e)),t.patches_&&Qi("Patches").generateReplacementPatches_(n[Hn].base_,e,t.patches_,t.inversePatches_)):e=rl(t,n,[]),hf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Kg?e:void 0}function rl(e,t,n){if(nl(t))return t;const r=t[Hn];if(!r)return Ju(t,(s,a)=>i1(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return il(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),Ju(a,(l,d)=>i1(e,r,s,l,d,n,u)),il(e,s,!1),n&&e.patches_&&Qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function i1(e,t,n,r,s,a,u){if(zs(s)){const l=a&&t&&t.type_!==3&&!cf(t.assigned_,r)?a.concat(r):void 0,d=rl(e,s,l);if(Zg(n,r,d),zs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Xi(s)&&!nl(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;rl(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(aa(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&il(e,s)}}function il(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ff(t,n)}function GC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:e1(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=mf;n&&(s=[r],a=la);const{revoke:u,proxy:l}=Proxy.revocable(s,a);return r.draft_=l,r.revoke_=u,l}var mf={get(e,t){if(t===Hn)return e;const n=Ki(e);if(!cf(n,t))return XC(e,n,t);const r=n[t];return e.finalized_||!Xi(r)?r:r===gf(e.base_,t)?(yf(e),e.copy_[t]=Tf(r,e)):r},has(e,t){return t in Ki(e)},ownKeys(e){return Reflect.ownKeys(Ki(e))},set(e,t,n){const r=s1(Ki(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=gf(Ki(e),t),a=s==null?void 0:s[Hn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(VC(n,s)&&(n!==void 0||cf(e.base_,t)))return!0;yf(e),Ef(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 gf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,yf(e),Ef(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ki(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ur(11)},getPrototypeOf(e){return js(e.base_)},setPrototypeOf(){ur(12)}},la={};Ju(mf,(e,t)=>{la[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),la.deleteProperty=function(e,t){return la.set.call(this,e,t,void 0)},la.set=function(e,t,n){return mf.set.call(this,e[0],t,n,e[0])};function gf(e,t){const n=e[Hn];return(n?Ki(n):e)[t]}function XC(e,t,n){var s;const r=s1(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function s1(e,t){if(!(t in e))return;let n=js(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=js(n)}}function Ef(e){e.modified_||(e.modified_=!0,e.parent_&&Ef(e.parent_))}function yf(e){e.copy_||(e.copy_=df(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var KC=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,m=>n.call(this,m,...f))}}typeof n!="function"&&ur(6),r!==void 0&&typeof r!="function"&&ur(7);let s;if(Xi(t)){const a=n1(this),u=Tf(t,void 0);let l=!0;try{s=n(u),l=!1}finally{l?hf(a):pf(a)}return t1(a,r),r1(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===Kg&&(s=void 0),this.autoFreeze_&&ff(s,!0),r){const a=[],u=[];Qi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else ur(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){Xi(e)||ur(8),zs(e)&&(e=QC(e));const t=n1(this),n=Tf(e,void 0);return n[Hn].isManual_=!0,pf(t),n}finishDraft(e,t){const n=e&&e[Hn];(!n||!n.isManual_)&&ur(9);const{scope_:r}=n;return t1(r,t),r1(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=Qi("Patches").applyPatches_;return zs(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Tf(e,t){const n=aa(e)?Qi("MapSet").proxyMap_(e,t):el(e)?Qi("MapSet").proxySet_(e,t):GC(e,t);return(t?t.scope_:e1()).drafts_.push(n),n}function QC(e){return zs(e)||ur(10,e),o1(e)}function o1(e){if(!Xi(e)||nl(e))return e;const t=e[Hn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=df(e,t.scope_.immer_.useStrictShallowCopy_)}else n=df(e,!0);return Ju(n,(r,s)=>{Zg(n,r,o1(s))}),t&&(t.finalized_=!1),n}var JC=new KC,ZC=JC.produce;function ek(e,t,n){var r=R.useMemo(function(){return ZC(e)},[e]);return R.useReducer(r,t,n)}const tk=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),a1=R.createContext(null),u1=R.createContext(null),nk=({children:e,dispatch:t})=>{const n=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),s=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),l=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),f=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),m=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),p=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),b=R.useCallback(x=>{t({type:Tt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=R.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:m,setResponseMessage:p,setIsResponseLoading:b}),[n,r,s,a,u,l,d,f,m,p,b]);return w.jsx(u1.Provider,{value:y,children:e})},rk=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Tt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case Tt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case Tt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case Tt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case Tt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case Tt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case Tt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case Tt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case Tt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case Tt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case Tt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case Tt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case Tt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case Tt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case Tt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},ik=({promptsConfig:e,children:t})=>{const[n,r]=ek(rk,oe(H(H({},W0),e||{}),{staticQuestions:tk((e==null?void 0:e.staticQuestions)||[])}));return w.jsx(a1.Provider,{value:n,children:w.jsx(nk,{dispatch:r,children:t})})},sk={productId:Jo.productId,pdpLink:Jo.pdpLink},l1=R.createContext(sk),ok=({children:e})=>{const[t,n]=R.useState(Jo.productId),[r,s]=R.useState(Jo.pdpLink);R.useEffect(()=>{const u=({detail:l})=>{if((l==null?void 0:l.property)==="pdp-context"){const d=l.value;n(d.productId),s(d.pdpLink);return}(l==null?void 0:l.property)==="productId"&&n(l.value),(l==null?void 0:l.property)==="pdpLink"&&s(l.value)};return PS(u),()=>{RS(u)}},[]);const a=R.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(l1.Provider,{value:a,children:e})},ak=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){_t(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){_t(!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"?(_t(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(_t(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},s.onerror=()=>{a||(u(),_t(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const l=setTimeout(()=>{a||(a=!0,_t(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(s)}),c1=R.createContext({overrides:{},isInitialized:!1}),uk=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,s]=R.useState({}),[a,u]=R.useState(!1);R.useEffect(()=>{Fe(null,null,function*(){let f={};e?(_t(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield ak(e)):t&&typeof t=="object"?(_t(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(_t(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),s(f),u(!0)})},[e,t]);const l=R.useMemo(()=>({overrides:r,isInitialized:a}),[r,a]);return w.jsx(c1.Provider,{value:l,children:n})},d1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:s,headerText:a,headerConfig:u,theme:l,openLinksInNewTab:d,globalClassName:f,isDevelopment:m=!1,componentType:p,componentConfig:b,entryType:y,initialEntry:x,entryMessage:S,disclaimerText:A,disclaimerMarkdown:_,clientContext:k,searchPlaceholder:O,searchButtonLabel:z,searchConfig:W,suggestionButtonConfig:D,messageAlignment:V,autoScroll:J,promptsConfig:ce,showProductDescription:U,resetConversationMessage:ie,conversationHistory:se,messagingConfig:ue,overrides:fe,overridesUrl:ne,inlineOverrides:Se,__features:de,children:Q})=>{const le=R.useRef(!1);return le.current||(le.current=!0,FS({initialEntry:x,entryType:y,isDevelopment:m})),w.jsx(nC,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:s,headerText:a,headerConfig:u,entryMessage:S,theme:l,globalClassName:f,openLinksInNewTab:d,searchPlaceholder:O,searchButtonLabel:z,searchConfig:W,suggestionButtonConfig:D,messageAlignment:V,autoScroll:J,showProductDescription:U,componentConfig:b,clientContext:k,disclaimerMarkdown:_,disclaimerText:A,resetConversationMessage:ie,conversationHistory:se,isDevelopment:m,__features:de,progressStepsLimit:ue==null?void 0:ue.progressStepsLimit,routingAttributes:ue==null?void 0:ue.routingAttributes,enableDownloadTranscript:ue==null?void 0:ue.enableDownloadTranscript,enableEscalationToAgent:ue==null?void 0:ue.enableEscalationToAgent,showProductCaptions:ue==null?void 0:ue.showProductCaptions,children:w.jsx(ov,{entryType:y!=null?y:x==null?void 0:x.type,componentConfig:b,componentType:p,children:w.jsx(ok,{children:w.jsx(ik,{promptsConfig:ce,children:w.jsx(uk,{overridesUrl:ne,inlineOverrides:Se||fe,children:w.jsx(Xg,{scrt2Url:(ue==null?void 0:ue.scrt2Url)||"",orgId:(ue==null?void 0:ue.orgId)||"",esDeveloperName:(ue==null?void 0:ue.esDeveloperName)||"",routingAttributes:(ue==null?void 0:ue.routingAttributes)||{},capabilitiesVersion:ue==null?void 0:ue.capabilitiesVersion,enableLogging:m,onProductResult:ue==null?void 0:ue.onProductResult,children:Q})})})})})})};var bf={exports:{}},kn={},wf={exports:{}},xf={};var f1;function lk(){return f1||(f1=1,(function(e){function t(Q,le){var C=Q.length;Q.push(le);e:for(;0<C;){var M=C-1>>>1,Z=Q[M];if(0<s(Z,le))Q[M]=le,Q[C]=Z,C=M;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var le=Q[0],C=Q.pop();if(C!==le){Q[0]=C;e:for(var M=0,Z=Q.length,P=Z>>>1;M<P;){var ve=2*(M+1)-1,Pe=Q[ve],he=ve+1,Ce=Q[he];if(0>s(Pe,C))he<Z&&0>s(Ce,Pe)?(Q[M]=Ce,Q[he]=C,M=he):(Q[M]=Pe,Q[ve]=C,M=ve);else if(he<Z&&0>s(Ce,C))Q[M]=Ce,Q[he]=C,M=he;else break e}}return le}function s(Q,le){var C=Q.sortIndex-le.sortIndex;return C!==0?C:Q.id-le.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=[],m=1,p=null,b=3,y=!1,x=!1,S=!1,A=typeof setTimeout=="function"?setTimeout:null,_=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 O(Q){for(var le=n(f);le!==null;){if(le.callback===null)r(f);else if(le.startTime<=Q)r(f),le.sortIndex=le.expirationTime,t(d,le);else break;le=n(f)}}function z(Q){if(S=!1,O(Q),!x)if(n(d)!==null)x=!0,Se(W);else{var le=n(f);le!==null&&de(z,le.startTime-Q)}}function W(Q,le){x=!1,S&&(S=!1,_(J),J=-1),y=!0;var C=b;try{for(O(le),p=n(d);p!==null&&(!(p.expirationTime>le)||Q&&!ie());){var M=p.callback;if(typeof M=="function"){p.callback=null,b=p.priorityLevel;var Z=M(p.expirationTime<=le);le=e.unstable_now(),typeof Z=="function"?p.callback=Z:p===n(d)&&r(d),O(le)}else r(d);p=n(d)}if(p!==null)var P=!0;else{var ve=n(f);ve!==null&&de(z,ve.startTime-le),P=!1}return P}finally{p=null,b=C,y=!1}}var D=!1,V=null,J=-1,ce=5,U=-1;function ie(){return!(e.unstable_now()-U<ce)}function se(){if(V!==null){var Q=e.unstable_now();U=Q;var le=!0;try{le=V(!0,Q)}finally{le?ue():(D=!1,V=null)}}else D=!1}var ue;if(typeof k=="function")ue=function(){k(se)};else if(typeof MessageChannel!="undefined"){var fe=new MessageChannel,ne=fe.port2;fe.port1.onmessage=se,ue=function(){ne.postMessage(null)}}else ue=function(){A(se,0)};function Se(Q){V=Q,D||(D=!0,ue())}function de(Q,le){J=A(function(){Q(e.unstable_now())},le)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,Se(W))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ce=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Q){switch(b){case 1:case 2:case 3:var le=3;break;default:le=b}var C=b;b=le;try{return Q()}finally{b=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,le){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var C=b;b=Q;try{return le()}finally{b=C}},e.unstable_scheduleCallback=function(Q,le,C){var M=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?M+C:M):C=M,Q){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=C+Z,Q={id:m++,callback:le,priorityLevel:Q,startTime:C,expirationTime:Z,sortIndex:-1},C>M?(Q.sortIndex=C,t(f,Q),n(d)===null&&Q===n(f)&&(S?(_(J),J=-1):S=!0,de(z,C-M))):(Q.sortIndex=Z,t(d,Q),x||y||(x=!0,Se(W))),Q},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(Q){var le=b;return function(){var C=b;b=le;try{return Q.apply(this,arguments)}finally{b=C}}}})(xf)),xf}var h1;function ck(){return h1||(h1=1,wf.exports=lk()),wf.exports}var p1;function dk(){if(p1)return kn;p1=1;var e=sr(),t=ck();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]*$/,m={},p={};function b(i){return d.call(p,i)?!0:d.call(m,i)?!1:f.test(i)?p[i]=!0:(m[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 S(i,o,c,h,E,T,v){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=T,this.removeEmptyString=v}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new S(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 S(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new S(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 S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var _=/[\-:]([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(_,k);A[o]=new S(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(_,k);A[o]=new S(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(_,k);A[o]=new S(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function O(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?b(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 z=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),D=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),ie=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),Se=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),Q=Symbol.iterator;function le(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,M;function Z(i){if(M===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);M=o&&o[1]||""}return`
17
17
  `+M+i}var P=!1;function ve(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(te){var h=te}Reflect.construct(i,[],o)}else{try{o.call()}catch(te){h=te}i.call(o.prototype)}else{try{throw Error()}catch(te){h=te}i()}}catch(te){if(te&&h&&typeof te.stack=="string"){for(var E=te.stack.split(`
18
18
  `),T=h.stack.split(`
19
19
  `),v=E.length-1,B=T.length-1;1<=v&&0<=B&&E[v]!==T[B];)B--;for(;1<=v&&0<=B;v--,B--)if(E[v]!==T[B]){if(v!==1||B!==1)do if(v--,B--,0>B||E[v]!==T[B]){var $=`
20
- `+E[v].replace(" at new "," at ");return i.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",i.displayName)),$}while(1<=v&&0<=B);break}}}finally{P=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?Z(i):""}function Pe(i){switch(i.tag){case 5:return Z(i.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return i=ve(i.type,!1),i;case 11:return i=ve(i.type.render,!1),i;case 1:return i=ve(i.type,!0),i;default:return""}}function he(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 V:return"Fragment";case D:return"Portal";case ae:return"Profiler";case K:return"StrictMode";case ce:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case j:return(i._context.displayName||"Context")+".Provider";case ie:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ne:return o=i.displayName||null,o!==null?o:he(i.type)||"Memo";case Se:o=i._payload,i=i._init;try{return he(i(o))}catch(c){}}return null}function ke(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 he(o);case 8:return o===K?"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 Me(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function He(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function nt(i){var o=He(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,T=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(v){h=""+v,T.call(this,v)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(v){h=""+v},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Nt(i){i._valueTracker||(i._valueTracker=nt(i))}function Ft(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=He(i)?i.checked?"true":"false":i.value),i=h,i!==c?(o.setValue(i),!0):!1}function xn(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 pn(i,o){var c=o.checked;return k({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Bt(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=Me(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&&O(i,"checked",o,!1)}function St(i,o){$e(i,o);var c=Me(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")?Ie(i,o.type,c):o.hasOwnProperty("defaultValue")&&Ie(i,o.type,Me(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function Wt(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 Ie(i,o,c){(o!=="number"||xn(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Xe=Array.isArray;function ot(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=""+Me(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 ft(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Jn(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(Xe(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:Me(c)}}function gs(i,o){var c=Me(o.value),h=Me(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 xi(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 xe(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,et=(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 ee(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var _e={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},Ne=["Webkit","ms","Moz","O"];Object.keys(_e).forEach(function(i){Ne.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),_e[o]=_e[i]})});function Ae(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||_e.hasOwnProperty(i)&&_e[i]?(""+o).trim():o+"px"}function ge(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=Ae(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var je=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ke(i,o){if(o){if(je[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 $t(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 ht=null;function Mr(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var vo=null,Jr=null,Ao=null;function Kw(i){if(i=pu(i)){if(typeof vo!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Lc(o),vo(i.stateNode,i.type,o))}}function Qw(i){Jr?Ao?Ao.push(i):Ao=[i]:Jr=i}function Jw(){if(Jr){var i=Jr,o=Ao;if(Ao=Jr=null,Kw(i),o)for(i=0;i<o.length;i++)Kw(o[i])}}function Zw(i,o){return i(o)}function ex(){}var Pp=!1;function tx(i,o,c){if(Pp)return i(o,c);Pp=!0;try{return Zw(i,o,c)}finally{Pp=!1,(Jr!==null||Ao!==null)&&(ex(),Jw())}}function Wa(i,o){var c=i.stateNode;if(c===null)return null;var h=Lc(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 Rp=!1;if(l)try{var Ga={};Object.defineProperty(Ga,"passive",{get:function(){Rp=!0}}),window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch(i){Rp=!1}function hB(i,o,c,h,E,T,v,B,$){var te=Array.prototype.slice.call(arguments,3);try{o.apply(c,te)}catch(Ee){this.onError(Ee)}}var Xa=!1,fc=null,hc=!1,Lp=null,pB={onError:function(i){Xa=!0,fc=i}};function mB(i,o,c,h,E,T,v,B,$){Xa=!1,fc=null,hB.apply(pB,arguments)}function gB(i,o,c,h,E,T,v,B,$){if(mB.apply(this,arguments),Xa){if(Xa){var te=fc;Xa=!1,fc=null}else throw Error(n(198));hc||(hc=!0,Lp=te)}}function Es(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 nx(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 rx(i){if(Es(i)!==i)throw Error(n(188))}function EB(i){var o=i.alternate;if(!o){if(o=Es(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 T=E.alternate;if(T===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===c)return rx(E),i;if(T===h)return rx(E),o;T=T.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=T;else{for(var v=!1,B=E.child;B;){if(B===c){v=!0,c=E,h=T;break}if(B===h){v=!0,h=E,c=T;break}B=B.sibling}if(!v){for(B=T.child;B;){if(B===c){v=!0,c=T,h=E;break}if(B===h){v=!0,h=T,c=E;break}B=B.sibling}if(!v)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 ix(i){return i=EB(i),i!==null?sx(i):null}function sx(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=sx(i);if(o!==null)return o;i=i.sibling}return null}var ox=t.unstable_scheduleCallback,ax=t.unstable_cancelCallback,yB=t.unstable_shouldYield,TB=t.unstable_requestPaint,Ut=t.unstable_now,bB=t.unstable_getCurrentPriorityLevel,Dp=t.unstable_ImmediatePriority,ux=t.unstable_UserBlockingPriority,pc=t.unstable_NormalPriority,wB=t.unstable_LowPriority,lx=t.unstable_IdlePriority,mc=null,Fr=null;function xB(i){if(Fr&&typeof Fr.onCommitFiberRoot=="function")try{Fr.onCommitFiberRoot(mc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var mr=Math.clz32?Math.clz32:vB,_B=Math.log,SB=Math.LN2;function vB(i){return i>>>=0,i===0?32:31-(_B(i)/SB|0)|0}var gc=64,Ec=4194304;function Ka(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 yc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,v=c&268435455;if(v!==0){var B=v&~E;B!==0?h=Ka(B):(T&=v,T!==0&&(h=Ka(T)))}else v=c&~E,v!==0?h=Ka(v):T!==0&&(h=Ka(T));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((h&4)!==0&&(h|=c&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)c=31-mr(o),E=1<<c,h|=i[c],o&=~E;return h}function AB(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 kB(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var v=31-mr(T),B=1<<v,$=E[v];$===-1?((B&c)===0||(B&h)!==0)&&(E[v]=AB(B,o)):$<=o&&(i.expiredLanes|=B),T&=~B}}function Mp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function cx(){var i=gc;return gc<<=1,(gc&4194240)===0&&(gc=64),i}function Fp(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function Qa(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-mr(o),i[o]=c}function CB(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-mr(c),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~T}}function Bp(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-mr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var mt=0;function dx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var fx,Up,hx,px,mx,Hp=!1,Tc=[],_i=null,Si=null,vi=null,Ja=new Map,Za=new Map,Ai=[],NB="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 gx(i,o){switch(i){case"focusin":case"focusout":_i=null;break;case"dragenter":case"dragleave":Si=null;break;case"mouseover":case"mouseout":vi=null;break;case"pointerover":case"pointerout":Ja.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Za.delete(o.pointerId)}}function eu(i,o,c,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},o!==null&&(o=pu(o),o!==null&&Up(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function OB(i,o,c,h,E){switch(o){case"focusin":return _i=eu(_i,i,o,c,h,E),!0;case"dragenter":return Si=eu(Si,i,o,c,h,E),!0;case"mouseover":return vi=eu(vi,i,o,c,h,E),!0;case"pointerover":var T=E.pointerId;return Ja.set(T,eu(Ja.get(T)||null,i,o,c,h,E)),!0;case"gotpointercapture":return T=E.pointerId,Za.set(T,eu(Za.get(T)||null,i,o,c,h,E)),!0}return!1}function Ex(i){var o=ys(i.target);if(o!==null){var c=Es(o);if(c!==null){if(o=c.tag,o===13){if(o=nx(c),o!==null){i.blockedOn=o,mx(i.priority,function(){hx(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 bc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=zp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);ht=h,c.target.dispatchEvent(h),ht=null}else return o=pu(c),o!==null&&Up(o),i.blockedOn=c,!1;o.shift()}return!0}function yx(i,o,c){bc(i)&&c.delete(o)}function IB(){Hp=!1,_i!==null&&bc(_i)&&(_i=null),Si!==null&&bc(Si)&&(Si=null),vi!==null&&bc(vi)&&(vi=null),Ja.forEach(yx),Za.forEach(yx)}function tu(i,o){i.blockedOn===o&&(i.blockedOn=null,Hp||(Hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,IB)))}function nu(i){function o(E){return tu(E,i)}if(0<Tc.length){tu(Tc[0],i);for(var c=1;c<Tc.length;c++){var h=Tc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(_i!==null&&tu(_i,i),Si!==null&&tu(Si,i),vi!==null&&tu(vi,i),Ja.forEach(o),Za.forEach(o),c=0;c<Ai.length;c++)h=Ai[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ai.length&&(c=Ai[0],c.blockedOn===null);)Ex(c),c.blockedOn===null&&Ai.shift()}var ko=z.ReactCurrentBatchConfig,wc=!0;function PB(i,o,c,h){var E=mt,T=ko.transition;ko.transition=null;try{mt=1,jp(i,o,c,h)}finally{mt=E,ko.transition=T}}function RB(i,o,c,h){var E=mt,T=ko.transition;ko.transition=null;try{mt=4,jp(i,o,c,h)}finally{mt=E,ko.transition=T}}function jp(i,o,c,h){if(wc){var E=zp(i,o,c,h);if(E===null)sm(i,o,h,xc,c),gx(i,h);else if(OB(E,i,o,c,h))h.stopPropagation();else if(gx(i,h),o&4&&-1<NB.indexOf(i)){for(;E!==null;){var T=pu(E);if(T!==null&&fx(T),T=zp(i,o,c,h),T===null&&sm(i,o,h,xc,c),T===E)break;E=T}E!==null&&h.stopPropagation()}else sm(i,o,h,null,c)}}var xc=null;function zp(i,o,c,h){if(xc=null,i=Mr(h),i=ys(i),i!==null)if(o=Es(i),o===null)i=null;else if(c=o.tag,c===13){if(i=nx(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 xc=i,null}function Tx(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(bB()){case Dp:return 1;case ux:return 4;case pc:case wB:return 16;case lx:return 536870912;default:return 16}default:return 16}}var ki=null,$p=null,_c=null;function bx(){if(_c)return _c;var i,o=$p,c=o.length,h,E="value"in ki?ki.value:ki.textContent,T=E.length;for(i=0;i<c&&o[i]===E[i];i++);var v=c-i;for(h=1;h<=v&&o[c-h]===E[T-h];h++);return _c=E.slice(i,1<h?1-h:void 0)}function Sc(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 vc(){return!0}function wx(){return!1}function Vn(i){function o(c,h,E,T,v){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=v,this.currentTarget=null;for(var B in i)i.hasOwnProperty(B)&&(c=i[B],this[B]=c?c(T):T[B]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?vc:wx,this.isPropagationStopped=wx,this}return k(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=vc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=vc)},persist:function(){},isPersistent:vc}),o}var Co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vp=Vn(Co),ru=k({},Co,{view:0,detail:0}),LB=Vn(ru),qp,Yp,iu,Ac=k({},ru,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gp,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!==iu&&(iu&&i.type==="mousemove"?(qp=i.screenX-iu.screenX,Yp=i.screenY-iu.screenY):Yp=qp=0,iu=i),qp)},movementY:function(i){return"movementY"in i?i.movementY:Yp}}),xx=Vn(Ac),DB=k({},Ac,{dataTransfer:0}),MB=Vn(DB),FB=k({},ru,{relatedTarget:0}),Wp=Vn(FB),BB=k({},Co,{animationName:0,elapsedTime:0,pseudoElement:0}),UB=Vn(BB),HB=k({},Co,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),jB=Vn(HB),zB=k({},Co,{data:0}),_x=Vn(zB),$B={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},VB={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"},qB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function YB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=qB[i])?!!o[i]:!1}function Gp(){return YB}var WB=k({},ru,{key:function(i){if(i.key){var o=$B[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Sc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?VB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gp,charCode:function(i){return i.type==="keypress"?Sc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Sc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),GB=Vn(WB),XB=k({},Ac,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sx=Vn(XB),KB=k({},ru,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gp}),QB=Vn(KB),JB=k({},Co,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZB=Vn(JB),e7=k({},Ac,{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}),t7=Vn(e7),n7=[9,13,27,32],Xp=l&&"CompositionEvent"in window,su=null;l&&"documentMode"in document&&(su=document.documentMode);var r7=l&&"TextEvent"in window&&!su,vx=l&&(!Xp||su&&8<su&&11>=su),Ax=" ",kx=!1;function Cx(i,o){switch(i){case"keyup":return n7.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var No=!1;function i7(i,o){switch(i){case"compositionend":return Nx(o);case"keypress":return o.which!==32?null:(kx=!0,Ax);case"textInput":return i=o.data,i===Ax&&kx?null:i;default:return null}}function s7(i,o){if(No)return i==="compositionend"||!Xp&&Cx(i,o)?(i=bx(),_c=$p=ki=null,No=!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 vx&&o.locale!=="ko"?null:o.data;default:return null}}var o7={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 Ox(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!o7[i.type]:o==="textarea"}function Ix(i,o,c,h){Qw(h),o=Ic(o,"onChange"),0<o.length&&(c=new Vp("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var ou=null,au=null;function a7(i){Xx(i,0)}function kc(i){var o=Lo(i);if(Ft(o))return i}function u7(i,o){if(i==="change")return o}var Px=!1;if(l){var Kp;if(l){var Qp="oninput"in document;if(!Qp){var Rx=document.createElement("div");Rx.setAttribute("oninput","return;"),Qp=typeof Rx.oninput=="function"}Kp=Qp}else Kp=!1;Px=Kp&&(!document.documentMode||9<document.documentMode)}function Lx(){ou&&(ou.detachEvent("onpropertychange",Dx),au=ou=null)}function Dx(i){if(i.propertyName==="value"&&kc(au)){var o=[];Ix(o,au,i,Mr(i)),tx(a7,o)}}function l7(i,o,c){i==="focusin"?(Lx(),ou=o,au=c,ou.attachEvent("onpropertychange",Dx)):i==="focusout"&&Lx()}function c7(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return kc(au)}function d7(i,o){if(i==="click")return kc(o)}function f7(i,o){if(i==="input"||i==="change")return kc(o)}function h7(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var gr=typeof Object.is=="function"?Object.is:h7;function uu(i,o){if(gr(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)||!gr(i[E],o[E]))return!1}return!0}function Mx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Fx(i,o){var c=Mx(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=Mx(c)}}function Bx(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?Bx(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Ux(){for(var i=window,o=xn();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=xn(i.document)}return o}function Jp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function p7(i){var o=Ux(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&Bx(c.ownerDocument.documentElement,c)){if(h!==null&&Jp(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,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=Fx(c,T);var v=Fx(c,h);E&&v&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==v.node||i.focusOffset!==v.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),T>h?(i.addRange(o),i.extend(v.node,v.offset)):(o.setEnd(v.node,v.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 m7=l&&"documentMode"in document&&11>=document.documentMode,Oo=null,Zp=null,lu=null,em=!1;function Hx(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;em||Oo==null||Oo!==xn(h)||(h=Oo,"selectionStart"in h&&Jp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),lu&&uu(lu,h)||(lu=h,h=Ic(Zp,"onSelect"),0<h.length&&(o=new Vp("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=Oo)))}function Cc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var Io={animationend:Cc("Animation","AnimationEnd"),animationiteration:Cc("Animation","AnimationIteration"),animationstart:Cc("Animation","AnimationStart"),transitionend:Cc("Transition","TransitionEnd")},tm={},jx={};l&&(jx=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function Nc(i){if(tm[i])return tm[i];if(!Io[i])return i;var o=Io[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in jx)return tm[i]=o[c];return i}var zx=Nc("animationend"),$x=Nc("animationiteration"),Vx=Nc("animationstart"),qx=Nc("transitionend"),Yx=new Map,Wx="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 Ci(i,o){Yx.set(i,o),a(o,[i])}for(var nm=0;nm<Wx.length;nm++){var rm=Wx[nm],g7=rm.toLowerCase(),E7=rm[0].toUpperCase()+rm.slice(1);Ci(g7,"on"+E7)}Ci(zx,"onAnimationEnd"),Ci($x,"onAnimationIteration"),Ci(Vx,"onAnimationStart"),Ci("dblclick","onDoubleClick"),Ci("focusin","onFocus"),Ci("focusout","onBlur"),Ci(qx,"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 cu="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(" "),y7=new Set("cancel close invalid load scroll toggle".split(" ").concat(cu));function Gx(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,gB(h,o,void 0,i),i.currentTarget=null}function Xx(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 T=void 0;if(o)for(var v=h.length-1;0<=v;v--){var B=h[v],$=B.instance,te=B.currentTarget;if(B=B.listener,$!==T&&E.isPropagationStopped())break e;Gx(E,B,te),T=$}else for(v=0;v<h.length;v++){if(B=h[v],$=B.instance,te=B.currentTarget,B=B.listener,$!==T&&E.isPropagationStopped())break e;Gx(E,B,te),T=$}}}if(hc)throw i=Lp,hc=!1,Lp=null,i}function vt(i,o){var c=o[dm];c===void 0&&(c=o[dm]=new Set);var h=i+"__bubble";c.has(h)||(Kx(o,i,2,!1),c.add(h))}function im(i,o,c){var h=0;o&&(h|=4),Kx(c,i,h,o)}var Oc="_reactListening"+Math.random().toString(36).slice(2);function du(i){if(!i[Oc]){i[Oc]=!0,r.forEach(function(c){c!=="selectionchange"&&(y7.has(c)||im(c,!1,i),im(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Oc]||(o[Oc]=!0,im("selectionchange",!1,o))}}function Kx(i,o,c,h){switch(Tx(o)){case 1:var E=PB;break;case 4:E=RB;break;default:E=jp}c=E.bind(null,o,c,i),E=void 0,!Rp||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 sm(i,o,c,h,E){var T=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var v=h.tag;if(v===3||v===4){var B=h.stateNode.containerInfo;if(B===E||B.nodeType===8&&B.parentNode===E)break;if(v===4)for(v=h.return;v!==null;){var $=v.tag;if(($===3||$===4)&&($=v.stateNode.containerInfo,$===E||$.nodeType===8&&$.parentNode===E))return;v=v.return}for(;B!==null;){if(v=ys(B),v===null)return;if($=v.tag,$===5||$===6){h=T=v;continue e}B=B.parentNode}}h=h.return}tx(function(){var te=T,Ee=Mr(c),Te=[];e:{var pe=Yx.get(i);if(pe!==void 0){var Oe=Vp,Le=i;switch(i){case"keypress":if(Sc(c)===0)break e;case"keydown":case"keyup":Oe=GB;break;case"focusin":Le="focus",Oe=Wp;break;case"focusout":Le="blur",Oe=Wp;break;case"beforeblur":case"afterblur":Oe=Wp;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":Oe=xx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=MB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=QB;break;case zx:case $x:case Vx:Oe=UB;break;case qx:Oe=ZB;break;case"scroll":Oe=LB;break;case"wheel":Oe=t7;break;case"copy":case"cut":case"paste":Oe=jB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=Sx}var De=(o&4)!==0,Ht=!De&&i==="scroll",G=De?pe!==null?pe+"Capture":null:pe;De=[];for(var q=te,Q;q!==null;){Q=q;var we=Q.stateNode;if(Q.tag===5&&we!==null&&(Q=we,G!==null&&(we=Wa(q,G),we!=null&&De.push(fu(q,we,Q)))),Ht)break;q=q.return}0<De.length&&(pe=new Oe(pe,Le,null,c,Ee),Te.push({event:pe,listeners:De}))}}if((o&7)===0){e:{if(pe=i==="mouseover"||i==="pointerover",Oe=i==="mouseout"||i==="pointerout",pe&&c!==ht&&(Le=c.relatedTarget||c.fromElement)&&(ys(Le)||Le[Zr]))break e;if((Oe||pe)&&(pe=Ee.window===Ee?Ee:(pe=Ee.ownerDocument)?pe.defaultView||pe.parentWindow:window,Oe?(Le=c.relatedTarget||c.toElement,Oe=te,Le=Le?ys(Le):null,Le!==null&&(Ht=Es(Le),Le!==Ht||Le.tag!==5&&Le.tag!==6)&&(Le=null)):(Oe=null,Le=te),Oe!==Le)){if(De=xx,we="onMouseLeave",G="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(De=Sx,we="onPointerLeave",G="onPointerEnter",q="pointer"),Ht=Oe==null?pe:Lo(Oe),Q=Le==null?pe:Lo(Le),pe=new De(we,q+"leave",Oe,c,Ee),pe.target=Ht,pe.relatedTarget=Q,we=null,ys(Ee)===te&&(De=new De(G,q+"enter",Le,c,Ee),De.target=Q,De.relatedTarget=Ht,we=De),Ht=we,Oe&&Le)t:{for(De=Oe,G=Le,q=0,Q=De;Q;Q=Po(Q))q++;for(Q=0,we=G;we;we=Po(we))Q++;for(;0<q-Q;)De=Po(De),q--;for(;0<Q-q;)G=Po(G),Q--;for(;q--;){if(De===G||G!==null&&De===G.alternate)break t;De=Po(De),G=Po(G)}De=null}else De=null;Oe!==null&&Qx(Te,pe,Oe,De,!1),Le!==null&&Ht!==null&&Qx(Te,Ht,Le,De,!0)}}e:{if(pe=te?Lo(te):window,Oe=pe.nodeName&&pe.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&pe.type==="file")var Be=u7;else if(Ox(pe))if(Px)Be=f7;else{Be=c7;var Ye=l7}else(Oe=pe.nodeName)&&Oe.toLowerCase()==="input"&&(pe.type==="checkbox"||pe.type==="radio")&&(Be=d7);if(Be&&(Be=Be(i,te))){Ix(Te,Be,c,Ee);break e}Ye&&Ye(i,pe,te),i==="focusout"&&(Ye=pe._wrapperState)&&Ye.controlled&&pe.type==="number"&&Ie(pe,"number",pe.value)}switch(Ye=te?Lo(te):window,i){case"focusin":(Ox(Ye)||Ye.contentEditable==="true")&&(Oo=Ye,Zp=te,lu=null);break;case"focusout":lu=Zp=Oo=null;break;case"mousedown":em=!0;break;case"contextmenu":case"mouseup":case"dragend":em=!1,Hx(Te,c,Ee);break;case"selectionchange":if(m7)break;case"keydown":case"keyup":Hx(Te,c,Ee)}var We;if(Xp)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 No?Cx(i,c)&&(Qe="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Qe="onCompositionStart");Qe&&(vx&&c.locale!=="ko"&&(No||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&No&&(We=bx()):(ki=Ee,$p="value"in ki?ki.value:ki.textContent,No=!0)),Ye=Ic(te,Qe),0<Ye.length&&(Qe=new _x(Qe,i,null,c,Ee),Te.push({event:Qe,listeners:Ye}),We?Qe.data=We:(We=Nx(c),We!==null&&(Qe.data=We)))),(We=r7?i7(i,c):s7(i,c))&&(te=Ic(te,"onBeforeInput"),0<te.length&&(Ee=new _x("onBeforeInput","beforeinput",null,c,Ee),Te.push({event:Ee,listeners:te}),Ee.data=We))}Xx(Te,o)})}function fu(i,o,c){return{instance:i,listener:o,currentTarget:c}}function Ic(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=Wa(i,c),T!=null&&h.unshift(fu(i,T,E)),T=Wa(i,o),T!=null&&h.push(fu(i,T,E))),i=i.return}return h}function Po(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Qx(i,o,c,h,E){for(var T=o._reactName,v=[];c!==null&&c!==h;){var B=c,$=B.alternate,te=B.stateNode;if($!==null&&$===h)break;B.tag===5&&te!==null&&(B=te,E?($=Wa(c,T),$!=null&&v.unshift(fu(c,$,B))):E||($=Wa(c,T),$!=null&&v.push(fu(c,$,B)))),c=c.return}v.length!==0&&i.push({event:o,listeners:v})}var T7=/\r\n?/g,b7=/\u0000|\uFFFD/g;function Jx(i){return(typeof i=="string"?i:""+i).replace(T7,`
21
- `).replace(b7,"")}function Pc(i,o,c){if(o=Jx(o),Jx(i)!==o&&c)throw Error(n(425))}function Rc(){}var om=null,am=null;function um(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 lm=typeof setTimeout=="function"?setTimeout:void 0,w7=typeof clearTimeout=="function"?clearTimeout:void 0,Zx=typeof Promise=="function"?Promise:void 0,x7=typeof queueMicrotask=="function"?queueMicrotask:typeof Zx!="undefined"?function(i){return Zx.resolve(null).then(i).catch(_7)}:lm;function _7(i){setTimeout(function(){throw i})}function cm(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),nu(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);nu(o)}function Ni(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 e_(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 Ro=Math.random().toString(36).slice(2),Br="__reactFiber$"+Ro,hu="__reactProps$"+Ro,Zr="__reactContainer$"+Ro,dm="__reactEvents$"+Ro,S7="__reactListeners$"+Ro,v7="__reactHandles$"+Ro;function ys(i){var o=i[Br];if(o)return o;for(var c=i.parentNode;c;){if(o=c[Zr]||c[Br]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=e_(i);i!==null;){if(c=i[Br])return c;i=e_(i)}return o}i=c,c=i.parentNode}return null}function pu(i){return i=i[Br]||i[Zr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Lo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Lc(i){return i[hu]||null}var fm=[],Do=-1;function Oi(i){return{current:i}}function At(i){0>Do||(i.current=fm[Do],fm[Do]=null,Do--)}function bt(i,o){Do++,fm[Do]=i.current,i.current=o}var Ii={},mn=Oi(Ii),Ln=Oi(!1),Ts=Ii;function Mo(i,o){var c=i.type.contextTypes;if(!c)return Ii;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in c)E[T]=o[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Dn(i){return i=i.childContextTypes,i!=null}function Dc(){At(Ln),At(mn)}function t_(i,o,c){if(mn.current!==Ii)throw Error(n(168));bt(mn,o),bt(Ln,c)}function n_(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,ke(i)||"Unknown",E));return k({},c,h)}function Mc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ii,Ts=mn.current,bt(mn,i),bt(Ln,Ln.current),!0}function r_(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=n_(i,o,Ts),h.__reactInternalMemoizedMergedChildContext=i,At(Ln),At(mn),bt(mn,i)):At(Ln),bt(Ln,c)}var ei=null,Fc=!1,hm=!1;function i_(i){ei===null?ei=[i]:ei.push(i)}function A7(i){Fc=!0,i_(i)}function Pi(){if(!hm&&ei!==null){hm=!0;var i=0,o=mt;try{var c=ei;for(mt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}ei=null,Fc=!1}catch(E){throw ei!==null&&(ei=ei.slice(i+1)),ox(Dp,Pi),E}finally{mt=o,hm=!1}}return null}var Fo=[],Bo=0,Bc=null,Uc=0,Zn=[],er=0,bs=null,ti=1,ni="";function ws(i,o){Fo[Bo++]=Uc,Fo[Bo++]=Bc,Bc=i,Uc=o}function s_(i,o,c){Zn[er++]=ti,Zn[er++]=ni,Zn[er++]=bs,bs=i;var h=ti;i=ni;var E=32-mr(h)-1;h&=~(1<<E),c+=1;var T=32-mr(o)+E;if(30<T){var v=E-E%5;T=(h&(1<<v)-1).toString(32),h>>=v,E-=v,ti=1<<32-mr(o)+E|c<<E|h,ni=T+i}else ti=1<<T|c<<E|h,ni=i}function pm(i){i.return!==null&&(ws(i,1),s_(i,1,0))}function mm(i){for(;i===Bc;)Bc=Fo[--Bo],Fo[Bo]=null,Uc=Fo[--Bo],Fo[Bo]=null;for(;i===bs;)bs=Zn[--er],Zn[er]=null,ni=Zn[--er],Zn[er]=null,ti=Zn[--er],Zn[er]=null}var qn=null,Yn=null,Ot=!1,Er=null;function o_(i,o){var c=ir(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 a_(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,qn=i,Yn=Ni(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,qn=i,Yn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=bs!==null?{id:ti,overflow:ni}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=ir(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,qn=i,Yn=null,!0):!1;default:return!1}}function gm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Em(i){if(Ot){var o=Yn;if(o){var c=o;if(!a_(i,o)){if(gm(i))throw Error(n(418));o=Ni(c.nextSibling);var h=qn;o&&a_(i,o)?o_(h,c):(i.flags=i.flags&-4097|2,Ot=!1,qn=i)}}else{if(gm(i))throw Error(n(418));i.flags=i.flags&-4097|2,Ot=!1,qn=i}}}function u_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;qn=i}function Hc(i){if(i!==qn)return!1;if(!Ot)return u_(i),Ot=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!um(i.type,i.memoizedProps)),o&&(o=Yn)){if(gm(i))throw l_(),Error(n(418));for(;o;)o_(i,o),o=Ni(o.nextSibling)}if(u_(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){Yn=Ni(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Yn=null}}else Yn=qn?Ni(i.stateNode.nextSibling):null;return!0}function l_(){for(var i=Yn;i;)i=Ni(i.nextSibling)}function Uo(){Yn=qn=null,Ot=!1}function ym(i){Er===null?Er=[i]:Er.push(i)}var k7=z.ReactCurrentBatchConfig;function mu(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,T=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===T?o.ref:(o=function(v){var B=E.refs;v===null?delete B[T]:B[T]=v},o._stringRef=T,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function jc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function c_(i){var o=i._init;return o(i._payload)}function d_(i){function o(G,q){if(i){var Q=G.deletions;Q===null?(G.deletions=[q],G.flags|=16):Q.push(q)}}function c(G,q){if(!i)return null;for(;q!==null;)o(G,q),q=q.sibling;return null}function h(G,q){for(G=new Map;q!==null;)q.key!==null?G.set(q.key,q):G.set(q.index,q),q=q.sibling;return G}function E(G,q){return G=Hi(G,q),G.index=0,G.sibling=null,G}function T(G,q,Q){return G.index=Q,i?(Q=G.alternate,Q!==null?(Q=Q.index,Q<q?(G.flags|=2,q):Q):(G.flags|=2,q)):(G.flags|=1048576,q)}function v(G){return i&&G.alternate===null&&(G.flags|=2),G}function B(G,q,Q,we){return q===null||q.tag!==6?(q=l0(Q,G.mode,we),q.return=G,q):(q=E(q,Q),q.return=G,q)}function $(G,q,Q,we){var Be=Q.type;return Be===V?Ee(G,q,Q.props.children,we,Q.key):q!==null&&(q.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===Se&&c_(Be)===q.type)?(we=E(q,Q.props),we.ref=mu(G,q,Q),we.return=G,we):(we=dd(Q.type,Q.key,Q.props,null,G.mode,we),we.ref=mu(G,q,Q),we.return=G,we)}function te(G,q,Q,we){return q===null||q.tag!==4||q.stateNode.containerInfo!==Q.containerInfo||q.stateNode.implementation!==Q.implementation?(q=c0(Q,G.mode,we),q.return=G,q):(q=E(q,Q.children||[]),q.return=G,q)}function Ee(G,q,Q,we,Be){return q===null||q.tag!==7?(q=Ns(Q,G.mode,we,Be),q.return=G,q):(q=E(q,Q),q.return=G,q)}function Te(G,q,Q){if(typeof q=="string"&&q!==""||typeof q=="number")return q=l0(""+q,G.mode,Q),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case W:return Q=dd(q.type,q.key,q.props,null,G.mode,Q),Q.ref=mu(G,null,q),Q.return=G,Q;case D:return q=c0(q,G.mode,Q),q.return=G,q;case Se:var we=q._init;return Te(G,we(q._payload),Q)}if(Xe(q)||le(q))return q=Ns(q,G.mode,Q,null),q.return=G,q;jc(G,q)}return null}function pe(G,q,Q,we){var Be=q!==null?q.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Be!==null?null:B(G,q,""+Q,we);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case W:return Q.key===Be?$(G,q,Q,we):null;case D:return Q.key===Be?te(G,q,Q,we):null;case Se:return Be=Q._init,pe(G,q,Be(Q._payload),we)}if(Xe(Q)||le(Q))return Be!==null?null:Ee(G,q,Q,we,null);jc(G,Q)}return null}function Oe(G,q,Q,we,Be){if(typeof we=="string"&&we!==""||typeof we=="number")return G=G.get(Q)||null,B(q,G,""+we,Be);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case W:return G=G.get(we.key===null?Q:we.key)||null,$(q,G,we,Be);case D:return G=G.get(we.key===null?Q:we.key)||null,te(q,G,we,Be);case Se:var Ye=we._init;return Oe(G,q,Q,Ye(we._payload),Be)}if(Xe(we)||le(we))return G=G.get(Q)||null,Ee(q,G,we,Be,null);jc(q,we)}return null}function Le(G,q,Q,we){for(var Be=null,Ye=null,We=q,Qe=q=0,nn=null;We!==null&&Qe<Q.length;Qe++){We.index>Qe?(nn=We,We=null):nn=We.sibling;var dt=pe(G,We,Q[Qe],we);if(dt===null){We===null&&(We=nn);break}i&&We&&dt.alternate===null&&o(G,We),q=T(dt,q,Qe),Ye===null?Be=dt:Ye.sibling=dt,Ye=dt,We=nn}if(Qe===Q.length)return c(G,We),Ot&&ws(G,Qe),Be;if(We===null){for(;Qe<Q.length;Qe++)We=Te(G,Q[Qe],we),We!==null&&(q=T(We,q,Qe),Ye===null?Be=We:Ye.sibling=We,Ye=We);return Ot&&ws(G,Qe),Be}for(We=h(G,We);Qe<Q.length;Qe++)nn=Oe(We,G,Qe,Q[Qe],we),nn!==null&&(i&&nn.alternate!==null&&We.delete(nn.key===null?Qe:nn.key),q=T(nn,q,Qe),Ye===null?Be=nn:Ye.sibling=nn,Ye=nn);return i&&We.forEach(function(ji){return o(G,ji)}),Ot&&ws(G,Qe),Be}function De(G,q,Q,we){var Be=le(Q);if(typeof Be!="function")throw Error(n(150));if(Q=Be.call(Q),Q==null)throw Error(n(151));for(var Ye=Be=null,We=q,Qe=q=0,nn=null,dt=Q.next();We!==null&&!dt.done;Qe++,dt=Q.next()){We.index>Qe?(nn=We,We=null):nn=We.sibling;var ji=pe(G,We,dt.value,we);if(ji===null){We===null&&(We=nn);break}i&&We&&ji.alternate===null&&o(G,We),q=T(ji,q,Qe),Ye===null?Be=ji:Ye.sibling=ji,Ye=ji,We=nn}if(dt.done)return c(G,We),Ot&&ws(G,Qe),Be;if(We===null){for(;!dt.done;Qe++,dt=Q.next())dt=Te(G,dt.value,we),dt!==null&&(q=T(dt,q,Qe),Ye===null?Be=dt:Ye.sibling=dt,Ye=dt);return Ot&&ws(G,Qe),Be}for(We=h(G,We);!dt.done;Qe++,dt=Q.next())dt=Oe(We,G,Qe,dt.value,we),dt!==null&&(i&&dt.alternate!==null&&We.delete(dt.key===null?Qe:dt.key),q=T(dt,q,Qe),Ye===null?Be=dt:Ye.sibling=dt,Ye=dt);return i&&We.forEach(function(oU){return o(G,oU)}),Ot&&ws(G,Qe),Be}function Ht(G,q,Q,we){if(typeof Q=="object"&&Q!==null&&Q.type===V&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case W:e:{for(var Be=Q.key,Ye=q;Ye!==null;){if(Ye.key===Be){if(Be=Q.type,Be===V){if(Ye.tag===7){c(G,Ye.sibling),q=E(Ye,Q.props.children),q.return=G,G=q;break e}}else if(Ye.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===Se&&c_(Be)===Ye.type){c(G,Ye.sibling),q=E(Ye,Q.props),q.ref=mu(G,Ye,Q),q.return=G,G=q;break e}c(G,Ye);break}else o(G,Ye);Ye=Ye.sibling}Q.type===V?(q=Ns(Q.props.children,G.mode,we,Q.key),q.return=G,G=q):(we=dd(Q.type,Q.key,Q.props,null,G.mode,we),we.ref=mu(G,q,Q),we.return=G,G=we)}return v(G);case D:e:{for(Ye=Q.key;q!==null;){if(q.key===Ye)if(q.tag===4&&q.stateNode.containerInfo===Q.containerInfo&&q.stateNode.implementation===Q.implementation){c(G,q.sibling),q=E(q,Q.children||[]),q.return=G,G=q;break e}else{c(G,q);break}else o(G,q);q=q.sibling}q=c0(Q,G.mode,we),q.return=G,G=q}return v(G);case Se:return Ye=Q._init,Ht(G,q,Ye(Q._payload),we)}if(Xe(Q))return Le(G,q,Q,we);if(le(Q))return De(G,q,Q,we);jc(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,q!==null&&q.tag===6?(c(G,q.sibling),q=E(q,Q),q.return=G,G=q):(c(G,q),q=l0(Q,G.mode,we),q.return=G,G=q),v(G)):c(G,q)}return Ht}var Ho=d_(!0),f_=d_(!1),zc=Oi(null),$c=null,jo=null,Tm=null;function bm(){Tm=jo=$c=null}function wm(i){var o=zc.current;At(zc),i._currentValue=o}function xm(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 zo(i,o){$c=i,Tm=jo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Mn=!0),i.firstContext=null)}function tr(i){var o=i._currentValue;if(Tm!==i)if(i={context:i,memoizedValue:o,next:null},jo===null){if($c===null)throw Error(n(308));jo=i,$c.dependencies={lanes:0,firstContext:i}}else jo=jo.next=i;return o}var xs=null;function _m(i){xs===null?xs=[i]:xs.push(i)}function h_(i,o,c,h){var E=o.interleaved;return E===null?(c.next=c,_m(o)):(c.next=E.next,E.next=c),o.interleaved=c,ri(i,h)}function ri(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 Ri=!1;function Sm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function p_(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 ii(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Li(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(ut&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,ri(i,c)}return E=h.interleaved,E===null?(o.next=o,_m(h)):(o.next=E.next,E.next=o),h.interleaved=o,ri(i,c)}function Vc(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,Bp(i,c)}}function m_(i,o){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,T=null;if(c=c.firstBaseUpdate,c!==null){do{var v={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};T===null?E=T=v:T=T.next=v,c=c.next}while(c!==null);T===null?E=T=o:T=T.next=o}else E=T=o;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,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 qc(i,o,c,h){var E=i.updateQueue;Ri=!1;var T=E.firstBaseUpdate,v=E.lastBaseUpdate,B=E.shared.pending;if(B!==null){E.shared.pending=null;var $=B,te=$.next;$.next=null,v===null?T=te:v.next=te,v=$;var Ee=i.alternate;Ee!==null&&(Ee=Ee.updateQueue,B=Ee.lastBaseUpdate,B!==v&&(B===null?Ee.firstBaseUpdate=te:B.next=te,Ee.lastBaseUpdate=$))}if(T!==null){var Te=E.baseState;v=0,Ee=te=$=null,B=T;do{var pe=B.lane,Oe=B.eventTime;if((h&pe)===pe){Ee!==null&&(Ee=Ee.next={eventTime:Oe,lane:0,tag:B.tag,payload:B.payload,callback:B.callback,next:null});e:{var Le=i,De=B;switch(pe=o,Oe=c,De.tag){case 1:if(Le=De.payload,typeof Le=="function"){Te=Le.call(Oe,Te,pe);break e}Te=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=De.payload,pe=typeof Le=="function"?Le.call(Oe,Te,pe):Le,pe==null)break e;Te=k({},Te,pe);break e;case 2:Ri=!0}}B.callback!==null&&B.lane!==0&&(i.flags|=64,pe=E.effects,pe===null?E.effects=[B]:pe.push(B))}else Oe={eventTime:Oe,lane:pe,tag:B.tag,payload:B.payload,callback:B.callback,next:null},Ee===null?(te=Ee=Oe,$=Te):Ee=Ee.next=Oe,v|=pe;if(B=B.next,B===null){if(B=E.shared.pending,B===null)break;pe=B,B=pe.next,pe.next=null,E.lastBaseUpdate=pe,E.shared.pending=null}}while(!0);if(Ee===null&&($=Te),E.baseState=$,E.firstBaseUpdate=te,E.lastBaseUpdate=Ee,o=E.shared.interleaved,o!==null){E=o;do v|=E.lane,E=E.next;while(E!==o)}else T===null&&(E.shared.lanes=0);vs|=v,i.lanes=v,i.memoizedState=Te}}function g_(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 gu={},Ur=Oi(gu),Eu=Oi(gu),yu=Oi(gu);function _s(i){if(i===gu)throw Error(n(174));return i}function vm(i,o){switch(bt(yu,o),bt(Eu,i),bt(Ur,gu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:xe(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=xe(o,i)}At(Ur),bt(Ur,o)}function $o(){At(Ur),At(Eu),At(yu)}function E_(i){_s(yu.current);var o=_s(Ur.current),c=xe(o,i.type);o!==c&&(bt(Eu,i),bt(Ur,c))}function Am(i){Eu.current===i&&(At(Ur),At(Eu))}var It=Oi(0);function Yc(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 km=[];function Cm(){for(var i=0;i<km.length;i++)km[i]._workInProgressVersionPrimary=null;km.length=0}var Wc=z.ReactCurrentDispatcher,Nm=z.ReactCurrentBatchConfig,Ss=0,Pt=null,Gt=null,en=null,Gc=!1,Tu=!1,bu=0,C7=0;function gn(){throw Error(n(321))}function Om(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!gr(i[c],o[c]))return!1;return!0}function Im(i,o,c,h,E,T){if(Ss=T,Pt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Wc.current=i===null||i.memoizedState===null?P7:R7,i=c(h,E),Tu){T=0;do{if(Tu=!1,bu=0,25<=T)throw Error(n(301));T+=1,en=Gt=null,o.updateQueue=null,Wc.current=L7,i=c(h,E)}while(Tu)}if(Wc.current=Qc,o=Gt!==null&&Gt.next!==null,Ss=0,en=Gt=Pt=null,Gc=!1,o)throw Error(n(300));return i}function Pm(){var i=bu!==0;return bu=0,i}function Hr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Pt.memoizedState=en=i:en=en.next=i,en}function nr(){if(Gt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=Gt.next;var o=en===null?Pt.memoizedState:en.next;if(o!==null)en=o,Gt=i;else{if(i===null)throw Error(n(310));Gt=i,i={memoizedState:Gt.memoizedState,baseState:Gt.baseState,baseQueue:Gt.baseQueue,queue:Gt.queue,next:null},en===null?Pt.memoizedState=en=i:en=en.next=i}return en}function wu(i,o){return typeof o=="function"?o(i):o}function Rm(i){var o=nr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Gt,E=h.baseQueue,T=c.pending;if(T!==null){if(E!==null){var v=E.next;E.next=T.next,T.next=v}h.baseQueue=E=T,c.pending=null}if(E!==null){T=E.next,h=h.baseState;var B=v=null,$=null,te=T;do{var Ee=te.lane;if((Ss&Ee)===Ee)$!==null&&($=$.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),h=te.hasEagerState?te.eagerState:i(h,te.action);else{var Te={lane:Ee,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};$===null?(B=$=Te,v=h):$=$.next=Te,Pt.lanes|=Ee,vs|=Ee}te=te.next}while(te!==null&&te!==T);$===null?v=h:$.next=B,gr(h,o.memoizedState)||(Mn=!0),o.memoizedState=h,o.baseState=v,o.baseQueue=$,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do T=E.lane,Pt.lanes|=T,vs|=T,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function Lm(i){var o=nr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,T=o.memoizedState;if(E!==null){c.pending=null;var v=E=E.next;do T=i(T,v.action),v=v.next;while(v!==E);gr(T,o.memoizedState)||(Mn=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),c.lastRenderedState=T}return[T,h]}function y_(){}function T_(i,o){var c=Pt,h=nr(),E=o(),T=!gr(h.memoizedState,E);if(T&&(h.memoizedState=E,Mn=!0),h=h.queue,Dm(x_.bind(null,c,h,i),[i]),h.getSnapshot!==o||T||en!==null&&en.memoizedState.tag&1){if(c.flags|=2048,xu(9,w_.bind(null,c,h,E,o),void 0,null),tn===null)throw Error(n(349));(Ss&30)!==0||b_(c,o,E)}return E}function b_(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function w_(i,o,c,h){o.value=c,o.getSnapshot=h,__(o)&&S_(i)}function x_(i,o,c){return c(function(){__(o)&&S_(i)})}function __(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!gr(i,c)}catch(h){return!0}}function S_(i){var o=ri(i,1);o!==null&&wr(o,i,1,-1)}function v_(i){var o=Hr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wu,lastRenderedState:i},o.queue=i,i=i.dispatch=I7.bind(null,Pt,i),[o.memoizedState,i]}function xu(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.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 A_(){return nr().memoizedState}function Xc(i,o,c,h){var E=Hr();Pt.flags|=i,E.memoizedState=xu(1|o,c,void 0,h===void 0?null:h)}function Kc(i,o,c,h){var E=nr();h=h===void 0?null:h;var T=void 0;if(Gt!==null){var v=Gt.memoizedState;if(T=v.destroy,h!==null&&Om(h,v.deps)){E.memoizedState=xu(o,c,T,h);return}}Pt.flags|=i,E.memoizedState=xu(1|o,c,T,h)}function k_(i,o){return Xc(8390656,8,i,o)}function Dm(i,o){return Kc(2048,8,i,o)}function C_(i,o){return Kc(4,2,i,o)}function N_(i,o){return Kc(4,4,i,o)}function O_(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 I_(i,o,c){return c=c!=null?c.concat([i]):null,Kc(4,4,O_.bind(null,o,i),c)}function Mm(){}function P_(i,o){var c=nr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&Om(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function R_(i,o){var c=nr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&Om(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function L_(i,o,c){return(Ss&21)===0?(i.baseState&&(i.baseState=!1,Mn=!0),i.memoizedState=c):(gr(c,o)||(c=cx(),Pt.lanes|=c,vs|=c,i.baseState=!0),o)}function N7(i,o){var c=mt;mt=c!==0&&4>c?c:4,i(!0);var h=Nm.transition;Nm.transition={};try{i(!1),o()}finally{mt=c,Nm.transition=h}}function D_(){return nr().memoizedState}function O7(i,o,c){var h=Bi(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},M_(i))F_(o,c);else if(c=h_(i,o,c,h),c!==null){var E=Sn();wr(c,i,h,E),B_(c,o,h)}}function I7(i,o,c){var h=Bi(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(M_(i))F_(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var v=o.lastRenderedState,B=T(v,c);if(E.hasEagerState=!0,E.eagerState=B,gr(B,v)){var $=o.interleaved;$===null?(E.next=E,_m(o)):(E.next=$.next,$.next=E),o.interleaved=E;return}}catch(te){}c=h_(i,o,E,h),c!==null&&(E=Sn(),wr(c,i,h,E),B_(c,o,h))}}function M_(i){var o=i.alternate;return i===Pt||o!==null&&o===Pt}function F_(i,o){Tu=Gc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function B_(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,Bp(i,c)}}var Qc={readContext:tr,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useInsertionEffect:gn,useLayoutEffect:gn,useMemo:gn,useReducer:gn,useRef:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useMutableSource:gn,useSyncExternalStore:gn,useId:gn,unstable_isNewReconciler:!1},P7={readContext:tr,useCallback:function(i,o){return Hr().memoizedState=[i,o===void 0?null:o],i},useContext:tr,useEffect:k_,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,Xc(4194308,4,O_.bind(null,o,i),c)},useLayoutEffect:function(i,o){return Xc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Xc(4,2,i,o)},useMemo:function(i,o){var c=Hr();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=Hr();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=O7.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var o=Hr();return i={current:i},o.memoizedState=i},useState:v_,useDebugValue:Mm,useDeferredValue:function(i){return Hr().memoizedState=i},useTransition:function(){var i=v_(!1),o=i[0];return i=N7.bind(null,i[1]),Hr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=Pt,E=Hr();if(Ot){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),tn===null)throw Error(n(349));(Ss&30)!==0||b_(h,o,c)}E.memoizedState=c;var T={value:c,getSnapshot:o};return E.queue=T,k_(x_.bind(null,h,T,i),[i]),h.flags|=2048,xu(9,w_.bind(null,h,T,c,o),void 0,null),c},useId:function(){var i=Hr(),o=tn.identifierPrefix;if(Ot){var c=ni,h=ti;c=(h&~(1<<32-mr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=bu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=C7++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},R7={readContext:tr,useCallback:P_,useContext:tr,useEffect:Dm,useImperativeHandle:I_,useInsertionEffect:C_,useLayoutEffect:N_,useMemo:R_,useReducer:Rm,useRef:A_,useState:function(){return Rm(wu)},useDebugValue:Mm,useDeferredValue:function(i){var o=nr();return L_(o,Gt.memoizedState,i)},useTransition:function(){var i=Rm(wu)[0],o=nr().memoizedState;return[i,o]},useMutableSource:y_,useSyncExternalStore:T_,useId:D_,unstable_isNewReconciler:!1},L7={readContext:tr,useCallback:P_,useContext:tr,useEffect:Dm,useImperativeHandle:I_,useInsertionEffect:C_,useLayoutEffect:N_,useMemo:R_,useReducer:Lm,useRef:A_,useState:function(){return Lm(wu)},useDebugValue:Mm,useDeferredValue:function(i){var o=nr();return Gt===null?o.memoizedState=i:L_(o,Gt.memoizedState,i)},useTransition:function(){var i=Lm(wu)[0],o=nr().memoizedState;return[i,o]},useMutableSource:y_,useSyncExternalStore:T_,useId:D_,unstable_isNewReconciler:!1};function yr(i,o){if(i&&i.defaultProps){o=k({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function Fm(i,o,c,h){o=i.memoizedState,c=c(h,o),c=c==null?o:k({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Jc={isMounted:function(i){return(i=i._reactInternals)?Es(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=Sn(),E=Bi(i),T=ii(h,E);T.payload=o,c!=null&&(T.callback=c),o=Li(i,T,E),o!==null&&(wr(o,i,E,h),Vc(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=Sn(),E=Bi(i),T=ii(h,E);T.tag=1,T.payload=o,c!=null&&(T.callback=c),o=Li(i,T,E),o!==null&&(wr(o,i,E,h),Vc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=Sn(),h=Bi(i),E=ii(c,h);E.tag=2,o!=null&&(E.callback=o),o=Li(i,E,h),o!==null&&(wr(o,i,h,c),Vc(o,i,h))}};function U_(i,o,c,h,E,T,v){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,v):o.prototype&&o.prototype.isPureReactComponent?!uu(c,h)||!uu(E,T):!0}function H_(i,o,c){var h=!1,E=Ii,T=o.contextType;return typeof T=="object"&&T!==null?T=tr(T):(E=Dn(o)?Ts:mn.current,h=o.contextTypes,T=(h=h!=null)?Mo(i,E):Ii),o=new o(c,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Jc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function j_(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&&Jc.enqueueReplaceState(o,o.state,null)}function Bm(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},Sm(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=tr(T):(T=Dn(o)?Ts:mn.current,E.context=Mo(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(Fm(i,o,T,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&&Jc.enqueueReplaceState(E,E.state,null),qc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Vo(i,o){try{var c="",h=o;do c+=Pe(h),h=h.return;while(h);var E=c}catch(T){E=`
20
+ `+E[v].replace(" at new "," at ");return i.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",i.displayName)),$}while(1<=v&&0<=B);break}}}finally{P=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?Z(i):""}function Pe(i){switch(i.tag){case 5:return Z(i.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return i=ve(i.type,!1),i;case 11:return i=ve(i.type.render,!1),i;case 1:return i=ve(i.type,!0),i;default:return""}}function he(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 V:return"Fragment";case D:return"Portal";case ce:return"Profiler";case J:return"StrictMode";case ue:return"Suspense";case fe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ie:return(i.displayName||"Context")+".Consumer";case U:return(i._context.displayName||"Context")+".Provider";case se:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ne:return o=i.displayName||null,o!==null?o:he(i.type)||"Memo";case Se:o=i._payload,i=i._init;try{return he(i(o))}catch(c){}}return null}function Ce(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 he(o);case 8:return o===J?"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 Me(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function He(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function nt(i){var o=He(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,T=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(v){h=""+v,T.call(this,v)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(v){h=""+v},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Nt(i){i._valueTracker||(i._valueTracker=nt(i))}function Ft(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),h="";return i&&(h=He(i)?i.checked?"true":"false":i.value),i=h,i!==c?(o.setValue(i),!0):!1}function xn(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 pn(i,o){var c=o.checked;return C({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Bt(i,o){var c=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;c=Me(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&&O(i,"checked",o,!1)}function St(i,o){$e(i,o);var c=Me(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")?Ie(i,o.type,c):o.hasOwnProperty("defaultValue")&&Ie(i,o.type,Me(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function Wt(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 Ie(i,o,c){(o!=="number"||xn(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Xe=Array.isArray;function ot(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=""+Me(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 ft(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return C({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Jn(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(Xe(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}i._wrapperState={initialValue:Me(c)}}function gs(i,o){var c=Me(o.value),h=Me(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 xi(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 xe(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 Ve,et=(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 ee(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var _e={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},Ne=["Webkit","ms","Moz","O"];Object.keys(_e).forEach(function(i){Ne.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),_e[o]=_e[i]})});function Ae(i,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||_e.hasOwnProperty(i)&&_e[i]?(""+o).trim():o+"px"}function ge(i,o){i=i.style;for(var c in o)if(o.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=Ae(c,o[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var je=C({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 Ke(i,o){if(o){if(je[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 $t(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 ht=null;function Mr(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var vo=null,Jr=null,Ao=null;function Kw(i){if(i=hu(i)){if(typeof vo!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Lc(o),vo(i.stateNode,i.type,o))}}function Qw(i){Jr?Ao?Ao.push(i):Ao=[i]:Jr=i}function Jw(){if(Jr){var i=Jr,o=Ao;if(Ao=Jr=null,Kw(i),o)for(i=0;i<o.length;i++)Kw(o[i])}}function Zw(i,o){return i(o)}function ex(){}var Pp=!1;function tx(i,o,c){if(Pp)return i(o,c);Pp=!0;try{return Zw(i,o,c)}finally{Pp=!1,(Jr!==null||Ao!==null)&&(ex(),Jw())}}function Ya(i,o){var c=i.stateNode;if(c===null)return null;var h=Lc(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 Rp=!1;if(l)try{var Wa={};Object.defineProperty(Wa,"passive",{get:function(){Rp=!0}}),window.addEventListener("test",Wa,Wa),window.removeEventListener("test",Wa,Wa)}catch(i){Rp=!1}function mB(i,o,c,h,E,T,v,B,$){var te=Array.prototype.slice.call(arguments,3);try{o.apply(c,te)}catch(Ee){this.onError(Ee)}}var Ga=!1,fc=null,hc=!1,Lp=null,gB={onError:function(i){Ga=!0,fc=i}};function EB(i,o,c,h,E,T,v,B,$){Ga=!1,fc=null,mB.apply(gB,arguments)}function yB(i,o,c,h,E,T,v,B,$){if(EB.apply(this,arguments),Ga){if(Ga){var te=fc;Ga=!1,fc=null}else throw Error(n(198));hc||(hc=!0,Lp=te)}}function Es(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 nx(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 rx(i){if(Es(i)!==i)throw Error(n(188))}function TB(i){var o=i.alternate;if(!o){if(o=Es(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 T=E.alternate;if(T===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===c)return rx(E),i;if(T===h)return rx(E),o;T=T.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=T;else{for(var v=!1,B=E.child;B;){if(B===c){v=!0,c=E,h=T;break}if(B===h){v=!0,h=E,c=T;break}B=B.sibling}if(!v){for(B=T.child;B;){if(B===c){v=!0,c=T,h=E;break}if(B===h){v=!0,h=T,c=E;break}B=B.sibling}if(!v)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 ix(i){return i=TB(i),i!==null?sx(i):null}function sx(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=sx(i);if(o!==null)return o;i=i.sibling}return null}var ox=t.unstable_scheduleCallback,ax=t.unstable_cancelCallback,bB=t.unstable_shouldYield,wB=t.unstable_requestPaint,Ut=t.unstable_now,xB=t.unstable_getCurrentPriorityLevel,Dp=t.unstable_ImmediatePriority,ux=t.unstable_UserBlockingPriority,pc=t.unstable_NormalPriority,_B=t.unstable_LowPriority,lx=t.unstable_IdlePriority,mc=null,Fr=null;function SB(i){if(Fr&&typeof Fr.onCommitFiberRoot=="function")try{Fr.onCommitFiberRoot(mc,i,void 0,(i.current.flags&128)===128)}catch(o){}}var mr=Math.clz32?Math.clz32:CB,vB=Math.log,AB=Math.LN2;function CB(i){return i>>>=0,i===0?32:31-(vB(i)/AB|0)|0}var gc=64,Ec=4194304;function Xa(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 yc(i,o){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,v=c&268435455;if(v!==0){var B=v&~E;B!==0?h=Xa(B):(T&=v,T!==0&&(h=Xa(T)))}else v=c&~E,v!==0?h=Xa(v):T!==0&&(h=Xa(T));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((h&4)!==0&&(h|=c&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)c=31-mr(o),E=1<<c,h|=i[c],o&=~E;return h}function kB(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 NB(i,o){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var v=31-mr(T),B=1<<v,$=E[v];$===-1?((B&c)===0||(B&h)!==0)&&(E[v]=kB(B,o)):$<=o&&(i.expiredLanes|=B),T&=~B}}function Mp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function cx(){var i=gc;return gc<<=1,(gc&4194240)===0&&(gc=64),i}function Fp(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function Ka(i,o,c){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-mr(o),i[o]=c}function OB(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-mr(c),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,c&=~T}}function Bp(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var h=31-mr(c),E=1<<h;E&o|i[h]&o&&(i[h]|=o),c&=~E}}var mt=0;function dx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var fx,Up,hx,px,mx,Hp=!1,Tc=[],_i=null,Si=null,vi=null,Qa=new Map,Ja=new Map,Ai=[],IB="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 gx(i,o){switch(i){case"focusin":case"focusout":_i=null;break;case"dragenter":case"dragleave":Si=null;break;case"mouseover":case"mouseout":vi=null;break;case"pointerover":case"pointerout":Qa.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ja.delete(o.pointerId)}}function Za(i,o,c,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:c,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},o!==null&&(o=hu(o),o!==null&&Up(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function PB(i,o,c,h,E){switch(o){case"focusin":return _i=Za(_i,i,o,c,h,E),!0;case"dragenter":return Si=Za(Si,i,o,c,h,E),!0;case"mouseover":return vi=Za(vi,i,o,c,h,E),!0;case"pointerover":var T=E.pointerId;return Qa.set(T,Za(Qa.get(T)||null,i,o,c,h,E)),!0;case"gotpointercapture":return T=E.pointerId,Ja.set(T,Za(Ja.get(T)||null,i,o,c,h,E)),!0}return!1}function Ex(i){var o=ys(i.target);if(o!==null){var c=Es(o);if(c!==null){if(o=c.tag,o===13){if(o=nx(c),o!==null){i.blockedOn=o,mx(i.priority,function(){hx(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 bc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=zp(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);ht=h,c.target.dispatchEvent(h),ht=null}else return o=hu(c),o!==null&&Up(o),i.blockedOn=c,!1;o.shift()}return!0}function yx(i,o,c){bc(i)&&c.delete(o)}function RB(){Hp=!1,_i!==null&&bc(_i)&&(_i=null),Si!==null&&bc(Si)&&(Si=null),vi!==null&&bc(vi)&&(vi=null),Qa.forEach(yx),Ja.forEach(yx)}function eu(i,o){i.blockedOn===o&&(i.blockedOn=null,Hp||(Hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,RB)))}function tu(i){function o(E){return eu(E,i)}if(0<Tc.length){eu(Tc[0],i);for(var c=1;c<Tc.length;c++){var h=Tc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(_i!==null&&eu(_i,i),Si!==null&&eu(Si,i),vi!==null&&eu(vi,i),Qa.forEach(o),Ja.forEach(o),c=0;c<Ai.length;c++)h=Ai[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ai.length&&(c=Ai[0],c.blockedOn===null);)Ex(c),c.blockedOn===null&&Ai.shift()}var Co=z.ReactCurrentBatchConfig,wc=!0;function LB(i,o,c,h){var E=mt,T=Co.transition;Co.transition=null;try{mt=1,jp(i,o,c,h)}finally{mt=E,Co.transition=T}}function DB(i,o,c,h){var E=mt,T=Co.transition;Co.transition=null;try{mt=4,jp(i,o,c,h)}finally{mt=E,Co.transition=T}}function jp(i,o,c,h){if(wc){var E=zp(i,o,c,h);if(E===null)sm(i,o,h,xc,c),gx(i,h);else if(PB(E,i,o,c,h))h.stopPropagation();else if(gx(i,h),o&4&&-1<IB.indexOf(i)){for(;E!==null;){var T=hu(E);if(T!==null&&fx(T),T=zp(i,o,c,h),T===null&&sm(i,o,h,xc,c),T===E)break;E=T}E!==null&&h.stopPropagation()}else sm(i,o,h,null,c)}}var xc=null;function zp(i,o,c,h){if(xc=null,i=Mr(h),i=ys(i),i!==null)if(o=Es(i),o===null)i=null;else if(c=o.tag,c===13){if(i=nx(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 xc=i,null}function Tx(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(xB()){case Dp:return 1;case ux:return 4;case pc:case _B:return 16;case lx:return 536870912;default:return 16}default:return 16}}var Ci=null,$p=null,_c=null;function bx(){if(_c)return _c;var i,o=$p,c=o.length,h,E="value"in Ci?Ci.value:Ci.textContent,T=E.length;for(i=0;i<c&&o[i]===E[i];i++);var v=c-i;for(h=1;h<=v&&o[c-h]===E[T-h];h++);return _c=E.slice(i,1<h?1-h:void 0)}function Sc(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 vc(){return!0}function wx(){return!1}function Vn(i){function o(c,h,E,T,v){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=v,this.currentTarget=null;for(var B in i)i.hasOwnProperty(B)&&(c=i[B],this[B]=c?c(T):T[B]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?vc:wx,this.isPropagationStopped=wx,this}return C(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=vc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=vc)},persist:function(){},isPersistent:vc}),o}var ko={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vp=Vn(ko),nu=C({},ko,{view:0,detail:0}),MB=Vn(nu),qp,Yp,ru,Ac=C({},nu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gp,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!==ru&&(ru&&i.type==="mousemove"?(qp=i.screenX-ru.screenX,Yp=i.screenY-ru.screenY):Yp=qp=0,ru=i),qp)},movementY:function(i){return"movementY"in i?i.movementY:Yp}}),xx=Vn(Ac),FB=C({},Ac,{dataTransfer:0}),BB=Vn(FB),UB=C({},nu,{relatedTarget:0}),Wp=Vn(UB),HB=C({},ko,{animationName:0,elapsedTime:0,pseudoElement:0}),jB=Vn(HB),zB=C({},ko,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),$B=Vn(zB),VB=C({},ko,{data:0}),_x=Vn(VB),qB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},YB={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"},WB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=WB[i])?!!o[i]:!1}function Gp(){return GB}var XB=C({},nu,{key:function(i){if(i.key){var o=qB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Sc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?YB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gp,charCode:function(i){return i.type==="keypress"?Sc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Sc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),KB=Vn(XB),QB=C({},Ac,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sx=Vn(QB),JB=C({},nu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gp}),ZB=Vn(JB),e7=C({},ko,{propertyName:0,elapsedTime:0,pseudoElement:0}),t7=Vn(e7),n7=C({},Ac,{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}),r7=Vn(n7),i7=[9,13,27,32],Xp=l&&"CompositionEvent"in window,iu=null;l&&"documentMode"in document&&(iu=document.documentMode);var s7=l&&"TextEvent"in window&&!iu,vx=l&&(!Xp||iu&&8<iu&&11>=iu),Ax=" ",Cx=!1;function kx(i,o){switch(i){case"keyup":return i7.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var No=!1;function o7(i,o){switch(i){case"compositionend":return Nx(o);case"keypress":return o.which!==32?null:(Cx=!0,Ax);case"textInput":return i=o.data,i===Ax&&Cx?null:i;default:return null}}function a7(i,o){if(No)return i==="compositionend"||!Xp&&kx(i,o)?(i=bx(),_c=$p=Ci=null,No=!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 vx&&o.locale!=="ko"?null:o.data;default:return null}}var u7={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 Ox(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!u7[i.type]:o==="textarea"}function Ix(i,o,c,h){Qw(h),o=Ic(o,"onChange"),0<o.length&&(c=new Vp("onChange","change",null,c,h),i.push({event:c,listeners:o}))}var su=null,ou=null;function l7(i){Xx(i,0)}function Cc(i){var o=Lo(i);if(Ft(o))return i}function c7(i,o){if(i==="change")return o}var Px=!1;if(l){var Kp;if(l){var Qp="oninput"in document;if(!Qp){var Rx=document.createElement("div");Rx.setAttribute("oninput","return;"),Qp=typeof Rx.oninput=="function"}Kp=Qp}else Kp=!1;Px=Kp&&(!document.documentMode||9<document.documentMode)}function Lx(){su&&(su.detachEvent("onpropertychange",Dx),ou=su=null)}function Dx(i){if(i.propertyName==="value"&&Cc(ou)){var o=[];Ix(o,ou,i,Mr(i)),tx(l7,o)}}function d7(i,o,c){i==="focusin"?(Lx(),su=o,ou=c,su.attachEvent("onpropertychange",Dx)):i==="focusout"&&Lx()}function f7(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Cc(ou)}function h7(i,o){if(i==="click")return Cc(o)}function p7(i,o){if(i==="input"||i==="change")return Cc(o)}function m7(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var gr=typeof Object.is=="function"?Object.is:m7;function au(i,o){if(gr(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)||!gr(i[E],o[E]))return!1}return!0}function Mx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Fx(i,o){var c=Mx(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=Mx(c)}}function Bx(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?Bx(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Ux(){for(var i=window,o=xn();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=xn(i.document)}return o}function Jp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function g7(i){var o=Ux(),c=i.focusedElem,h=i.selectionRange;if(o!==c&&c&&c.ownerDocument&&Bx(c.ownerDocument.documentElement,c)){if(h!==null&&Jp(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,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=Fx(c,T);var v=Fx(c,h);E&&v&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==v.node||i.focusOffset!==v.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),T>h?(i.addRange(o),i.extend(v.node,v.offset)):(o.setEnd(v.node,v.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 E7=l&&"documentMode"in document&&11>=document.documentMode,Oo=null,Zp=null,uu=null,em=!1;function Hx(i,o,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;em||Oo==null||Oo!==xn(h)||(h=Oo,"selectionStart"in h&&Jp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),uu&&au(uu,h)||(uu=h,h=Ic(Zp,"onSelect"),0<h.length&&(o=new Vp("onSelect","select",null,o,c),i.push({event:o,listeners:h}),o.target=Oo)))}function kc(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var Io={animationend:kc("Animation","AnimationEnd"),animationiteration:kc("Animation","AnimationIteration"),animationstart:kc("Animation","AnimationStart"),transitionend:kc("Transition","TransitionEnd")},tm={},jx={};l&&(jx=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function Nc(i){if(tm[i])return tm[i];if(!Io[i])return i;var o=Io[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in jx)return tm[i]=o[c];return i}var zx=Nc("animationend"),$x=Nc("animationiteration"),Vx=Nc("animationstart"),qx=Nc("transitionend"),Yx=new Map,Wx="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 ki(i,o){Yx.set(i,o),a(o,[i])}for(var nm=0;nm<Wx.length;nm++){var rm=Wx[nm],y7=rm.toLowerCase(),T7=rm[0].toUpperCase()+rm.slice(1);ki(y7,"on"+T7)}ki(zx,"onAnimationEnd"),ki($x,"onAnimationIteration"),ki(Vx,"onAnimationStart"),ki("dblclick","onDoubleClick"),ki("focusin","onFocus"),ki("focusout","onBlur"),ki(qx,"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 lu="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(" "),b7=new Set("cancel close invalid load scroll toggle".split(" ").concat(lu));function Gx(i,o,c){var h=i.type||"unknown-event";i.currentTarget=c,yB(h,o,void 0,i),i.currentTarget=null}function Xx(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 T=void 0;if(o)for(var v=h.length-1;0<=v;v--){var B=h[v],$=B.instance,te=B.currentTarget;if(B=B.listener,$!==T&&E.isPropagationStopped())break e;Gx(E,B,te),T=$}else for(v=0;v<h.length;v++){if(B=h[v],$=B.instance,te=B.currentTarget,B=B.listener,$!==T&&E.isPropagationStopped())break e;Gx(E,B,te),T=$}}}if(hc)throw i=Lp,hc=!1,Lp=null,i}function vt(i,o){var c=o[dm];c===void 0&&(c=o[dm]=new Set);var h=i+"__bubble";c.has(h)||(Kx(o,i,2,!1),c.add(h))}function im(i,o,c){var h=0;o&&(h|=4),Kx(c,i,h,o)}var Oc="_reactListening"+Math.random().toString(36).slice(2);function cu(i){if(!i[Oc]){i[Oc]=!0,r.forEach(function(c){c!=="selectionchange"&&(b7.has(c)||im(c,!1,i),im(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Oc]||(o[Oc]=!0,im("selectionchange",!1,o))}}function Kx(i,o,c,h){switch(Tx(o)){case 1:var E=LB;break;case 4:E=DB;break;default:E=jp}c=E.bind(null,o,c,i),E=void 0,!Rp||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 sm(i,o,c,h,E){var T=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var v=h.tag;if(v===3||v===4){var B=h.stateNode.containerInfo;if(B===E||B.nodeType===8&&B.parentNode===E)break;if(v===4)for(v=h.return;v!==null;){var $=v.tag;if(($===3||$===4)&&($=v.stateNode.containerInfo,$===E||$.nodeType===8&&$.parentNode===E))return;v=v.return}for(;B!==null;){if(v=ys(B),v===null)return;if($=v.tag,$===5||$===6){h=T=v;continue e}B=B.parentNode}}h=h.return}tx(function(){var te=T,Ee=Mr(c),Te=[];e:{var pe=Yx.get(i);if(pe!==void 0){var Oe=Vp,Le=i;switch(i){case"keypress":if(Sc(c)===0)break e;case"keydown":case"keyup":Oe=KB;break;case"focusin":Le="focus",Oe=Wp;break;case"focusout":Le="blur",Oe=Wp;break;case"beforeblur":case"afterblur":Oe=Wp;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":Oe=xx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=BB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=ZB;break;case zx:case $x:case Vx:Oe=jB;break;case qx:Oe=t7;break;case"scroll":Oe=MB;break;case"wheel":Oe=r7;break;case"copy":case"cut":case"paste":Oe=$B;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=Sx}var De=(o&4)!==0,Ht=!De&&i==="scroll",G=De?pe!==null?pe+"Capture":null:pe;De=[];for(var q=te,K;q!==null;){K=q;var we=K.stateNode;if(K.tag===5&&we!==null&&(K=we,G!==null&&(we=Ya(q,G),we!=null&&De.push(du(q,we,K)))),Ht)break;q=q.return}0<De.length&&(pe=new Oe(pe,Le,null,c,Ee),Te.push({event:pe,listeners:De}))}}if((o&7)===0){e:{if(pe=i==="mouseover"||i==="pointerover",Oe=i==="mouseout"||i==="pointerout",pe&&c!==ht&&(Le=c.relatedTarget||c.fromElement)&&(ys(Le)||Le[Zr]))break e;if((Oe||pe)&&(pe=Ee.window===Ee?Ee:(pe=Ee.ownerDocument)?pe.defaultView||pe.parentWindow:window,Oe?(Le=c.relatedTarget||c.toElement,Oe=te,Le=Le?ys(Le):null,Le!==null&&(Ht=Es(Le),Le!==Ht||Le.tag!==5&&Le.tag!==6)&&(Le=null)):(Oe=null,Le=te),Oe!==Le)){if(De=xx,we="onMouseLeave",G="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(De=Sx,we="onPointerLeave",G="onPointerEnter",q="pointer"),Ht=Oe==null?pe:Lo(Oe),K=Le==null?pe:Lo(Le),pe=new De(we,q+"leave",Oe,c,Ee),pe.target=Ht,pe.relatedTarget=K,we=null,ys(Ee)===te&&(De=new De(G,q+"enter",Le,c,Ee),De.target=K,De.relatedTarget=Ht,we=De),Ht=we,Oe&&Le)t:{for(De=Oe,G=Le,q=0,K=De;K;K=Po(K))q++;for(K=0,we=G;we;we=Po(we))K++;for(;0<q-K;)De=Po(De),q--;for(;0<K-q;)G=Po(G),K--;for(;q--;){if(De===G||G!==null&&De===G.alternate)break t;De=Po(De),G=Po(G)}De=null}else De=null;Oe!==null&&Qx(Te,pe,Oe,De,!1),Le!==null&&Ht!==null&&Qx(Te,Ht,Le,De,!0)}}e:{if(pe=te?Lo(te):window,Oe=pe.nodeName&&pe.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&pe.type==="file")var Be=c7;else if(Ox(pe))if(Px)Be=p7;else{Be=f7;var Ye=d7}else(Oe=pe.nodeName)&&Oe.toLowerCase()==="input"&&(pe.type==="checkbox"||pe.type==="radio")&&(Be=h7);if(Be&&(Be=Be(i,te))){Ix(Te,Be,c,Ee);break e}Ye&&Ye(i,pe,te),i==="focusout"&&(Ye=pe._wrapperState)&&Ye.controlled&&pe.type==="number"&&Ie(pe,"number",pe.value)}switch(Ye=te?Lo(te):window,i){case"focusin":(Ox(Ye)||Ye.contentEditable==="true")&&(Oo=Ye,Zp=te,uu=null);break;case"focusout":uu=Zp=Oo=null;break;case"mousedown":em=!0;break;case"contextmenu":case"mouseup":case"dragend":em=!1,Hx(Te,c,Ee);break;case"selectionchange":if(E7)break;case"keydown":case"keyup":Hx(Te,c,Ee)}var We;if(Xp)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 No?kx(i,c)&&(Qe="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Qe="onCompositionStart");Qe&&(vx&&c.locale!=="ko"&&(No||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&No&&(We=bx()):(Ci=Ee,$p="value"in Ci?Ci.value:Ci.textContent,No=!0)),Ye=Ic(te,Qe),0<Ye.length&&(Qe=new _x(Qe,i,null,c,Ee),Te.push({event:Qe,listeners:Ye}),We?Qe.data=We:(We=Nx(c),We!==null&&(Qe.data=We)))),(We=s7?o7(i,c):a7(i,c))&&(te=Ic(te,"onBeforeInput"),0<te.length&&(Ee=new _x("onBeforeInput","beforeinput",null,c,Ee),Te.push({event:Ee,listeners:te}),Ee.data=We))}Xx(Te,o)})}function du(i,o,c){return{instance:i,listener:o,currentTarget:c}}function Ic(i,o){for(var c=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=Ya(i,c),T!=null&&h.unshift(du(i,T,E)),T=Ya(i,o),T!=null&&h.push(du(i,T,E))),i=i.return}return h}function Po(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Qx(i,o,c,h,E){for(var T=o._reactName,v=[];c!==null&&c!==h;){var B=c,$=B.alternate,te=B.stateNode;if($!==null&&$===h)break;B.tag===5&&te!==null&&(B=te,E?($=Ya(c,T),$!=null&&v.unshift(du(c,$,B))):E||($=Ya(c,T),$!=null&&v.push(du(c,$,B)))),c=c.return}v.length!==0&&i.push({event:o,listeners:v})}var w7=/\r\n?/g,x7=/\u0000|\uFFFD/g;function Jx(i){return(typeof i=="string"?i:""+i).replace(w7,`
21
+ `).replace(x7,"")}function Pc(i,o,c){if(o=Jx(o),Jx(i)!==o&&c)throw Error(n(425))}function Rc(){}var om=null,am=null;function um(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 lm=typeof setTimeout=="function"?setTimeout:void 0,_7=typeof clearTimeout=="function"?clearTimeout:void 0,Zx=typeof Promise=="function"?Promise:void 0,S7=typeof queueMicrotask=="function"?queueMicrotask:typeof Zx!="undefined"?function(i){return Zx.resolve(null).then(i).catch(v7)}:lm;function v7(i){setTimeout(function(){throw i})}function cm(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),tu(o);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);tu(o)}function Ni(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 e_(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 Ro=Math.random().toString(36).slice(2),Br="__reactFiber$"+Ro,fu="__reactProps$"+Ro,Zr="__reactContainer$"+Ro,dm="__reactEvents$"+Ro,A7="__reactListeners$"+Ro,C7="__reactHandles$"+Ro;function ys(i){var o=i[Br];if(o)return o;for(var c=i.parentNode;c;){if(o=c[Zr]||c[Br]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=e_(i);i!==null;){if(c=i[Br])return c;i=e_(i)}return o}i=c,c=i.parentNode}return null}function hu(i){return i=i[Br]||i[Zr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Lo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Lc(i){return i[fu]||null}var fm=[],Do=-1;function Oi(i){return{current:i}}function At(i){0>Do||(i.current=fm[Do],fm[Do]=null,Do--)}function bt(i,o){Do++,fm[Do]=i.current,i.current=o}var Ii={},mn=Oi(Ii),Ln=Oi(!1),Ts=Ii;function Mo(i,o){var c=i.type.contextTypes;if(!c)return Ii;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in c)E[T]=o[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Dn(i){return i=i.childContextTypes,i!=null}function Dc(){At(Ln),At(mn)}function t_(i,o,c){if(mn.current!==Ii)throw Error(n(168));bt(mn,o),bt(Ln,c)}function n_(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,Ce(i)||"Unknown",E));return C({},c,h)}function Mc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ii,Ts=mn.current,bt(mn,i),bt(Ln,Ln.current),!0}function r_(i,o,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=n_(i,o,Ts),h.__reactInternalMemoizedMergedChildContext=i,At(Ln),At(mn),bt(mn,i)):At(Ln),bt(Ln,c)}var ei=null,Fc=!1,hm=!1;function i_(i){ei===null?ei=[i]:ei.push(i)}function k7(i){Fc=!0,i_(i)}function Pi(){if(!hm&&ei!==null){hm=!0;var i=0,o=mt;try{var c=ei;for(mt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}ei=null,Fc=!1}catch(E){throw ei!==null&&(ei=ei.slice(i+1)),ox(Dp,Pi),E}finally{mt=o,hm=!1}}return null}var Fo=[],Bo=0,Bc=null,Uc=0,Zn=[],er=0,bs=null,ti=1,ni="";function ws(i,o){Fo[Bo++]=Uc,Fo[Bo++]=Bc,Bc=i,Uc=o}function s_(i,o,c){Zn[er++]=ti,Zn[er++]=ni,Zn[er++]=bs,bs=i;var h=ti;i=ni;var E=32-mr(h)-1;h&=~(1<<E),c+=1;var T=32-mr(o)+E;if(30<T){var v=E-E%5;T=(h&(1<<v)-1).toString(32),h>>=v,E-=v,ti=1<<32-mr(o)+E|c<<E|h,ni=T+i}else ti=1<<T|c<<E|h,ni=i}function pm(i){i.return!==null&&(ws(i,1),s_(i,1,0))}function mm(i){for(;i===Bc;)Bc=Fo[--Bo],Fo[Bo]=null,Uc=Fo[--Bo],Fo[Bo]=null;for(;i===bs;)bs=Zn[--er],Zn[er]=null,ni=Zn[--er],Zn[er]=null,ti=Zn[--er],Zn[er]=null}var qn=null,Yn=null,Ot=!1,Er=null;function o_(i,o){var c=ir(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 a_(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,qn=i,Yn=Ni(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,qn=i,Yn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=bs!==null?{id:ti,overflow:ni}:null,i.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=ir(18,null,null,0),c.stateNode=o,c.return=i,i.child=c,qn=i,Yn=null,!0):!1;default:return!1}}function gm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Em(i){if(Ot){var o=Yn;if(o){var c=o;if(!a_(i,o)){if(gm(i))throw Error(n(418));o=Ni(c.nextSibling);var h=qn;o&&a_(i,o)?o_(h,c):(i.flags=i.flags&-4097|2,Ot=!1,qn=i)}}else{if(gm(i))throw Error(n(418));i.flags=i.flags&-4097|2,Ot=!1,qn=i}}}function u_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;qn=i}function Hc(i){if(i!==qn)return!1;if(!Ot)return u_(i),Ot=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!um(i.type,i.memoizedProps)),o&&(o=Yn)){if(gm(i))throw l_(),Error(n(418));for(;o;)o_(i,o),o=Ni(o.nextSibling)}if(u_(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){Yn=Ni(i.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}i=i.nextSibling}Yn=null}}else Yn=qn?Ni(i.stateNode.nextSibling):null;return!0}function l_(){for(var i=Yn;i;)i=Ni(i.nextSibling)}function Uo(){Yn=qn=null,Ot=!1}function ym(i){Er===null?Er=[i]:Er.push(i)}var N7=z.ReactCurrentBatchConfig;function pu(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,T=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===T?o.ref:(o=function(v){var B=E.refs;v===null?delete B[T]:B[T]=v},o._stringRef=T,o)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function jc(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function c_(i){var o=i._init;return o(i._payload)}function d_(i){function o(G,q){if(i){var K=G.deletions;K===null?(G.deletions=[q],G.flags|=16):K.push(q)}}function c(G,q){if(!i)return null;for(;q!==null;)o(G,q),q=q.sibling;return null}function h(G,q){for(G=new Map;q!==null;)q.key!==null?G.set(q.key,q):G.set(q.index,q),q=q.sibling;return G}function E(G,q){return G=Hi(G,q),G.index=0,G.sibling=null,G}function T(G,q,K){return G.index=K,i?(K=G.alternate,K!==null?(K=K.index,K<q?(G.flags|=2,q):K):(G.flags|=2,q)):(G.flags|=1048576,q)}function v(G){return i&&G.alternate===null&&(G.flags|=2),G}function B(G,q,K,we){return q===null||q.tag!==6?(q=l0(K,G.mode,we),q.return=G,q):(q=E(q,K),q.return=G,q)}function $(G,q,K,we){var Be=K.type;return Be===V?Ee(G,q,K.props.children,we,K.key):q!==null&&(q.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===Se&&c_(Be)===q.type)?(we=E(q,K.props),we.ref=pu(G,q,K),we.return=G,we):(we=dd(K.type,K.key,K.props,null,G.mode,we),we.ref=pu(G,q,K),we.return=G,we)}function te(G,q,K,we){return q===null||q.tag!==4||q.stateNode.containerInfo!==K.containerInfo||q.stateNode.implementation!==K.implementation?(q=c0(K,G.mode,we),q.return=G,q):(q=E(q,K.children||[]),q.return=G,q)}function Ee(G,q,K,we,Be){return q===null||q.tag!==7?(q=Ns(K,G.mode,we,Be),q.return=G,q):(q=E(q,K),q.return=G,q)}function Te(G,q,K){if(typeof q=="string"&&q!==""||typeof q=="number")return q=l0(""+q,G.mode,K),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case W:return K=dd(q.type,q.key,q.props,null,G.mode,K),K.ref=pu(G,null,q),K.return=G,K;case D:return q=c0(q,G.mode,K),q.return=G,q;case Se:var we=q._init;return Te(G,we(q._payload),K)}if(Xe(q)||le(q))return q=Ns(q,G.mode,K,null),q.return=G,q;jc(G,q)}return null}function pe(G,q,K,we){var Be=q!==null?q.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return Be!==null?null:B(G,q,""+K,we);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case W:return K.key===Be?$(G,q,K,we):null;case D:return K.key===Be?te(G,q,K,we):null;case Se:return Be=K._init,pe(G,q,Be(K._payload),we)}if(Xe(K)||le(K))return Be!==null?null:Ee(G,q,K,we,null);jc(G,K)}return null}function Oe(G,q,K,we,Be){if(typeof we=="string"&&we!==""||typeof we=="number")return G=G.get(K)||null,B(q,G,""+we,Be);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case W:return G=G.get(we.key===null?K:we.key)||null,$(q,G,we,Be);case D:return G=G.get(we.key===null?K:we.key)||null,te(q,G,we,Be);case Se:var Ye=we._init;return Oe(G,q,K,Ye(we._payload),Be)}if(Xe(we)||le(we))return G=G.get(K)||null,Ee(q,G,we,Be,null);jc(q,we)}return null}function Le(G,q,K,we){for(var Be=null,Ye=null,We=q,Qe=q=0,nn=null;We!==null&&Qe<K.length;Qe++){We.index>Qe?(nn=We,We=null):nn=We.sibling;var dt=pe(G,We,K[Qe],we);if(dt===null){We===null&&(We=nn);break}i&&We&&dt.alternate===null&&o(G,We),q=T(dt,q,Qe),Ye===null?Be=dt:Ye.sibling=dt,Ye=dt,We=nn}if(Qe===K.length)return c(G,We),Ot&&ws(G,Qe),Be;if(We===null){for(;Qe<K.length;Qe++)We=Te(G,K[Qe],we),We!==null&&(q=T(We,q,Qe),Ye===null?Be=We:Ye.sibling=We,Ye=We);return Ot&&ws(G,Qe),Be}for(We=h(G,We);Qe<K.length;Qe++)nn=Oe(We,G,Qe,K[Qe],we),nn!==null&&(i&&nn.alternate!==null&&We.delete(nn.key===null?Qe:nn.key),q=T(nn,q,Qe),Ye===null?Be=nn:Ye.sibling=nn,Ye=nn);return i&&We.forEach(function(ji){return o(G,ji)}),Ot&&ws(G,Qe),Be}function De(G,q,K,we){var Be=le(K);if(typeof Be!="function")throw Error(n(150));if(K=Be.call(K),K==null)throw Error(n(151));for(var Ye=Be=null,We=q,Qe=q=0,nn=null,dt=K.next();We!==null&&!dt.done;Qe++,dt=K.next()){We.index>Qe?(nn=We,We=null):nn=We.sibling;var ji=pe(G,We,dt.value,we);if(ji===null){We===null&&(We=nn);break}i&&We&&ji.alternate===null&&o(G,We),q=T(ji,q,Qe),Ye===null?Be=ji:Ye.sibling=ji,Ye=ji,We=nn}if(dt.done)return c(G,We),Ot&&ws(G,Qe),Be;if(We===null){for(;!dt.done;Qe++,dt=K.next())dt=Te(G,dt.value,we),dt!==null&&(q=T(dt,q,Qe),Ye===null?Be=dt:Ye.sibling=dt,Ye=dt);return Ot&&ws(G,Qe),Be}for(We=h(G,We);!dt.done;Qe++,dt=K.next())dt=Oe(We,G,Qe,dt.value,we),dt!==null&&(i&&dt.alternate!==null&&We.delete(dt.key===null?Qe:dt.key),q=T(dt,q,Qe),Ye===null?Be=dt:Ye.sibling=dt,Ye=dt);return i&&We.forEach(function(uU){return o(G,uU)}),Ot&&ws(G,Qe),Be}function Ht(G,q,K,we){if(typeof K=="object"&&K!==null&&K.type===V&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case W:e:{for(var Be=K.key,Ye=q;Ye!==null;){if(Ye.key===Be){if(Be=K.type,Be===V){if(Ye.tag===7){c(G,Ye.sibling),q=E(Ye,K.props.children),q.return=G,G=q;break e}}else if(Ye.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===Se&&c_(Be)===Ye.type){c(G,Ye.sibling),q=E(Ye,K.props),q.ref=pu(G,Ye,K),q.return=G,G=q;break e}c(G,Ye);break}else o(G,Ye);Ye=Ye.sibling}K.type===V?(q=Ns(K.props.children,G.mode,we,K.key),q.return=G,G=q):(we=dd(K.type,K.key,K.props,null,G.mode,we),we.ref=pu(G,q,K),we.return=G,G=we)}return v(G);case D:e:{for(Ye=K.key;q!==null;){if(q.key===Ye)if(q.tag===4&&q.stateNode.containerInfo===K.containerInfo&&q.stateNode.implementation===K.implementation){c(G,q.sibling),q=E(q,K.children||[]),q.return=G,G=q;break e}else{c(G,q);break}else o(G,q);q=q.sibling}q=c0(K,G.mode,we),q.return=G,G=q}return v(G);case Se:return Ye=K._init,Ht(G,q,Ye(K._payload),we)}if(Xe(K))return Le(G,q,K,we);if(le(K))return De(G,q,K,we);jc(G,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,q!==null&&q.tag===6?(c(G,q.sibling),q=E(q,K),q.return=G,G=q):(c(G,q),q=l0(K,G.mode,we),q.return=G,G=q),v(G)):c(G,q)}return Ht}var Ho=d_(!0),f_=d_(!1),zc=Oi(null),$c=null,jo=null,Tm=null;function bm(){Tm=jo=$c=null}function wm(i){var o=zc.current;At(zc),i._currentValue=o}function xm(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 zo(i,o){$c=i,Tm=jo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Mn=!0),i.firstContext=null)}function tr(i){var o=i._currentValue;if(Tm!==i)if(i={context:i,memoizedValue:o,next:null},jo===null){if($c===null)throw Error(n(308));jo=i,$c.dependencies={lanes:0,firstContext:i}}else jo=jo.next=i;return o}var xs=null;function _m(i){xs===null?xs=[i]:xs.push(i)}function h_(i,o,c,h){var E=o.interleaved;return E===null?(c.next=c,_m(o)):(c.next=E.next,E.next=c),o.interleaved=c,ri(i,h)}function ri(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 Ri=!1;function Sm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function p_(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 ii(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Li(i,o,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(ut&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,ri(i,c)}return E=h.interleaved,E===null?(o.next=o,_m(h)):(o.next=E.next,E.next=o),h.interleaved=o,ri(i,c)}function Vc(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,Bp(i,c)}}function m_(i,o){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,T=null;if(c=c.firstBaseUpdate,c!==null){do{var v={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};T===null?E=T=v:T=T.next=v,c=c.next}while(c!==null);T===null?E=T=o:T=T.next=o}else E=T=o;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,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 qc(i,o,c,h){var E=i.updateQueue;Ri=!1;var T=E.firstBaseUpdate,v=E.lastBaseUpdate,B=E.shared.pending;if(B!==null){E.shared.pending=null;var $=B,te=$.next;$.next=null,v===null?T=te:v.next=te,v=$;var Ee=i.alternate;Ee!==null&&(Ee=Ee.updateQueue,B=Ee.lastBaseUpdate,B!==v&&(B===null?Ee.firstBaseUpdate=te:B.next=te,Ee.lastBaseUpdate=$))}if(T!==null){var Te=E.baseState;v=0,Ee=te=$=null,B=T;do{var pe=B.lane,Oe=B.eventTime;if((h&pe)===pe){Ee!==null&&(Ee=Ee.next={eventTime:Oe,lane:0,tag:B.tag,payload:B.payload,callback:B.callback,next:null});e:{var Le=i,De=B;switch(pe=o,Oe=c,De.tag){case 1:if(Le=De.payload,typeof Le=="function"){Te=Le.call(Oe,Te,pe);break e}Te=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=De.payload,pe=typeof Le=="function"?Le.call(Oe,Te,pe):Le,pe==null)break e;Te=C({},Te,pe);break e;case 2:Ri=!0}}B.callback!==null&&B.lane!==0&&(i.flags|=64,pe=E.effects,pe===null?E.effects=[B]:pe.push(B))}else Oe={eventTime:Oe,lane:pe,tag:B.tag,payload:B.payload,callback:B.callback,next:null},Ee===null?(te=Ee=Oe,$=Te):Ee=Ee.next=Oe,v|=pe;if(B=B.next,B===null){if(B=E.shared.pending,B===null)break;pe=B,B=pe.next,pe.next=null,E.lastBaseUpdate=pe,E.shared.pending=null}}while(!0);if(Ee===null&&($=Te),E.baseState=$,E.firstBaseUpdate=te,E.lastBaseUpdate=Ee,o=E.shared.interleaved,o!==null){E=o;do v|=E.lane,E=E.next;while(E!==o)}else T===null&&(E.shared.lanes=0);vs|=v,i.lanes=v,i.memoizedState=Te}}function g_(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 mu={},Ur=Oi(mu),gu=Oi(mu),Eu=Oi(mu);function _s(i){if(i===mu)throw Error(n(174));return i}function vm(i,o){switch(bt(Eu,o),bt(gu,i),bt(Ur,mu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:xe(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=xe(o,i)}At(Ur),bt(Ur,o)}function $o(){At(Ur),At(gu),At(Eu)}function E_(i){_s(Eu.current);var o=_s(Ur.current),c=xe(o,i.type);o!==c&&(bt(gu,i),bt(Ur,c))}function Am(i){gu.current===i&&(At(Ur),At(gu))}var It=Oi(0);function Yc(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 km(){for(var i=0;i<Cm.length;i++)Cm[i]._workInProgressVersionPrimary=null;Cm.length=0}var Wc=z.ReactCurrentDispatcher,Nm=z.ReactCurrentBatchConfig,Ss=0,Pt=null,Gt=null,en=null,Gc=!1,yu=!1,Tu=0,O7=0;function gn(){throw Error(n(321))}function Om(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!gr(i[c],o[c]))return!1;return!0}function Im(i,o,c,h,E,T){if(Ss=T,Pt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Wc.current=i===null||i.memoizedState===null?L7:D7,i=c(h,E),yu){T=0;do{if(yu=!1,Tu=0,25<=T)throw Error(n(301));T+=1,en=Gt=null,o.updateQueue=null,Wc.current=M7,i=c(h,E)}while(yu)}if(Wc.current=Qc,o=Gt!==null&&Gt.next!==null,Ss=0,en=Gt=Pt=null,Gc=!1,o)throw Error(n(300));return i}function Pm(){var i=Tu!==0;return Tu=0,i}function Hr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Pt.memoizedState=en=i:en=en.next=i,en}function nr(){if(Gt===null){var i=Pt.alternate;i=i!==null?i.memoizedState:null}else i=Gt.next;var o=en===null?Pt.memoizedState:en.next;if(o!==null)en=o,Gt=i;else{if(i===null)throw Error(n(310));Gt=i,i={memoizedState:Gt.memoizedState,baseState:Gt.baseState,baseQueue:Gt.baseQueue,queue:Gt.queue,next:null},en===null?Pt.memoizedState=en=i:en=en.next=i}return en}function bu(i,o){return typeof o=="function"?o(i):o}function Rm(i){var o=nr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Gt,E=h.baseQueue,T=c.pending;if(T!==null){if(E!==null){var v=E.next;E.next=T.next,T.next=v}h.baseQueue=E=T,c.pending=null}if(E!==null){T=E.next,h=h.baseState;var B=v=null,$=null,te=T;do{var Ee=te.lane;if((Ss&Ee)===Ee)$!==null&&($=$.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),h=te.hasEagerState?te.eagerState:i(h,te.action);else{var Te={lane:Ee,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};$===null?(B=$=Te,v=h):$=$.next=Te,Pt.lanes|=Ee,vs|=Ee}te=te.next}while(te!==null&&te!==T);$===null?v=h:$.next=B,gr(h,o.memoizedState)||(Mn=!0),o.memoizedState=h,o.baseState=v,o.baseQueue=$,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do T=E.lane,Pt.lanes|=T,vs|=T,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function Lm(i){var o=nr(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,T=o.memoizedState;if(E!==null){c.pending=null;var v=E=E.next;do T=i(T,v.action),v=v.next;while(v!==E);gr(T,o.memoizedState)||(Mn=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),c.lastRenderedState=T}return[T,h]}function y_(){}function T_(i,o){var c=Pt,h=nr(),E=o(),T=!gr(h.memoizedState,E);if(T&&(h.memoizedState=E,Mn=!0),h=h.queue,Dm(x_.bind(null,c,h,i),[i]),h.getSnapshot!==o||T||en!==null&&en.memoizedState.tag&1){if(c.flags|=2048,wu(9,w_.bind(null,c,h,E,o),void 0,null),tn===null)throw Error(n(349));(Ss&30)!==0||b_(c,o,E)}return E}function b_(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function w_(i,o,c,h){o.value=c,o.getSnapshot=h,__(o)&&S_(i)}function x_(i,o,c){return c(function(){__(o)&&S_(i)})}function __(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!gr(i,c)}catch(h){return!0}}function S_(i){var o=ri(i,1);o!==null&&wr(o,i,1,-1)}function v_(i){var o=Hr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:bu,lastRenderedState:i},o.queue=i,i=i.dispatch=R7.bind(null,Pt,i),[o.memoizedState,i]}function wu(i,o,c,h){return i={tag:i,create:o,destroy:c,deps:h,next:null},o=Pt.updateQueue,o===null?(o={lastEffect:null,stores:null},Pt.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 A_(){return nr().memoizedState}function Xc(i,o,c,h){var E=Hr();Pt.flags|=i,E.memoizedState=wu(1|o,c,void 0,h===void 0?null:h)}function Kc(i,o,c,h){var E=nr();h=h===void 0?null:h;var T=void 0;if(Gt!==null){var v=Gt.memoizedState;if(T=v.destroy,h!==null&&Om(h,v.deps)){E.memoizedState=wu(o,c,T,h);return}}Pt.flags|=i,E.memoizedState=wu(1|o,c,T,h)}function C_(i,o){return Xc(8390656,8,i,o)}function Dm(i,o){return Kc(2048,8,i,o)}function k_(i,o){return Kc(4,2,i,o)}function N_(i,o){return Kc(4,4,i,o)}function O_(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 I_(i,o,c){return c=c!=null?c.concat([i]):null,Kc(4,4,O_.bind(null,o,i),c)}function Mm(){}function P_(i,o){var c=nr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&Om(o,h[1])?h[0]:(c.memoizedState=[i,o],i)}function R_(i,o){var c=nr();o=o===void 0?null:o;var h=c.memoizedState;return h!==null&&o!==null&&Om(o,h[1])?h[0]:(i=i(),c.memoizedState=[i,o],i)}function L_(i,o,c){return(Ss&21)===0?(i.baseState&&(i.baseState=!1,Mn=!0),i.memoizedState=c):(gr(c,o)||(c=cx(),Pt.lanes|=c,vs|=c,i.baseState=!0),o)}function I7(i,o){var c=mt;mt=c!==0&&4>c?c:4,i(!0);var h=Nm.transition;Nm.transition={};try{i(!1),o()}finally{mt=c,Nm.transition=h}}function D_(){return nr().memoizedState}function P7(i,o,c){var h=Bi(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},M_(i))F_(o,c);else if(c=h_(i,o,c,h),c!==null){var E=Sn();wr(c,i,h,E),B_(c,o,h)}}function R7(i,o,c){var h=Bi(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(M_(i))F_(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var v=o.lastRenderedState,B=T(v,c);if(E.hasEagerState=!0,E.eagerState=B,gr(B,v)){var $=o.interleaved;$===null?(E.next=E,_m(o)):(E.next=$.next,$.next=E),o.interleaved=E;return}}catch(te){}c=h_(i,o,E,h),c!==null&&(E=Sn(),wr(c,i,h,E),B_(c,o,h))}}function M_(i){var o=i.alternate;return i===Pt||o!==null&&o===Pt}function F_(i,o){yu=Gc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function B_(i,o,c){if((c&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,c|=h,o.lanes=c,Bp(i,c)}}var Qc={readContext:tr,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useInsertionEffect:gn,useLayoutEffect:gn,useMemo:gn,useReducer:gn,useRef:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useMutableSource:gn,useSyncExternalStore:gn,useId:gn,unstable_isNewReconciler:!1},L7={readContext:tr,useCallback:function(i,o){return Hr().memoizedState=[i,o===void 0?null:o],i},useContext:tr,useEffect:C_,useImperativeHandle:function(i,o,c){return c=c!=null?c.concat([i]):null,Xc(4194308,4,O_.bind(null,o,i),c)},useLayoutEffect:function(i,o){return Xc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Xc(4,2,i,o)},useMemo:function(i,o){var c=Hr();return o=o===void 0?null:o,i=i(),c.memoizedState=[i,o],i},useReducer:function(i,o,c){var h=Hr();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=P7.bind(null,Pt,i),[h.memoizedState,i]},useRef:function(i){var o=Hr();return i={current:i},o.memoizedState=i},useState:v_,useDebugValue:Mm,useDeferredValue:function(i){return Hr().memoizedState=i},useTransition:function(){var i=v_(!1),o=i[0];return i=I7.bind(null,i[1]),Hr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,c){var h=Pt,E=Hr();if(Ot){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),tn===null)throw Error(n(349));(Ss&30)!==0||b_(h,o,c)}E.memoizedState=c;var T={value:c,getSnapshot:o};return E.queue=T,C_(x_.bind(null,h,T,i),[i]),h.flags|=2048,wu(9,w_.bind(null,h,T,c,o),void 0,null),c},useId:function(){var i=Hr(),o=tn.identifierPrefix;if(Ot){var c=ni,h=ti;c=(h&~(1<<32-mr(h)-1)).toString(32)+c,o=":"+o+"R"+c,c=Tu++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=O7++,o=":"+o+"r"+c.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},D7={readContext:tr,useCallback:P_,useContext:tr,useEffect:Dm,useImperativeHandle:I_,useInsertionEffect:k_,useLayoutEffect:N_,useMemo:R_,useReducer:Rm,useRef:A_,useState:function(){return Rm(bu)},useDebugValue:Mm,useDeferredValue:function(i){var o=nr();return L_(o,Gt.memoizedState,i)},useTransition:function(){var i=Rm(bu)[0],o=nr().memoizedState;return[i,o]},useMutableSource:y_,useSyncExternalStore:T_,useId:D_,unstable_isNewReconciler:!1},M7={readContext:tr,useCallback:P_,useContext:tr,useEffect:Dm,useImperativeHandle:I_,useInsertionEffect:k_,useLayoutEffect:N_,useMemo:R_,useReducer:Lm,useRef:A_,useState:function(){return Lm(bu)},useDebugValue:Mm,useDeferredValue:function(i){var o=nr();return Gt===null?o.memoizedState=i:L_(o,Gt.memoizedState,i)},useTransition:function(){var i=Lm(bu)[0],o=nr().memoizedState;return[i,o]},useMutableSource:y_,useSyncExternalStore:T_,useId:D_,unstable_isNewReconciler:!1};function yr(i,o){if(i&&i.defaultProps){o=C({},o),i=i.defaultProps;for(var c in i)o[c]===void 0&&(o[c]=i[c]);return o}return o}function Fm(i,o,c,h){o=i.memoizedState,c=c(h,o),c=c==null?o:C({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Jc={isMounted:function(i){return(i=i._reactInternals)?Es(i)===i:!1},enqueueSetState:function(i,o,c){i=i._reactInternals;var h=Sn(),E=Bi(i),T=ii(h,E);T.payload=o,c!=null&&(T.callback=c),o=Li(i,T,E),o!==null&&(wr(o,i,E,h),Vc(o,i,E))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var h=Sn(),E=Bi(i),T=ii(h,E);T.tag=1,T.payload=o,c!=null&&(T.callback=c),o=Li(i,T,E),o!==null&&(wr(o,i,E,h),Vc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=Sn(),h=Bi(i),E=ii(c,h);E.tag=2,o!=null&&(E.callback=o),o=Li(i,E,h),o!==null&&(wr(o,i,h,c),Vc(o,i,h))}};function U_(i,o,c,h,E,T,v){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,v):o.prototype&&o.prototype.isPureReactComponent?!au(c,h)||!au(E,T):!0}function H_(i,o,c){var h=!1,E=Ii,T=o.contextType;return typeof T=="object"&&T!==null?T=tr(T):(E=Dn(o)?Ts:mn.current,h=o.contextTypes,T=(h=h!=null)?Mo(i,E):Ii),o=new o(c,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Jc,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function j_(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&&Jc.enqueueReplaceState(o,o.state,null)}function Bm(i,o,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},Sm(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=tr(T):(T=Dn(o)?Ts:mn.current,E.context=Mo(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(Fm(i,o,T,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&&Jc.enqueueReplaceState(E,E.state,null),qc(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Vo(i,o){try{var c="",h=o;do c+=Pe(h),h=h.return;while(h);var E=c}catch(T){E=`
22
22
  Error generating stack: `+T.message+`
23
- `+T.stack}return{value:i,source:o,stack:E,digest:null}}function Um(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function Hm(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var D7=typeof WeakMap=="function"?WeakMap:Map;function z_(i,o,c){c=ii(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){sd||(sd=!0,t0=h),Hm(i,o)},c}function $_(i,o,c){c=ii(-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(){Hm(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(c.callback=function(){Hm(i,o),typeof h!="function"&&(Mi===null?Mi=new Set([this]):Mi.add(this));var v=o.stack;this.componentDidCatch(o.value,{componentStack:v!==null?v:""})}),c}function V_(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new D7;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=X7.bind(null,i,o,c),o.then(i,i))}function q_(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 Y_(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=ii(-1,1),o.tag=2,Li(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var M7=z.ReactCurrentOwner,Mn=!1;function _n(i,o,c,h){o.child=i===null?f_(o,null,c,h):Ho(o,i.child,c,h)}function W_(i,o,c,h,E){c=c.render;var T=o.ref;return zo(o,E),h=Im(i,o,c,h,T,E),c=Pm(),i!==null&&!Mn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,si(i,o,E)):(Ot&&c&&pm(o),o.flags|=1,_n(i,o,h,E),o.child)}function G_(i,o,c,h,E){if(i===null){var T=c.type;return typeof T=="function"&&!u0(T)&&T.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=T,X_(i,o,T,h,E)):(i=dd(c.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,(i.lanes&E)===0){var v=T.memoizedProps;if(c=c.compare,c=c!==null?c:uu,c(v,h)&&i.ref===o.ref)return si(i,o,E)}return o.flags|=1,i=Hi(T,h),i.ref=o.ref,i.return=o,o.child=i}function X_(i,o,c,h,E){if(i!==null){var T=i.memoizedProps;if(uu(T,h)&&i.ref===o.ref)if(Mn=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Mn=!0);else return o.lanes=i.lanes,si(i,o,E)}return jm(i,o,c,h,E)}function K_(i,o,c){var h=o.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(Yo,Wn),Wn|=c;else{if((c&1073741824)===0)return i=T!==null?T.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,bt(Yo,Wn),Wn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:c,bt(Yo,Wn),Wn|=h}else T!==null?(h=T.baseLanes|c,o.memoizedState=null):h=c,bt(Yo,Wn),Wn|=h;return _n(i,o,E,c),o.child}function Q_(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function jm(i,o,c,h,E){var T=Dn(c)?Ts:mn.current;return T=Mo(o,T),zo(o,E),c=Im(i,o,c,h,T,E),h=Pm(),i!==null&&!Mn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,si(i,o,E)):(Ot&&h&&pm(o),o.flags|=1,_n(i,o,c,E),o.child)}function J_(i,o,c,h,E){if(Dn(c)){var T=!0;Mc(o)}else T=!1;if(zo(o,E),o.stateNode===null)ed(i,o),H_(o,c,h),Bm(o,c,h,E),h=!0;else if(i===null){var v=o.stateNode,B=o.memoizedProps;v.props=B;var $=v.context,te=c.contextType;typeof te=="object"&&te!==null?te=tr(te):(te=Dn(c)?Ts:mn.current,te=Mo(o,te));var Ee=c.getDerivedStateFromProps,Te=typeof Ee=="function"||typeof v.getSnapshotBeforeUpdate=="function";Te||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(B!==h||$!==te)&&j_(o,v,h,te),Ri=!1;var pe=o.memoizedState;v.state=pe,qc(o,h,v,E),$=o.memoizedState,B!==h||pe!==$||Ln.current||Ri?(typeof Ee=="function"&&(Fm(o,c,Ee,h),$=o.memoizedState),(B=Ri||U_(o,c,B,h,pe,$,te))?(Te||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=$),v.props=h,v.state=$,v.context=te,h=B):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{v=o.stateNode,p_(i,o),B=o.memoizedProps,te=o.type===o.elementType?B:yr(o.type,B),v.props=te,Te=o.pendingProps,pe=v.context,$=c.contextType,typeof $=="object"&&$!==null?$=tr($):($=Dn(c)?Ts:mn.current,$=Mo(o,$));var Oe=c.getDerivedStateFromProps;(Ee=typeof Oe=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(B!==Te||pe!==$)&&j_(o,v,h,$),Ri=!1,pe=o.memoizedState,v.state=pe,qc(o,h,v,E);var Le=o.memoizedState;B!==Te||pe!==Le||Ln.current||Ri?(typeof Oe=="function"&&(Fm(o,c,Oe,h),Le=o.memoizedState),(te=Ri||U_(o,c,te,h,pe,Le,$)||!1)?(Ee||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(h,Le,$),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(h,Le,$)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||B===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Le),v.props=h,v.state=Le,v.context=$,h=te):(typeof v.componentDidUpdate!="function"||B===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),h=!1)}return zm(i,o,c,h,T,E)}function zm(i,o,c,h,E,T){Q_(i,o);var v=(o.flags&128)!==0;if(!h&&!v)return E&&r_(o,c,!1),si(i,o,T);h=o.stateNode,M7.current=o;var B=v&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&v?(o.child=Ho(o,i.child,null,T),o.child=Ho(o,null,B,T)):_n(i,o,B,T),o.memoizedState=h.state,E&&r_(o,c,!0),o.child}function Z_(i){var o=i.stateNode;o.pendingContext?t_(i,o.pendingContext,o.pendingContext!==o.context):o.context&&t_(i,o.context,!1),vm(i,o.containerInfo)}function e2(i,o,c,h,E){return Uo(),ym(E),o.flags|=256,_n(i,o,c,h),o.child}var $m={dehydrated:null,treeContext:null,retryLane:0};function Vm(i){return{baseLanes:i,cachePool:null,transitions:null}}function t2(i,o,c){var h=o.pendingProps,E=It.current,T=!1,v=(o.flags&128)!==0,B;if((B=v)||(B=i!==null&&i.memoizedState===null?!1:(E&2)!==0),B?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),bt(It,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):(v=h.children,i=h.fallback,T?(h=o.mode,T=o.child,v={mode:"hidden",children:v},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=v):T=fd(v,h,0,null),i=Ns(i,h,c,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Vm(c),o.memoizedState=$m,i):qm(o,v));if(E=i.memoizedState,E!==null&&(B=E.dehydrated,B!==null))return F7(i,o,v,h,B,E,c);if(T){T=h.fallback,v=o.mode,E=i.child,B=E.sibling;var $={mode:"hidden",children:h.children};return(v&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=$,o.deletions=null):(h=Hi(E,$),h.subtreeFlags=E.subtreeFlags&14680064),B!==null?T=Hi(B,T):(T=Ns(T,v,c,null),T.flags|=2),T.return=o,h.return=o,h.sibling=T,o.child=h,h=T,T=o.child,v=i.child.memoizedState,v=v===null?Vm(c):{baseLanes:v.baseLanes|c,cachePool:null,transitions:v.transitions},T.memoizedState=v,T.childLanes=i.childLanes&~c,o.memoizedState=$m,h}return T=i.child,i=T.sibling,h=Hi(T,{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 qm(i,o){return o=fd({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function Zc(i,o,c,h){return h!==null&&ym(h),Ho(o,i.child,null,c),i=qm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function F7(i,o,c,h,E,T,v){if(c)return o.flags&256?(o.flags&=-257,h=Um(Error(n(422))),Zc(i,o,v,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=fd({mode:"visible",children:h.children},E,0,null),T=Ns(T,E,v,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&Ho(o,i.child,null,v),o.child.memoizedState=Vm(v),o.memoizedState=$m,T);if((o.mode&1)===0)return Zc(i,o,v,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var B=h.dgst;return h=B,T=Error(n(419)),h=Um(T,h,void 0),Zc(i,o,v,h)}if(B=(v&i.childLanes)!==0,Mn||B){if(h=tn,h!==null){switch(v&-v){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|v))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,ri(i,E),wr(h,i,E,-1))}return a0(),h=Um(Error(n(421))),Zc(i,o,v,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=K7.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,Yn=Ni(E.nextSibling),qn=o,Ot=!0,Er=null,i!==null&&(Zn[er++]=ti,Zn[er++]=ni,Zn[er++]=bs,ti=i.id,ni=i.overflow,bs=o),o=qm(o,h.children),o.flags|=4096,o)}function n2(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),xm(i.return,o,c)}function Ym(i,o,c,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=c,T.tailMode=E)}function r2(i,o,c){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(_n(i,o,h.children,c),h=It.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&&n2(i,c,o);else if(i.tag===19)n2(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(bt(It,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&&Yc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),Ym(o,!1,E,c,T);break;case"backwards":for(c=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Yc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Ym(o,!0,c,null,T);break;case"together":Ym(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function ed(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function si(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),vs|=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=Hi(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=Hi(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function B7(i,o,c){switch(o.tag){case 3:Z_(o),Uo();break;case 5:E_(o);break;case 1:Dn(o.type)&&Mc(o);break;case 4:vm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;bt(zc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(bt(It,It.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?t2(i,o,c):(bt(It,It.current&1),i=si(i,o,c),i!==null?i.sibling:null);bt(It,It.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return r2(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(It,It.current),h)break;return null;case 22:case 23:return o.lanes=0,K_(i,o,c)}return si(i,o,c)}var i2,Wm,s2,o2;i2=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}},Wm=function(){},s2=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,_s(Ur.current);var T=null;switch(c){case"input":E=pn(i,E),h=pn(i,h),T=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),T=[];break;case"textarea":E=ft(i,E),h=ft(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Rc)}Ke(c,h);var v;c=null;for(te in E)if(!h.hasOwnProperty(te)&&E.hasOwnProperty(te)&&E[te]!=null)if(te==="style"){var B=E[te];for(v in B)B.hasOwnProperty(v)&&(c||(c={}),c[v]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(s.hasOwnProperty(te)?T||(T=[]):(T=T||[]).push(te,null));for(te in h){var $=h[te];if(B=E!=null?E[te]:void 0,h.hasOwnProperty(te)&&$!==B&&($!=null||B!=null))if(te==="style")if(B){for(v in B)!B.hasOwnProperty(v)||$&&$.hasOwnProperty(v)||(c||(c={}),c[v]="");for(v in $)$.hasOwnProperty(v)&&B[v]!==$[v]&&(c||(c={}),c[v]=$[v])}else c||(T||(T=[]),T.push(te,c)),c=$;else te==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,B=B?B.__html:void 0,$!=null&&B!==$&&(T=T||[]).push(te,$)):te==="children"?typeof $!="string"&&typeof $!="number"||(T=T||[]).push(te,""+$):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(s.hasOwnProperty(te)?($!=null&&te==="onScroll"&&vt("scroll",i),T||B===$||(T=[])):(T=T||[]).push(te,$))}c&&(T=T||[]).push("style",c);var te=T;(o.updateQueue=te)&&(o.flags|=4)}},o2=function(i,o,c,h){c!==h&&(o.flags|=4)};function _u(i,o){if(!Ot)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 En(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 U7(i,o,c){var h=o.pendingProps;switch(mm(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return En(o),null;case 1:return Dn(o.type)&&Dc(),En(o),null;case 3:return h=o.stateNode,$o(),At(Ln),At(mn),Cm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Hc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Er!==null&&(i0(Er),Er=null))),Wm(i,o),En(o),null;case 5:Am(o);var E=_s(yu.current);if(c=o.type,i!==null&&o.stateNode!=null)s2(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 En(o),null}if(i=_s(Ur.current),Hc(o)){h=o.stateNode,c=o.type;var T=o.memoizedProps;switch(h[Br]=o,h[hu]=T,i=(o.mode&1)!==0,c){case"dialog":vt("cancel",h),vt("close",h);break;case"iframe":case"object":case"embed":vt("load",h);break;case"video":case"audio":for(E=0;E<cu.length;E++)vt(cu[E],h);break;case"source":vt("error",h);break;case"img":case"image":case"link":vt("error",h),vt("load",h);break;case"details":vt("toggle",h);break;case"input":Bt(h,T),vt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},vt("invalid",h);break;case"textarea":Jn(h,T),vt("invalid",h)}Ke(c,T),E=null;for(var v in T)if(T.hasOwnProperty(v)){var B=T[v];v==="children"?typeof B=="string"?h.textContent!==B&&(T.suppressHydrationWarning!==!0&&Pc(h.textContent,B,i),E=["children",B]):typeof B=="number"&&h.textContent!==""+B&&(T.suppressHydrationWarning!==!0&&Pc(h.textContent,B,i),E=["children",""+B]):s.hasOwnProperty(v)&&B!=null&&v==="onScroll"&&vt("scroll",h)}switch(c){case"input":Nt(h),Wt(h,T,!0);break;case"textarea":Nt(h),xi(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=Rc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{v=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=v.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=v.createElement(c,{is:h.is}):(i=v.createElement(c),c==="select"&&(v=i,h.multiple?v.multiple=!0:h.size&&(v.size=h.size))):i=v.createElementNS(i,c),i[Br]=o,i[hu]=h,i2(i,o,!1,!1),o.stateNode=i;e:{switch(v=$t(c,h),c){case"dialog":vt("cancel",i),vt("close",i),E=h;break;case"iframe":case"object":case"embed":vt("load",i),E=h;break;case"video":case"audio":for(E=0;E<cu.length;E++)vt(cu[E],i);E=h;break;case"source":vt("error",i),E=h;break;case"img":case"image":case"link":vt("error",i),vt("load",i),E=h;break;case"details":vt("toggle",i),E=h;break;case"input":Bt(i,h),E=pn(i,h),vt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),vt("invalid",i);break;case"textarea":Jn(i,h),E=ft(i,h),vt("invalid",i);break;default:E=h}Ke(c,E),B=E;for(T in B)if(B.hasOwnProperty(T)){var $=B[T];T==="style"?ge(i,$):T==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&et(i,$)):T==="children"?typeof $=="string"?(c!=="textarea"||$!=="")&&ee(i,$):typeof $=="number"&&ee(i,""+$):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?$!=null&&T==="onScroll"&&vt("scroll",i):$!=null&&O(i,T,$,v))}switch(c){case"input":Nt(i),Wt(i,h,!1);break;case"textarea":Nt(i),xi(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Me(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?ot(i,!!h.multiple,T,!1):h.defaultValue!=null&&ot(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Rc)}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 En(o),null;case 6:if(i&&o.stateNode!=null)o2(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=_s(yu.current),_s(Ur.current),Hc(o)){if(h=o.stateNode,c=o.memoizedProps,h[Br]=o,(T=h.nodeValue!==c)&&(i=qn,i!==null))switch(i.tag){case 3:Pc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Pc(h.nodeValue,c,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Br]=o,o.stateNode=h}return En(o),null;case 13:if(At(It),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Ot&&Yn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)l_(),Uo(),o.flags|=98560,T=!1;else if(T=Hc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=o.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Br]=o}else Uo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;En(o),T=!1}else Er!==null&&(i0(Er),Er=null),T=!0;if(!T)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||(It.current&1)!==0?Xt===0&&(Xt=3):a0())),o.updateQueue!==null&&(o.flags|=4),En(o),null);case 4:return $o(),Wm(i,o),i===null&&du(o.stateNode.containerInfo),En(o),null;case 10:return wm(o.type._context),En(o),null;case 17:return Dn(o.type)&&Dc(),En(o),null;case 19:if(At(It),T=o.memoizedState,T===null)return En(o),null;if(h=(o.flags&128)!==0,v=T.rendering,v===null)if(h)_u(T,!1);else{if(Xt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(v=Yc(i),v!==null){for(o.flags|=128,_u(T,!1),h=v.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)T=c,i=h,T.flags&=14680066,v=T.alternate,v===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=v.childLanes,T.lanes=v.lanes,T.child=v.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=v.memoizedProps,T.memoizedState=v.memoizedState,T.updateQueue=v.updateQueue,T.type=v.type,i=v.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return bt(It,It.current&1|2),o.child}i=i.sibling}T.tail!==null&&Ut()>Wo&&(o.flags|=128,h=!0,_u(T,!1),o.lanes=4194304)}else{if(!h)if(i=Yc(v),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),_u(T,!0),T.tail===null&&T.tailMode==="hidden"&&!v.alternate&&!Ot)return En(o),null}else 2*Ut()-T.renderingStartTime>Wo&&c!==1073741824&&(o.flags|=128,h=!0,_u(T,!1),o.lanes=4194304);T.isBackwards?(v.sibling=o.child,o.child=v):(c=T.last,c!==null?c.sibling=v:o.child=v,T.last=v)}return T.tail!==null?(o=T.tail,T.rendering=o,T.tail=o.sibling,T.renderingStartTime=Ut(),o.sibling=null,c=It.current,bt(It,h?c&1|2:c&1),o):(En(o),null);case 22:case 23:return o0(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Wn&1073741824)!==0&&(En(o),o.subtreeFlags&6&&(o.flags|=8192)):En(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function H7(i,o){switch(mm(o),o.tag){case 1:return Dn(o.type)&&Dc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return $o(),At(Ln),At(mn),Cm(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Am(o),null;case 13:if(At(It),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Uo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return At(It),null;case 4:return $o(),null;case 10:return wm(o.type._context),null;case 22:case 23:return o0(),null;case 24:return null;default:return null}}var td=!1,yn=!1,j7=typeof WeakSet=="function"?WeakSet:Set,Re=null;function qo(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Lt(i,o,h)}else c.current=null}function Gm(i,o,c){try{c()}catch(h){Lt(i,o,h)}}var a2=!1;function z7(i,o){if(om=wc,i=Ux(),Jp(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,T=h.focusNode;h=h.focusOffset;try{c.nodeType,T.nodeType}catch(we){c=null;break e}var v=0,B=-1,$=-1,te=0,Ee=0,Te=i,pe=null;t:for(;;){for(var Oe;Te!==c||E!==0&&Te.nodeType!==3||(B=v+E),Te!==T||h!==0&&Te.nodeType!==3||($=v+h),Te.nodeType===3&&(v+=Te.nodeValue.length),(Oe=Te.firstChild)!==null;)pe=Te,Te=Oe;for(;;){if(Te===i)break t;if(pe===c&&++te===E&&(B=v),pe===T&&++Ee===h&&($=v),(Oe=Te.nextSibling)!==null)break;Te=pe,pe=Te.parentNode}Te=Oe}c=B===-1||$===-1?null:{start:B,end:$}}else c=null}c=c||{start:0,end:0}}else c=null;for(am={focusedElem:i,selectionRange:c},wc=!1,Re=o;Re!==null;)if(o=Re,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Re=i;else for(;Re!==null;){o=Re;try{var Le=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Le!==null){var De=Le.memoizedProps,Ht=Le.memoizedState,G=o.stateNode,q=G.getSnapshotBeforeUpdate(o.elementType===o.type?De:yr(o.type,De),Ht);G.__reactInternalSnapshotBeforeUpdate=q}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){Lt(o,o.return,we)}if(i=o.sibling,i!==null){i.return=o.return,Re=i;break}Re=o.return}return Le=a2,a2=!1,Le}function Su(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 T=E.destroy;E.destroy=void 0,T!==void 0&&Gm(o,c,T)}E=E.next}while(E!==h)}}function nd(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 Xm(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 u2(i){var o=i.alternate;o!==null&&(i.alternate=null,u2(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Br],delete o[hu],delete o[dm],delete o[S7],delete o[v7])),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 l2(i){return i.tag===5||i.tag===3||i.tag===4}function c2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||l2(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 Km(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=Rc));else if(h!==4&&(i=i.child,i!==null))for(Km(i,o,c),i=i.sibling;i!==null;)Km(i,o,c),i=i.sibling}function Qm(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(Qm(i,o,c),i=i.sibling;i!==null;)Qm(i,o,c),i=i.sibling}var on=null,Tr=!1;function Di(i,o,c){for(c=c.child;c!==null;)d2(i,o,c),c=c.sibling}function d2(i,o,c){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(mc,c)}catch(B){}switch(c.tag){case 5:yn||qo(c,o);case 6:var h=on,E=Tr;on=null,Di(i,o,c),on=h,Tr=E,on!==null&&(Tr?(i=on,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):on.removeChild(c.stateNode));break;case 18:on!==null&&(Tr?(i=on,c=c.stateNode,i.nodeType===8?cm(i.parentNode,c):i.nodeType===1&&cm(i,c),nu(i)):cm(on,c.stateNode));break;case 4:h=on,E=Tr,on=c.stateNode.containerInfo,Tr=!0,Di(i,o,c),on=h,Tr=E;break;case 0:case 11:case 14:case 15:if(!yn&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,v=T.destroy;T=T.tag,v!==void 0&&((T&2)!==0||(T&4)!==0)&&Gm(c,o,v),E=E.next}while(E!==h)}Di(i,o,c);break;case 1:if(!yn&&(qo(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(B){Lt(c,o,B)}Di(i,o,c);break;case 21:Di(i,o,c);break;case 22:c.mode&1?(yn=(h=yn)||c.memoizedState!==null,Di(i,o,c),yn=h):Di(i,o,c);break;default:Di(i,o,c)}}function f2(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new j7),o.forEach(function(h){var E=Q7.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function br(i,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var T=i,v=o,B=v;e:for(;B!==null;){switch(B.tag){case 5:on=B.stateNode,Tr=!1;break e;case 3:on=B.stateNode.containerInfo,Tr=!0;break e;case 4:on=B.stateNode.containerInfo,Tr=!0;break e}B=B.return}if(on===null)throw Error(n(160));d2(T,v,E),on=null,Tr=!1;var $=E.alternate;$!==null&&($.return=null),E.return=null}catch(te){Lt(E,o,te)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)h2(o,i),o=o.sibling}function h2(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(br(o,i),jr(i),h&4){try{Su(3,i,i.return),nd(3,i)}catch(De){Lt(i,i.return,De)}try{Su(5,i,i.return)}catch(De){Lt(i,i.return,De)}}break;case 1:br(o,i),jr(i),h&512&&c!==null&&qo(c,c.return);break;case 5:if(br(o,i),jr(i),h&512&&c!==null&&qo(c,c.return),i.flags&32){var E=i.stateNode;try{ee(E,"")}catch(De){Lt(i,i.return,De)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,v=c!==null?c.memoizedProps:T,B=i.type,$=i.updateQueue;if(i.updateQueue=null,$!==null)try{B==="input"&&T.type==="radio"&&T.name!=null&&$e(E,T),$t(B,v);var te=$t(B,T);for(v=0;v<$.length;v+=2){var Ee=$[v],Te=$[v+1];Ee==="style"?ge(E,Te):Ee==="dangerouslySetInnerHTML"?et(E,Te):Ee==="children"?ee(E,Te):O(E,Ee,Te,te)}switch(B){case"input":St(E,T);break;case"textarea":gs(E,T);break;case"select":var pe=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Oe=T.value;Oe!=null?ot(E,!!T.multiple,Oe,!1):pe!==!!T.multiple&&(T.defaultValue!=null?ot(E,!!T.multiple,T.defaultValue,!0):ot(E,!!T.multiple,T.multiple?[]:"",!1))}E[hu]=T}catch(De){Lt(i,i.return,De)}}break;case 6:if(br(o,i),jr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(De){Lt(i,i.return,De)}}break;case 3:if(br(o,i),jr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{nu(o.containerInfo)}catch(De){Lt(i,i.return,De)}break;case 4:br(o,i),jr(i);break;case 13:br(o,i),jr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(e0=Ut())),h&4&&f2(i);break;case 22:if(Ee=c!==null&&c.memoizedState!==null,i.mode&1?(yn=(te=yn)||Ee,br(o,i),yn=te):br(o,i),jr(i),h&8192){if(te=i.memoizedState!==null,(i.stateNode.isHidden=te)&&!Ee&&(i.mode&1)!==0)for(Re=i,Ee=i.child;Ee!==null;){for(Te=Re=Ee;Re!==null;){switch(pe=Re,Oe=pe.child,pe.tag){case 0:case 11:case 14:case 15:Su(4,pe,pe.return);break;case 1:qo(pe,pe.return);var Le=pe.stateNode;if(typeof Le.componentWillUnmount=="function"){h=pe,c=pe.return;try{o=h,Le.props=o.memoizedProps,Le.state=o.memoizedState,Le.componentWillUnmount()}catch(De){Lt(h,c,De)}}break;case 5:qo(pe,pe.return);break;case 22:if(pe.memoizedState!==null){g2(Te);continue}}Oe!==null?(Oe.return=pe,Re=Oe):g2(Te)}Ee=Ee.sibling}e:for(Ee=null,Te=i;;){if(Te.tag===5){if(Ee===null){Ee=Te;try{E=Te.stateNode,te?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(B=Te.stateNode,$=Te.memoizedProps.style,v=$!=null&&$.hasOwnProperty("display")?$.display:null,B.style.display=Ae("display",v))}catch(De){Lt(i,i.return,De)}}}else if(Te.tag===6){if(Ee===null)try{Te.stateNode.nodeValue=te?"":Te.memoizedProps}catch(De){Lt(i,i.return,De)}}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;Ee===Te&&(Ee=null),Te=Te.return}Ee===Te&&(Ee=null),Te.sibling.return=Te.return,Te=Te.sibling}}break;case 19:br(o,i),jr(i),h&4&&f2(i);break;case 21:break;default:br(o,i),jr(i)}}function jr(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(l2(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&&(ee(E,""),h.flags&=-33);var T=c2(i);Qm(i,T,E);break;case 3:case 4:var v=h.stateNode.containerInfo,B=c2(i);Km(i,B,v);break;default:throw Error(n(161))}}catch($){Lt(i,i.return,$)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function $7(i,o,c){Re=i,p2(i)}function p2(i,o,c){for(var h=(i.mode&1)!==0;Re!==null;){var E=Re,T=E.child;if(E.tag===22&&h){var v=E.memoizedState!==null||td;if(!v){var B=E.alternate,$=B!==null&&B.memoizedState!==null||yn;B=td;var te=yn;if(td=v,(yn=$)&&!te)for(Re=E;Re!==null;)v=Re,$=v.child,v.tag===22&&v.memoizedState!==null?E2(E):$!==null?($.return=v,Re=$):E2(E);for(;T!==null;)Re=T,p2(T),T=T.sibling;Re=E,td=B,yn=te}m2(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Re=T):m2(i)}}function m2(i){for(;Re!==null;){var o=Re;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:yn||nd(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!yn)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:yr(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&g_(o,T,h);break;case 3:var v=o.updateQueue;if(v!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}g_(o,v,c)}break;case 5:var B=o.stateNode;if(c===null&&o.flags&4){c=B;var $=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&c.focus();break;case"img":$.src&&(c.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var te=o.alternate;if(te!==null){var Ee=te.memoizedState;if(Ee!==null){var Te=Ee.dehydrated;Te!==null&&nu(Te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}yn||o.flags&512&&Xm(o)}catch(pe){Lt(o,o.return,pe)}}if(o===i){Re=null;break}if(c=o.sibling,c!==null){c.return=o.return,Re=c;break}Re=o.return}}function g2(i){for(;Re!==null;){var o=Re;if(o===i){Re=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Re=c;break}Re=o.return}}function E2(i){for(;Re!==null;){var o=Re;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{nd(4,o)}catch($){Lt(o,c,$)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch($){Lt(o,E,$)}}var T=o.return;try{Xm(o)}catch($){Lt(o,T,$)}break;case 5:var v=o.return;try{Xm(o)}catch($){Lt(o,v,$)}}}catch($){Lt(o,o.return,$)}if(o===i){Re=null;break}var B=o.sibling;if(B!==null){B.return=o.return,Re=B;break}Re=o.return}}var V7=Math.ceil,rd=z.ReactCurrentDispatcher,Jm=z.ReactCurrentOwner,rr=z.ReactCurrentBatchConfig,ut=0,tn=null,Vt=null,an=0,Wn=0,Yo=Oi(0),Xt=0,vu=null,vs=0,id=0,Zm=0,Au=null,Fn=null,e0=0,Wo=1/0,oi=null,sd=!1,t0=null,Mi=null,od=!1,Fi=null,ad=0,ku=0,n0=null,ud=-1,ld=0;function Sn(){return(ut&6)!==0?Ut():ud!==-1?ud:ud=Ut()}function Bi(i){return(i.mode&1)===0?1:(ut&2)!==0&&an!==0?an&-an:k7.transition!==null?(ld===0&&(ld=cx()),ld):(i=mt,i!==0||(i=window.event,i=i===void 0?16:Tx(i.type)),i)}function wr(i,o,c,h){if(50<ku)throw ku=0,n0=null,Error(n(185));Qa(i,c,h),((ut&2)===0||i!==tn)&&(i===tn&&((ut&2)===0&&(id|=c),Xt===4&&Ui(i,an)),Bn(i,h),c===1&&ut===0&&(o.mode&1)===0&&(Wo=Ut()+500,Fc&&Pi()))}function Bn(i,o){var c=i.callbackNode;kB(i,o);var h=yc(i,i===tn?an:0);if(h===0)c!==null&&ax(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&ax(c),o===1)i.tag===0?A7(T2.bind(null,i)):i_(T2.bind(null,i)),x7(function(){(ut&6)===0&&Pi()}),c=null;else{switch(dx(h)){case 1:c=Dp;break;case 4:c=ux;break;case 16:c=pc;break;case 536870912:c=lx;break;default:c=pc}c=k2(c,y2.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function y2(i,o){if(ud=-1,ld=0,(ut&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Go()&&i.callbackNode!==c)return null;var h=yc(i,i===tn?an:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=cd(i,h);else{o=h;var E=ut;ut|=2;var T=w2();(tn!==i||an!==o)&&(oi=null,Wo=Ut()+500,ks(i,o));do try{W7();break}catch(B){b2(i,B)}while(!0);bm(),rd.current=T,ut=E,Vt!==null?o=0:(tn=null,an=0,o=Xt)}if(o!==0){if(o===2&&(E=Mp(i),E!==0&&(h=E,o=r0(i,E))),o===1)throw c=vu,ks(i,0),Ui(i,h),Bn(i,Ut()),c;if(o===6)Ui(i,h);else{if(E=i.current.alternate,(h&30)===0&&!q7(E)&&(o=cd(i,h),o===2&&(T=Mp(i),T!==0&&(h=T,o=r0(i,T))),o===1))throw c=vu,ks(i,0),Ui(i,h),Bn(i,Ut()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Cs(i,Fn,oi);break;case 3:if(Ui(i,h),(h&130023424)===h&&(o=e0+500-Ut(),10<o)){if(yc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){Sn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=lm(Cs.bind(null,i,Fn,oi),o);break}Cs(i,Fn,oi);break;case 4:if(Ui(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var v=31-mr(h);T=1<<v,v=o[v],v>E&&(E=v),h&=~T}if(h=E,h=Ut()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*V7(h/1960))-h,10<h){i.timeoutHandle=lm(Cs.bind(null,i,Fn,oi),h);break}Cs(i,Fn,oi);break;case 5:Cs(i,Fn,oi);break;default:throw Error(n(329))}}}return Bn(i,Ut()),i.callbackNode===c?y2.bind(null,i):null}function r0(i,o){var c=Au;return i.current.memoizedState.isDehydrated&&(ks(i,o).flags|=256),i=cd(i,o),i!==2&&(o=Fn,Fn=c,o!==null&&i0(o)),i}function i0(i){Fn===null?Fn=i:Fn.push.apply(Fn,i)}function q7(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],T=E.getSnapshot;E=E.value;try{if(!gr(T(),E))return!1}catch(v){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 Ui(i,o){for(o&=~Zm,o&=~id,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-mr(o),h=1<<c;i[c]=-1,o&=~h}}function T2(i){if((ut&6)!==0)throw Error(n(327));Go();var o=yc(i,0);if((o&1)===0)return Bn(i,Ut()),null;var c=cd(i,o);if(i.tag!==0&&c===2){var h=Mp(i);h!==0&&(o=h,c=r0(i,h))}if(c===1)throw c=vu,ks(i,0),Ui(i,o),Bn(i,Ut()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Cs(i,Fn,oi),Bn(i,Ut()),null}function s0(i,o){var c=ut;ut|=1;try{return i(o)}finally{ut=c,ut===0&&(Wo=Ut()+500,Fc&&Pi())}}function As(i){Fi!==null&&Fi.tag===0&&(ut&6)===0&&Go();var o=ut;ut|=1;var c=rr.transition,h=mt;try{if(rr.transition=null,mt=1,i)return i()}finally{mt=h,rr.transition=c,ut=o,(ut&6)===0&&Pi()}}function o0(){Wn=Yo.current,At(Yo)}function ks(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,w7(c)),Vt!==null)for(c=Vt.return;c!==null;){var h=c;switch(mm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Dc();break;case 3:$o(),At(Ln),At(mn),Cm();break;case 5:Am(h);break;case 4:$o();break;case 13:At(It);break;case 19:At(It);break;case 10:wm(h.type._context);break;case 22:case 23:o0()}c=c.return}if(tn=i,Vt=i=Hi(i.current,null),an=Wn=o,Xt=0,vu=null,Zm=id=vs=0,Fn=Au=null,xs!==null){for(o=0;o<xs.length;o++)if(c=xs[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,T=c.pending;if(T!==null){var v=T.next;T.next=E,h.next=v}c.pending=h}xs=null}return i}function b2(i,o){do{var c=Vt;try{if(bm(),Wc.current=Qc,Gc){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Gc=!1}if(Ss=0,en=Gt=Pt=null,Tu=!1,bu=0,Jm.current=null,c===null||c.return===null){Xt=1,vu=o,Vt=null;break}e:{var T=i,v=c.return,B=c,$=o;if(o=an,B.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var te=$,Ee=B,Te=Ee.tag;if((Ee.mode&1)===0&&(Te===0||Te===11||Te===15)){var pe=Ee.alternate;pe?(Ee.updateQueue=pe.updateQueue,Ee.memoizedState=pe.memoizedState,Ee.lanes=pe.lanes):(Ee.updateQueue=null,Ee.memoizedState=null)}var Oe=q_(v);if(Oe!==null){Oe.flags&=-257,Y_(Oe,v,B,T,o),Oe.mode&1&&V_(T,te,o),o=Oe,$=te;var Le=o.updateQueue;if(Le===null){var De=new Set;De.add($),o.updateQueue=De}else Le.add($);break e}else{if((o&1)===0){V_(T,te,o),a0();break e}$=Error(n(426))}}else if(Ot&&B.mode&1){var Ht=q_(v);if(Ht!==null){(Ht.flags&65536)===0&&(Ht.flags|=256),Y_(Ht,v,B,T,o),ym(Vo($,B));break e}}T=$=Vo($,B),Xt!==4&&(Xt=2),Au===null?Au=[T]:Au.push(T),T=v;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var G=z_(T,$,o);m_(T,G);break e;case 1:B=$;var q=T.type,Q=T.stateNode;if((T.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(Mi===null||!Mi.has(Q)))){T.flags|=65536,o&=-o,T.lanes|=o;var we=$_(T,B,o);m_(T,we);break e}}T=T.return}while(T!==null)}_2(c)}catch(Be){o=Be,Vt===c&&c!==null&&(Vt=c=c.return);continue}break}while(!0)}function w2(){var i=rd.current;return rd.current=Qc,i===null?Qc:i}function a0(){(Xt===0||Xt===3||Xt===2)&&(Xt=4),tn===null||(vs&268435455)===0&&(id&268435455)===0||Ui(tn,an)}function cd(i,o){var c=ut;ut|=2;var h=w2();(tn!==i||an!==o)&&(oi=null,ks(i,o));do try{Y7();break}catch(E){b2(i,E)}while(!0);if(bm(),ut=c,rd.current=h,Vt!==null)throw Error(n(261));return tn=null,an=0,Xt}function Y7(){for(;Vt!==null;)x2(Vt)}function W7(){for(;Vt!==null&&!yB();)x2(Vt)}function x2(i){var o=A2(i.alternate,i,Wn);i.memoizedProps=i.pendingProps,o===null?_2(i):Vt=o,Jm.current=null}function _2(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=U7(c,o,Wn),c!==null){Vt=c;return}}else{if(c=H7(c,o),c!==null){c.flags&=32767,Vt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Xt=6,Vt=null;return}}if(o=o.sibling,o!==null){Vt=o;return}Vt=o=i}while(o!==null);Xt===0&&(Xt=5)}function Cs(i,o,c){var h=mt,E=rr.transition;try{rr.transition=null,mt=1,G7(i,o,c,h)}finally{rr.transition=E,mt=h}return null}function G7(i,o,c,h){do Go();while(Fi!==null);if((ut&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 T=c.lanes|c.childLanes;if(CB(i,T),i===tn&&(Vt=tn=null,an=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||od||(od=!0,k2(pc,function(){return Go(),null})),T=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||T){T=rr.transition,rr.transition=null;var v=mt;mt=1;var B=ut;ut|=4,Jm.current=null,z7(i,c),h2(c,i),p7(am),wc=!!om,am=om=null,i.current=c,$7(c),TB(),ut=B,mt=v,rr.transition=T}else i.current=c;if(od&&(od=!1,Fi=i,ad=E),T=i.pendingLanes,T===0&&(Mi=null),xB(c.stateNode),Bn(i,Ut()),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(sd)throw sd=!1,i=t0,t0=null,i;return(ad&1)!==0&&i.tag!==0&&Go(),T=i.pendingLanes,(T&1)!==0?i===n0?ku++:(ku=0,n0=i):ku=0,Pi(),null}function Go(){if(Fi!==null){var i=dx(ad),o=rr.transition,c=mt;try{if(rr.transition=null,mt=16>i?16:i,Fi===null)var h=!1;else{if(i=Fi,Fi=null,ad=0,(ut&6)!==0)throw Error(n(331));var E=ut;for(ut|=4,Re=i.current;Re!==null;){var T=Re,v=T.child;if((Re.flags&16)!==0){var B=T.deletions;if(B!==null){for(var $=0;$<B.length;$++){var te=B[$];for(Re=te;Re!==null;){var Ee=Re;switch(Ee.tag){case 0:case 11:case 15:Su(8,Ee,T)}var Te=Ee.child;if(Te!==null)Te.return=Ee,Re=Te;else for(;Re!==null;){Ee=Re;var pe=Ee.sibling,Oe=Ee.return;if(u2(Ee),Ee===te){Re=null;break}if(pe!==null){pe.return=Oe,Re=pe;break}Re=Oe}}}var Le=T.alternate;if(Le!==null){var De=Le.child;if(De!==null){Le.child=null;do{var Ht=De.sibling;De.sibling=null,De=Ht}while(De!==null)}}Re=T}}if((T.subtreeFlags&2064)!==0&&v!==null)v.return=T,Re=v;else e:for(;Re!==null;){if(T=Re,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:Su(9,T,T.return)}var G=T.sibling;if(G!==null){G.return=T.return,Re=G;break e}Re=T.return}}var q=i.current;for(Re=q;Re!==null;){v=Re;var Q=v.child;if((v.subtreeFlags&2064)!==0&&Q!==null)Q.return=v,Re=Q;else e:for(v=q;Re!==null;){if(B=Re,(B.flags&2048)!==0)try{switch(B.tag){case 0:case 11:case 15:nd(9,B)}}catch(Be){Lt(B,B.return,Be)}if(B===v){Re=null;break e}var we=B.sibling;if(we!==null){we.return=B.return,Re=we;break e}Re=B.return}}if(ut=E,Pi(),Fr&&typeof Fr.onPostCommitFiberRoot=="function")try{Fr.onPostCommitFiberRoot(mc,i)}catch(Be){}h=!0}return h}finally{mt=c,rr.transition=o}}return!1}function S2(i,o,c){o=Vo(c,o),o=z_(i,o,1),i=Li(i,o,1),o=Sn(),i!==null&&(Qa(i,1,o),Bn(i,o))}function Lt(i,o,c){if(i.tag===3)S2(i,i,c);else for(;o!==null;){if(o.tag===3){S2(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Mi===null||!Mi.has(h))){i=Vo(c,i),i=$_(o,i,1),o=Li(o,i,1),i=Sn(),o!==null&&(Qa(o,1,i),Bn(o,i));break}}o=o.return}}function X7(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=Sn(),i.pingedLanes|=i.suspendedLanes&c,tn===i&&(an&c)===c&&(Xt===4||Xt===3&&(an&130023424)===an&&500>Ut()-e0?ks(i,0):Zm|=c),Bn(i,o)}function v2(i,o){o===0&&((i.mode&1)===0?o=1:(o=Ec,Ec<<=1,(Ec&130023424)===0&&(Ec=4194304)));var c=Sn();i=ri(i,o),i!==null&&(Qa(i,o,c),Bn(i,c))}function K7(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),v2(i,c)}function Q7(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),v2(i,c)}var A2;A2=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||Ln.current)Mn=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return Mn=!1,B7(i,o,c);Mn=(i.flags&131072)!==0}else Mn=!1,Ot&&(o.flags&1048576)!==0&&s_(o,Uc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;ed(i,o),i=o.pendingProps;var E=Mo(o,mn.current);zo(o,c),E=Im(null,o,h,i,E,c);var T=Pm();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,Dn(h)?(T=!0,Mc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Sm(o),E.updater=Jc,o.stateNode=E,E._reactInternals=o,Bm(o,h,i,c),o=zm(null,o,h,!0,T,c)):(o.tag=0,Ot&&T&&pm(o),_n(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(ed(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=Z7(h),i=yr(h,i),E){case 0:o=jm(null,o,h,i,c);break e;case 1:o=J_(null,o,h,i,c);break e;case 11:o=W_(null,o,h,i,c);break e;case 14:o=G_(null,o,h,yr(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:yr(h,E),jm(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:yr(h,E),J_(i,o,h,E,c);case 3:e:{if(Z_(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,p_(i,o),qc(o,h,null,c);var v=o.memoizedState;if(h=v.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){E=Vo(Error(n(423)),o),o=e2(i,o,h,c,E);break e}else if(h!==E){E=Vo(Error(n(424)),o),o=e2(i,o,h,c,E);break e}else for(Yn=Ni(o.stateNode.containerInfo.firstChild),qn=o,Ot=!0,Er=null,c=f_(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Uo(),h===E){o=si(i,o,c);break e}_n(i,o,h,c)}o=o.child}return o;case 5:return E_(o),i===null&&Em(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,v=E.children,um(h,E)?v=null:T!==null&&um(h,T)&&(o.flags|=32),Q_(i,o),_n(i,o,v,c),o.child;case 6:return i===null&&Em(o),null;case 13:return t2(i,o,c);case 4:return vm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Ho(o,null,h,c):_n(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:yr(h,E),W_(i,o,h,E,c);case 7:return _n(i,o,o.pendingProps,c),o.child;case 8:return _n(i,o,o.pendingProps.children,c),o.child;case 12:return _n(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,T=o.memoizedProps,v=E.value,bt(zc,h._currentValue),h._currentValue=v,T!==null)if(gr(T.value,v)){if(T.children===E.children&&!Ln.current){o=si(i,o,c);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var B=T.dependencies;if(B!==null){v=T.child;for(var $=B.firstContext;$!==null;){if($.context===h){if(T.tag===1){$=ii(-1,c&-c),$.tag=2;var te=T.updateQueue;if(te!==null){te=te.shared;var Ee=te.pending;Ee===null?$.next=$:($.next=Ee.next,Ee.next=$),te.pending=$}}T.lanes|=c,$=T.alternate,$!==null&&($.lanes|=c),xm(T.return,c,o),B.lanes|=c;break}$=$.next}}else if(T.tag===10)v=T.type===o.type?null:T.child;else if(T.tag===18){if(v=T.return,v===null)throw Error(n(341));v.lanes|=c,B=v.alternate,B!==null&&(B.lanes|=c),xm(v,c,o),v=T.sibling}else v=T.child;if(v!==null)v.return=T;else for(v=T;v!==null;){if(v===o){v=null;break}if(T=v.sibling,T!==null){T.return=v.return,v=T;break}v=v.return}T=v}_n(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,zo(o,c),E=tr(E),h=h(E),o.flags|=1,_n(i,o,h,c),o.child;case 14:return h=o.type,E=yr(h,o.pendingProps),E=yr(h.type,E),G_(i,o,h,E,c);case 15:return X_(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:yr(h,E),ed(i,o),o.tag=1,Dn(h)?(i=!0,Mc(o)):i=!1,zo(o,c),H_(o,h,E),Bm(o,h,E,c),zm(null,o,h,!0,i,c);case 19:return r2(i,o,c);case 22:return K_(i,o,c)}throw Error(n(156,o.tag))};function k2(i,o){return ox(i,o)}function J7(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 ir(i,o,c,h){return new J7(i,o,c,h)}function u0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Z7(i){if(typeof i=="function")return u0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ie)return 11;if(i===ne)return 14}return 2}function Hi(i,o){var c=i.alternate;return c===null?(c=ir(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 dd(i,o,c,h,E,T){var v=2;if(h=i,typeof i=="function")u0(i)&&(v=1);else if(typeof i=="string")v=5;else e:switch(i){case V:return Ns(c.children,E,T,o);case K:v=8,E|=8;break;case ae:return i=ir(12,c,o,E|2),i.elementType=ae,i.lanes=T,i;case ce:return i=ir(13,c,o,E),i.elementType=ce,i.lanes=T,i;case fe:return i=ir(19,c,o,E),i.elementType=fe,i.lanes=T,i;case de:return fd(c,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case j:v=10;break e;case se:v=9;break e;case ie:v=11;break e;case ne:v=14;break e;case Se:v=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=ir(v,c,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function Ns(i,o,c,h){return i=ir(7,i,h,o),i.lanes=c,i}function fd(i,o,c,h){return i=ir(22,i,h,o),i.elementType=de,i.lanes=c,i.stateNode={isHidden:!1},i}function l0(i,o,c){return i=ir(6,i,null,o),i.lanes=c,i}function c0(i,o,c){return o=ir(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function eU(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=Fp(0),this.expirationTimes=Fp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function d0(i,o,c,h,E,T,v,B,$){return i=new eU(i,o,c,B,$),o===1?(o=1,T===!0&&(o|=8)):o=0,T=ir(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sm(T),i}function tU(i,o,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:o,implementation:c}}function C2(i){if(!i)return Ii;i=i._reactInternals;e:{if(Es(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(Dn(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(Dn(c))return n_(i,c,o)}return o}function N2(i,o,c,h,E,T,v,B,$){return i=d0(c,h,!0,i,E,T,v,B,$),i.context=C2(null),c=i.current,h=Sn(),E=Bi(c),T=ii(h,E),T.callback=o!=null?o:null,Li(c,T,E),i.current.lanes=E,Qa(i,E,h),Bn(i,h),i}function hd(i,o,c,h){var E=o.current,T=Sn(),v=Bi(E);return c=C2(c),o.context===null?o.context=c:o.pendingContext=c,o=ii(T,v),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Li(E,o,v),i!==null&&(wr(i,E,v,T),Vc(i,E,v)),v}function pd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function O2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function f0(i,o){O2(i,o),(i=i.alternate)&&O2(i,o)}function nU(){return null}var I2=typeof reportError=="function"?reportError:function(i){console.error(i)};function h0(i){this._internalRoot=i}md.prototype.render=h0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));hd(i,o,null,null)},md.prototype.unmount=h0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;As(function(){hd(null,i,null,null)}),o[Zr]=null}};function md(i){this._internalRoot=i}md.prototype.unstable_scheduleHydration=function(i){if(i){var o=px();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Ai.length&&o!==0&&o<Ai[c].priority;c++);Ai.splice(c,0,i),c===0&&Ex(i)}};function p0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function gd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function P2(){}function rU(i,o,c,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var te=pd(v);T.call(te)}}var v=N2(o,h,i,0,null,!1,!1,"",P2);return i._reactRootContainer=v,i[Zr]=v.current,du(i.nodeType===8?i.parentNode:i),As(),v}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var B=h;h=function(){var te=pd($);B.call(te)}}var $=d0(i,0,!1,null,null,!1,!1,"",P2);return i._reactRootContainer=$,i[Zr]=$.current,du(i.nodeType===8?i.parentNode:i),As(function(){hd(o,$,c,h)}),$}function Ed(i,o,c,h,E){var T=c._reactRootContainer;if(T){var v=T;if(typeof E=="function"){var B=E;E=function(){var $=pd(v);B.call($)}}hd(o,v,i,E)}else v=rU(c,o,i,E,h);return pd(v)}fx=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=Ka(o.pendingLanes);c!==0&&(Bp(o,c|1),Bn(o,Ut()),(ut&6)===0&&(Wo=Ut()+500,Pi()))}break;case 13:As(function(){var h=ri(i,1);if(h!==null){var E=Sn();wr(h,i,1,E)}}),f0(i,1)}},Up=function(i){if(i.tag===13){var o=ri(i,134217728);if(o!==null){var c=Sn();wr(o,i,134217728,c)}f0(i,134217728)}},hx=function(i){if(i.tag===13){var o=Bi(i),c=ri(i,o);if(c!==null){var h=Sn();wr(c,i,o,h)}f0(i,o)}},px=function(){return mt},mx=function(i,o){var c=mt;try{return mt=i,o()}finally{mt=c}},vo=function(i,o,c){switch(o){case"input":if(St(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=Lc(h);if(!E)throw Error(n(90));Ft(h),St(h,E)}}}break;case"textarea":gs(i,c);break;case"select":o=c.value,o!=null&&ot(i,!!c.multiple,o,!1)}},Zw=s0,ex=As;var iU={usingClientEntryPoint:!1,Events:[pu,Lo,Lc,Qw,Jw,s0]},Cu={findFiberByHostInstance:ys,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},sU={bundleType:Cu.bundleType,version:Cu.version,rendererPackageName:Cu.rendererPackageName,rendererConfig:Cu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:z.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=ix(i),i===null?null:i.stateNode},findFiberByHostInstance:Cu.findFiberByHostInstance||nU,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 yd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yd.isDisabled&&yd.supportsFiber)try{mc=yd.inject(sU),Fr=yd}catch(i){}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iU,Cn.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p0(o))throw Error(n(200));return tU(i,o,null,c)},Cn.createRoot=function(i,o){if(!p0(i))throw Error(n(299));var c=!1,h="",E=I2;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=d0(i,1,!1,null,null,c,!1,h,E),i[Zr]=o.current,du(i.nodeType===8?i.parentNode:i),new h0(o)},Cn.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=ix(o),i=i===null?null:i.stateNode,i},Cn.flushSync=function(i){return As(i)},Cn.hydrate=function(i,o,c){if(!gd(o))throw Error(n(200));return Ed(null,i,o,!0,c)},Cn.hydrateRoot=function(i,o,c){if(!p0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,T="",v=I2;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(T=c.identifierPrefix),c.onRecoverableError!==void 0&&(v=c.onRecoverableError)),o=N2(o,null,i,1,c!=null?c:null,E,!1,T,v),i[Zr]=o.current,du(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 md(o)},Cn.render=function(i,o,c){if(!gd(o))throw Error(n(200));return Ed(null,i,o,!1,c)},Cn.unmountComponentAtNode=function(i){if(!gd(i))throw Error(n(40));return i._reactRootContainer?(As(function(){Ed(null,null,i,!1,function(){i._reactRootContainer=null,i[Zr]=null})}),!0):!1},Cn.unstable_batchedUpdates=s0,Cn.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!gd(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Ed(i,o,c,!1,h)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var m1;function g1(){if(m1)return bf.exports;m1=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(),bf.exports=dC(),bf.exports}var $s=g1();function E1(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=E1(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=E1(e))&&(r&&(r+=" "),r+=t);return r}var y1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},T1=$i.createContext&&$i.createContext(y1),fC=["attr","size","title"];function hC(e,t){if(e==null)return{};var n=pC(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 pC(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 ol(){return ol=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},ol.apply(this,arguments)}function b1(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 al(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b1(Object(n),!0).forEach(function(r){mC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mC(e,t,n){return t=gC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gC(e){var t=EC(e,"string");return typeof t=="symbol"?t:t+""}function EC(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 w1(e){return e&&e.map((t,n)=>$i.createElement(t.tag,al({key:n},t.attr),w1(t.child)))}function pt(e){return t=>$i.createElement(yC,ol({attr:al({},e.attr)},t),w1(e.child))}function yC(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=hC(e,fC),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),$i.createElement("svg",ol({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:al(al({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&$i.createElement("title",null,a),e.children)};return T1!==void 0?$i.createElement(T1.Consumer,null,n=>t(n)):t(y1)}function TC(e){return pt({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 bC(e){return pt({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 wC(e){return pt({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 lr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:w.jsx("button",{className:F(e,`${N}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?w.jsx("img",{className:F(`${N}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),xC="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",_C=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ct(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?w.jsx(wC,{className:F(t,`${N}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||xC,alt:"Copilot",className:F(t,`${N}-minimized-icon-img`)});return w.jsx(lr,{className:F(t,`${N}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},SC=()=>{const{globalClassName:e,themeVariables:t}=ct(),n=()=>{Ls(!1),$r(!0)};return $s.createPortal(w.jsx("div",{className:F(e,`${N}-minimized-container`),style:t,children:w.jsx(_C,{onClick:n})}),document.body)};function vC(e){return pt({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 bn(){const e=R.useContext($g);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const AC=e=>({[`${Un}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Un}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Un}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Un}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Un}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Un}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function x1(e){return pt({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 kC(e){return pt({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 _f(e){return pt({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 CC(e){return pt({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 NC(e){return pt({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 OC(e){return pt({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 _1(e){return pt({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 S1(e){return pt({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 IC(e){return pt({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 PC(e){return pt({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 RC(e){return pt({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 v1(e){return pt({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 Sf=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>w.jsx("button",{className:F(`${N}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),LC=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:F(`${N}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(_f,{size:"16px"})},DC=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(lr,{className:F(e,n,`cim-${r}-component`,`${N}-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:w.jsx(_f,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(Sf,{className:F(e,n,`cim-${r}-component`,`${N}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&w.jsx(LC,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function DU(){}function MU(){}function A1(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 k1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const MC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BC={};function C1(e,t){return(BC.jsx?FC:MC).test(e)}const UC=/[ \t\n\f\r]/g;function HC(e){return typeof e=="object"?e.type==="text"?N1(e.value):!1:N1(e)}function N1(e){return e.replace(UC,"")===""}class ca{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ca.prototype.normal={},ca.prototype.property={},ca.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 ca(n,r,t)}function da(e){return e.toLowerCase()}class Nn{constructor(t,n){this.attribute=n,this.property=t}}Nn.prototype.attribute="",Nn.prototype.booleanish=!1,Nn.prototype.boolean=!1,Nn.prototype.commaOrSpaceSeparated=!1,Nn.prototype.commaSeparated=!1,Nn.prototype.defined=!1,Nn.prototype.mustUseProperty=!1,Nn.prototype.number=!1,Nn.prototype.overloadedBoolean=!1,Nn.prototype.property="",Nn.prototype.spaceSeparated=!1,Nn.prototype.space=void 0;let jC=0;const Ze=Zi(),zt=Zi(),vf=Zi(),be=Zi(),Et=Zi(),Ji=Zi(),jn=Zi();function Zi(){return bd(2,++jC)}const Af=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ze,booleanish:zt,commaOrSpaceSeparated:jn,commaSeparated:Ji,number:be,overloadedBoolean:vf,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),kf=Object.keys(Af);class Cf extends Nn{constructor(t,n,r,s){let a=-1;if(super(t,n),I1(this,"space",s),typeof r=="number")for(;++a<kf.length;){const u=kf[a];I1(this,kf[a],(r&Af[u])===Af[u])}}}Cf.prototype.defined=!0;function I1(e,t,n){n&&(e[t]=n)}function Vs(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Cf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[da(r)]=r,n[da(a.attribute)]=r}return new ca(t,n,e.space)}const P1=Vs({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:Et,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:be,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:Et,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:zt,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 R1(e,t){return t in e?e[t]:t}function L1(e,t){return R1(e,t.toLowerCase())}const zC=Vs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ji,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Ze,allowPaymentRequest:Ze,allowUserMedia:Ze,alpha:Ze,alt:null,as:null,async:Ze,autoCapitalize:null,autoComplete:Et,autoFocus:Ze,autoPlay:Ze,blocking:Et,capture:null,charSet:null,checked:Ze,cite:null,className:Et,closedBy:null,colorSpace:null,cols:be,colSpan:be,command:null,commandFor:null,content:null,contentEditable:zt,controls:Ze,controlsList:Et,coords:be|Ji,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ze,defer:Ze,dir:null,dirName:null,disabled:Ze,download:vf,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ze,formTarget:null,headers:Et,height:be,hidden:vf,high:be,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Ze,inputMode:null,integrity:null,is:null,isMap:Ze,itemId:null,itemProp:Et,itemRef:Et,itemScope:Ze,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ze,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Ze,muted:Ze,name:null,nonce:null,noModule:Ze,noValidate:Ze,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:Ze,optimum:be,pattern:null,ping:Et,placeholder:null,playsInline:Ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ze,referrerPolicy:null,rel:Et,required:Ze,reversed:Ze,rows:be,rowSpan:be,sandbox:Et,scope:null,scoped:Ze,seamless:Ze,selected:Ze,shadowRootClonable:Ze,shadowRootCustomElementRegistry:Ze,shadowRootDelegatesFocus:Ze,shadowRootMode:null,shadowRootSerializable:Ze,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:zt,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:Ze,useMap:null,value:zt,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,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:Ze,declare:Ze,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Ze,noHref:Ze,noShade:Ze,noWrap:Ze,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:zt,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:Ze,disablePictureInPicture:Ze,disableRemotePlayback:Ze,exportParts:Ji,part:Et,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:L1}),$C=Vs({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:jn,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:Et,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:Ze,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:Ji,g2:Ji,glyphName:Ji,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:jn,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:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant: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:jn,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:jn,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:jn,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:R1}),D1=Vs({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()}}),M1=Vs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:L1}),F1=Vs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),VC={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"},qC=/[A-Z]/g,B1=/-[a-z]/g,YC=/^data[-\w.:]+$/i;function ul(e,t){const n=da(t);let r=t,s=Nn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&YC.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(B1,GC);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!B1.test(a)){let u=a.replace(qC,WC);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=Cf}return new s(r,t)}function WC(e){return"-"+e.toLowerCase()}function GC(e){return e.charAt(1).toUpperCase()}const fa=O1([P1,zC,D1,M1,F1],"html"),di=O1([P1,$C,D1,M1,F1],"svg");function U1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function H1(e){return e.join(" ").trim()}var qs={},Nf,j1;function XC(){if(j1)return Nf;j1=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="/",m="*",p="",b="comment",y="declaration";function x(A,_){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];_=_||{};var C=1,O=1;function z(fe){var ne=fe.match(t);ne&&(C+=ne.length);var Se=fe.lastIndexOf(d);O=~Se?fe.length-Se:O+fe.length}function W(){var fe={line:C,column:O};return function(ne){return ne.position=new D(fe),ae(),ne}}function D(fe){this.start=fe,this.end={line:C,column:O},this.source=_.source}D.prototype.content=A;function V(fe){var ne=new Error(_.source+":"+C+":"+O+": "+fe);if(ne.reason=fe,ne.filename=_.source,ne.line=C,ne.column=O,ne.source=A,!_.silent)throw ne}function K(fe){var ne=fe.exec(A);if(ne){var Se=ne[0];return z(Se),A=A.slice(Se.length),ne}}function ae(){K(n)}function j(fe){var ne;for(fe=fe||[];ne=se();)ne!==!1&&fe.push(ne);return fe}function se(){var fe=W();if(!(f!=A.charAt(0)||m!=A.charAt(1))){for(var ne=2;p!=A.charAt(ne)&&(m!=A.charAt(ne)||f!=A.charAt(ne+1));)++ne;if(ne+=2,p===A.charAt(ne-1))return V("End of comment missing");var Se=A.slice(2,ne-2);return O+=2,z(Se),A=A.slice(ne),O+=2,fe({type:b,comment:Se})}}function ie(){var fe=W(),ne=K(r);if(ne){if(se(),!K(s))return V("property missing ':'");var Se=K(a),de=fe({type:y,property:S(ne[0].replace(e,p)),value:Se?S(Se[0].replace(e,p)):p});return K(u),de}}function ce(){var fe=[];j(fe);for(var ne;ne=ie();)ne!==!1&&(fe.push(ne),j(fe));return fe}return ae(),ce()}function S(A){return A?A.replace(l,p):p}return Nf=x,Nf}var z1;function KC(){if(z1)return qs;z1=1;var e=qs&&qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qs,"__esModule",{value:!0}),qs.default=n;const t=e(XC());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:m}=d;l?s(f,m,d):m&&(a=a||{},a[f]=m)}),a}return qs}var ha={},$1;function QC(){if($1)return ha;$1=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.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,m){return m.toUpperCase()},l=function(f,m){return"".concat(m,"-")},d=function(f,m){return m===void 0&&(m={}),a(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(s,l):f=f.replace(r,l),f.replace(t,u))};return ha.camelCase=d,ha}var pa,V1;function JC(){if(V1)return pa;V1=1;var e=pa&&pa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(KC()),n=QC();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,pa=r,pa}var ZC=JC();const eN=rt(ZC),ll=q1("end"),vr=q1("start");function q1(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 Y1(e){const t=vr(e),n=ll(e);if(t&&n)return{start:t,end:n}}function ma(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?Of(e):""}function Of(e){return G1(e&&e.line)+":"+G1(e&&e.column)}function W1(e){return Of(e&&e.start)+"-"+Of(e&&e.end)}function G1(e){return e&&typeof e=="number"?e:1}class cn 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=ma(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}}cn.prototype.file="",cn.prototype.name="",cn.prototype.reason="",cn.prototype.message="",cn.prototype.stack="",cn.prototype.column=void 0,cn.prototype.line=void 0,cn.prototype.ancestors=void 0,cn.prototype.cause=void 0,cn.prototype.fatal=void 0,cn.prototype.place=void 0,cn.prototype.ruleId=void 0,cn.prototype.source=void 0;const If={}.hasOwnProperty,tN=new Map,nN=/[A-Z]/g,rN=new Set(["table","tbody","thead","tfoot","tr"]),iN=new Set(["td","th"]),X1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sN(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=hN(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=fN(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"?di:fa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=K1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function K1(e,t,n){if(t.type==="element")return oN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return aN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return lN(e,t,n);if(t.type==="mdxjsEsm")return uN(e,t);if(t.type==="root")return cN(e,t,n);if(t.type==="text")return dN(e,t)}function oN(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=di,e.schema=s),e.ancestors.push(t);const a=J1(e,t.tagName,!1),u=pN(e,t);let l=Rf(e,t);return rN.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!HC(d):!0})),Q1(e,u,a,t),Pf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function aN(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)}ga(e,t.position)}function uN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ga(e,t.position)}function lN(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=di,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:J1(e,t.name,!0),u=mN(e,t),l=Rf(e,t);return Q1(e,u,a,t),Pf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function cN(e,t,n){const r={};return Pf(r,Rf(e,t)),e.create(t,e.Fragment,r,n)}function dN(e,t){return t.value}function Q1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Pf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function fN(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 hN(e,t){return n;function n(r,s,a,u){const l=Array.isArray(a.children),d=vr(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 pN(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&If.call(t.properties,s)){const a=gN(e,s,t.properties[s]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&iN.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 mN(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 ga(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 ga(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Rf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:tN;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=K1(e,a,u);l!==void 0&&n.push(l)}return n}function gN(e,t,n){const r=ul(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?k1(n):H1(n)),r.property==="style"){let s=typeof n=="object"?n:EN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=yN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?VC[r.property]||r.property:r.attribute,n]}}function EN(e,t){try{return eN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new cn("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=X1+"#cannot-parse-style-attribute",s}}function J1(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=C1(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=C1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return If.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);ga(e)}function ga(e,t){const n=new cn("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=X1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function yN(e){const t={};let n;for(n in e)If.call(e,n)&&(t[TN(n)]=e[n]);return t}function TN(e){let t=e.replace(nN,bN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function bN(e){return"-"+e.toLowerCase()}const Lf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},wN={};function Df(e,t){const n=wN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Z1(e,r,s)}function Z1(e,t,n){if(xN(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 eE(e.children,t,n)}return Array.isArray(e)?eE(e,t,n):""}function eE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=Z1(e[s],t,n);return r.join("")}function xN(e){return!!(e&&typeof e=="object")}const tE=document.createElement("i");function Mf(e){const t="&"+e+";";tE.innerHTML=t;const n=tE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zn(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 Xn(e,t){return e.length>0?(zn(e,e.length,0,t),e):t}const nE={}.hasOwnProperty;function rE(e){const t={};let n=-1;for(;++n<e.length;)_N(t,e[n]);return t}function _N(e,t){let n;for(n in t){const s=(nE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){nE.call(s,u)||(s[u]=[]);const l=a[u];SN(s[u],Array.isArray(l)?l:l?[l]:[])}}}function SN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);zn(e,0,0,r)}function iE(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 cr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wn=fi(/[A-Za-z]/),dn=fi(/[\dA-Za-z]/),vN=fi(/[#-'*+\--9=?A-Z^-~]/);function cl(e){return e!==null&&(e<32||e===127)}const Ff=fi(/\d/),AN=fi(/[\dA-Fa-f]/),kN=fi(/[!-/:-@[-`{-~]/);function qe(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const dl=fi(new RegExp("\\p{P}|\\p{S}","u")),es=fi(/\s/);function fi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ys(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&dn(e.charCodeAt(n+1))&&dn(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 at(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return it(d)?(e.enter(n),l(d)):t(d)}function l(d){return it(d)&&a++<s?(e.consume(d),l):(e.exit(n),t(d))}}const CN={tokenize:NN};function NN(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"),at(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 qe(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const ON={tokenize:IN},sE={tokenize:PN};function IN(e){const t=this,n=[];let r=0,s,a,u;return l;function l(O){if(r<n.length){const z=n[r];return t.containerState=z[1],e.attempt(z[0].continuation,d,f)(O)}return f(O)}function d(O){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&C();const z=t.events.length;let W=z,D;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){D=t.events[W][1].end;break}_(r);let V=z;for(;V<t.events.length;)t.events[V][1].end=U({},D),V++;return zn(t.events,W+1,0,t.events.slice(z)),t.events.length=V,f(O)}return l(O)}function f(O){if(r===n.length){if(!s)return b(O);if(s.currentConstruct&&s.currentConstruct.concrete)return x(O);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sE,m,p)(O)}function m(O){return s&&C(),_(r),b(O)}function p(O){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(O)}function b(O){return t.containerState={},e.attempt(sE,y,x)(O)}function y(O){return r++,n.push([t.currentConstruct,t.containerState]),b(O)}function x(O){if(O===null){s&&C(),_(0),e.consume(O);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),S(O)}function S(O){if(O===null){A(e.exit("chunkFlow"),!0),_(0),e.consume(O);return}return qe(O)?(e.consume(O),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(O),S)}function A(O,z){const W=t.sliceStream(O);if(z&&W.push(null),O.previous=a,a&&(a.next=O),a=O,s.defineSkip(O.start),s.write(W),t.parser.lazy[O.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<u&&(!s.events[D][1].end||s.events[D][1].end.offset>u))return;const V=t.events.length;let K=V,ae,j;for(;K--;)if(t.events[K][0]==="exit"&&t.events[K][1].type==="chunkFlow"){if(ae){j=t.events[K][1].end;break}ae=!0}for(_(r),D=V;D<t.events.length;)t.events[D][1].end=U({},j),D++;zn(t.events,K+1,0,t.events.slice(V)),t.events.length=D}}function _(O){let z=n.length;for(;z-- >O;){const W=n[z];t.containerState=W[1],W[0].exit.call(t,e)}n.length=O}function C(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function PN(e,t,n){return at(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ws(e){if(e===null||yt(e)||es(e))return 1;if(dl(e))return 2}function fl(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Bf={name:"attention",resolveAll:RN,tokenize:LN};function RN(e,t){let n=-1,r,s,a,u,l,d,f,m;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 p=U({},e[r][1].end),b=U({},e[n][1].start);oE(p,-d),oE(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:p,end:U({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:U({},e[n][1].start),end:b},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=Xn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Xn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Xn(f,fl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Xn(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,f=Xn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,zn(e,r-1,n-r+3,f),n=r+f.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function LN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Ws(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"),m=Ws(d),p=!m||m===2&&s||n.includes(d),b=!s||s===2&&m||n.includes(r);return f._open=!!(a===42?p:p&&(s||!b)),f._close=!!(a===42?b:b&&(m||!p)),t(d)}}function oE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const DN={name:"autolink",tokenize:MN};function MN(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 wn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||dn(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||dn(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||cl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),m):vN(y)?(e.consume(y),f):n(y)}function m(y){return dn(y)?p(y):n(y)}function p(y){return y===46?(e.consume(y),r=0,m):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||dn(y))&&r++<63){const x=y===45?b:p;return e.consume(y),x}return n(y)}}const Ea={partial:!0,tokenize:FN};function FN(e,t,n){return r;function r(a){return it(a)?at(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||qe(a)?t(a):n(a)}}const aE={continuation:{tokenize:UN},exit:HN,name:"blockQuote",tokenize:BN};function BN(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 it(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function UN(e,t,n){const r=this;return s;function s(u){return it(u)?at(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(aE,t,n)(u)}}function HN(e){e.exit("blockQuote")}const uE={name:"characterEscape",tokenize:jN};function jN(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 kN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const lE={name:"characterReference",tokenize:zN};function zN(e,t,n){const r=this;let s=0,a,u;return l;function l(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=dn,m(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=AN,m):(e.enter("characterReferenceValue"),a=7,u=Ff,m(p))}function m(p){if(p===59&&s){const b=e.exit("characterReferenceValue");return u===dn&&!Mf(r.sliceSerialize(b))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(p)&&s++<a?(e.consume(p),m):n(p)}}const cE={partial:!0,tokenize:VN},dE={concrete:!0,name:"codeFenced",tokenize:$N};function $N(e,t,n){const r=this,s={partial:!0,tokenize:W};let a=0,u=0,l;return d;function d(D){return f(D)}function f(D){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,l=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(D)}function m(D){return D===l?(u++,e.consume(D),m):u<3?n(D):(e.exit("codeFencedFenceSequence"),it(D)?at(e,p,"whitespace")(D):p(D))}function p(D){return D===null||qe(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(cE,S,z)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||qe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(D)):it(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,y,"whitespace")(D)):D===96&&D===l?n(D):(e.consume(D),b)}function y(D){return D===null||qe(D)?p(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===null||qe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(D)):D===96&&D===l?n(D):(e.consume(D),x)}function S(D){return e.attempt(s,z,A)(D)}function A(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),_}function _(D){return a>0&&it(D)?at(e,C,"linePrefix",a+1)(D):C(D)}function C(D){return D===null||qe(D)?e.check(cE,S,z)(D):(e.enter("codeFlowValue"),O(D))}function O(D){return D===null||qe(D)?(e.exit("codeFlowValue"),C(D)):(e.consume(D),O)}function z(D){return e.exit("codeFenced"),t(D)}function W(D,V,K){let ae=0;return j;function j(ne){return D.enter("lineEnding"),D.consume(ne),D.exit("lineEnding"),se}function se(ne){return D.enter("codeFencedFence"),it(ne)?at(D,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):ie(ne)}function ie(ne){return ne===l?(D.enter("codeFencedFenceSequence"),ce(ne)):K(ne)}function ce(ne){return ne===l?(ae++,D.consume(ne),ce):ae>=u?(D.exit("codeFencedFenceSequence"),it(ne)?at(D,fe,"whitespace")(ne):fe(ne)):K(ne)}function fe(ne){return ne===null||qe(ne)?(D.exit("codeFencedFence"),V(ne)):K(ne)}}}function VN(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Uf={name:"codeIndented",tokenize:YN},qN={partial:!0,tokenize:WN};function YN(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),at(e,a,"linePrefix",5)(f)}function a(f){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):qe(f)?e.attempt(qN,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||qe(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function WN(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):qe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):at(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):qe(u)?s(u):n(u)}}const GN={name:"codeText",previous:KN,resolve:XN,tokenize:QN};function XN(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 KN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function QN(e,t,n){let r=0,s,a;return u;function u(p){return e.enter("codeText"),e.enter("codeTextSequence"),l(p)}function l(p){return p===96?(e.consume(p),r++,l):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(a=e.enter("codeTextSequence"),s=0,m(p)):qe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||qe(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),f)}function m(p){return p===96?(e.consume(p),s++,m):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",f(p))}}class JN{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&&ya(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),ya(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ya(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);ya(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ya(this.left,n.reverse())}}}function ya(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 fE(e){const t={};let n=-1,r,s,a,u,l,d,f;const m=new JN(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.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,ZN(m,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=m.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(m.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({},m.get(s)[1].start),l=m.slice(s,n),l.unshift(r),m.splice(s,n-s+1,l))}}return zn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!f}function ZN(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 m,p,b=-1,y=n,x=0,S=0;const A=[S];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(m=r.sliceStream(y),y.next||m.push(null),p&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),p=y,y=y.next}for(y=n;++b<l.length;)l[b][0]==="exit"&&l[b-1][0]==="enter"&&l[b][1].type===l[b-1][1].type&&l[b][1].start.line!==l[b][1].end.line&&(S=b+1,A.push(S),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(),b=A.length;b--;){const _=l.slice(A[b],A[b+1]),C=a.pop();d.push([C,C+_.length-1]),e.splice(C,2,_)}for(d.reverse(),b=-1;++b<d.length;)f[x+d[b][0]]=x+d[b][1],x+=d[b][1]-d[b][0]-1;return f}const e3={resolve:n3,tokenize:r3},t3={partial:!0,tokenize:i3};function n3(e){return fE(e),e}function r3(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):qe(l)?e.check(t3,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 i3(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),at(e,a,"linePrefix")}function a(u){if(u===null||qe(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 hE(e,t,n,r,s,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let m=0;return p;function p(_){return _===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(_),e.exit(a),b):_===null||_===32||_===41||cl(_)?n(_):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),S(_))}function b(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(_))}function y(_){return _===62?(e.exit("chunkString"),e.exit(l),b(_)):_===null||_===60||qe(_)?n(_):(e.consume(_),_===92?x:y)}function x(_){return _===60||_===62||_===92?(e.consume(_),y):y(_)}function S(_){return!m&&(_===null||_===41||yt(_))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(_)):m<f&&_===40?(e.consume(_),m++,S):_===41?(e.consume(_),m--,S):_===null||_===32||_===40||cl(_)?n(_):(e.consume(_),_===92?A:S)}function A(_){return _===40||_===41||_===92?(e.consume(_),S):S(_)}}function pE(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),m}function m(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):qe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===null||y===91||y===93||qe(y)||l++>999?(e.exit("chunkString"),m(y)):(e.consume(y),d||(d=!it(y)),y===92?b:p)}function b(y){return y===91||y===92||y===93?(e.consume(y),l++,p):p(y)}}function mE(e,t,n,r,s,a){let u;return l;function l(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):qe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),at(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===u||b===null||qe(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?p:m)}function p(b){return b===u||b===92?(e.consume(b),m):m(b)}}function Ta(e,t){let n;return r;function r(s){return qe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):it(s)?at(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const s3={name:"definition",tokenize:a3},o3={partial:!0,tokenize:u3};function a3(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return pE.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return s=cr(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 yt(y)?Ta(e,f)(y):f(y)}function f(y){return hE(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function m(y){return e.attempt(o3,p,p)(y)}function p(y){return it(y)?at(e,b,"whitespace")(y):b(y)}function b(y){return y===null||qe(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function u3(e,t,n){return r;function r(l){return yt(l)?Ta(e,s)(l):n(l)}function s(l){return mE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return it(l)?at(e,u,"whitespace")(l):u(l)}function u(l){return l===null||qe(l)?t(l):n(l)}}const l3={name:"hardBreakEscape",tokenize:c3};function c3(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return qe(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const d3={name:"headingAtx",resolve:f3,tokenize:h3};function f3(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"},zn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function h3(e,t,n){let r=0;return s;function s(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&r++<6?(e.consume(m),u):m===null||yt(m)?(e.exit("atxHeadingSequence"),l(m)):n(m)}function l(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||qe(m)?(e.exit("atxHeading"),t(m)):it(m)?at(e,l,"whitespace")(m):(e.enter("atxHeadingText"),f(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),l(m))}function f(m){return m===null||m===35||yt(m)?(e.exit("atxHeadingText"),l(m)):(e.consume(m),f)}}const p3=["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"],gE=["pre","script","style","textarea"],m3={concrete:!0,name:"htmlFlow",resolveTo:y3,tokenize:T3},g3={partial:!0,tokenize:w3},E3={partial:!0,tokenize:b3};function y3(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 T3(e,t,n){const r=this;let s,a,u,l,d;return f;function f(P){return m(P)}function m(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),p}function p(P){return P===33?(e.consume(P),b):P===47?(e.consume(P),a=!0,S):P===63?(e.consume(P),s=3,r.interrupt?t:k):wn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function b(P){return P===45?(e.consume(P),s=2,y):P===91?(e.consume(P),s=5,l=0,x):wn(P)?(e.consume(P),s=4,r.interrupt?t:k):n(P)}function y(P){return P===45?(e.consume(P),r.interrupt?t:k):n(P)}function x(P){const ve="CDATA[";return P===ve.charCodeAt(l++)?(e.consume(P),l===ve.length?r.interrupt?t:ie:x):n(P)}function S(P){return wn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function A(P){if(P===null||P===47||P===62||yt(P)){const ve=P===47,Pe=u.toLowerCase();return!ve&&!a&&gE.includes(Pe)?(s=1,r.interrupt?t(P):ie(P)):p3.includes(u.toLowerCase())?(s=6,ve?(e.consume(P),_):r.interrupt?t(P):ie(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):a?C(P):O(P))}return P===45||dn(P)?(e.consume(P),u+=String.fromCharCode(P),A):n(P)}function _(P){return P===62?(e.consume(P),r.interrupt?t:ie):n(P)}function C(P){return it(P)?(e.consume(P),C):j(P)}function O(P){return P===47?(e.consume(P),j):P===58||P===95||wn(P)?(e.consume(P),z):it(P)?(e.consume(P),O):j(P)}function z(P){return P===45||P===46||P===58||P===95||dn(P)?(e.consume(P),z):W(P)}function W(P){return P===61?(e.consume(P),D):it(P)?(e.consume(P),W):O(P)}function D(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),d=P,V):it(P)?(e.consume(P),D):K(P)}function V(P){return P===d?(e.consume(P),d=null,ae):P===null||qe(P)?n(P):(e.consume(P),V)}function K(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||yt(P)?W(P):(e.consume(P),K)}function ae(P){return P===47||P===62||it(P)?O(P):n(P)}function j(P){return P===62?(e.consume(P),se):n(P)}function se(P){return P===null||qe(P)?ie(P):it(P)?(e.consume(P),se):n(P)}function ie(P){return P===45&&s===2?(e.consume(P),Se):P===60&&s===1?(e.consume(P),de):P===62&&s===4?(e.consume(P),M):P===63&&s===3?(e.consume(P),k):P===93&&s===5?(e.consume(P),le):qe(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(g3,Z,ce)(P)):P===null||qe(P)?(e.exit("htmlFlowData"),ce(P)):(e.consume(P),ie)}function ce(P){return e.check(E3,fe,Z)(P)}function fe(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ne}function ne(P){return P===null||qe(P)?ce(P):(e.enter("htmlFlowData"),ie(P))}function Se(P){return P===45?(e.consume(P),k):ie(P)}function de(P){return P===47?(e.consume(P),u="",J):ie(P)}function J(P){if(P===62){const ve=u.toLowerCase();return gE.includes(ve)?(e.consume(P),M):ie(P)}return wn(P)&&u.length<8?(e.consume(P),u+=String.fromCharCode(P),J):ie(P)}function le(P){return P===93?(e.consume(P),k):ie(P)}function k(P){return P===62?(e.consume(P),M):P===45&&s===2?(e.consume(P),k):ie(P)}function M(P){return P===null||qe(P)?(e.exit("htmlFlowData"),Z(P)):(e.consume(P),M)}function Z(P){return e.exit("htmlFlow"),t(P)}}function b3(e,t,n){const r=this;return s;function s(u){return qe(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 w3(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Ea,t,n)}}const x3={name:"htmlText",tokenize:_3};function _3(e,t,n){const r=this;let s,a,u;return l;function l(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),W):k===63?(e.consume(k),O):wn(k)?(e.consume(k),K):n(k)}function f(k){return k===45?(e.consume(k),m):k===91?(e.consume(k),a=0,x):wn(k)?(e.consume(k),C):n(k)}function m(k){return k===45?(e.consume(k),y):n(k)}function p(k){return k===null?n(k):k===45?(e.consume(k),b):qe(k)?(u=p,de(k)):(e.consume(k),p)}function b(k){return k===45?(e.consume(k),y):p(k)}function y(k){return k===62?Se(k):k===45?b(k):p(k)}function x(k){const M="CDATA[";return k===M.charCodeAt(a++)?(e.consume(k),a===M.length?S:x):n(k)}function S(k){return k===null?n(k):k===93?(e.consume(k),A):qe(k)?(u=S,de(k)):(e.consume(k),S)}function A(k){return k===93?(e.consume(k),_):S(k)}function _(k){return k===62?Se(k):k===93?(e.consume(k),_):S(k)}function C(k){return k===null||k===62?Se(k):qe(k)?(u=C,de(k)):(e.consume(k),C)}function O(k){return k===null?n(k):k===63?(e.consume(k),z):qe(k)?(u=O,de(k)):(e.consume(k),O)}function z(k){return k===62?Se(k):O(k)}function W(k){return wn(k)?(e.consume(k),D):n(k)}function D(k){return k===45||dn(k)?(e.consume(k),D):V(k)}function V(k){return qe(k)?(u=V,de(k)):it(k)?(e.consume(k),V):Se(k)}function K(k){return k===45||dn(k)?(e.consume(k),K):k===47||k===62||yt(k)?ae(k):n(k)}function ae(k){return k===47?(e.consume(k),Se):k===58||k===95||wn(k)?(e.consume(k),j):qe(k)?(u=ae,de(k)):it(k)?(e.consume(k),ae):Se(k)}function j(k){return k===45||k===46||k===58||k===95||dn(k)?(e.consume(k),j):se(k)}function se(k){return k===61?(e.consume(k),ie):qe(k)?(u=se,de(k)):it(k)?(e.consume(k),se):ae(k)}function ie(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),s=k,ce):qe(k)?(u=ie,de(k)):it(k)?(e.consume(k),ie):(e.consume(k),fe)}function ce(k){return k===s?(e.consume(k),s=void 0,ne):k===null?n(k):qe(k)?(u=ce,de(k)):(e.consume(k),ce)}function fe(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||yt(k)?ae(k):(e.consume(k),fe)}function ne(k){return k===47||k===62||yt(k)?ae(k):n(k)}function Se(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function de(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),J}function J(k){return it(k)?at(e,le,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):le(k)}function le(k){return e.enter("htmlTextData"),u(k)}}const Hf={name:"labelEnd",resolveAll:k3,resolveTo:C3,tokenize:N3},S3={tokenize:O3},v3={tokenize:I3},A3={tokenize:P3};function k3(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&&zn(e,0,e.length,n),e}function C3(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)},m={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=Xn(l,e.slice(a+1,a+r+3)),l=Xn(l,[["enter",m,t]]),l=Xn(l,fl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=Xn(l,[["exit",m,t],e[u-2],e[u-1],["exit",f,t]]),l=Xn(l,e.slice(u+1)),l=Xn(l,[["exit",d,t]]),zn(e,a,e.length,l),e}function N3(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(b){return a?a._inactive?p(b):(u=r.parser.defined.includes(cr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(S3,m,u?m:p)(b):b===91?e.attempt(v3,m,u?f:p)(b):u?m(b):p(b)}function f(b){return e.attempt(A3,m,p)(b)}function m(b){return t(b)}function p(b){return a._balanced=!0,n(b)}}function O3(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),s}function s(p){return yt(p)?Ta(e,a)(p):a(p)}function a(p){return p===41?m(p):hE(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function u(p){return yt(p)?Ta(e,d)(p):m(p)}function l(p){return n(p)}function d(p){return p===34||p===39||p===40?mE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function f(p){return yt(p)?Ta(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function I3(e,t,n){const r=this;return s;function s(l){return pE.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(cr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function P3(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 R3={name:"labelStartImage",resolveAll:Hf.resolveAll,tokenize:L3};function L3(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 D3={name:"labelStartLink",resolveAll:Hf.resolveAll,tokenize:M3};function M3(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const jf={name:"lineEnding",tokenize:F3};function F3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),at(e,t,"linePrefix")}}const hl={name:"thematicBreak",tokenize:B3};function B3(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||qe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),it(f)?at(e,l,"whitespace")(f):l(f))}}const On={continuation:{tokenize:z3},exit:V3,name:"list",tokenize:j3},U3={partial:!0,tokenize:q3},H3={partial:!0,tokenize:$3};function j3(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:Ff(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(hl,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Ff(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Ea,r.interrupt?n:m,e.attempt(U3,b,p))}function m(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function p(y){return it(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function z3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ea,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,at(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!it(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(H3,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,at(e,e.attempt(On,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function $3(e,t,n){const r=this;return at(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 V3(e){e.exit(this.containerState.type)}function q3(e,t,n){const r=this;return at(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!it(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const EE={name:"setextUnderline",resolveTo:Y3,tokenize:W3};function Y3(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 W3(e,t,n){const r=this;let s;return a;function a(f){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(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"),it(f)?at(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||qe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const G3={tokenize:X3};function X3(e){const t=this,n=e.attempt(Ea,r,e.attempt(this.parser.constructs.flowInitial,s,at(e,e.attempt(this.parser.constructs.flow,s,e.attempt(e3,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 K3={resolveAll:TE()},Q3=yE("string"),J3=yE("text");function yE(e){return{resolveAll:TE(e==="text"?Z3: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(m){return f(m)?a(m):l(m)}function l(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return f(m)?(n.exit("data"),a(m)):(n.consume(m),d)}function f(m){if(m===null)return!0;const p=s[m];let b=-1;if(p)for(;++b<p.length;){const y=p[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function TE(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 Z3(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 eO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:s3},disable:{null:[]},document:{42:On,43:On,45:On,48:On,49:On,50:On,51:On,52:On,53:On,54:On,55:On,56:On,57:On,62:aE},flow:{35:d3,42:hl,45:[EE,hl],60:m3,61:EE,95:hl,96:dE,126:dE},flowInitial:{[-2]:Uf,[-1]:Uf,32:Uf},insideSpan:{null:[Bf,K3]},string:{38:lE,92:uE},text:{[-5]:jf,[-4]:jf,[-3]:jf,33:R3,38:lE,42:Bf,60:[DN,x3],91:D3,92:[l3,uE],93:Hf,95:Bf,96:GN}},Symbol.toStringTag,{value:"Module"}));function tO(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:V(W),check:V(D),consume:C,enter:O,exit:z,interrupt:V(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:x,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:p};let m=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function p(se){return u=Xn(u,se),A(),u[u.length-1]!==null?[]:(K(t,0),f.events=fl(a,f.events,f),f.events)}function b(se,ie){return rO(y(se),ie)}function y(se){return nO(u,se)}function x(){const{_bufferIndex:se,_index:ie,line:ce,column:fe,offset:ne}=r;return{_bufferIndex:se,_index:ie,line:ce,column:fe,offset:ne}}function S(se){s[se.line]=se.column,j()}function A(){let se;for(;r._index<u.length;){const ie=u[r._index];if(typeof ie=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<ie.length;)_(ie.charCodeAt(r._bufferIndex));else _(ie)}}function _(se){m=m(se)}function C(se){qe(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,j()):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 O(se,ie){const ce=ie||{};return ce.type=se,ce.start=x(),f.events.push(["enter",ce,f]),l.push(ce),ce}function z(se){const ie=l.pop();return ie.end=x(),f.events.push(["exit",ie,f]),ie}function W(se,ie){K(se,ie.from)}function D(se,ie){ie.restore()}function V(se,ie){return ce;function ce(fe,ne,Se){let de,J,le,k;return Array.isArray(fe)?Z(fe):"tokenize"in fe?Z([fe]):M(fe);function M(he){return ke;function ke(Me){const He=Me!==null&&he[Me],nt=Me!==null&&he.null,Nt=[...Array.isArray(He)?He:He?[He]:[],...Array.isArray(nt)?nt:nt?[nt]:[]];return Z(Nt)(Me)}}function Z(he){return de=he,J=0,he.length===0?Se:P(he[J])}function P(he){return ke;function ke(Me){return k=ae(),le=he,he.partial||(f.currentConstruct=he),he.name&&f.parser.constructs.disable.null.includes(he.name)?Pe():he.tokenize.call(ie?Object.assign(Object.create(f),ie):f,d,ve,Pe)(Me)}}function ve(he){return se(le,k),ne}function Pe(he){return k.restore(),++J<de.length?P(de[J]):Se}}}function K(se,ie){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&zn(f.events,ie,f.events.length-ie,se.resolve(f.events.slice(ie),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function ae(){const se=x(),ie=f.previous,ce=f.currentConstruct,fe=f.events.length,ne=Array.from(l);return{from:fe,restore:Se};function Se(){r=se,f.previous=ie,f.currentConstruct=ce,f.events.length=fe,l=ne,j()}}function j(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function nO(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 rO(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
+ `+T.stack}return{value:i,source:o,stack:E,digest:null}}function Um(i,o,c){return{value:i,source:null,stack:c!=null?c:null,digest:o!=null?o:null}}function Hm(i,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var F7=typeof WeakMap=="function"?WeakMap:Map;function z_(i,o,c){c=ii(-1,c),c.tag=3,c.payload={element:null};var h=o.value;return c.callback=function(){sd||(sd=!0,t0=h),Hm(i,o)},c}function $_(i,o,c){c=ii(-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(){Hm(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(c.callback=function(){Hm(i,o),typeof h!="function"&&(Mi===null?Mi=new Set([this]):Mi.add(this));var v=o.stack;this.componentDidCatch(o.value,{componentStack:v!==null?v:""})}),c}function V_(i,o,c){var h=i.pingCache;if(h===null){h=i.pingCache=new F7;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=Q7.bind(null,i,o,c),o.then(i,i))}function q_(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 Y_(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=ii(-1,1),o.tag=2,Li(c,o,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var B7=z.ReactCurrentOwner,Mn=!1;function _n(i,o,c,h){o.child=i===null?f_(o,null,c,h):Ho(o,i.child,c,h)}function W_(i,o,c,h,E){c=c.render;var T=o.ref;return zo(o,E),h=Im(i,o,c,h,T,E),c=Pm(),i!==null&&!Mn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,si(i,o,E)):(Ot&&c&&pm(o),o.flags|=1,_n(i,o,h,E),o.child)}function G_(i,o,c,h,E){if(i===null){var T=c.type;return typeof T=="function"&&!u0(T)&&T.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=T,X_(i,o,T,h,E)):(i=dd(c.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,(i.lanes&E)===0){var v=T.memoizedProps;if(c=c.compare,c=c!==null?c:au,c(v,h)&&i.ref===o.ref)return si(i,o,E)}return o.flags|=1,i=Hi(T,h),i.ref=o.ref,i.return=o,o.child=i}function X_(i,o,c,h,E){if(i!==null){var T=i.memoizedProps;if(au(T,h)&&i.ref===o.ref)if(Mn=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Mn=!0);else return o.lanes=i.lanes,si(i,o,E)}return jm(i,o,c,h,E)}function K_(i,o,c){var h=o.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(Yo,Wn),Wn|=c;else{if((c&1073741824)===0)return i=T!==null?T.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,bt(Yo,Wn),Wn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:c,bt(Yo,Wn),Wn|=h}else T!==null?(h=T.baseLanes|c,o.memoizedState=null):h=c,bt(Yo,Wn),Wn|=h;return _n(i,o,E,c),o.child}function Q_(i,o){var c=o.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(o.flags|=512,o.flags|=2097152)}function jm(i,o,c,h,E){var T=Dn(c)?Ts:mn.current;return T=Mo(o,T),zo(o,E),c=Im(i,o,c,h,T,E),h=Pm(),i!==null&&!Mn?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,si(i,o,E)):(Ot&&h&&pm(o),o.flags|=1,_n(i,o,c,E),o.child)}function J_(i,o,c,h,E){if(Dn(c)){var T=!0;Mc(o)}else T=!1;if(zo(o,E),o.stateNode===null)ed(i,o),H_(o,c,h),Bm(o,c,h,E),h=!0;else if(i===null){var v=o.stateNode,B=o.memoizedProps;v.props=B;var $=v.context,te=c.contextType;typeof te=="object"&&te!==null?te=tr(te):(te=Dn(c)?Ts:mn.current,te=Mo(o,te));var Ee=c.getDerivedStateFromProps,Te=typeof Ee=="function"||typeof v.getSnapshotBeforeUpdate=="function";Te||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(B!==h||$!==te)&&j_(o,v,h,te),Ri=!1;var pe=o.memoizedState;v.state=pe,qc(o,h,v,E),$=o.memoizedState,B!==h||pe!==$||Ln.current||Ri?(typeof Ee=="function"&&(Fm(o,c,Ee,h),$=o.memoizedState),(B=Ri||U_(o,c,B,h,pe,$,te))?(Te||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=$),v.props=h,v.state=$,v.context=te,h=B):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{v=o.stateNode,p_(i,o),B=o.memoizedProps,te=o.type===o.elementType?B:yr(o.type,B),v.props=te,Te=o.pendingProps,pe=v.context,$=c.contextType,typeof $=="object"&&$!==null?$=tr($):($=Dn(c)?Ts:mn.current,$=Mo(o,$));var Oe=c.getDerivedStateFromProps;(Ee=typeof Oe=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(B!==Te||pe!==$)&&j_(o,v,h,$),Ri=!1,pe=o.memoizedState,v.state=pe,qc(o,h,v,E);var Le=o.memoizedState;B!==Te||pe!==Le||Ln.current||Ri?(typeof Oe=="function"&&(Fm(o,c,Oe,h),Le=o.memoizedState),(te=Ri||U_(o,c,te,h,pe,Le,$)||!1)?(Ee||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(h,Le,$),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(h,Le,$)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||B===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Le),v.props=h,v.state=Le,v.context=$,h=te):(typeof v.componentDidUpdate!="function"||B===i.memoizedProps&&pe===i.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||B===i.memoizedProps&&pe===i.memoizedState||(o.flags|=1024),h=!1)}return zm(i,o,c,h,T,E)}function zm(i,o,c,h,E,T){Q_(i,o);var v=(o.flags&128)!==0;if(!h&&!v)return E&&r_(o,c,!1),si(i,o,T);h=o.stateNode,B7.current=o;var B=v&&typeof c.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&v?(o.child=Ho(o,i.child,null,T),o.child=Ho(o,null,B,T)):_n(i,o,B,T),o.memoizedState=h.state,E&&r_(o,c,!0),o.child}function Z_(i){var o=i.stateNode;o.pendingContext?t_(i,o.pendingContext,o.pendingContext!==o.context):o.context&&t_(i,o.context,!1),vm(i,o.containerInfo)}function e2(i,o,c,h,E){return Uo(),ym(E),o.flags|=256,_n(i,o,c,h),o.child}var $m={dehydrated:null,treeContext:null,retryLane:0};function Vm(i){return{baseLanes:i,cachePool:null,transitions:null}}function t2(i,o,c){var h=o.pendingProps,E=It.current,T=!1,v=(o.flags&128)!==0,B;if((B=v)||(B=i!==null&&i.memoizedState===null?!1:(E&2)!==0),B?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),bt(It,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):(v=h.children,i=h.fallback,T?(h=o.mode,T=o.child,v={mode:"hidden",children:v},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=v):T=fd(v,h,0,null),i=Ns(i,h,c,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Vm(c),o.memoizedState=$m,i):qm(o,v));if(E=i.memoizedState,E!==null&&(B=E.dehydrated,B!==null))return U7(i,o,v,h,B,E,c);if(T){T=h.fallback,v=o.mode,E=i.child,B=E.sibling;var $={mode:"hidden",children:h.children};return(v&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=$,o.deletions=null):(h=Hi(E,$),h.subtreeFlags=E.subtreeFlags&14680064),B!==null?T=Hi(B,T):(T=Ns(T,v,c,null),T.flags|=2),T.return=o,h.return=o,h.sibling=T,o.child=h,h=T,T=o.child,v=i.child.memoizedState,v=v===null?Vm(c):{baseLanes:v.baseLanes|c,cachePool:null,transitions:v.transitions},T.memoizedState=v,T.childLanes=i.childLanes&~c,o.memoizedState=$m,h}return T=i.child,i=T.sibling,h=Hi(T,{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 qm(i,o){return o=fd({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function Zc(i,o,c,h){return h!==null&&ym(h),Ho(o,i.child,null,c),i=qm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function U7(i,o,c,h,E,T,v){if(c)return o.flags&256?(o.flags&=-257,h=Um(Error(n(422))),Zc(i,o,v,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=fd({mode:"visible",children:h.children},E,0,null),T=Ns(T,E,v,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&Ho(o,i.child,null,v),o.child.memoizedState=Vm(v),o.memoizedState=$m,T);if((o.mode&1)===0)return Zc(i,o,v,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var B=h.dgst;return h=B,T=Error(n(419)),h=Um(T,h,void 0),Zc(i,o,v,h)}if(B=(v&i.childLanes)!==0,Mn||B){if(h=tn,h!==null){switch(v&-v){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|v))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,ri(i,E),wr(h,i,E,-1))}return a0(),h=Um(Error(n(421))),Zc(i,o,v,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=J7.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,Yn=Ni(E.nextSibling),qn=o,Ot=!0,Er=null,i!==null&&(Zn[er++]=ti,Zn[er++]=ni,Zn[er++]=bs,ti=i.id,ni=i.overflow,bs=o),o=qm(o,h.children),o.flags|=4096,o)}function n2(i,o,c){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),xm(i.return,o,c)}function Ym(i,o,c,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=c,T.tailMode=E)}function r2(i,o,c){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(_n(i,o,h.children,c),h=It.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&&n2(i,c,o);else if(i.tag===19)n2(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(bt(It,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&&Yc(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=o.child,o.child=null):(E=c.sibling,c.sibling=null),Ym(o,!1,E,c,T);break;case"backwards":for(c=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Yc(i)===null){o.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Ym(o,!0,c,null,T);break;case"together":Ym(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function ed(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function si(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),vs|=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=Hi(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=Hi(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function H7(i,o,c){switch(o.tag){case 3:Z_(o),Uo();break;case 5:E_(o);break;case 1:Dn(o.type)&&Mc(o);break;case 4:vm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;bt(zc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(bt(It,It.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?t2(i,o,c):(bt(It,It.current&1),i=si(i,o,c),i!==null?i.sibling:null);bt(It,It.current&1);break;case 19:if(h=(c&o.childLanes)!==0,(i.flags&128)!==0){if(h)return r2(i,o,c);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),bt(It,It.current),h)break;return null;case 22:case 23:return o.lanes=0,K_(i,o,c)}return si(i,o,c)}var i2,Wm,s2,o2;i2=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}},Wm=function(){},s2=function(i,o,c,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,_s(Ur.current);var T=null;switch(c){case"input":E=pn(i,E),h=pn(i,h),T=[];break;case"select":E=C({},E,{value:void 0}),h=C({},h,{value:void 0}),T=[];break;case"textarea":E=ft(i,E),h=ft(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Rc)}Ke(c,h);var v;c=null;for(te in E)if(!h.hasOwnProperty(te)&&E.hasOwnProperty(te)&&E[te]!=null)if(te==="style"){var B=E[te];for(v in B)B.hasOwnProperty(v)&&(c||(c={}),c[v]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(s.hasOwnProperty(te)?T||(T=[]):(T=T||[]).push(te,null));for(te in h){var $=h[te];if(B=E!=null?E[te]:void 0,h.hasOwnProperty(te)&&$!==B&&($!=null||B!=null))if(te==="style")if(B){for(v in B)!B.hasOwnProperty(v)||$&&$.hasOwnProperty(v)||(c||(c={}),c[v]="");for(v in $)$.hasOwnProperty(v)&&B[v]!==$[v]&&(c||(c={}),c[v]=$[v])}else c||(T||(T=[]),T.push(te,c)),c=$;else te==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,B=B?B.__html:void 0,$!=null&&B!==$&&(T=T||[]).push(te,$)):te==="children"?typeof $!="string"&&typeof $!="number"||(T=T||[]).push(te,""+$):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(s.hasOwnProperty(te)?($!=null&&te==="onScroll"&&vt("scroll",i),T||B===$||(T=[])):(T=T||[]).push(te,$))}c&&(T=T||[]).push("style",c);var te=T;(o.updateQueue=te)&&(o.flags|=4)}},o2=function(i,o,c,h){c!==h&&(o.flags|=4)};function xu(i,o){if(!Ot)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 En(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 j7(i,o,c){var h=o.pendingProps;switch(mm(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return En(o),null;case 1:return Dn(o.type)&&Dc(),En(o),null;case 3:return h=o.stateNode,$o(),At(Ln),At(mn),km(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Hc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Er!==null&&(i0(Er),Er=null))),Wm(i,o),En(o),null;case 5:Am(o);var E=_s(Eu.current);if(c=o.type,i!==null&&o.stateNode!=null)s2(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 En(o),null}if(i=_s(Ur.current),Hc(o)){h=o.stateNode,c=o.type;var T=o.memoizedProps;switch(h[Br]=o,h[fu]=T,i=(o.mode&1)!==0,c){case"dialog":vt("cancel",h),vt("close",h);break;case"iframe":case"object":case"embed":vt("load",h);break;case"video":case"audio":for(E=0;E<lu.length;E++)vt(lu[E],h);break;case"source":vt("error",h);break;case"img":case"image":case"link":vt("error",h),vt("load",h);break;case"details":vt("toggle",h);break;case"input":Bt(h,T),vt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},vt("invalid",h);break;case"textarea":Jn(h,T),vt("invalid",h)}Ke(c,T),E=null;for(var v in T)if(T.hasOwnProperty(v)){var B=T[v];v==="children"?typeof B=="string"?h.textContent!==B&&(T.suppressHydrationWarning!==!0&&Pc(h.textContent,B,i),E=["children",B]):typeof B=="number"&&h.textContent!==""+B&&(T.suppressHydrationWarning!==!0&&Pc(h.textContent,B,i),E=["children",""+B]):s.hasOwnProperty(v)&&B!=null&&v==="onScroll"&&vt("scroll",h)}switch(c){case"input":Nt(h),Wt(h,T,!0);break;case"textarea":Nt(h),xi(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=Rc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{v=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=v.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=v.createElement(c,{is:h.is}):(i=v.createElement(c),c==="select"&&(v=i,h.multiple?v.multiple=!0:h.size&&(v.size=h.size))):i=v.createElementNS(i,c),i[Br]=o,i[fu]=h,i2(i,o,!1,!1),o.stateNode=i;e:{switch(v=$t(c,h),c){case"dialog":vt("cancel",i),vt("close",i),E=h;break;case"iframe":case"object":case"embed":vt("load",i),E=h;break;case"video":case"audio":for(E=0;E<lu.length;E++)vt(lu[E],i);E=h;break;case"source":vt("error",i),E=h;break;case"img":case"image":case"link":vt("error",i),vt("load",i),E=h;break;case"details":vt("toggle",i),E=h;break;case"input":Bt(i,h),E=pn(i,h),vt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=C({},h,{value:void 0}),vt("invalid",i);break;case"textarea":Jn(i,h),E=ft(i,h),vt("invalid",i);break;default:E=h}Ke(c,E),B=E;for(T in B)if(B.hasOwnProperty(T)){var $=B[T];T==="style"?ge(i,$):T==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&et(i,$)):T==="children"?typeof $=="string"?(c!=="textarea"||$!=="")&&ee(i,$):typeof $=="number"&&ee(i,""+$):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?$!=null&&T==="onScroll"&&vt("scroll",i):$!=null&&O(i,T,$,v))}switch(c){case"input":Nt(i),Wt(i,h,!1);break;case"textarea":Nt(i),xi(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Me(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?ot(i,!!h.multiple,T,!1):h.defaultValue!=null&&ot(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Rc)}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 En(o),null;case 6:if(i&&o.stateNode!=null)o2(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(c=_s(Eu.current),_s(Ur.current),Hc(o)){if(h=o.stateNode,c=o.memoizedProps,h[Br]=o,(T=h.nodeValue!==c)&&(i=qn,i!==null))switch(i.tag){case 3:Pc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Pc(h.nodeValue,c,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Br]=o,o.stateNode=h}return En(o),null;case 13:if(At(It),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Ot&&Yn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)l_(),Uo(),o.flags|=98560,T=!1;else if(T=Hc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=o.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Br]=o}else Uo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;En(o),T=!1}else Er!==null&&(i0(Er),Er=null),T=!0;if(!T)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||(It.current&1)!==0?Xt===0&&(Xt=3):a0())),o.updateQueue!==null&&(o.flags|=4),En(o),null);case 4:return $o(),Wm(i,o),i===null&&cu(o.stateNode.containerInfo),En(o),null;case 10:return wm(o.type._context),En(o),null;case 17:return Dn(o.type)&&Dc(),En(o),null;case 19:if(At(It),T=o.memoizedState,T===null)return En(o),null;if(h=(o.flags&128)!==0,v=T.rendering,v===null)if(h)xu(T,!1);else{if(Xt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(v=Yc(i),v!==null){for(o.flags|=128,xu(T,!1),h=v.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=c,c=o.child;c!==null;)T=c,i=h,T.flags&=14680066,v=T.alternate,v===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=v.childLanes,T.lanes=v.lanes,T.child=v.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=v.memoizedProps,T.memoizedState=v.memoizedState,T.updateQueue=v.updateQueue,T.type=v.type,i=v.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return bt(It,It.current&1|2),o.child}i=i.sibling}T.tail!==null&&Ut()>Wo&&(o.flags|=128,h=!0,xu(T,!1),o.lanes=4194304)}else{if(!h)if(i=Yc(v),i!==null){if(o.flags|=128,h=!0,c=i.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),xu(T,!0),T.tail===null&&T.tailMode==="hidden"&&!v.alternate&&!Ot)return En(o),null}else 2*Ut()-T.renderingStartTime>Wo&&c!==1073741824&&(o.flags|=128,h=!0,xu(T,!1),o.lanes=4194304);T.isBackwards?(v.sibling=o.child,o.child=v):(c=T.last,c!==null?c.sibling=v:o.child=v,T.last=v)}return T.tail!==null?(o=T.tail,T.rendering=o,T.tail=o.sibling,T.renderingStartTime=Ut(),o.sibling=null,c=It.current,bt(It,h?c&1|2:c&1),o):(En(o),null);case 22:case 23:return o0(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Wn&1073741824)!==0&&(En(o),o.subtreeFlags&6&&(o.flags|=8192)):En(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function z7(i,o){switch(mm(o),o.tag){case 1:return Dn(o.type)&&Dc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return $o(),At(Ln),At(mn),km(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Am(o),null;case 13:if(At(It),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Uo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return At(It),null;case 4:return $o(),null;case 10:return wm(o.type._context),null;case 22:case 23:return o0(),null;case 24:return null;default:return null}}var td=!1,yn=!1,$7=typeof WeakSet=="function"?WeakSet:Set,Re=null;function qo(i,o){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Lt(i,o,h)}else c.current=null}function Gm(i,o,c){try{c()}catch(h){Lt(i,o,h)}}var a2=!1;function V7(i,o){if(om=wc,i=Ux(),Jp(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,T=h.focusNode;h=h.focusOffset;try{c.nodeType,T.nodeType}catch(we){c=null;break e}var v=0,B=-1,$=-1,te=0,Ee=0,Te=i,pe=null;t:for(;;){for(var Oe;Te!==c||E!==0&&Te.nodeType!==3||(B=v+E),Te!==T||h!==0&&Te.nodeType!==3||($=v+h),Te.nodeType===3&&(v+=Te.nodeValue.length),(Oe=Te.firstChild)!==null;)pe=Te,Te=Oe;for(;;){if(Te===i)break t;if(pe===c&&++te===E&&(B=v),pe===T&&++Ee===h&&($=v),(Oe=Te.nextSibling)!==null)break;Te=pe,pe=Te.parentNode}Te=Oe}c=B===-1||$===-1?null:{start:B,end:$}}else c=null}c=c||{start:0,end:0}}else c=null;for(am={focusedElem:i,selectionRange:c},wc=!1,Re=o;Re!==null;)if(o=Re,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Re=i;else for(;Re!==null;){o=Re;try{var Le=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Le!==null){var De=Le.memoizedProps,Ht=Le.memoizedState,G=o.stateNode,q=G.getSnapshotBeforeUpdate(o.elementType===o.type?De:yr(o.type,De),Ht);G.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var K=o.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(we){Lt(o,o.return,we)}if(i=o.sibling,i!==null){i.return=o.return,Re=i;break}Re=o.return}return Le=a2,a2=!1,Le}function _u(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 T=E.destroy;E.destroy=void 0,T!==void 0&&Gm(o,c,T)}E=E.next}while(E!==h)}}function nd(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 Xm(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 u2(i){var o=i.alternate;o!==null&&(i.alternate=null,u2(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Br],delete o[fu],delete o[dm],delete o[A7],delete o[C7])),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 l2(i){return i.tag===5||i.tag===3||i.tag===4}function c2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||l2(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 Km(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=Rc));else if(h!==4&&(i=i.child,i!==null))for(Km(i,o,c),i=i.sibling;i!==null;)Km(i,o,c),i=i.sibling}function Qm(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(Qm(i,o,c),i=i.sibling;i!==null;)Qm(i,o,c),i=i.sibling}var on=null,Tr=!1;function Di(i,o,c){for(c=c.child;c!==null;)d2(i,o,c),c=c.sibling}function d2(i,o,c){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(mc,c)}catch(B){}switch(c.tag){case 5:yn||qo(c,o);case 6:var h=on,E=Tr;on=null,Di(i,o,c),on=h,Tr=E,on!==null&&(Tr?(i=on,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):on.removeChild(c.stateNode));break;case 18:on!==null&&(Tr?(i=on,c=c.stateNode,i.nodeType===8?cm(i.parentNode,c):i.nodeType===1&&cm(i,c),tu(i)):cm(on,c.stateNode));break;case 4:h=on,E=Tr,on=c.stateNode.containerInfo,Tr=!0,Di(i,o,c),on=h,Tr=E;break;case 0:case 11:case 14:case 15:if(!yn&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,v=T.destroy;T=T.tag,v!==void 0&&((T&2)!==0||(T&4)!==0)&&Gm(c,o,v),E=E.next}while(E!==h)}Di(i,o,c);break;case 1:if(!yn&&(qo(c,o),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(B){Lt(c,o,B)}Di(i,o,c);break;case 21:Di(i,o,c);break;case 22:c.mode&1?(yn=(h=yn)||c.memoizedState!==null,Di(i,o,c),yn=h):Di(i,o,c);break;default:Di(i,o,c)}}function f2(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new $7),o.forEach(function(h){var E=Z7.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function br(i,o){var c=o.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var T=i,v=o,B=v;e:for(;B!==null;){switch(B.tag){case 5:on=B.stateNode,Tr=!1;break e;case 3:on=B.stateNode.containerInfo,Tr=!0;break e;case 4:on=B.stateNode.containerInfo,Tr=!0;break e}B=B.return}if(on===null)throw Error(n(160));d2(T,v,E),on=null,Tr=!1;var $=E.alternate;$!==null&&($.return=null),E.return=null}catch(te){Lt(E,o,te)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)h2(o,i),o=o.sibling}function h2(i,o){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(br(o,i),jr(i),h&4){try{_u(3,i,i.return),nd(3,i)}catch(De){Lt(i,i.return,De)}try{_u(5,i,i.return)}catch(De){Lt(i,i.return,De)}}break;case 1:br(o,i),jr(i),h&512&&c!==null&&qo(c,c.return);break;case 5:if(br(o,i),jr(i),h&512&&c!==null&&qo(c,c.return),i.flags&32){var E=i.stateNode;try{ee(E,"")}catch(De){Lt(i,i.return,De)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,v=c!==null?c.memoizedProps:T,B=i.type,$=i.updateQueue;if(i.updateQueue=null,$!==null)try{B==="input"&&T.type==="radio"&&T.name!=null&&$e(E,T),$t(B,v);var te=$t(B,T);for(v=0;v<$.length;v+=2){var Ee=$[v],Te=$[v+1];Ee==="style"?ge(E,Te):Ee==="dangerouslySetInnerHTML"?et(E,Te):Ee==="children"?ee(E,Te):O(E,Ee,Te,te)}switch(B){case"input":St(E,T);break;case"textarea":gs(E,T);break;case"select":var pe=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Oe=T.value;Oe!=null?ot(E,!!T.multiple,Oe,!1):pe!==!!T.multiple&&(T.defaultValue!=null?ot(E,!!T.multiple,T.defaultValue,!0):ot(E,!!T.multiple,T.multiple?[]:"",!1))}E[fu]=T}catch(De){Lt(i,i.return,De)}}break;case 6:if(br(o,i),jr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(De){Lt(i,i.return,De)}}break;case 3:if(br(o,i),jr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{tu(o.containerInfo)}catch(De){Lt(i,i.return,De)}break;case 4:br(o,i),jr(i);break;case 13:br(o,i),jr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(e0=Ut())),h&4&&f2(i);break;case 22:if(Ee=c!==null&&c.memoizedState!==null,i.mode&1?(yn=(te=yn)||Ee,br(o,i),yn=te):br(o,i),jr(i),h&8192){if(te=i.memoizedState!==null,(i.stateNode.isHidden=te)&&!Ee&&(i.mode&1)!==0)for(Re=i,Ee=i.child;Ee!==null;){for(Te=Re=Ee;Re!==null;){switch(pe=Re,Oe=pe.child,pe.tag){case 0:case 11:case 14:case 15:_u(4,pe,pe.return);break;case 1:qo(pe,pe.return);var Le=pe.stateNode;if(typeof Le.componentWillUnmount=="function"){h=pe,c=pe.return;try{o=h,Le.props=o.memoizedProps,Le.state=o.memoizedState,Le.componentWillUnmount()}catch(De){Lt(h,c,De)}}break;case 5:qo(pe,pe.return);break;case 22:if(pe.memoizedState!==null){g2(Te);continue}}Oe!==null?(Oe.return=pe,Re=Oe):g2(Te)}Ee=Ee.sibling}e:for(Ee=null,Te=i;;){if(Te.tag===5){if(Ee===null){Ee=Te;try{E=Te.stateNode,te?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(B=Te.stateNode,$=Te.memoizedProps.style,v=$!=null&&$.hasOwnProperty("display")?$.display:null,B.style.display=Ae("display",v))}catch(De){Lt(i,i.return,De)}}}else if(Te.tag===6){if(Ee===null)try{Te.stateNode.nodeValue=te?"":Te.memoizedProps}catch(De){Lt(i,i.return,De)}}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;Ee===Te&&(Ee=null),Te=Te.return}Ee===Te&&(Ee=null),Te.sibling.return=Te.return,Te=Te.sibling}}break;case 19:br(o,i),jr(i),h&4&&f2(i);break;case 21:break;default:br(o,i),jr(i)}}function jr(i){var o=i.flags;if(o&2){try{e:{for(var c=i.return;c!==null;){if(l2(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&&(ee(E,""),h.flags&=-33);var T=c2(i);Qm(i,T,E);break;case 3:case 4:var v=h.stateNode.containerInfo,B=c2(i);Km(i,B,v);break;default:throw Error(n(161))}}catch($){Lt(i,i.return,$)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function q7(i,o,c){Re=i,p2(i)}function p2(i,o,c){for(var h=(i.mode&1)!==0;Re!==null;){var E=Re,T=E.child;if(E.tag===22&&h){var v=E.memoizedState!==null||td;if(!v){var B=E.alternate,$=B!==null&&B.memoizedState!==null||yn;B=td;var te=yn;if(td=v,(yn=$)&&!te)for(Re=E;Re!==null;)v=Re,$=v.child,v.tag===22&&v.memoizedState!==null?E2(E):$!==null?($.return=v,Re=$):E2(E);for(;T!==null;)Re=T,p2(T),T=T.sibling;Re=E,td=B,yn=te}m2(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Re=T):m2(i)}}function m2(i){for(;Re!==null;){var o=Re;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:yn||nd(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!yn)if(c===null)h.componentDidMount();else{var E=o.elementType===o.type?c.memoizedProps:yr(o.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&g_(o,T,h);break;case 3:var v=o.updateQueue;if(v!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}g_(o,v,c)}break;case 5:var B=o.stateNode;if(c===null&&o.flags&4){c=B;var $=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&c.focus();break;case"img":$.src&&(c.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var te=o.alternate;if(te!==null){var Ee=te.memoizedState;if(Ee!==null){var Te=Ee.dehydrated;Te!==null&&tu(Te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}yn||o.flags&512&&Xm(o)}catch(pe){Lt(o,o.return,pe)}}if(o===i){Re=null;break}if(c=o.sibling,c!==null){c.return=o.return,Re=c;break}Re=o.return}}function g2(i){for(;Re!==null;){var o=Re;if(o===i){Re=null;break}var c=o.sibling;if(c!==null){c.return=o.return,Re=c;break}Re=o.return}}function E2(i){for(;Re!==null;){var o=Re;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{nd(4,o)}catch($){Lt(o,c,$)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch($){Lt(o,E,$)}}var T=o.return;try{Xm(o)}catch($){Lt(o,T,$)}break;case 5:var v=o.return;try{Xm(o)}catch($){Lt(o,v,$)}}}catch($){Lt(o,o.return,$)}if(o===i){Re=null;break}var B=o.sibling;if(B!==null){B.return=o.return,Re=B;break}Re=o.return}}var Y7=Math.ceil,rd=z.ReactCurrentDispatcher,Jm=z.ReactCurrentOwner,rr=z.ReactCurrentBatchConfig,ut=0,tn=null,Vt=null,an=0,Wn=0,Yo=Oi(0),Xt=0,Su=null,vs=0,id=0,Zm=0,vu=null,Fn=null,e0=0,Wo=1/0,oi=null,sd=!1,t0=null,Mi=null,od=!1,Fi=null,ad=0,Au=0,n0=null,ud=-1,ld=0;function Sn(){return(ut&6)!==0?Ut():ud!==-1?ud:ud=Ut()}function Bi(i){return(i.mode&1)===0?1:(ut&2)!==0&&an!==0?an&-an:N7.transition!==null?(ld===0&&(ld=cx()),ld):(i=mt,i!==0||(i=window.event,i=i===void 0?16:Tx(i.type)),i)}function wr(i,o,c,h){if(50<Au)throw Au=0,n0=null,Error(n(185));Ka(i,c,h),((ut&2)===0||i!==tn)&&(i===tn&&((ut&2)===0&&(id|=c),Xt===4&&Ui(i,an)),Bn(i,h),c===1&&ut===0&&(o.mode&1)===0&&(Wo=Ut()+500,Fc&&Pi()))}function Bn(i,o){var c=i.callbackNode;NB(i,o);var h=yc(i,i===tn?an:0);if(h===0)c!==null&&ax(c),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(c!=null&&ax(c),o===1)i.tag===0?k7(T2.bind(null,i)):i_(T2.bind(null,i)),S7(function(){(ut&6)===0&&Pi()}),c=null;else{switch(dx(h)){case 1:c=Dp;break;case 4:c=ux;break;case 16:c=pc;break;case 536870912:c=lx;break;default:c=pc}c=C2(c,y2.bind(null,i))}i.callbackPriority=o,i.callbackNode=c}}function y2(i,o){if(ud=-1,ld=0,(ut&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Go()&&i.callbackNode!==c)return null;var h=yc(i,i===tn?an:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=cd(i,h);else{o=h;var E=ut;ut|=2;var T=w2();(tn!==i||an!==o)&&(oi=null,Wo=Ut()+500,Cs(i,o));do try{X7();break}catch(B){b2(i,B)}while(!0);bm(),rd.current=T,ut=E,Vt!==null?o=0:(tn=null,an=0,o=Xt)}if(o!==0){if(o===2&&(E=Mp(i),E!==0&&(h=E,o=r0(i,E))),o===1)throw c=Su,Cs(i,0),Ui(i,h),Bn(i,Ut()),c;if(o===6)Ui(i,h);else{if(E=i.current.alternate,(h&30)===0&&!W7(E)&&(o=cd(i,h),o===2&&(T=Mp(i),T!==0&&(h=T,o=r0(i,T))),o===1))throw c=Su,Cs(i,0),Ui(i,h),Bn(i,Ut()),c;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:ks(i,Fn,oi);break;case 3:if(Ui(i,h),(h&130023424)===h&&(o=e0+500-Ut(),10<o)){if(yc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){Sn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=lm(ks.bind(null,i,Fn,oi),o);break}ks(i,Fn,oi);break;case 4:if(Ui(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var v=31-mr(h);T=1<<v,v=o[v],v>E&&(E=v),h&=~T}if(h=E,h=Ut()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*Y7(h/1960))-h,10<h){i.timeoutHandle=lm(ks.bind(null,i,Fn,oi),h);break}ks(i,Fn,oi);break;case 5:ks(i,Fn,oi);break;default:throw Error(n(329))}}}return Bn(i,Ut()),i.callbackNode===c?y2.bind(null,i):null}function r0(i,o){var c=vu;return i.current.memoizedState.isDehydrated&&(Cs(i,o).flags|=256),i=cd(i,o),i!==2&&(o=Fn,Fn=c,o!==null&&i0(o)),i}function i0(i){Fn===null?Fn=i:Fn.push.apply(Fn,i)}function W7(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],T=E.getSnapshot;E=E.value;try{if(!gr(T(),E))return!1}catch(v){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 Ui(i,o){for(o&=~Zm,o&=~id,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var c=31-mr(o),h=1<<c;i[c]=-1,o&=~h}}function T2(i){if((ut&6)!==0)throw Error(n(327));Go();var o=yc(i,0);if((o&1)===0)return Bn(i,Ut()),null;var c=cd(i,o);if(i.tag!==0&&c===2){var h=Mp(i);h!==0&&(o=h,c=r0(i,h))}if(c===1)throw c=Su,Cs(i,0),Ui(i,o),Bn(i,Ut()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,ks(i,Fn,oi),Bn(i,Ut()),null}function s0(i,o){var c=ut;ut|=1;try{return i(o)}finally{ut=c,ut===0&&(Wo=Ut()+500,Fc&&Pi())}}function As(i){Fi!==null&&Fi.tag===0&&(ut&6)===0&&Go();var o=ut;ut|=1;var c=rr.transition,h=mt;try{if(rr.transition=null,mt=1,i)return i()}finally{mt=h,rr.transition=c,ut=o,(ut&6)===0&&Pi()}}function o0(){Wn=Yo.current,At(Yo)}function Cs(i,o){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,_7(c)),Vt!==null)for(c=Vt.return;c!==null;){var h=c;switch(mm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Dc();break;case 3:$o(),At(Ln),At(mn),km();break;case 5:Am(h);break;case 4:$o();break;case 13:At(It);break;case 19:At(It);break;case 10:wm(h.type._context);break;case 22:case 23:o0()}c=c.return}if(tn=i,Vt=i=Hi(i.current,null),an=Wn=o,Xt=0,Su=null,Zm=id=vs=0,Fn=vu=null,xs!==null){for(o=0;o<xs.length;o++)if(c=xs[o],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,T=c.pending;if(T!==null){var v=T.next;T.next=E,h.next=v}c.pending=h}xs=null}return i}function b2(i,o){do{var c=Vt;try{if(bm(),Wc.current=Qc,Gc){for(var h=Pt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Gc=!1}if(Ss=0,en=Gt=Pt=null,yu=!1,Tu=0,Jm.current=null,c===null||c.return===null){Xt=1,Su=o,Vt=null;break}e:{var T=i,v=c.return,B=c,$=o;if(o=an,B.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var te=$,Ee=B,Te=Ee.tag;if((Ee.mode&1)===0&&(Te===0||Te===11||Te===15)){var pe=Ee.alternate;pe?(Ee.updateQueue=pe.updateQueue,Ee.memoizedState=pe.memoizedState,Ee.lanes=pe.lanes):(Ee.updateQueue=null,Ee.memoizedState=null)}var Oe=q_(v);if(Oe!==null){Oe.flags&=-257,Y_(Oe,v,B,T,o),Oe.mode&1&&V_(T,te,o),o=Oe,$=te;var Le=o.updateQueue;if(Le===null){var De=new Set;De.add($),o.updateQueue=De}else Le.add($);break e}else{if((o&1)===0){V_(T,te,o),a0();break e}$=Error(n(426))}}else if(Ot&&B.mode&1){var Ht=q_(v);if(Ht!==null){(Ht.flags&65536)===0&&(Ht.flags|=256),Y_(Ht,v,B,T,o),ym(Vo($,B));break e}}T=$=Vo($,B),Xt!==4&&(Xt=2),vu===null?vu=[T]:vu.push(T),T=v;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var G=z_(T,$,o);m_(T,G);break e;case 1:B=$;var q=T.type,K=T.stateNode;if((T.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&(Mi===null||!Mi.has(K)))){T.flags|=65536,o&=-o,T.lanes|=o;var we=$_(T,B,o);m_(T,we);break e}}T=T.return}while(T!==null)}_2(c)}catch(Be){o=Be,Vt===c&&c!==null&&(Vt=c=c.return);continue}break}while(!0)}function w2(){var i=rd.current;return rd.current=Qc,i===null?Qc:i}function a0(){(Xt===0||Xt===3||Xt===2)&&(Xt=4),tn===null||(vs&268435455)===0&&(id&268435455)===0||Ui(tn,an)}function cd(i,o){var c=ut;ut|=2;var h=w2();(tn!==i||an!==o)&&(oi=null,Cs(i,o));do try{G7();break}catch(E){b2(i,E)}while(!0);if(bm(),ut=c,rd.current=h,Vt!==null)throw Error(n(261));return tn=null,an=0,Xt}function G7(){for(;Vt!==null;)x2(Vt)}function X7(){for(;Vt!==null&&!bB();)x2(Vt)}function x2(i){var o=A2(i.alternate,i,Wn);i.memoizedProps=i.pendingProps,o===null?_2(i):Vt=o,Jm.current=null}function _2(i){var o=i;do{var c=o.alternate;if(i=o.return,(o.flags&32768)===0){if(c=j7(c,o,Wn),c!==null){Vt=c;return}}else{if(c=z7(c,o),c!==null){c.flags&=32767,Vt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Xt=6,Vt=null;return}}if(o=o.sibling,o!==null){Vt=o;return}Vt=o=i}while(o!==null);Xt===0&&(Xt=5)}function ks(i,o,c){var h=mt,E=rr.transition;try{rr.transition=null,mt=1,K7(i,o,c,h)}finally{rr.transition=E,mt=h}return null}function K7(i,o,c,h){do Go();while(Fi!==null);if((ut&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 T=c.lanes|c.childLanes;if(OB(i,T),i===tn&&(Vt=tn=null,an=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||od||(od=!0,C2(pc,function(){return Go(),null})),T=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||T){T=rr.transition,rr.transition=null;var v=mt;mt=1;var B=ut;ut|=4,Jm.current=null,V7(i,c),h2(c,i),g7(am),wc=!!om,am=om=null,i.current=c,q7(c),wB(),ut=B,mt=v,rr.transition=T}else i.current=c;if(od&&(od=!1,Fi=i,ad=E),T=i.pendingLanes,T===0&&(Mi=null),SB(c.stateNode),Bn(i,Ut()),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(sd)throw sd=!1,i=t0,t0=null,i;return(ad&1)!==0&&i.tag!==0&&Go(),T=i.pendingLanes,(T&1)!==0?i===n0?Au++:(Au=0,n0=i):Au=0,Pi(),null}function Go(){if(Fi!==null){var i=dx(ad),o=rr.transition,c=mt;try{if(rr.transition=null,mt=16>i?16:i,Fi===null)var h=!1;else{if(i=Fi,Fi=null,ad=0,(ut&6)!==0)throw Error(n(331));var E=ut;for(ut|=4,Re=i.current;Re!==null;){var T=Re,v=T.child;if((Re.flags&16)!==0){var B=T.deletions;if(B!==null){for(var $=0;$<B.length;$++){var te=B[$];for(Re=te;Re!==null;){var Ee=Re;switch(Ee.tag){case 0:case 11:case 15:_u(8,Ee,T)}var Te=Ee.child;if(Te!==null)Te.return=Ee,Re=Te;else for(;Re!==null;){Ee=Re;var pe=Ee.sibling,Oe=Ee.return;if(u2(Ee),Ee===te){Re=null;break}if(pe!==null){pe.return=Oe,Re=pe;break}Re=Oe}}}var Le=T.alternate;if(Le!==null){var De=Le.child;if(De!==null){Le.child=null;do{var Ht=De.sibling;De.sibling=null,De=Ht}while(De!==null)}}Re=T}}if((T.subtreeFlags&2064)!==0&&v!==null)v.return=T,Re=v;else e:for(;Re!==null;){if(T=Re,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:_u(9,T,T.return)}var G=T.sibling;if(G!==null){G.return=T.return,Re=G;break e}Re=T.return}}var q=i.current;for(Re=q;Re!==null;){v=Re;var K=v.child;if((v.subtreeFlags&2064)!==0&&K!==null)K.return=v,Re=K;else e:for(v=q;Re!==null;){if(B=Re,(B.flags&2048)!==0)try{switch(B.tag){case 0:case 11:case 15:nd(9,B)}}catch(Be){Lt(B,B.return,Be)}if(B===v){Re=null;break e}var we=B.sibling;if(we!==null){we.return=B.return,Re=we;break e}Re=B.return}}if(ut=E,Pi(),Fr&&typeof Fr.onPostCommitFiberRoot=="function")try{Fr.onPostCommitFiberRoot(mc,i)}catch(Be){}h=!0}return h}finally{mt=c,rr.transition=o}}return!1}function S2(i,o,c){o=Vo(c,o),o=z_(i,o,1),i=Li(i,o,1),o=Sn(),i!==null&&(Ka(i,1,o),Bn(i,o))}function Lt(i,o,c){if(i.tag===3)S2(i,i,c);else for(;o!==null;){if(o.tag===3){S2(o,i,c);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Mi===null||!Mi.has(h))){i=Vo(c,i),i=$_(o,i,1),o=Li(o,i,1),i=Sn(),o!==null&&(Ka(o,1,i),Bn(o,i));break}}o=o.return}}function Q7(i,o,c){var h=i.pingCache;h!==null&&h.delete(o),o=Sn(),i.pingedLanes|=i.suspendedLanes&c,tn===i&&(an&c)===c&&(Xt===4||Xt===3&&(an&130023424)===an&&500>Ut()-e0?Cs(i,0):Zm|=c),Bn(i,o)}function v2(i,o){o===0&&((i.mode&1)===0?o=1:(o=Ec,Ec<<=1,(Ec&130023424)===0&&(Ec=4194304)));var c=Sn();i=ri(i,o),i!==null&&(Ka(i,o,c),Bn(i,c))}function J7(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),v2(i,c)}function Z7(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),v2(i,c)}var A2;A2=function(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps||Ln.current)Mn=!0;else{if((i.lanes&c)===0&&(o.flags&128)===0)return Mn=!1,H7(i,o,c);Mn=(i.flags&131072)!==0}else Mn=!1,Ot&&(o.flags&1048576)!==0&&s_(o,Uc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;ed(i,o),i=o.pendingProps;var E=Mo(o,mn.current);zo(o,c),E=Im(null,o,h,i,E,c);var T=Pm();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,Dn(h)?(T=!0,Mc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Sm(o),E.updater=Jc,o.stateNode=E,E._reactInternals=o,Bm(o,h,i,c),o=zm(null,o,h,!0,T,c)):(o.tag=0,Ot&&T&&pm(o),_n(null,o,E,c),o=o.child),o;case 16:h=o.elementType;e:{switch(ed(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=tU(h),i=yr(h,i),E){case 0:o=jm(null,o,h,i,c);break e;case 1:o=J_(null,o,h,i,c);break e;case 11:o=W_(null,o,h,i,c);break e;case 14:o=G_(null,o,h,yr(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:yr(h,E),jm(i,o,h,E,c);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:yr(h,E),J_(i,o,h,E,c);case 3:e:{if(Z_(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,p_(i,o),qc(o,h,null,c);var v=o.memoizedState;if(h=v.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){E=Vo(Error(n(423)),o),o=e2(i,o,h,c,E);break e}else if(h!==E){E=Vo(Error(n(424)),o),o=e2(i,o,h,c,E);break e}else for(Yn=Ni(o.stateNode.containerInfo.firstChild),qn=o,Ot=!0,Er=null,c=f_(o,null,h,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Uo(),h===E){o=si(i,o,c);break e}_n(i,o,h,c)}o=o.child}return o;case 5:return E_(o),i===null&&Em(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,v=E.children,um(h,E)?v=null:T!==null&&um(h,T)&&(o.flags|=32),Q_(i,o),_n(i,o,v,c),o.child;case 6:return i===null&&Em(o),null;case 13:return t2(i,o,c);case 4:return vm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=Ho(o,null,h,c):_n(i,o,h,c),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:yr(h,E),W_(i,o,h,E,c);case 7:return _n(i,o,o.pendingProps,c),o.child;case 8:return _n(i,o,o.pendingProps.children,c),o.child;case 12:return _n(i,o,o.pendingProps.children,c),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,T=o.memoizedProps,v=E.value,bt(zc,h._currentValue),h._currentValue=v,T!==null)if(gr(T.value,v)){if(T.children===E.children&&!Ln.current){o=si(i,o,c);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var B=T.dependencies;if(B!==null){v=T.child;for(var $=B.firstContext;$!==null;){if($.context===h){if(T.tag===1){$=ii(-1,c&-c),$.tag=2;var te=T.updateQueue;if(te!==null){te=te.shared;var Ee=te.pending;Ee===null?$.next=$:($.next=Ee.next,Ee.next=$),te.pending=$}}T.lanes|=c,$=T.alternate,$!==null&&($.lanes|=c),xm(T.return,c,o),B.lanes|=c;break}$=$.next}}else if(T.tag===10)v=T.type===o.type?null:T.child;else if(T.tag===18){if(v=T.return,v===null)throw Error(n(341));v.lanes|=c,B=v.alternate,B!==null&&(B.lanes|=c),xm(v,c,o),v=T.sibling}else v=T.child;if(v!==null)v.return=T;else for(v=T;v!==null;){if(v===o){v=null;break}if(T=v.sibling,T!==null){T.return=v.return,v=T;break}v=v.return}T=v}_n(i,o,E.children,c),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,zo(o,c),E=tr(E),h=h(E),o.flags|=1,_n(i,o,h,c),o.child;case 14:return h=o.type,E=yr(h,o.pendingProps),E=yr(h.type,E),G_(i,o,h,E,c);case 15:return X_(i,o,o.type,o.pendingProps,c);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:yr(h,E),ed(i,o),o.tag=1,Dn(h)?(i=!0,Mc(o)):i=!1,zo(o,c),H_(o,h,E),Bm(o,h,E,c),zm(null,o,h,!0,i,c);case 19:return r2(i,o,c);case 22:return K_(i,o,c)}throw Error(n(156,o.tag))};function C2(i,o){return ox(i,o)}function eU(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 ir(i,o,c,h){return new eU(i,o,c,h)}function u0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function tU(i){if(typeof i=="function")return u0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===se)return 11;if(i===ne)return 14}return 2}function Hi(i,o){var c=i.alternate;return c===null?(c=ir(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 dd(i,o,c,h,E,T){var v=2;if(h=i,typeof i=="function")u0(i)&&(v=1);else if(typeof i=="string")v=5;else e:switch(i){case V:return Ns(c.children,E,T,o);case J:v=8,E|=8;break;case ce:return i=ir(12,c,o,E|2),i.elementType=ce,i.lanes=T,i;case ue:return i=ir(13,c,o,E),i.elementType=ue,i.lanes=T,i;case fe:return i=ir(19,c,o,E),i.elementType=fe,i.lanes=T,i;case de:return fd(c,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case U:v=10;break e;case ie:v=9;break e;case se:v=11;break e;case ne:v=14;break e;case Se:v=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=ir(v,c,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function Ns(i,o,c,h){return i=ir(7,i,h,o),i.lanes=c,i}function fd(i,o,c,h){return i=ir(22,i,h,o),i.elementType=de,i.lanes=c,i.stateNode={isHidden:!1},i}function l0(i,o,c){return i=ir(6,i,null,o),i.lanes=c,i}function c0(i,o,c){return o=ir(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function nU(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=Fp(0),this.expirationTimes=Fp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function d0(i,o,c,h,E,T,v,B,$){return i=new nU(i,o,c,B,$),o===1?(o=1,T===!0&&(o|=8)):o=0,T=ir(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sm(T),i}function rU(i,o,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:h==null?null:""+h,children:i,containerInfo:o,implementation:c}}function k2(i){if(!i)return Ii;i=i._reactInternals;e:{if(Es(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(Dn(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(Dn(c))return n_(i,c,o)}return o}function N2(i,o,c,h,E,T,v,B,$){return i=d0(c,h,!0,i,E,T,v,B,$),i.context=k2(null),c=i.current,h=Sn(),E=Bi(c),T=ii(h,E),T.callback=o!=null?o:null,Li(c,T,E),i.current.lanes=E,Ka(i,E,h),Bn(i,h),i}function hd(i,o,c,h){var E=o.current,T=Sn(),v=Bi(E);return c=k2(c),o.context===null?o.context=c:o.pendingContext=c,o=ii(T,v),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=Li(E,o,v),i!==null&&(wr(i,E,v,T),Vc(i,E,v)),v}function pd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function O2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function f0(i,o){O2(i,o),(i=i.alternate)&&O2(i,o)}function iU(){return null}var I2=typeof reportError=="function"?reportError:function(i){console.error(i)};function h0(i){this._internalRoot=i}md.prototype.render=h0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));hd(i,o,null,null)},md.prototype.unmount=h0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;As(function(){hd(null,i,null,null)}),o[Zr]=null}};function md(i){this._internalRoot=i}md.prototype.unstable_scheduleHydration=function(i){if(i){var o=px();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Ai.length&&o!==0&&o<Ai[c].priority;c++);Ai.splice(c,0,i),c===0&&Ex(i)}};function p0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function gd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function P2(){}function sU(i,o,c,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var te=pd(v);T.call(te)}}var v=N2(o,h,i,0,null,!1,!1,"",P2);return i._reactRootContainer=v,i[Zr]=v.current,cu(i.nodeType===8?i.parentNode:i),As(),v}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var B=h;h=function(){var te=pd($);B.call(te)}}var $=d0(i,0,!1,null,null,!1,!1,"",P2);return i._reactRootContainer=$,i[Zr]=$.current,cu(i.nodeType===8?i.parentNode:i),As(function(){hd(o,$,c,h)}),$}function Ed(i,o,c,h,E){var T=c._reactRootContainer;if(T){var v=T;if(typeof E=="function"){var B=E;E=function(){var $=pd(v);B.call($)}}hd(o,v,i,E)}else v=sU(c,o,i,E,h);return pd(v)}fx=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var c=Xa(o.pendingLanes);c!==0&&(Bp(o,c|1),Bn(o,Ut()),(ut&6)===0&&(Wo=Ut()+500,Pi()))}break;case 13:As(function(){var h=ri(i,1);if(h!==null){var E=Sn();wr(h,i,1,E)}}),f0(i,1)}},Up=function(i){if(i.tag===13){var o=ri(i,134217728);if(o!==null){var c=Sn();wr(o,i,134217728,c)}f0(i,134217728)}},hx=function(i){if(i.tag===13){var o=Bi(i),c=ri(i,o);if(c!==null){var h=Sn();wr(c,i,o,h)}f0(i,o)}},px=function(){return mt},mx=function(i,o){var c=mt;try{return mt=i,o()}finally{mt=c}},vo=function(i,o,c){switch(o){case"input":if(St(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=Lc(h);if(!E)throw Error(n(90));Ft(h),St(h,E)}}}break;case"textarea":gs(i,c);break;case"select":o=c.value,o!=null&&ot(i,!!c.multiple,o,!1)}},Zw=s0,ex=As;var oU={usingClientEntryPoint:!1,Events:[hu,Lo,Lc,Qw,Jw,s0]},Cu={findFiberByHostInstance:ys,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},aU={bundleType:Cu.bundleType,version:Cu.version,rendererPackageName:Cu.rendererPackageName,rendererConfig:Cu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:z.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=ix(i),i===null?null:i.stateNode},findFiberByHostInstance:Cu.findFiberByHostInstance||iU,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 yd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yd.isDisabled&&yd.supportsFiber)try{mc=yd.inject(aU),Fr=yd}catch(i){}}return kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oU,kn.createPortal=function(i,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p0(o))throw Error(n(200));return rU(i,o,null,c)},kn.createRoot=function(i,o){if(!p0(i))throw Error(n(299));var c=!1,h="",E=I2;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=d0(i,1,!1,null,null,c,!1,h,E),i[Zr]=o.current,cu(i.nodeType===8?i.parentNode:i),new h0(o)},kn.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=ix(o),i=i===null?null:i.stateNode,i},kn.flushSync=function(i){return As(i)},kn.hydrate=function(i,o,c){if(!gd(o))throw Error(n(200));return Ed(null,i,o,!0,c)},kn.hydrateRoot=function(i,o,c){if(!p0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,T="",v=I2;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(T=c.identifierPrefix),c.onRecoverableError!==void 0&&(v=c.onRecoverableError)),o=N2(o,null,i,1,c!=null?c:null,E,!1,T,v),i[Zr]=o.current,cu(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 md(o)},kn.render=function(i,o,c){if(!gd(o))throw Error(n(200));return Ed(null,i,o,!1,c)},kn.unmountComponentAtNode=function(i){if(!gd(i))throw Error(n(40));return i._reactRootContainer?(As(function(){Ed(null,null,i,!1,function(){i._reactRootContainer=null,i[Zr]=null})}),!0):!1},kn.unstable_batchedUpdates=s0,kn.unstable_renderSubtreeIntoContainer=function(i,o,c,h){if(!gd(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Ed(i,o,c,!1,h)},kn.version="18.3.1-next-f1338f8080-20240426",kn}var m1;function g1(){if(m1)return bf.exports;m1=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(),bf.exports=dk(),bf.exports}var $s=g1();function E1(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=E1(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=E1(e))&&(r&&(r+=" "),r+=t);return r}var y1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},T1=$i.createContext&&$i.createContext(y1),fk=["attr","size","title"];function hk(e,t){if(e==null)return{};var n=pk(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 pk(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 sl(){return sl=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},sl.apply(this,arguments)}function b1(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 ol(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b1(Object(n),!0).forEach(function(r){mk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mk(e,t,n){return t=gk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gk(e){var t=Ek(e,"string");return typeof t=="symbol"?t:t+""}function Ek(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 w1(e){return e&&e.map((t,n)=>$i.createElement(t.tag,ol({key:n},t.attr),w1(t.child)))}function pt(e){return t=>$i.createElement(yk,sl({attr:ol({},e.attr)},t),w1(e.child))}function yk(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=hk(e,fk),l=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),$i.createElement("svg",sl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:ol(ol({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&$i.createElement("title",null,a),e.children)};return T1!==void 0?$i.createElement(T1.Consumer,null,n=>t(n)):t(y1)}function Tk(e){return pt({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 bk(e){return pt({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 wk(e){return pt({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 lr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:l})=>!n&&!t?null:w.jsx("button",{className:F(e,`${N}-icon-button`),type:r,"aria-label":s,title:a,onClick:l,disabled:u,children:t?w.jsx("img",{className:F(`${N}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),xk="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",_k=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ct(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?w.jsx(wk,{className:F(t,`${N}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||xk,alt:"Copilot",className:F(t,`${N}-minimized-icon-img`)});return w.jsx(lr,{className:F(t,`${N}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},Sk=()=>{const{globalClassName:e,themeVariables:t}=ct(),n=()=>{Ls(!1),$r(!0)};return $s.createPortal(w.jsx("div",{className:F(e,`${N}-minimized-container`),style:t,children:w.jsx(_k,{onClick:n})}),document.body)};function vk(e){return pt({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 bn(){const e=R.useContext($g);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const Ak=e=>({[`${Un}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${Un}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${Un}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${Un}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${Un}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${Un}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function x1(e){return pt({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 Ck(e){return pt({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 _f(e){return pt({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 kk(e){return pt({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 Nk(e){return pt({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 Ok(e){return pt({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 _1(e){return pt({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 S1(e){return pt({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 Ik(e){return pt({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 Pk(e){return pt({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 Rk(e){return pt({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 v1(e){return pt({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 Sf=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>w.jsx("button",{className:F(`${N}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),Lk=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?w.jsx("img",{className:F(`${N}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(_f,{size:"16px"})},Dk=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return w.jsx(lr,{className:F(e,n,`cim-${r}-component`,`${N}-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:w.jsx(_f,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs(Sf,{className:F(e,n,`cim-${r}-component`,`${N}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&w.jsx(Lk,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function FU(){}function BU(){}function A1(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 C1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Mk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bk={};function k1(e,t){return(Bk.jsx?Fk:Mk).test(e)}const Uk=/[ \t\n\f\r]/g;function Hk(e){return typeof e=="object"?e.type==="text"?N1(e.value):!1:N1(e)}function N1(e){return e.replace(Uk,"")===""}class ca{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ca.prototype.normal={},ca.prototype.property={},ca.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 ca(n,r,t)}function da(e){return e.toLowerCase()}class Nn{constructor(t,n){this.attribute=n,this.property=t}}Nn.prototype.attribute="",Nn.prototype.booleanish=!1,Nn.prototype.boolean=!1,Nn.prototype.commaOrSpaceSeparated=!1,Nn.prototype.commaSeparated=!1,Nn.prototype.defined=!1,Nn.prototype.mustUseProperty=!1,Nn.prototype.number=!1,Nn.prototype.overloadedBoolean=!1,Nn.prototype.property="",Nn.prototype.spaceSeparated=!1,Nn.prototype.space=void 0;let jk=0;const Ze=Zi(),zt=Zi(),vf=Zi(),be=Zi(),Et=Zi(),Ji=Zi(),jn=Zi();function Zi(){return bd(2,++jk)}const Af=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ze,booleanish:zt,commaOrSpaceSeparated:jn,commaSeparated:Ji,number:be,overloadedBoolean:vf,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),Cf=Object.keys(Af);class kf extends Nn{constructor(t,n,r,s){let a=-1;if(super(t,n),I1(this,"space",s),typeof r=="number")for(;++a<Cf.length;){const u=Cf[a];I1(this,Cf[a],(r&Af[u])===Af[u])}}}kf.prototype.defined=!0;function I1(e,t,n){n&&(e[t]=n)}function Vs(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new kf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[da(r)]=r,n[da(a.attribute)]=r}return new ca(t,n,e.space)}const P1=Vs({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:Et,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:be,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:Et,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:zt,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 R1(e,t){return t in e?e[t]:t}function L1(e,t){return R1(e,t.toLowerCase())}const zk=Vs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ji,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Ze,allowPaymentRequest:Ze,allowUserMedia:Ze,alpha:Ze,alt:null,as:null,async:Ze,autoCapitalize:null,autoComplete:Et,autoFocus:Ze,autoPlay:Ze,blocking:Et,capture:null,charSet:null,checked:Ze,cite:null,className:Et,closedBy:null,colorSpace:null,cols:be,colSpan:be,command:null,commandFor:null,content:null,contentEditable:zt,controls:Ze,controlsList:Et,coords:be|Ji,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ze,defer:Ze,dir:null,dirName:null,disabled:Ze,download:vf,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ze,formTarget:null,headers:Et,height:be,hidden:vf,high:be,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Ze,inputMode:null,integrity:null,is:null,isMap:Ze,itemId:null,itemProp:Et,itemRef:Et,itemScope:Ze,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ze,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Ze,muted:Ze,name:null,nonce:null,noModule:Ze,noValidate:Ze,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:Ze,optimum:be,pattern:null,ping:Et,placeholder:null,playsInline:Ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ze,referrerPolicy:null,rel:Et,required:Ze,reversed:Ze,rows:be,rowSpan:be,sandbox:Et,scope:null,scoped:Ze,seamless:Ze,selected:Ze,shadowRootClonable:Ze,shadowRootCustomElementRegistry:Ze,shadowRootDelegatesFocus:Ze,shadowRootMode:null,shadowRootSerializable:Ze,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:zt,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:Ze,useMap:null,value:zt,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,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:Ze,declare:Ze,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Ze,noHref:Ze,noShade:Ze,noWrap:Ze,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:zt,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:Ze,disablePictureInPicture:Ze,disableRemotePlayback:Ze,exportParts:Ji,part:Et,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:L1}),$k=Vs({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:jn,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:Et,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:Ze,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:Ji,g2:Ji,glyphName:Ji,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:jn,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:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant: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:jn,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:jn,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:jn,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:R1}),D1=Vs({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()}}),M1=Vs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:L1}),F1=Vs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Vk={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"},qk=/[A-Z]/g,B1=/-[a-z]/g,Yk=/^data[-\w.:]+$/i;function al(e,t){const n=da(t);let r=t,s=Nn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Yk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(B1,Gk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!B1.test(a)){let u=a.replace(qk,Wk);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=kf}return new s(r,t)}function Wk(e){return"-"+e.toLowerCase()}function Gk(e){return e.charAt(1).toUpperCase()}const fa=O1([P1,zk,D1,M1,F1],"html"),di=O1([P1,$k,D1,M1,F1],"svg");function U1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function H1(e){return e.join(" ").trim()}var qs={},Nf,j1;function Xk(){if(j1)return Nf;j1=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="/",m="*",p="",b="comment",y="declaration";function x(A,_){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];_=_||{};var k=1,O=1;function z(fe){var ne=fe.match(t);ne&&(k+=ne.length);var Se=fe.lastIndexOf(d);O=~Se?fe.length-Se:O+fe.length}function W(){var fe={line:k,column:O};return function(ne){return ne.position=new D(fe),ce(),ne}}function D(fe){this.start=fe,this.end={line:k,column:O},this.source=_.source}D.prototype.content=A;function V(fe){var ne=new Error(_.source+":"+k+":"+O+": "+fe);if(ne.reason=fe,ne.filename=_.source,ne.line=k,ne.column=O,ne.source=A,!_.silent)throw ne}function J(fe){var ne=fe.exec(A);if(ne){var Se=ne[0];return z(Se),A=A.slice(Se.length),ne}}function ce(){J(n)}function U(fe){var ne;for(fe=fe||[];ne=ie();)ne!==!1&&fe.push(ne);return fe}function ie(){var fe=W();if(!(f!=A.charAt(0)||m!=A.charAt(1))){for(var ne=2;p!=A.charAt(ne)&&(m!=A.charAt(ne)||f!=A.charAt(ne+1));)++ne;if(ne+=2,p===A.charAt(ne-1))return V("End of comment missing");var Se=A.slice(2,ne-2);return O+=2,z(Se),A=A.slice(ne),O+=2,fe({type:b,comment:Se})}}function se(){var fe=W(),ne=J(r);if(ne){if(ie(),!J(s))return V("property missing ':'");var Se=J(a),de=fe({type:y,property:S(ne[0].replace(e,p)),value:Se?S(Se[0].replace(e,p)):p});return J(u),de}}function ue(){var fe=[];U(fe);for(var ne;ne=se();)ne!==!1&&(fe.push(ne),U(fe));return fe}return ce(),ue()}function S(A){return A?A.replace(l,p):p}return Nf=x,Nf}var z1;function Kk(){if(z1)return qs;z1=1;var e=qs&&qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qs,"__esModule",{value:!0}),qs.default=n;const t=e(Xk());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:m}=d;l?s(f,m,d):m&&(a=a||{},a[f]=m)}),a}return qs}var ha={},$1;function Qk(){if($1)return ha;$1=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.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,m){return m.toUpperCase()},l=function(f,m){return"".concat(m,"-")},d=function(f,m){return m===void 0&&(m={}),a(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(s,l):f=f.replace(r,l),f.replace(t,u))};return ha.camelCase=d,ha}var pa,V1;function Jk(){if(V1)return pa;V1=1;var e=pa&&pa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(Kk()),n=Qk();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,pa=r,pa}var Zk=Jk();const eN=rt(Zk),ul=q1("end"),vr=q1("start");function q1(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 Y1(e){const t=vr(e),n=ul(e);if(t&&n)return{start:t,end:n}}function ma(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?Of(e):""}function Of(e){return G1(e&&e.line)+":"+G1(e&&e.column)}function W1(e){return Of(e&&e.start)+"-"+Of(e&&e.end)}function G1(e){return e&&typeof e=="number"?e:1}class cn 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=H({},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=ma(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}}cn.prototype.file="",cn.prototype.name="",cn.prototype.reason="",cn.prototype.message="",cn.prototype.stack="",cn.prototype.column=void 0,cn.prototype.line=void 0,cn.prototype.ancestors=void 0,cn.prototype.cause=void 0,cn.prototype.fatal=void 0,cn.prototype.place=void 0,cn.prototype.ruleId=void 0,cn.prototype.source=void 0;const If={}.hasOwnProperty,tN=new Map,nN=/[A-Z]/g,rN=new Set(["table","tbody","thead","tfoot","tr"]),iN=new Set(["td","th"]),X1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sN(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=hN(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=fN(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"?di:fa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=K1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function K1(e,t,n){if(t.type==="element")return oN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return aN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return lN(e,t,n);if(t.type==="mdxjsEsm")return uN(e,t);if(t.type==="root")return cN(e,t,n);if(t.type==="text")return dN(e,t)}function oN(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=di,e.schema=s),e.ancestors.push(t);const a=J1(e,t.tagName,!1),u=pN(e,t);let l=Rf(e,t);return rN.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!Hk(d):!0})),Q1(e,u,a,t),Pf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function aN(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)}ga(e,t.position)}function uN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ga(e,t.position)}function lN(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=di,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:J1(e,t.name,!0),u=mN(e,t),l=Rf(e,t);return Q1(e,u,a,t),Pf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function cN(e,t,n){const r={};return Pf(r,Rf(e,t)),e.create(t,e.Fragment,r,n)}function dN(e,t){return t.value}function Q1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Pf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function fN(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 hN(e,t){return n;function n(r,s,a,u){const l=Array.isArray(a.children),d=vr(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 pN(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&If.call(t.properties,s)){const a=gN(e,s,t.properties[s]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&iN.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 mN(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 ga(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 ga(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Rf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:tN;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=K1(e,a,u);l!==void 0&&n.push(l)}return n}function gN(e,t,n){const r=al(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?C1(n):H1(n)),r.property==="style"){let s=typeof n=="object"?n:EN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=yN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?Vk[r.property]||r.property:r.attribute,n]}}function EN(e,t){try{return eN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new cn("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=X1+"#cannot-parse-style-attribute",s}}function J1(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=k1(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=k1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return If.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);ga(e)}function ga(e,t){const n=new cn("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=X1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function yN(e){const t={};let n;for(n in e)If.call(e,n)&&(t[TN(n)]=e[n]);return t}function TN(e){let t=e.replace(nN,bN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function bN(e){return"-"+e.toLowerCase()}const Lf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},wN={};function Df(e,t){const n=wN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Z1(e,r,s)}function Z1(e,t,n){if(xN(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 eE(e.children,t,n)}return Array.isArray(e)?eE(e,t,n):""}function eE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=Z1(e[s],t,n);return r.join("")}function xN(e){return!!(e&&typeof e=="object")}const tE=document.createElement("i");function Mf(e){const t="&"+e+";";tE.innerHTML=t;const n=tE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zn(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 Xn(e,t){return e.length>0?(zn(e,e.length,0,t),e):t}const nE={}.hasOwnProperty;function rE(e){const t={};let n=-1;for(;++n<e.length;)_N(t,e[n]);return t}function _N(e,t){let n;for(n in t){const s=(nE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){nE.call(s,u)||(s[u]=[]);const l=a[u];SN(s[u],Array.isArray(l)?l:l?[l]:[])}}}function SN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);zn(e,0,0,r)}function iE(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 cr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wn=fi(/[A-Za-z]/),dn=fi(/[\dA-Za-z]/),vN=fi(/[#-'*+\--9=?A-Z^-~]/);function ll(e){return e!==null&&(e<32||e===127)}const Ff=fi(/\d/),AN=fi(/[\dA-Fa-f]/),CN=fi(/[!-/:-@[-`{-~]/);function qe(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const cl=fi(new RegExp("\\p{P}|\\p{S}","u")),es=fi(/\s/);function fi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ys(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&dn(e.charCodeAt(n+1))&&dn(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 at(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return it(d)?(e.enter(n),l(d)):t(d)}function l(d){return it(d)&&a++<s?(e.consume(d),l):(e.exit(n),t(d))}}const kN={tokenize:NN};function NN(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"),at(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 qe(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const ON={tokenize:IN},sE={tokenize:PN};function IN(e){const t=this,n=[];let r=0,s,a,u;return l;function l(O){if(r<n.length){const z=n[r];return t.containerState=z[1],e.attempt(z[0].continuation,d,f)(O)}return f(O)}function d(O){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&k();const z=t.events.length;let W=z,D;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){D=t.events[W][1].end;break}_(r);let V=z;for(;V<t.events.length;)t.events[V][1].end=H({},D),V++;return zn(t.events,W+1,0,t.events.slice(z)),t.events.length=V,f(O)}return l(O)}function f(O){if(r===n.length){if(!s)return b(O);if(s.currentConstruct&&s.currentConstruct.concrete)return x(O);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sE,m,p)(O)}function m(O){return s&&k(),_(r),b(O)}function p(O){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(O)}function b(O){return t.containerState={},e.attempt(sE,y,x)(O)}function y(O){return r++,n.push([t.currentConstruct,t.containerState]),b(O)}function x(O){if(O===null){s&&k(),_(0),e.consume(O);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),S(O)}function S(O){if(O===null){A(e.exit("chunkFlow"),!0),_(0),e.consume(O);return}return qe(O)?(e.consume(O),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(O),S)}function A(O,z){const W=t.sliceStream(O);if(z&&W.push(null),O.previous=a,a&&(a.next=O),a=O,s.defineSkip(O.start),s.write(W),t.parser.lazy[O.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<u&&(!s.events[D][1].end||s.events[D][1].end.offset>u))return;const V=t.events.length;let J=V,ce,U;for(;J--;)if(t.events[J][0]==="exit"&&t.events[J][1].type==="chunkFlow"){if(ce){U=t.events[J][1].end;break}ce=!0}for(_(r),D=V;D<t.events.length;)t.events[D][1].end=H({},U),D++;zn(t.events,J+1,0,t.events.slice(V)),t.events.length=D}}function _(O){let z=n.length;for(;z-- >O;){const W=n[z];t.containerState=W[1],W[0].exit.call(t,e)}n.length=O}function k(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function PN(e,t,n){return at(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ws(e){if(e===null||yt(e)||es(e))return 1;if(cl(e))return 2}function dl(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Bf={name:"attention",resolveAll:RN,tokenize:LN};function RN(e,t){let n=-1,r,s,a,u,l,d,f,m;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 p=H({},e[r][1].end),b=H({},e[n][1].start);oE(p,-d),oE(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:p,end:H({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:H({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:H({},e[r][1].end),end:H({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:H({},u.start),end:H({},l.end)},e[r][1].end=H({},u.start),e[n][1].start=H({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Xn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Xn(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Xn(f,dl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Xn(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,f=Xn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,zn(e,r-1,n-r+3,f),n=r+f.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function LN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Ws(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"),m=Ws(d),p=!m||m===2&&s||n.includes(d),b=!s||s===2&&m||n.includes(r);return f._open=!!(a===42?p:p&&(s||!b)),f._close=!!(a===42?b:b&&(m||!p)),t(d)}}function oE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const DN={name:"autolink",tokenize:MN};function MN(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 wn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||dn(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||dn(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||ll(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),m):vN(y)?(e.consume(y),f):n(y)}function m(y){return dn(y)?p(y):n(y)}function p(y){return y===46?(e.consume(y),r=0,m):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||dn(y))&&r++<63){const x=y===45?b:p;return e.consume(y),x}return n(y)}}const Ea={partial:!0,tokenize:FN};function FN(e,t,n){return r;function r(a){return it(a)?at(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||qe(a)?t(a):n(a)}}const aE={continuation:{tokenize:UN},exit:HN,name:"blockQuote",tokenize:BN};function BN(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 it(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function UN(e,t,n){const r=this;return s;function s(u){return it(u)?at(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(aE,t,n)(u)}}function HN(e){e.exit("blockQuote")}const uE={name:"characterEscape",tokenize:jN};function jN(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 CN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const lE={name:"characterReference",tokenize:zN};function zN(e,t,n){const r=this;let s=0,a,u;return l;function l(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=dn,m(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=AN,m):(e.enter("characterReferenceValue"),a=7,u=Ff,m(p))}function m(p){if(p===59&&s){const b=e.exit("characterReferenceValue");return u===dn&&!Mf(r.sliceSerialize(b))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(p)&&s++<a?(e.consume(p),m):n(p)}}const cE={partial:!0,tokenize:VN},dE={concrete:!0,name:"codeFenced",tokenize:$N};function $N(e,t,n){const r=this,s={partial:!0,tokenize:W};let a=0,u=0,l;return d;function d(D){return f(D)}function f(D){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,l=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(D)}function m(D){return D===l?(u++,e.consume(D),m):u<3?n(D):(e.exit("codeFencedFenceSequence"),it(D)?at(e,p,"whitespace")(D):p(D))}function p(D){return D===null||qe(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(cE,S,z)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||qe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(D)):it(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,y,"whitespace")(D)):D===96&&D===l?n(D):(e.consume(D),b)}function y(D){return D===null||qe(D)?p(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===null||qe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(D)):D===96&&D===l?n(D):(e.consume(D),x)}function S(D){return e.attempt(s,z,A)(D)}function A(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),_}function _(D){return a>0&&it(D)?at(e,k,"linePrefix",a+1)(D):k(D)}function k(D){return D===null||qe(D)?e.check(cE,S,z)(D):(e.enter("codeFlowValue"),O(D))}function O(D){return D===null||qe(D)?(e.exit("codeFlowValue"),k(D)):(e.consume(D),O)}function z(D){return e.exit("codeFenced"),t(D)}function W(D,V,J){let ce=0;return U;function U(ne){return D.enter("lineEnding"),D.consume(ne),D.exit("lineEnding"),ie}function ie(ne){return D.enter("codeFencedFence"),it(ne)?at(D,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):se(ne)}function se(ne){return ne===l?(D.enter("codeFencedFenceSequence"),ue(ne)):J(ne)}function ue(ne){return ne===l?(ce++,D.consume(ne),ue):ce>=u?(D.exit("codeFencedFenceSequence"),it(ne)?at(D,fe,"whitespace")(ne):fe(ne)):J(ne)}function fe(ne){return ne===null||qe(ne)?(D.exit("codeFencedFence"),V(ne)):J(ne)}}}function VN(e,t,n){const r=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Uf={name:"codeIndented",tokenize:YN},qN={partial:!0,tokenize:WN};function YN(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),at(e,a,"linePrefix",5)(f)}function a(f){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):qe(f)?e.attempt(qN,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||qe(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function WN(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):qe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):at(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):qe(u)?s(u):n(u)}}const GN={name:"codeText",previous:KN,resolve:XN,tokenize:QN};function XN(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 KN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function QN(e,t,n){let r=0,s,a;return u;function u(p){return e.enter("codeText"),e.enter("codeTextSequence"),l(p)}function l(p){return p===96?(e.consume(p),r++,l):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(a=e.enter("codeTextSequence"),s=0,m(p)):qe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||qe(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),f)}function m(p){return p===96?(e.consume(p),s++,m):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",f(p))}}class JN{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&&ya(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),ya(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ya(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);ya(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ya(this.left,n.reverse())}}}function ya(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 fE(e){const t={};let n=-1,r,s,a,u,l,d,f;const m=new JN(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.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,ZN(m,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=m.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(m.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=H({},m.get(s)[1].start),l=m.slice(s,n),l.unshift(r),m.splice(s,n-s+1,l))}}return zn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!f}function ZN(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 m,p,b=-1,y=n,x=0,S=0;const A=[S];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(m=r.sliceStream(y),y.next||m.push(null),p&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),p=y,y=y.next}for(y=n;++b<l.length;)l[b][0]==="exit"&&l[b-1][0]==="enter"&&l[b][1].type===l[b-1][1].type&&l[b][1].start.line!==l[b][1].end.line&&(S=b+1,A.push(S),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(),b=A.length;b--;){const _=l.slice(A[b],A[b+1]),k=a.pop();d.push([k,k+_.length-1]),e.splice(k,2,_)}for(d.reverse(),b=-1;++b<d.length;)f[x+d[b][0]]=x+d[b][1],x+=d[b][1]-d[b][0]-1;return f}const e3={resolve:n3,tokenize:r3},t3={partial:!0,tokenize:i3};function n3(e){return fE(e),e}function r3(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):qe(l)?e.check(t3,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 i3(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),at(e,a,"linePrefix")}function a(u){if(u===null||qe(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 hE(e,t,n,r,s,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let m=0;return p;function p(_){return _===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(_),e.exit(a),b):_===null||_===32||_===41||ll(_)?n(_):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),S(_))}function b(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(_))}function y(_){return _===62?(e.exit("chunkString"),e.exit(l),b(_)):_===null||_===60||qe(_)?n(_):(e.consume(_),_===92?x:y)}function x(_){return _===60||_===62||_===92?(e.consume(_),y):y(_)}function S(_){return!m&&(_===null||_===41||yt(_))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(_)):m<f&&_===40?(e.consume(_),m++,S):_===41?(e.consume(_),m--,S):_===null||_===32||_===40||ll(_)?n(_):(e.consume(_),_===92?A:S)}function A(_){return _===40||_===41||_===92?(e.consume(_),S):S(_)}}function pE(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),m}function m(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):qe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===null||y===91||y===93||qe(y)||l++>999?(e.exit("chunkString"),m(y)):(e.consume(y),d||(d=!it(y)),y===92?b:p)}function b(y){return y===91||y===92||y===93?(e.consume(y),l++,p):p(y)}}function mE(e,t,n,r,s,a){let u;return l;function l(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):qe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),at(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===u||b===null||qe(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?p:m)}function p(b){return b===u||b===92?(e.consume(b),m):m(b)}}function Ta(e,t){let n;return r;function r(s){return qe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):it(s)?at(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const s3={name:"definition",tokenize:a3},o3={partial:!0,tokenize:u3};function a3(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return pE.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return s=cr(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 yt(y)?Ta(e,f)(y):f(y)}function f(y){return hE(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function m(y){return e.attempt(o3,p,p)(y)}function p(y){return it(y)?at(e,b,"whitespace")(y):b(y)}function b(y){return y===null||qe(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function u3(e,t,n){return r;function r(l){return yt(l)?Ta(e,s)(l):n(l)}function s(l){return mE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return it(l)?at(e,u,"whitespace")(l):u(l)}function u(l){return l===null||qe(l)?t(l):n(l)}}const l3={name:"hardBreakEscape",tokenize:c3};function c3(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return qe(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const d3={name:"headingAtx",resolve:f3,tokenize:h3};function f3(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"},zn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function h3(e,t,n){let r=0;return s;function s(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&r++<6?(e.consume(m),u):m===null||yt(m)?(e.exit("atxHeadingSequence"),l(m)):n(m)}function l(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||qe(m)?(e.exit("atxHeading"),t(m)):it(m)?at(e,l,"whitespace")(m):(e.enter("atxHeadingText"),f(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),l(m))}function f(m){return m===null||m===35||yt(m)?(e.exit("atxHeadingText"),l(m)):(e.consume(m),f)}}const p3=["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"],gE=["pre","script","style","textarea"],m3={concrete:!0,name:"htmlFlow",resolveTo:y3,tokenize:T3},g3={partial:!0,tokenize:w3},E3={partial:!0,tokenize:b3};function y3(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 T3(e,t,n){const r=this;let s,a,u,l,d;return f;function f(P){return m(P)}function m(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),p}function p(P){return P===33?(e.consume(P),b):P===47?(e.consume(P),a=!0,S):P===63?(e.consume(P),s=3,r.interrupt?t:C):wn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function b(P){return P===45?(e.consume(P),s=2,y):P===91?(e.consume(P),s=5,l=0,x):wn(P)?(e.consume(P),s=4,r.interrupt?t:C):n(P)}function y(P){return P===45?(e.consume(P),r.interrupt?t:C):n(P)}function x(P){const ve="CDATA[";return P===ve.charCodeAt(l++)?(e.consume(P),l===ve.length?r.interrupt?t:se:x):n(P)}function S(P){return wn(P)?(e.consume(P),u=String.fromCharCode(P),A):n(P)}function A(P){if(P===null||P===47||P===62||yt(P)){const ve=P===47,Pe=u.toLowerCase();return!ve&&!a&&gE.includes(Pe)?(s=1,r.interrupt?t(P):se(P)):p3.includes(u.toLowerCase())?(s=6,ve?(e.consume(P),_):r.interrupt?t(P):se(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):a?k(P):O(P))}return P===45||dn(P)?(e.consume(P),u+=String.fromCharCode(P),A):n(P)}function _(P){return P===62?(e.consume(P),r.interrupt?t:se):n(P)}function k(P){return it(P)?(e.consume(P),k):U(P)}function O(P){return P===47?(e.consume(P),U):P===58||P===95||wn(P)?(e.consume(P),z):it(P)?(e.consume(P),O):U(P)}function z(P){return P===45||P===46||P===58||P===95||dn(P)?(e.consume(P),z):W(P)}function W(P){return P===61?(e.consume(P),D):it(P)?(e.consume(P),W):O(P)}function D(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),d=P,V):it(P)?(e.consume(P),D):J(P)}function V(P){return P===d?(e.consume(P),d=null,ce):P===null||qe(P)?n(P):(e.consume(P),V)}function J(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||yt(P)?W(P):(e.consume(P),J)}function ce(P){return P===47||P===62||it(P)?O(P):n(P)}function U(P){return P===62?(e.consume(P),ie):n(P)}function ie(P){return P===null||qe(P)?se(P):it(P)?(e.consume(P),ie):n(P)}function se(P){return P===45&&s===2?(e.consume(P),Se):P===60&&s===1?(e.consume(P),de):P===62&&s===4?(e.consume(P),M):P===63&&s===3?(e.consume(P),C):P===93&&s===5?(e.consume(P),le):qe(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(g3,Z,ue)(P)):P===null||qe(P)?(e.exit("htmlFlowData"),ue(P)):(e.consume(P),se)}function ue(P){return e.check(E3,fe,Z)(P)}function fe(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ne}function ne(P){return P===null||qe(P)?ue(P):(e.enter("htmlFlowData"),se(P))}function Se(P){return P===45?(e.consume(P),C):se(P)}function de(P){return P===47?(e.consume(P),u="",Q):se(P)}function Q(P){if(P===62){const ve=u.toLowerCase();return gE.includes(ve)?(e.consume(P),M):se(P)}return wn(P)&&u.length<8?(e.consume(P),u+=String.fromCharCode(P),Q):se(P)}function le(P){return P===93?(e.consume(P),C):se(P)}function C(P){return P===62?(e.consume(P),M):P===45&&s===2?(e.consume(P),C):se(P)}function M(P){return P===null||qe(P)?(e.exit("htmlFlowData"),Z(P)):(e.consume(P),M)}function Z(P){return e.exit("htmlFlow"),t(P)}}function b3(e,t,n){const r=this;return s;function s(u){return qe(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 w3(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Ea,t,n)}}const x3={name:"htmlText",tokenize:_3};function _3(e,t,n){const r=this;let s,a,u;return l;function l(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),f):C===47?(e.consume(C),W):C===63?(e.consume(C),O):wn(C)?(e.consume(C),J):n(C)}function f(C){return C===45?(e.consume(C),m):C===91?(e.consume(C),a=0,x):wn(C)?(e.consume(C),k):n(C)}function m(C){return C===45?(e.consume(C),y):n(C)}function p(C){return C===null?n(C):C===45?(e.consume(C),b):qe(C)?(u=p,de(C)):(e.consume(C),p)}function b(C){return C===45?(e.consume(C),y):p(C)}function y(C){return C===62?Se(C):C===45?b(C):p(C)}function x(C){const M="CDATA[";return C===M.charCodeAt(a++)?(e.consume(C),a===M.length?S:x):n(C)}function S(C){return C===null?n(C):C===93?(e.consume(C),A):qe(C)?(u=S,de(C)):(e.consume(C),S)}function A(C){return C===93?(e.consume(C),_):S(C)}function _(C){return C===62?Se(C):C===93?(e.consume(C),_):S(C)}function k(C){return C===null||C===62?Se(C):qe(C)?(u=k,de(C)):(e.consume(C),k)}function O(C){return C===null?n(C):C===63?(e.consume(C),z):qe(C)?(u=O,de(C)):(e.consume(C),O)}function z(C){return C===62?Se(C):O(C)}function W(C){return wn(C)?(e.consume(C),D):n(C)}function D(C){return C===45||dn(C)?(e.consume(C),D):V(C)}function V(C){return qe(C)?(u=V,de(C)):it(C)?(e.consume(C),V):Se(C)}function J(C){return C===45||dn(C)?(e.consume(C),J):C===47||C===62||yt(C)?ce(C):n(C)}function ce(C){return C===47?(e.consume(C),Se):C===58||C===95||wn(C)?(e.consume(C),U):qe(C)?(u=ce,de(C)):it(C)?(e.consume(C),ce):Se(C)}function U(C){return C===45||C===46||C===58||C===95||dn(C)?(e.consume(C),U):ie(C)}function ie(C){return C===61?(e.consume(C),se):qe(C)?(u=ie,de(C)):it(C)?(e.consume(C),ie):ce(C)}function se(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,ue):qe(C)?(u=se,de(C)):it(C)?(e.consume(C),se):(e.consume(C),fe)}function ue(C){return C===s?(e.consume(C),s=void 0,ne):C===null?n(C):qe(C)?(u=ue,de(C)):(e.consume(C),ue)}function fe(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||yt(C)?ce(C):(e.consume(C),fe)}function ne(C){return C===47||C===62||yt(C)?ce(C):n(C)}function Se(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function de(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),Q}function Q(C){return it(C)?at(e,le,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):le(C)}function le(C){return e.enter("htmlTextData"),u(C)}}const Hf={name:"labelEnd",resolveAll:C3,resolveTo:k3,tokenize:N3},S3={tokenize:O3},v3={tokenize:I3},A3={tokenize:P3};function C3(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&&zn(e,0,e.length,n),e}function k3(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:H({},e[a][1].start),end:H({},e[e.length-1][1].end)},f={type:"label",start:H({},e[a][1].start),end:H({},e[u][1].end)},m={type:"labelText",start:H({},e[a+r+2][1].end),end:H({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=Xn(l,e.slice(a+1,a+r+3)),l=Xn(l,[["enter",m,t]]),l=Xn(l,dl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=Xn(l,[["exit",m,t],e[u-2],e[u-1],["exit",f,t]]),l=Xn(l,e.slice(u+1)),l=Xn(l,[["exit",d,t]]),zn(e,a,e.length,l),e}function N3(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(b){return a?a._inactive?p(b):(u=r.parser.defined.includes(cr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(S3,m,u?m:p)(b):b===91?e.attempt(v3,m,u?f:p)(b):u?m(b):p(b)}function f(b){return e.attempt(A3,m,p)(b)}function m(b){return t(b)}function p(b){return a._balanced=!0,n(b)}}function O3(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),s}function s(p){return yt(p)?Ta(e,a)(p):a(p)}function a(p){return p===41?m(p):hE(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function u(p){return yt(p)?Ta(e,d)(p):m(p)}function l(p){return n(p)}function d(p){return p===34||p===39||p===40?mE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function f(p){return yt(p)?Ta(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function I3(e,t,n){const r=this;return s;function s(l){return pE.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(cr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function P3(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 R3={name:"labelStartImage",resolveAll:Hf.resolveAll,tokenize:L3};function L3(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 D3={name:"labelStartLink",resolveAll:Hf.resolveAll,tokenize:M3};function M3(e,t,n){const r=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const jf={name:"lineEnding",tokenize:F3};function F3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),at(e,t,"linePrefix")}}const fl={name:"thematicBreak",tokenize:B3};function B3(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||qe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),it(f)?at(e,l,"whitespace")(f):l(f))}}const On={continuation:{tokenize:z3},exit:V3,name:"list",tokenize:j3},U3={partial:!0,tokenize:q3},H3={partial:!0,tokenize:$3};function j3(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:Ff(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(fl,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Ff(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Ea,r.interrupt?n:m,e.attempt(U3,b,p))}function m(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function p(y){return it(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function z3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ea,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,at(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!it(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(H3,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,at(e,e.attempt(On,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function $3(e,t,n){const r=this;return at(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 V3(e){e.exit(this.containerState.type)}function q3(e,t,n){const r=this;return at(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!it(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const EE={name:"setextUnderline",resolveTo:Y3,tokenize:W3};function Y3(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:H({},e[r][1].start),end:H({},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=H({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function W3(e,t,n){const r=this;let s;return a;function a(f){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(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"),it(f)?at(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||qe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const G3={tokenize:X3};function X3(e){const t=this,n=e.attempt(Ea,r,e.attempt(this.parser.constructs.flowInitial,s,at(e,e.attempt(this.parser.constructs.flow,s,e.attempt(e3,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 K3={resolveAll:TE()},Q3=yE("string"),J3=yE("text");function yE(e){return{resolveAll:TE(e==="text"?Z3: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(m){return f(m)?a(m):l(m)}function l(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return f(m)?(n.exit("data"),a(m)):(n.consume(m),d)}function f(m){if(m===null)return!0;const p=s[m];let b=-1;if(p)for(;++b<p.length;){const y=p[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function TE(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 Z3(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:H({},r.end)};r.end=H({},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 eO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:s3},disable:{null:[]},document:{42:On,43:On,45:On,48:On,49:On,50:On,51:On,52:On,53:On,54:On,55:On,56:On,57:On,62:aE},flow:{35:d3,42:fl,45:[EE,fl],60:m3,61:EE,95:fl,96:dE,126:dE},flowInitial:{[-2]:Uf,[-1]:Uf,32:Uf},insideSpan:{null:[Bf,K3]},string:{38:lE,92:uE},text:{[-5]:jf,[-4]:jf,[-3]:jf,33:R3,38:lE,42:Bf,60:[DN,x3],91:D3,92:[l3,uE],93:Hf,95:Bf,96:GN}},Symbol.toStringTag,{value:"Module"}));function tO(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:V(W),check:V(D),consume:k,enter:O,exit:z,interrupt:V(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:x,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:p};let m=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function p(ie){return u=Xn(u,ie),A(),u[u.length-1]!==null?[]:(J(t,0),f.events=dl(a,f.events,f),f.events)}function b(ie,se){return rO(y(ie),se)}function y(ie){return nO(u,ie)}function x(){const{_bufferIndex:ie,_index:se,line:ue,column:fe,offset:ne}=r;return{_bufferIndex:ie,_index:se,line:ue,column:fe,offset:ne}}function S(ie){s[ie.line]=ie.column,U()}function A(){let ie;for(;r._index<u.length;){const se=u[r._index];if(typeof se=="string")for(ie=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ie&&r._bufferIndex<se.length;)_(se.charCodeAt(r._bufferIndex));else _(se)}}function _(ie){m=m(ie)}function k(ie){qe(ie)?(r.line++,r.column=1,r.offset+=ie===-3?2:1,U()):ie!==-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=ie}function O(ie,se){const ue=se||{};return ue.type=ie,ue.start=x(),f.events.push(["enter",ue,f]),l.push(ue),ue}function z(ie){const se=l.pop();return se.end=x(),f.events.push(["exit",se,f]),se}function W(ie,se){J(ie,se.from)}function D(ie,se){se.restore()}function V(ie,se){return ue;function ue(fe,ne,Se){let de,Q,le,C;return Array.isArray(fe)?Z(fe):"tokenize"in fe?Z([fe]):M(fe);function M(he){return Ce;function Ce(Me){const He=Me!==null&&he[Me],nt=Me!==null&&he.null,Nt=[...Array.isArray(He)?He:He?[He]:[],...Array.isArray(nt)?nt:nt?[nt]:[]];return Z(Nt)(Me)}}function Z(he){return de=he,Q=0,he.length===0?Se:P(he[Q])}function P(he){return Ce;function Ce(Me){return C=ce(),le=he,he.partial||(f.currentConstruct=he),he.name&&f.parser.constructs.disable.null.includes(he.name)?Pe():he.tokenize.call(se?Object.assign(Object.create(f),se):f,d,ve,Pe)(Me)}}function ve(he){return ie(le,C),ne}function Pe(he){return C.restore(),++Q<de.length?P(de[Q]):Se}}}function J(ie,se){ie.resolveAll&&!a.includes(ie)&&a.push(ie),ie.resolve&&zn(f.events,se,f.events.length-se,ie.resolve(f.events.slice(se),f)),ie.resolveTo&&(f.events=ie.resolveTo(f.events,f))}function ce(){const ie=x(),se=f.previous,ue=f.currentConstruct,fe=f.events.length,ne=Array.from(l);return{from:fe,restore:Se};function Se(){r=ie,f.previous=se,f.currentConstruct=ue,f.events.length=fe,l=ne,U()}}function U(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function nO(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 rO(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 iO(e){const r={constructs:rE([eO,...(e||{}).extensions||[]]),content:s(CN),defined:[],document:s(ON),flow:s(G3),lazy:{},string:s(Q3),text:s(J3)};return r;function s(a){return u;function u(l){return tO(r,a,l)}}}function sO(e){for(;!fE(e););return e}const bE=/[\0\t\n\r]/g;function oO(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,m,p,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),p=0,t="",n&&(a.charCodeAt(0)===65279&&p++,n=void 0);p<a.length;){if(bE.lastIndex=p,f=bE.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(p);break}if(y===10&&p===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),p<b&&(d.push(a.slice(p,b)),e+=b-p),y){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}p=b+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const aO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uO(e){return e.replace(aO,lO)}function lO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return iE(n.slice(a?2:1),a?16:10)}return Mf(n)||e}const wE={}.hasOwnProperty;function cO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),dO(n)(sO(iO(n).document().write(oO()(e,t,!0))))}function dO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ie),autolinkProtocol:ae,autolinkEmail:ae,atxHeading:a(Bt),blockQuote:a(nt),characterEscape:ae,characterReference:ae,codeFenced:a(Nt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Nt,u),codeText:a(Ft,u),codeTextData:ae,data:ae,codeFlowValue:ae,definition:a(xn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(pn),hardBreakEscape:a($e),hardBreakTrailing:a($e),htmlFlow:a(St,u),htmlFlowData:ae,htmlText:a(St,u),htmlTextData:ae,image:a(Wt),label:u,link:a(Ie),listItem:a(ot),listItemValue:b,listOrdered:a(Xe,p),listUnordered:a(Xe),paragraph:a(ft),reference:P,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Bt),strong:a(Jn),thematicBreak:a(xi)},exit:{atxHeading:d(),atxHeadingSequence:W,autolink:d(),autolinkEmail:He,autolinkProtocol:Me,blockQuote:d(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:Pe,characterReferenceMarkerNumeric:Pe,characterReferenceValue:he,characterReference:ke,codeFenced:d(A),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:j,codeIndented:d(_),codeText:d(ne),codeTextData:j,data:j,definition:d(),definitionDestinationString:z,definitionLabelString:C,definitionTitleString:O,emphasis:d(),hardBreakEscape:d(ie),hardBreakTrailing:d(ie),htmlFlow:d(ce),htmlFlowData:j,htmlText:d(fe),htmlTextData:j,image:d(de),label:le,labelText:J,lineEnding:se,link:d(Se),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ve,resourceDestinationString:k,resourceTitleString:M,resource:Z,setextHeading:d(K),setextHeadingLineSequence:V,setextHeadingText:D,strong:d(),thematicBreak:d()}};xE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let xe={type:"root",children:[]};const Ve={stack:[xe],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:m,data:n},et=[];let ee=-1;for(;++ee<oe.length;)if(oe[ee][1].type==="listOrdered"||oe[ee][1].type==="listUnordered")if(oe[ee][0]==="enter")et.push(ee);else{const _e=et.pop();ee=s(oe,_e,ee)}for(ee=-1;++ee<oe.length;){const _e=t[oe[ee][0]];wE.call(_e,oe[ee][1].type)&&_e[oe[ee][1].type].call(Object.assign({sliceSerialize:oe[ee][2].sliceSerialize},Ve),oe[ee][1])}if(Ve.tokenStack.length>0){const _e=Ve.tokenStack[Ve.tokenStack.length-1];(_e[1]||_E).call(Ve,void 0,_e[0])}for(xe.position={start:hi(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:hi(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},ee=-1;++ee<t.transforms.length;)xe=t.transforms[ee](xe)||xe;return xe}function s(oe,xe,Ve){let et=xe-1,ee=-1,_e=!1,Ne,Ae,ge,je;for(;++et<=Ve;){const Ke=oe[et];switch(Ke[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ke[0]==="enter"?ee++:ee--,je=void 0;break}case"lineEndingBlank":{Ke[0]==="enter"&&(Ne&&!je&&!ee&&!ge&&(ge=et),je=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:je=void 0}if(!ee&&Ke[0]==="enter"&&Ke[1].type==="listItemPrefix"||ee===-1&&Ke[0]==="exit"&&(Ke[1].type==="listUnordered"||Ke[1].type==="listOrdered")){if(Ne){let $t=et;for(Ae=void 0;$t--;){const ht=oe[$t];if(ht[1].type==="lineEnding"||ht[1].type==="lineEndingBlank"){if(ht[0]==="exit")continue;Ae&&(oe[Ae][1].type="lineEndingBlank",_e=!0),ht[1].type="lineEnding",Ae=$t}else if(!(ht[1].type==="linePrefix"||ht[1].type==="blockQuotePrefix"||ht[1].type==="blockQuotePrefixWhitespace"||ht[1].type==="blockQuoteMarker"||ht[1].type==="listItemIndent"))break}ge&&(!Ae||ge<Ae)&&(Ne._spread=!0),Ne.end=Object.assign({},Ae?oe[Ae][1].start:Ke[1].end),oe.splice(Ae||et,0,["exit",Ne,Ke[2]]),et++,Ve++}if(Ke[1].type==="listItemPrefix"){const $t={type:"listItem",_spread:!1,start:Object.assign({},Ke[1].start),end:void 0};Ne=$t,oe.splice(et,0,["enter",$t,Ke[2]]),et++,Ve++,ge=void 0,je=!0}}}return oe[xe][1]._spread=_e,Ve}function a(oe,xe){return Ve;function Ve(et){l.call(this,oe(et),et),xe&&xe.call(this,et)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(oe,xe,Ve){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([xe,Ve||void 0]),oe.position={start:hi(xe.start),end:void 0}}function d(oe){return xe;function xe(Ve){oe&&oe.call(this,Ve),f.call(this,Ve)}}function f(oe,xe){const Ve=this.stack.pop(),et=this.tokenStack.pop();if(et)et[0].type!==oe.type&&(xe?xe.call(this,oe,et[0]):(et[1]||_E).call(this,oe,et[0]));else throw new Error("Cannot close `"+oe.type+"` ("+ma({start:oe.start,end:oe.end})+"): it’s not open");Ve.position.end=hi(oe.end)}function m(){return Df(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(oe){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function y(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=oe}function x(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=oe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe.replace(/(\r?\n|\r)$/g,"")}function C(oe){const xe=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=xe,Ve.identifier=cr(this.sliceSerialize(oe)).toLowerCase()}function O(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.title=oe}function z(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.url=oe}function W(oe){const xe=this.stack[this.stack.length-1];if(!xe.depth){const Ve=this.sliceSerialize(oe).length;xe.depth=Ve}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function V(oe){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function K(){this.data.setextHeadingSlurpLineEnding=void 0}function ae(oe){const Ve=this.stack[this.stack.length-1].children;let et=Ve[Ve.length-1];(!et||et.type!=="text")&&(et=gs(),et.position={start:hi(oe.start),end:void 0},Ve.push(et)),this.stack.push(et)}function j(oe){const xe=this.stack.pop();xe.value+=this.sliceSerialize(oe),xe.position.end=hi(oe.end)}function se(oe){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ve=xe.children[xe.children.length-1];Ve.position.end=hi(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(ae.call(this,oe),j.call(this,oe))}function ie(){this.data.atHardBreak=!0}function ce(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe}function fe(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe}function ne(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe}function Se(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=xe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function de(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=xe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function J(oe){const xe=this.sliceSerialize(oe),Ve=this.stack[this.stack.length-2];Ve.label=uO(xe),Ve.identifier=cr(xe).toLowerCase()}function le(){const oe=this.stack[this.stack.length-1],xe=this.resume(),Ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ve.type==="link"){const et=oe.children;Ve.children=et}else Ve.alt=xe}function k(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.url=oe}function M(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.title=oe}function Z(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function ve(oe){const xe=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=xe,Ve.identifier=cr(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function Pe(oe){this.data.characterReferenceType=oe.type}function he(oe){const xe=this.sliceSerialize(oe),Ve=this.data.characterReferenceType;let et;Ve?(et=iE(xe,Ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):et=Mf(xe);const ee=this.stack[this.stack.length-1];ee.value+=et}function ke(oe){const xe=this.stack.pop();xe.position.end=hi(oe.end)}function Me(oe){j.call(this,oe);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(oe)}function He(oe){j.call(this,oe);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(oe)}function nt(){return{type:"blockquote",children:[]}}function Nt(){return{type:"code",lang:null,meta:null,value:""}}function Ft(){return{type:"inlineCode",value:""}}function xn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function pn(){return{type:"emphasis",children:[]}}function Bt(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function St(){return{type:"html",value:""}}function Wt(){return{type:"image",title:null,url:"",alt:null}}function Ie(){return{type:"link",title:null,url:"",children:[]}}function Xe(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function ot(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function ft(){return{type:"paragraph",children:[]}}function Jn(){return{type:"strong",children:[]}}function gs(){return{type:"text",value:""}}function xi(){return{type:"thematicBreak"}}}function hi(e){return{line:e.line,column:e.column,offset:e.offset}}function xE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?xE(e,r):fO(e,r)}}function fO(e,t){let n;for(n in t)if(wE.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 _E(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ma({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ma({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ma({start:t.start,end:t.end})+") is still open")}function hO(e){const t=this;t.parser=n;function n(r){return cO(r,ue(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function pO(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 mO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{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 iO(e){const r={constructs:rE([eO,...(e||{}).extensions||[]]),content:s(kN),defined:[],document:s(ON),flow:s(G3),lazy:{},string:s(Q3),text:s(J3)};return r;function s(a){return u;function u(l){return tO(r,a,l)}}}function sO(e){for(;!fE(e););return e}const bE=/[\0\t\n\r]/g;function oO(){let e=1,t="",n=!0,r;return s;function s(a,u,l){const d=[];let f,m,p,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),p=0,t="",n&&(a.charCodeAt(0)===65279&&p++,n=void 0);p<a.length;){if(bE.lastIndex=p,f=bE.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(p);break}if(y===10&&p===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),p<b&&(d.push(a.slice(p,b)),e+=b-p),y){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}p=b+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const aO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uO(e){return e.replace(aO,lO)}function lO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return iE(n.slice(a?2:1),a?16:10)}return Mf(n)||e}const wE={}.hasOwnProperty;function cO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),dO(n)(sO(iO(n).document().write(oO()(e,t,!0))))}function dO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ie),autolinkProtocol:ce,autolinkEmail:ce,atxHeading:a(Bt),blockQuote:a(nt),characterEscape:ce,characterReference:ce,codeFenced:a(Nt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Nt,u),codeText:a(Ft,u),codeTextData:ce,data:ce,codeFlowValue:ce,definition:a(xn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(pn),hardBreakEscape:a($e),hardBreakTrailing:a($e),htmlFlow:a(St,u),htmlFlowData:ce,htmlText:a(St,u),htmlTextData:ce,image:a(Wt),label:u,link:a(Ie),listItem:a(ot),listItemValue:b,listOrdered:a(Xe,p),listUnordered:a(Xe),paragraph:a(ft),reference:P,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Bt),strong:a(Jn),thematicBreak:a(xi)},exit:{atxHeading:d(),atxHeadingSequence:W,autolink:d(),autolinkEmail:He,autolinkProtocol:Me,blockQuote:d(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:Pe,characterReferenceMarkerNumeric:Pe,characterReferenceValue:he,characterReference:Ce,codeFenced:d(A),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:U,codeIndented:d(_),codeText:d(ne),codeTextData:U,data:U,definition:d(),definitionDestinationString:z,definitionLabelString:k,definitionTitleString:O,emphasis:d(),hardBreakEscape:d(se),hardBreakTrailing:d(se),htmlFlow:d(ue),htmlFlowData:U,htmlText:d(fe),htmlTextData:U,image:d(de),label:le,labelText:Q,lineEnding:ie,link:d(Se),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ve,resourceDestinationString:C,resourceTitleString:M,resource:Z,setextHeading:d(J),setextHeadingLineSequence:V,setextHeadingText:D,strong:d(),thematicBreak:d()}};xE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ae){let xe={type:"root",children:[]};const Ve={stack:[xe],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:m,data:n},et=[];let ee=-1;for(;++ee<ae.length;)if(ae[ee][1].type==="listOrdered"||ae[ee][1].type==="listUnordered")if(ae[ee][0]==="enter")et.push(ee);else{const _e=et.pop();ee=s(ae,_e,ee)}for(ee=-1;++ee<ae.length;){const _e=t[ae[ee][0]];wE.call(_e,ae[ee][1].type)&&_e[ae[ee][1].type].call(Object.assign({sliceSerialize:ae[ee][2].sliceSerialize},Ve),ae[ee][1])}if(Ve.tokenStack.length>0){const _e=Ve.tokenStack[Ve.tokenStack.length-1];(_e[1]||_E).call(Ve,void 0,_e[0])}for(xe.position={start:hi(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:hi(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},ee=-1;++ee<t.transforms.length;)xe=t.transforms[ee](xe)||xe;return xe}function s(ae,xe,Ve){let et=xe-1,ee=-1,_e=!1,Ne,Ae,ge,je;for(;++et<=Ve;){const Ke=ae[et];switch(Ke[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ke[0]==="enter"?ee++:ee--,je=void 0;break}case"lineEndingBlank":{Ke[0]==="enter"&&(Ne&&!je&&!ee&&!ge&&(ge=et),je=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:je=void 0}if(!ee&&Ke[0]==="enter"&&Ke[1].type==="listItemPrefix"||ee===-1&&Ke[0]==="exit"&&(Ke[1].type==="listUnordered"||Ke[1].type==="listOrdered")){if(Ne){let $t=et;for(Ae=void 0;$t--;){const ht=ae[$t];if(ht[1].type==="lineEnding"||ht[1].type==="lineEndingBlank"){if(ht[0]==="exit")continue;Ae&&(ae[Ae][1].type="lineEndingBlank",_e=!0),ht[1].type="lineEnding",Ae=$t}else if(!(ht[1].type==="linePrefix"||ht[1].type==="blockQuotePrefix"||ht[1].type==="blockQuotePrefixWhitespace"||ht[1].type==="blockQuoteMarker"||ht[1].type==="listItemIndent"))break}ge&&(!Ae||ge<Ae)&&(Ne._spread=!0),Ne.end=Object.assign({},Ae?ae[Ae][1].start:Ke[1].end),ae.splice(Ae||et,0,["exit",Ne,Ke[2]]),et++,Ve++}if(Ke[1].type==="listItemPrefix"){const $t={type:"listItem",_spread:!1,start:Object.assign({},Ke[1].start),end:void 0};Ne=$t,ae.splice(et,0,["enter",$t,Ke[2]]),et++,Ve++,ge=void 0,je=!0}}}return ae[xe][1]._spread=_e,Ve}function a(ae,xe){return Ve;function Ve(et){l.call(this,ae(et),et),xe&&xe.call(this,et)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(ae,xe,Ve){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([xe,Ve||void 0]),ae.position={start:hi(xe.start),end:void 0}}function d(ae){return xe;function xe(Ve){ae&&ae.call(this,Ve),f.call(this,Ve)}}function f(ae,xe){const Ve=this.stack.pop(),et=this.tokenStack.pop();if(et)et[0].type!==ae.type&&(xe?xe.call(this,ae,et[0]):(et[1]||_E).call(this,ae,et[0]));else throw new Error("Cannot close `"+ae.type+"` ("+ma({start:ae.start,end:ae.end})+"): it’s not open");Ve.position.end=hi(ae.end)}function m(){return Df(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(ae){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=ae}function x(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=ae}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ae.replace(/(\r?\n|\r)$/g,"")}function k(ae){const xe=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=xe,Ve.identifier=cr(this.sliceSerialize(ae)).toLowerCase()}function O(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ae}function z(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ae}function W(ae){const xe=this.stack[this.stack.length-1];if(!xe.depth){const Ve=this.sliceSerialize(ae).length;xe.depth=Ve}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function V(ae){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function J(){this.data.setextHeadingSlurpLineEnding=void 0}function ce(ae){const Ve=this.stack[this.stack.length-1].children;let et=Ve[Ve.length-1];(!et||et.type!=="text")&&(et=gs(),et.position={start:hi(ae.start),end:void 0},Ve.push(et)),this.stack.push(et)}function U(ae){const xe=this.stack.pop();xe.value+=this.sliceSerialize(ae),xe.position.end=hi(ae.end)}function ie(ae){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ve=xe.children[xe.children.length-1];Ve.position.end=hi(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(ce.call(this,ae),U.call(this,ae))}function se(){this.data.atHardBreak=!0}function ue(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ae}function fe(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ae}function ne(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ae}function Se(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=xe,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function de(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=xe,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function Q(ae){const xe=this.sliceSerialize(ae),Ve=this.stack[this.stack.length-2];Ve.label=uO(xe),Ve.identifier=cr(xe).toLowerCase()}function le(){const ae=this.stack[this.stack.length-1],xe=this.resume(),Ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ve.type==="link"){const et=ae.children;Ve.children=et}else Ve.alt=xe}function C(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ae}function M(){const ae=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ae}function Z(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function ve(ae){const xe=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=xe,Ve.identifier=cr(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function Pe(ae){this.data.characterReferenceType=ae.type}function he(ae){const xe=this.sliceSerialize(ae),Ve=this.data.characterReferenceType;let et;Ve?(et=iE(xe,Ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):et=Mf(xe);const ee=this.stack[this.stack.length-1];ee.value+=et}function Ce(ae){const xe=this.stack.pop();xe.position.end=hi(ae.end)}function Me(ae){U.call(this,ae);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(ae)}function He(ae){U.call(this,ae);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(ae)}function nt(){return{type:"blockquote",children:[]}}function Nt(){return{type:"code",lang:null,meta:null,value:""}}function Ft(){return{type:"inlineCode",value:""}}function xn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function pn(){return{type:"emphasis",children:[]}}function Bt(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function St(){return{type:"html",value:""}}function Wt(){return{type:"image",title:null,url:"",alt:null}}function Ie(){return{type:"link",title:null,url:"",children:[]}}function Xe(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function ot(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function ft(){return{type:"paragraph",children:[]}}function Jn(){return{type:"strong",children:[]}}function gs(){return{type:"text",value:""}}function xi(){return{type:"thematicBreak"}}}function hi(e){return{line:e.line,column:e.column,offset:e.offset}}function xE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?xE(e,r):fO(e,r)}}function fO(e,t){let n;for(n in t)if(wE.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 _E(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ma({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ma({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ma({start:t.start,end:t.end})+") is still open")}function hO(e){const t=this;t.parser=n;function n(r){return cO(r,oe(H(H({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function pO(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 mO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
27
27
  `}]}function gO(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 EO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function TO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Ys(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 bO(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 wO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function SE(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 xO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return SE(e,t);const s={src:Ys(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 _O(e,t){const n={src:Ys(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 SO(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 vO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return SE(e,t);const s={href:Ys(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 AO(e,t){const n={href:Ys(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 kO(e,t,n){const r=e.all(t),s=n?CO(n):vE(t),a={},u=[];if(typeof t.checked=="boolean"){const m=r[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.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 m=r[l];(s||l!==0||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",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 EO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function TO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Ys(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 bO(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 wO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function SE(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 xO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return SE(e,t);const s={src:Ys(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 _O(e,t){const n={src:Ys(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 SO(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 vO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return SE(e,t);const s={href:Ys(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 AO(e,t){const n={href:Ys(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 CO(e,t,n){const r=e.all(t),s=n?kO(n):vE(t),a={},u=[];if(typeof t.checked=="boolean"){const m=r[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.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 m=r[l];(s||l!==0||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
29
29
  `}),m.type==="element"&&m.tagName==="p"&&!s?u.push(...m.children):u.push(m)}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 CO(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=vE(n[r])}return t}function vE(e){const t=e.spread;return t==null?e.children.length>1:t}function NO(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 OO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function PO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RO(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=vr(t.children[1]),d=ll(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 LO(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 p=t.children[d],b={},y=u?u[d]:void 0;y&&(b.align=y);let x={type:"element",tagName:a,properties:b,children:[]};p&&(x.children=e.all(p),e.patch(p,x),x=e.applyData(p,x)),f.push(x)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,m),e.applyData(t,m)}function DO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const AE=9,kE=32;function MO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(CE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(CE(t.slice(s),s>0,!1)),a.join("")}function CE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===AE||a===kE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===AE||a===kE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function FO(e,t){const n={type:"text",value:MO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function BO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const UO={blockquote:pO,break:mO,code:gO,delete:EO,emphasis:yO,footnoteReference:TO,heading:bO,html:wO,imageReference:xO,image:_O,inlineCode:SO,linkReference:vO,link:AO,listItem:kO,list:NO,paragraph:OO,root:IO,strong:PO,table:RO,tableCell:DO,tableRow:LO,text:FO,thematicBreak:BO,toml:pl,yaml:pl,definition:pl,footnoteDefinition:pl};function pl(){}const NE=-1,ml=0,ba=1,gl=2,zf=3,$f=4,Vf=5,qf=6,OE=7,IE=8,PE=typeof self=="object"?self:globalThis,RE=(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 PE[e](t)},HO=(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 ml:case NE:return n(u,s);case ba:{const l=n([],s);for(const d of u)l.push(r(d));return l}case gl:{const l=n({},s);for(const[d,f]of u)l[r(d)]=r(f);return l}case zf:return n(new Date(u),s);case $f:{const{source:l,flags:d}=u;return n(new RegExp(l,d),s)}case Vf:{const l=n(new Map,s);for(const[d,f]of u)l.set(r(d),r(f));return l}case qf:{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 PE[l]=="function"?RE(l,d):new Error(d),s)}case IE: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(RE(a,u),s)};return r},LE=e=>HO(new Map,e)(0),ts="",{toString:jO}={},{keys:zO}=Object,wa=e=>{const t=typeof e;if(t!=="object"||!e)return[ml,t];const n=jO.call(e).slice(8,-1);switch(n){case"Array":return[ba,ts];case"Object":return[gl,ts];case"Date":return[zf,ts];case"RegExp":return[$f,ts];case"Map":return[Vf,ts];case"Set":return[qf,ts];case"DataView":return[ba,n]}return n.includes("Array")?[ba,n]:e instanceof Error?[OE,e.name||"Error"]:[gl,n]},El=([e,t])=>e===ml&&(t==="function"||t==="symbol"),$O=(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]=wa(u);switch(l){case ml:{let m=u;switch(d){case"bigint":l=IE,m=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return s([NE],u)}return s([l,m],u)}case ba:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),s([d,[...b]],u)}const m=[],p=s([l,m],u);for(const b of u)m.push(a(b));return p}case gl:{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 m=[],p=s([l,m],u);for(const b of zO(u))(e||!El(wa(u[b])))&&m.push([a(b),a(u[b])]);return p}case zf:return s([l,isNaN(u.getTime())?ts:u.toISOString()],u);case $f:{const{source:m,flags:p}=u;return s([l,{source:m,flags:p}],u)}case Vf:{const m=[],p=s([l,m],u);for(const[b,y]of u)(e||!(El(wa(b))||El(wa(y))))&&m.push([a(b),a(y)]);return p}case qf:{const m=[],p=s([l,m],u);for(const b of u)(e||!El(wa(b)))&&m.push(a(b));return p}}const{message:f}=u;return s([l,{name:d,message:f}],u)};return a},DE=(e,{json:t,lossy:n}={})=>{const r=[];return $O(!(t||n),!!t,new Map,r)(e),r},ns=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?LE(DE(e,t)):structuredClone(e):(e,t)=>LE(DE(e,t));function VO(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 qO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function YO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||VO,r=e.options.footnoteBackLabel||qO,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 m=e.all(f),p=String(f.identifier).toUpperCase(),b=Ys(p.toLowerCase());let y=0;const x=[],S=e.footnoteCounts.get(p);for(;S!==void 0&&++y<=S;){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-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const A=m[m.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 m.push(...x);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(m,!0)};e.patch(f,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:ue(U({},ns(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 kO(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=vE(n[r])}return t}function vE(e){const t=e.spread;return t==null?e.children.length>1:t}function NO(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 OO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function PO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RO(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=vr(t.children[1]),d=ul(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 LO(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 p=t.children[d],b={},y=u?u[d]:void 0;y&&(b.align=y);let x={type:"element",tagName:a,properties:b,children:[]};p&&(x.children=e.all(p),e.patch(p,x),x=e.applyData(p,x)),f.push(x)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,m),e.applyData(t,m)}function DO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const AE=9,CE=32;function MO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(kE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(kE(t.slice(s),s>0,!1)),a.join("")}function kE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===AE||a===CE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===AE||a===CE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function FO(e,t){const n={type:"text",value:MO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function BO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const UO={blockquote:pO,break:mO,code:gO,delete:EO,emphasis:yO,footnoteReference:TO,heading:bO,html:wO,imageReference:xO,image:_O,inlineCode:SO,linkReference:vO,link:AO,listItem:CO,list:NO,paragraph:OO,root:IO,strong:PO,table:RO,tableCell:DO,tableRow:LO,text:FO,thematicBreak:BO,toml:hl,yaml:hl,definition:hl,footnoteDefinition:hl};function hl(){}const NE=-1,pl=0,ba=1,ml=2,zf=3,$f=4,Vf=5,qf=6,OE=7,IE=8,PE=typeof self=="object"?self:globalThis,RE=(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 PE[e](t)},HO=(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 pl:case NE:return n(u,s);case ba:{const l=n([],s);for(const d of u)l.push(r(d));return l}case ml:{const l=n({},s);for(const[d,f]of u)l[r(d)]=r(f);return l}case zf:return n(new Date(u),s);case $f:{const{source:l,flags:d}=u;return n(new RegExp(l,d),s)}case Vf:{const l=n(new Map,s);for(const[d,f]of u)l.set(r(d),r(f));return l}case qf:{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 PE[l]=="function"?RE(l,d):new Error(d),s)}case IE: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(RE(a,u),s)};return r},LE=e=>HO(new Map,e)(0),ts="",{toString:jO}={},{keys:zO}=Object,wa=e=>{const t=typeof e;if(t!=="object"||!e)return[pl,t];const n=jO.call(e).slice(8,-1);switch(n){case"Array":return[ba,ts];case"Object":return[ml,ts];case"Date":return[zf,ts];case"RegExp":return[$f,ts];case"Map":return[Vf,ts];case"Set":return[qf,ts];case"DataView":return[ba,n]}return n.includes("Array")?[ba,n]:e instanceof Error?[OE,e.name||"Error"]:[ml,n]},gl=([e,t])=>e===pl&&(t==="function"||t==="symbol"),$O=(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]=wa(u);switch(l){case pl:{let m=u;switch(d){case"bigint":l=IE,m=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return s([NE],u)}return s([l,m],u)}case ba:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),s([d,[...b]],u)}const m=[],p=s([l,m],u);for(const b of u)m.push(a(b));return p}case ml:{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 m=[],p=s([l,m],u);for(const b of zO(u))(e||!gl(wa(u[b])))&&m.push([a(b),a(u[b])]);return p}case zf:return s([l,isNaN(u.getTime())?ts:u.toISOString()],u);case $f:{const{source:m,flags:p}=u;return s([l,{source:m,flags:p}],u)}case Vf:{const m=[],p=s([l,m],u);for(const[b,y]of u)(e||!(gl(wa(b))||gl(wa(y))))&&m.push([a(b),a(y)]);return p}case qf:{const m=[],p=s([l,m],u);for(const b of u)(e||!gl(wa(b)))&&m.push(a(b));return p}}const{message:f}=u;return s([l,{name:d,message:f}],u)};return a},DE=(e,{json:t,lossy:n}={})=>{const r=[];return $O(!(t||n),!!t,new Map,r)(e),r},ns=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?LE(DE(e,t)):structuredClone(e):(e,t)=>LE(DE(e,t));function VO(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 qO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function YO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||VO,r=e.options.footnoteBackLabel||qO,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 m=e.all(f),p=String(f.identifier).toUpperCase(),b=Ys(p.toLowerCase());let y=0;const x=[],S=e.footnoteCounts.get(p);for(;S!==void 0&&++y<=S;){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-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const A=m[m.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 m.push(...x);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(m,!0)};e.patch(f,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:oe(H({},ns(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 yl=(function(e){if(e==null)return KO;if(typeof e=="function")return Tl(e);if(typeof e=="object")return Array.isArray(e)?WO(e):GO(e);if(typeof e=="string")return XO(e);throw new Error("Expected function, string, or object as test")});function WO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=yl(e[n]);return Tl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function GO(e){const t=e;return Tl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function XO(e){return Tl(t);function t(n){return n&&n.type===e}}function Tl(e){return t;function t(n,r,s){return!!(QO(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function KO(){return!0}function QO(e){return e!==null&&typeof e=="object"&&"type"in e}function YU(e){return e}const ME=[],JO=!0,Yf=!1,ZO="skip";function FE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=yl(s),u=r?-1:1;l(e,void 0,[])();function l(d,f,m){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const y=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=ME,x,S,A;if((!t||a(d,f,m[m.length-1]||void 0))&&(y=eI(n(d,m)),y[0]===Yf))return y;if("children"in d&&d.children){const _=d;if(_.children&&y[0]!==ZO)for(S=(r?_.children.length:-1)+u,A=m.concat(_);S>-1&&S<_.children.length;){const C=_.children[S];if(x=l(C,S,A)(),x[0]===Yf)return x;S=typeof x[1]=="number"?x[1]:S+u}}return y}}}function eI(e){return Array.isArray(e)?e:typeof e=="number"?[JO,e]:e==null?ME:[e]}function bl(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),FE(e,a,l,s);function l(d,f){const m=f[f.length-1],p=m?m.children.indexOf(d):void 0;return u(d,p,m)}}const Wf={}.hasOwnProperty,tI={};function nI(e,t){const n=t||tI,r=new Map,s=new Map,a=new Map,u=U(U({},UO),n.handlers),l={all:f,applyData:iI,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:rI,wrap:oI};return bl(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?r:s,b=String(m.identifier).toUpperCase();p.has(b)||p.set(b,m)}}),l;function d(m,p){const b=m.type,y=l.handlers[b];if(Wf.call(l.handlers,b)&&y)return y(l,m,p);if(l.options.passThrough&&l.options.passThrough.includes(b)){if("children"in m){const S=m,{children:A}=S,_=vn(S,["children"]),C=ns(_);return C.children=l.all(m),C}return ns(m)}return(l.options.unknownHandler||sI)(l,m,p)}function f(m){const p=[];if("children"in m){const b=m.children;let y=-1;for(;++y<b.length;){const x=l.one(b[y],m);if(x){if(y&&b[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=BE(x.value)),!Array.isArray(x)&&x.type==="element")){const S=x.children[0];S&&S.type==="text"&&(S.value=BE(S.value))}Array.isArray(x)?p.push(...x):p.push(x)}}}return p}}function rI(e,t){e.position&&(t.position=Y1(e))}function iI(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,ns(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function sI(e,t){const n=t.data||{},r="value"in t&&!(Wf.call(n,"hProperties")||Wf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function oI(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
32
+ `}]}}const El=(function(e){if(e==null)return KO;if(typeof e=="function")return yl(e);if(typeof e=="object")return Array.isArray(e)?WO(e):GO(e);if(typeof e=="string")return XO(e);throw new Error("Expected function, string, or object as test")});function WO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=El(e[n]);return yl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function GO(e){const t=e;return yl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function XO(e){return yl(t);function t(n){return n&&n.type===e}}function yl(e){return t;function t(n,r,s){return!!(QO(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function KO(){return!0}function QO(e){return e!==null&&typeof e=="object"&&"type"in e}function GU(e){return e}const ME=[],JO=!0,Yf=!1,ZO="skip";function FE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=El(s),u=r?-1:1;l(e,void 0,[])();function l(d,f,m){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const y=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=ME,x,S,A;if((!t||a(d,f,m[m.length-1]||void 0))&&(y=eI(n(d,m)),y[0]===Yf))return y;if("children"in d&&d.children){const _=d;if(_.children&&y[0]!==ZO)for(S=(r?_.children.length:-1)+u,A=m.concat(_);S>-1&&S<_.children.length;){const k=_.children[S];if(x=l(k,S,A)(),x[0]===Yf)return x;S=typeof x[1]=="number"?x[1]:S+u}}return y}}}function eI(e){return Array.isArray(e)?e:typeof e=="number"?[JO,e]:e==null?ME:[e]}function Tl(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),FE(e,a,l,s);function l(d,f){const m=f[f.length-1],p=m?m.children.indexOf(d):void 0;return u(d,p,m)}}const Wf={}.hasOwnProperty,tI={};function nI(e,t){const n=t||tI,r=new Map,s=new Map,a=new Map,u=H(H({},UO),n.handlers),l={all:f,applyData:iI,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:rI,wrap:oI};return Tl(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?r:s,b=String(m.identifier).toUpperCase();p.has(b)||p.set(b,m)}}),l;function d(m,p){const b=m.type,y=l.handlers[b];if(Wf.call(l.handlers,b)&&y)return y(l,m,p);if(l.options.passThrough&&l.options.passThrough.includes(b)){if("children"in m){const S=m,{children:A}=S,_=vn(S,["children"]),k=ns(_);return k.children=l.all(m),k}return ns(m)}return(l.options.unknownHandler||sI)(l,m,p)}function f(m){const p=[];if("children"in m){const b=m.children;let y=-1;for(;++y<b.length;){const x=l.one(b[y],m);if(x){if(y&&b[y-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=BE(x.value)),!Array.isArray(x)&&x.type==="element")){const S=x.children[0];S&&S.type==="text"&&(S.value=BE(S.value))}Array.isArray(x)?p.push(...x):p.push(x)}}}return p}}function rI(e,t){e.position&&(t.position=Y1(e))}function iI(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,ns(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function sI(e,t){const n=t.data||{},r="value"in t&&!(Wf.call(n,"hProperties")||Wf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function oI(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
35
  `}),n}function BE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function UE(e,t){const n=nI(e,t),r=n.one(e,void 0),s=YO(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 aI(e,t){return e&&"run"in e?function(n,r){return Fe(this,null,function*(){const s=UE(n,U({file:r},t));yield e.run(s,r)})}:function(n,r){return UE(n,U({file:r},e||t))}}function HE(e){if(e)throw e}var Gf,jE;function uI(){if(jE)return Gf;jE=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 m=e.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!m&&!p)return!1;var b;for(b in f);return typeof b=="undefined"||e.call(f,b)},u=function(f,m){n&&m.name==="__proto__"?n(f,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):f[m.name]=m.newValue},l=function(f,m){if(m==="__proto__")if(e.call(f,m)){if(r)return r(f,m).value}else return;return f[m]};return Gf=function d(){var f,m,p,b,y,x,S=arguments[0],A=1,_=arguments.length,C=!1;for(typeof S=="boolean"&&(C=S,S=arguments[1]||{},A=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});A<_;++A)if(f=arguments[A],f!=null)for(m in f)p=l(S,m),b=l(f,m),S!==b&&(C&&b&&(a(b)||(y=s(b)))?(y?(y=!1,x=p&&s(p)?p:[]):x=p&&a(p)?p:{},u(S,{name:m,newValue:d(C,x,b)})):typeof b!="undefined"&&u(S,{name:m,newValue:b}));return S},Gf}var lI=uI();const Xf=rt(lI);function Kf(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function cI(){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 m=e[++a];let p=-1;if(d){u(d);return}for(;++p<s.length;)(f[p]===null||f[p]===void 0)&&(f[p]=s[p]);s=f,m?dI(m,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 dI(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 m=f;if(l&&n)throw m;return s(m)}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 Ar={basename:fI,dirname:hI,extname:pI,join:mI,sep:"/"};function fI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');xa(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 hI(e){if(xa(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 pI(e){xa(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 mI(...e){let t=-1,n;for(;++t<e.length;)xa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":gI(n)}function gI(e){xa(e);const t=e.codePointAt(0)===47;let n=EI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function EI(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 xa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const yI={cwd:TI};function TI(){return"/"}function Qf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function bI(e){if(typeof e=="string")e=new URL(e);else if(!Qf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return wI(e)}function wI(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Jf=["history","path","basename","stem","extname","dirname"];class zE{constructor(t){let n;t?Qf(t)?n={path:t}:typeof t=="string"||xI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":yI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Jf.length;){const a=Jf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)Jf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ar.basename(this.path):void 0}set basename(t){eh(t,"basename"),Zf(t,"basename"),this.path=Ar.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ar.dirname(this.path):void 0}set dirname(t){$E(this.basename,"dirname"),this.path=Ar.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ar.extname(this.path):void 0}set extname(t){if(Zf(t,"extname"),$E(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=Ar.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qf(t)&&(t=bI(t)),eh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ar.basename(this.path,this.extname):void 0}set stem(t){eh(t,"stem"),Zf(t,"stem"),this.path=Ar.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 cn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Zf(e,t){if(e&&e.includes(Ar.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ar.sep+"`")}function eh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function $E(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function xI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _I=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),SI={}.hasOwnProperty;class th extends _I{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=cI()}copy(){const t=new th;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Xf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ih("data",this.frozen),this.namespace[t]=n,this):SI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ih("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=wl(t),r=this.parser||this.Parser;return nh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),nh("process",this.parser||this.Parser),rh("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const l=wl(t),d=r.parse(l);r.run(d,l,function(m,p,b){if(m||!p||!b)return f(m);const y=p,x=r.stringify(y,b);kI(x)?b.value=x:b.result=x,f(m,b)});function f(m,p){m||!p?u(m):a?a(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),nh("processSync",this.parser||this.Parser),rh("processSync",this.compiler||this.Compiler),this.process(t,s),qE("processSync","process",n),r;function s(a,u){n=!0,HE(a),r=u}}run(t,n,r){VE(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=wl(n);s.run(t,d,f);function f(m,p,b){const y=p||t;m?l(m):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),qE("runSync","run",r),s;function a(u,l){HE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=wl(n),s=this.compiler||this.Compiler;return rh("stringify",s),VE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(ih("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?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[m,...p]=f;d(m,p)}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=Xf(!0,s.settings,f.settings))}function l(f){let m=-1;if(f!=null)if(Array.isArray(f))for(;++m<f.length;){const p=f[m];a(p)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,m){let p=-1,b=-1;for(;++p<r.length;)if(r[p][0]===f){b=p;break}if(b===-1)r.push([f,...m]);else if(m.length>0){let[y,...x]=m;const S=r[b][1];Kf(S)&&Kf(y)&&(y=Xf(!0,S,y)),r[b]=[f,y,...x]}}}}const vI=new th().freeze();function nh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ih(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function VE(e){if(!Kf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function wl(e){return AI(e)?e:new zE(e)}function AI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function kI(e){return typeof e=="string"||CI(e)}function CI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",YE=[],WE={allowDangerousHtml:!0},OI=/^(https?|ircs?|mailto|xmpp)$/i,II=[{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 GE(e){const t=PI(e),n=RI(e);return LI(t.runSync(t.parse(n),n),e)}function PI(e){const t=e.rehypePlugins||YE,n=e.remarkPlugins||YE,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),WE):WE;return vI().use(hO).use(n).use(aI,r).use(t)}function RI(e){const t=e.children||"",n=new zE;return typeof t=="string"&&(n.value=t),n}function LI(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||DI;for(const m of II)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+NI+m.id,void 0);return bl(e,f),sN(e,{Fragment:w.Fragment,components:s,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function f(m,p,b){if(m.type==="raw"&&b&&typeof p=="number")return u?b.children.splice(p,1):b.children[p]={type:"text",value:m.value},p;if(m.type==="element"){let y;for(y in Lf)if(Object.hasOwn(Lf,y)&&Object.hasOwn(m.properties,y)){const x=m.properties[y],S=Lf[y];(S===null||S.includes(m.tagName))&&(m.properties[y]=d(String(x||""),y,m))}}if(m.type==="element"){let y=n?!n.includes(m.tagName):a?a.includes(m.tagName):!1;if(!y&&r&&typeof p=="number"&&(y=!r(m,p,b)),y&&b&&typeof p=="number")return l&&m.children?b.children.splice(p,1,...m.children):b.children.splice(p,1),p}}}function DI(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||OI.test(e.slice(0,t))?e:""}const XE=/[#.]/g;function MI(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){XE.lastIndex=s;const l=XE.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 KE(e,t,n){const r=n?HI(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=MI(a,t);const f=d.tagName.toLowerCase(),m=r?r.get(f):void 0;if(d.tagName=m||f,FI(u))l.unshift(u);else for(const[p,b]of Object.entries(u))BI(e,d.properties,p,b)}for(const f of l)sh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function FI(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 BI(e,t,n,r){const s=ul(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=U1(r):s.commaSeparated?a=A1(r):s.commaOrSpaceSeparated?a=U1(A1(r).join(" ")):a=QE(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?UI(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(QE(s,s.property,l));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function sh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)sh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?sh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function QE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||da(n)===da(t)))return!0}return n}function UI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function HI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const jI=["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"],zI=KE(fa,"div"),$I=KE(di,"g",jI);function VI(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=JE(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=JE(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 JE(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 rs={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/"},ZE={}.hasOwnProperty,qI=Object.prototype;function YI(e,t){const n=t||{};return oh({file:n.file||void 0,location:!1,schema:n.space==="svg"?di:fa,verbose:n.verbose||!1},e)}function oh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},xl(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:ey(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=VI(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"},xl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},xl(e,r,n),n}default:return n=WI(e,t),n}}function ey(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=oh(e,t[n]);r.push(s)}return r}function WI(e,t){const n=e.schema;e.schema=t.namespaceURI===rs.svg?di:fa;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;ZE.call(qI,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?$I:zI)(t.tagName,s,ey(e,t.childNodes));if(xl(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&Gs(d.startTag),m=d&&d.endTag&&Gs(d.endTag),p=oh(e,l.content);f&&m&&e.file&&(p.position={start:f.end,end:m.start}),u.content=p}return e.schema=n,u}function xl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=GI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function GI(e,t,n){const r=Gs(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)ZE.call(n.attrs,u)&&(a[ul(e.schema,u).property]=Gs(n.attrs[u]));n.startTag;const l=Gs(n.startTag),d=n.endTag?Gs(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Gs(e){const t=ty({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ty({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ty(e){return e.line&&e.column?e:void 0}const ny={}.hasOwnProperty;function ry(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&ny.call(s,e)){const d=String(s[e]);u=ny.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 XI={},KI={}.hasOwnProperty,iy=ry("type",{handlers:{root:JI,element:rP,text:tP,comment:nP,doctype:eP}});function QI(e,t){const r=(t||XI).space;return iy(e,r==="svg"?di:fa)}function JI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ah(e.children,n,t),Xs(e,n),n}function ZI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ah(e.children,n,t),Xs(e,n),n}function eP(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Xs(e,t),t}function tP(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Xs(e,t),t}function nP(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Xs(e,t),t}function rP(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=di);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&KI.call(e.properties,a)){const d=iP(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:rs[u],childNodes:[],parentNode:null};return l.childNodes=ah(e.children,l,r),Xs(e,l),e.tagName==="template"&&e.content&&(l.content=ZI(e.content,r)),l}function iP(e,t,n){const r=ul(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?k1(n):H1(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=rs[r.space]}return s}function ah(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=iy(e[r],n);a.parentNode=t,s.push(a)}return s}function Xs(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 sP=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],oP=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]),kt="�";var I;(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"})(I||(I={}));const In={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function sy(e){return e>=55296&&e<=57343}function aP(e){return e>=56320&&e<=57343}function uP(e,t){return(e-55296)*1024+9216+t}function oy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ay(e){return e>=64976&&e<=65007||oP.has(e)}var re;(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"})(re||(re={}));const lP=65536;class cP{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=lP,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(aP(n))return this.pos++,this._addGap(),uP(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(re.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,I.EOF;const r=this.html.charCodeAt(n);return r===I.CARRIAGE_RETURN?I.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,I.EOF;let t=this.html.charCodeAt(this.pos);return t===I.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,I.LINE_FEED):t===I.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,sy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===I.LINE_FEED||t===I.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){oy(t)?this._err(re.controlCharacterInInputStream):ay(t)&&this._err(re.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var tt;(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"})(tt||(tt={}));function uy(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 dP=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))),fP=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 hP(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=fP.get(e))!==null&&t!==void 0?t:e}var Kt;(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"})(Kt||(Kt={}));const pP=32;var pi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(pi||(pi={}));function uh(e){return e>=Kt.ZERO&&e<=Kt.NINE}function mP(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_F||e>=Kt.LOWER_A&&e<=Kt.LOWER_F}function gP(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_Z||e>=Kt.LOWER_A&&e<=Kt.LOWER_Z||uh(e)}function EP(e){return e===Kt.EQUALS||gP(e)}var Qt;(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"})(Qt||(Qt={}));var qr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(qr||(qr={}));class yP{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=qr.Strict}startEntity(t){this.decodeMode=t,this.state=Qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Qt.EntityStart:return t.charCodeAt(n)===Kt.NUM?(this.state=Qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Qt.NamedEntity,this.stateNamedEntity(t,n));case Qt.NumericStart:return this.stateNumericStart(t,n);case Qt.NumericDecimal:return this.stateNumericDecimal(t,n);case Qt.NumericHex:return this.stateNumericHex(t,n);case Qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|pP)===Kt.LOWER_X?(this.state=Qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Qt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(uh(s)||mP(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(uh(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Kt.SEMI)this.consumed+=1;else if(this.decodeMode===qr.Strict)return 0;return this.emitCodePoint(hP(this.result),this.consumed),this.errors&&(t!==Kt.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&pi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=TP(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===qr.Attribute&&(a===0||EP(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&pi.VALUE_LENGTH)>>14,a!==0){if(u===Kt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==qr.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]&pi.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]&~pi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Qt.NamedEntity:return this.result!==0&&(this.decodeMode!==qr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Qt.NumericDecimal:return this.emitNumericEntity(0,2);case Qt.NumericHex:return this.emitNumericEntity(0,3);case Qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Qt.EntityStart:return 0}}}function TP(e,t,n,r){const s=(t&pi.BRANCH_LENGTH)>>7,a=t&pi.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 is;(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"})(is||(is={}));var Kn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Kn||(Kn={}));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 bP=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 Ks(e){var t;return(t=bP.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const ye=g,wP={[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},lh=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 Mt={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function xP(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function _a(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function _P(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function mi(e){return _P(e)||_a(e)}function ly(e){return mi(e)||xP(e)}function _l(e){return e+32}function cy(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function dy(e){return cy(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function SP(e){return e===I.NULL?re.nullCharacterReference:e>1114111?re.characterReferenceOutsideUnicodeRange:sy(e)?re.surrogateCharacterReference:ay(e)?re.noncharacterCharacterReference:oy(e)||e===I.CARRIAGE_RETURN?re.controlCharacterReference:null}class vP{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 cP(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new yP(dP,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(re.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(re.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=SP(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:tt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:tt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:tt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:tt.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(uy(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(re.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=Ks(t.tagName),t.type===tt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(re.endTagWithAttributes),t.selfClosing&&this._err(re.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 tt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case tt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case tt.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:tt.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=cy(t)?tt.WHITESPACE_CHARACTER:t===I.NULL?tt.NULL_CHARACTER:tt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(tt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?qr.Attribute:qr.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 I.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitCodePoint(t);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case I.AMPERSAND:{this._startCharacterReference();break}case I.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(mi(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(re.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(re.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(mi(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(re.missingEndTagName),this.state=L.DATA;break}case I.EOF:{this._err(re.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.tagName+=kt;break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(_a(t)?_l(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){mi(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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case I.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===I.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){mi(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 I.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case I.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){mi(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===I.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.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 I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(kt);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(kt);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:mi(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){mi(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(In.SCRIPT,!1)&&dy(this.preprocessor.peek(In.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<In.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 I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(kt);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(kt);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(kt);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.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(In.SCRIPT,!1)&&dy(this.preprocessor.peek(In.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<In.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(re.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this._leaveAttrName(),this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(re.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.name+=kt;break}default:this.currentAttr.name+=String.fromCodePoint(_a(t)?_l(t):t)}}_stateAfterAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{this.state=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=kt;break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=kt;break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=kt;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(re.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.data+=kt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(In.DASH_DASH,!0)?(this._createCommentToken(In.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(In.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(In.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(In.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(re.cdataInHtmlContent),this._createCommentToken(In.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(re.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(re.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 I.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(re.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 I.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.data+=kt;break}case I.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case I.EXCLAMATION_MARK:{n.data+="!",this.state=L.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(re.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case I.EOF:{this._err(re.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 I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case I.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{n.data+="-";break}case I.EOF:{this._err(re.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 I.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(re.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(re.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(_a(t))this._createDoctypeToken(String.fromCharCode(_l(t))),this.state=L.DOCTYPE_NAME;else switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.NULL:{this._err(re.unexpectedNullCharacter),this._createDoctypeToken(kt),this.state=L.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(re.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.name+=kt;break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(_a(t)?_l(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(In.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(In.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(re.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=kt;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(re.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 I.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=kt;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(re.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.QUOTATION_MARK:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=kt;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(re.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 I.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=kt;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(re.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.NULL:{this._err(re.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(re.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=L.DATA;break}case I.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(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ly(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ly(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(re.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const fy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),hy=new Set([...fy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Sl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),AP=new Set([...Sl,g.OL,g.UL]),kP=new Set([...Sl,g.BUTTON]),py=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),my=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),CP=new Set([g.TR,g.TEMPLATE,g.HTML]),NP=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),OP=new Set([g.TABLE,g.TEMPLATE,g.HTML]),IP=new Set([g.TD,g.TH]);class PP{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(lh,me.HTML)}popUntilTableCellPopped(){this.popUntilPopped(IP,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(OP,me.HTML)}clearBackToTableBodyContext(){this.clearBackTo(NP,me.HTML)}clearBackToTableRowContext(){this.clearBackTo(CP,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(my.has(s))return!1;break}case me.MATHML:{if(py.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Sl)}hasInListItemScope(t){return this.hasInDynamicScope(t,AP)}hasInButtonScope(t){return this.hasInDynamicScope(t,kP)}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(lh.has(n))return!0;if(Sl.has(n))return!1;break}case me.SVG:{if(my.has(n))return!1;break}case me.MATHML:{if(py.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&&fy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&hy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&hy.has(this.currentTagId);)this.pop()}}const ch=3;var kr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(kr||(kr={}));const gy={type:kr.Marker};class RP{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===kr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const m=this.treeAdapter.getAttrList(f);m.length===s&&r.push({idx:l,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ch)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ch)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const l=r[u];l.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=ch&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(gy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:kr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:kr.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(gy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===kr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===kr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===kr.Element&&n.element===t)}}const gi={createDocument(){return{nodeName:"#document",mode:Kn.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};gi.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(gi.isTextNode(n)){n.value+=t;return}}gi.appendChild(e,gi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&gi.isTextNode(r)?r.value+=t:gi.insertBefore(e,gi.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)}},Ey="html",LP="about:legacy-compat",DP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",yy=["+//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//"],MP=[...yy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],FP=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ty=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],BP=[...Ty,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function by(e,t){return t.some(n=>e.startsWith(n))}function UP(e){return e.name===Ey&&e.publicId===null&&(e.systemId===null||e.systemId===LP)}function HP(e){if(e.name!==Ey)return Kn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===DP)return Kn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),FP.has(n))return Kn.QUIRKS;let r=t===null?MP:yy;if(by(n,r))return Kn.QUIRKS;if(r=t===null?Ty:BP,by(n,r))return Kn.LIMITED_QUIRKS}return Kn.NO_QUIRKS}const wy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},jP="definitionurl",zP="definitionURL",$P=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])),VP=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}]]),qP=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])),YP=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 WP(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===is.COLOR||r===is.SIZE||r===is.FACE)||YP.has(t)}function xy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===jP){e.attrs[t].name=zP;break}}function _y(e){for(let t=0;t<e.attrs.length;t++){const n=$P.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function dh(e){for(let t=0;t<e.attrs.length;t++){const n=VP.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 GP(e){const t=qP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ks(e.tagName))}function XP(e,t){return t===me.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function KP(e,t,n){if(t===me.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===is.ENCODING){const s=n[r].value.toLowerCase();return s===wy.TEXT_HTML||s===wy.APPLICATION_XML}}return t===me.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function QP(e,t,n,r){return(!r||r===me.HTML)&&KP(e,t,n)||(!r||r===me.MATHML)&&XP(e,t)}const JP="hidden",ZP=8,eR=3;var H;(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"})(H||(H={}));const tR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Sy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),vy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gi,onParseError:null};class Ay{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=H.INITIAL,this.originalInsertionMode=H.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({},vy),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 vP(this.options,this),this.activeFormattingElements=new RP(this.treeAdapter),this.fragmentContextID=r?Ks(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new PP(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({},vy),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(H.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:tR,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=H.TEXT}switchToPlaintextParsing(){this.insertionMode=H.TEXT,this.originalInsertionMode=H.IN_BODY,this.tokenizer.state=Mt.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=Mt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Mt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Mt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Mt.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:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:m})}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===tt.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 tt.CHARACTER:{this.onCharacter(t);break}case tt.NULL_CHARACTER:{this.onNullCharacter(t);break}case tt.COMMENT:{this.onComment(t);break}case tt.DOCTYPE:{this.onDoctype(t);break}case tt.START_TAG:{this._processStartTag(t);break}case tt.END_TAG:{this.onEndTag(t);break}case tt.EOF:{this.onEof(t);break}case tt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return QP(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===kr.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=H.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=H.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=H.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=H.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=H.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=H.IN_TABLE;return}case g.BODY:{this.insertionMode=H.IN_BODY;return}case g.FRAMESET:{this.insertionMode=H.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?H.AFTER_HEAD:H.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=H.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=H.IN_HEAD;return}break}}this.insertionMode=H.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=H.IN_SELECT_IN_TABLE;return}}this.insertionMode=H.IN_SELECT}_isElementCausesFosterParenting(t){return Sy.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 wP[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){I6(this,t);return}switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{va(this,t);break}case H.BEFORE_HEAD:{Aa(this,t);break}case H.IN_HEAD:{ka(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Ca(this,t);break}case H.AFTER_HEAD:{Na(this,t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:{Cy(this,t);break}case H.TEXT:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{mh(this,t);break}case H.IN_TABLE_TEXT:{My(this,t);break}case H.IN_COLUMN_GROUP:{kl(this,t);break}case H.AFTER_BODY:{Ol(this,t);break}case H.AFTER_AFTER_BODY:{Il(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){O6(this,t);return}switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{va(this,t);break}case H.BEFORE_HEAD:{Aa(this,t);break}case H.IN_HEAD:{ka(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Ca(this,t);break}case H.AFTER_HEAD:{Na(this,t);break}case H.TEXT:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{mh(this,t);break}case H.IN_COLUMN_GROUP:{kl(this,t);break}case H.AFTER_BODY:{Ol(this,t);break}case H.AFTER_AFTER_BODY:{Il(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){hh(this,t);return}switch(this.insertionMode){case H.INITIAL:case H.BEFORE_HTML:case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_TEMPLATE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{hh(this,t);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}case H.AFTER_BODY:{uR(this,t);break}case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{lR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case H.INITIAL:{cR(this,t);break}case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:{this._err(t,re.misplacedDoctype);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,re.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?P6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{dR(this,t);break}case H.BEFORE_HEAD:{hR(this,t);break}case H.IN_HEAD:{dr(this,t);break}case H.IN_HEAD_NO_SCRIPT:{gR(this,t);break}case H.AFTER_HEAD:{yR(this,t);break}case H.IN_BODY:{fn(this,t);break}case H.IN_TABLE:{Qs(this,t);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}case H.IN_CAPTION:{p6(this,t);break}case H.IN_COLUMN_GROUP:{gh(this,t);break}case H.IN_TABLE_BODY:{Cl(this,t);break}case H.IN_ROW:{Nl(this,t);break}case H.IN_CELL:{E6(this,t);break}case H.IN_SELECT:{Uy(this,t);break}case H.IN_SELECT_IN_TABLE:{T6(this,t);break}case H.IN_TEMPLATE:{w6(this,t);break}case H.AFTER_BODY:{_6(this,t);break}case H.IN_FRAMESET:{S6(this,t);break}case H.AFTER_FRAMESET:{A6(this,t);break}case H.AFTER_AFTER_BODY:{C6(this,t);break}case H.AFTER_AFTER_FRAMESET:{N6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?R6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{fR(this,t);break}case H.BEFORE_HEAD:{pR(this,t);break}case H.IN_HEAD:{mR(this,t);break}case H.IN_HEAD_NO_SCRIPT:{ER(this,t);break}case H.AFTER_HEAD:{TR(this,t);break}case H.IN_BODY:{Al(this,t);break}case H.TEXT:{i6(this,t);break}case H.IN_TABLE:{Oa(this,t);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}case H.IN_CAPTION:{m6(this,t);break}case H.IN_COLUMN_GROUP:{g6(this,t);break}case H.IN_TABLE_BODY:{Eh(this,t);break}case H.IN_ROW:{By(this,t);break}case H.IN_CELL:{y6(this,t);break}case H.IN_SELECT:{Hy(this,t);break}case H.IN_SELECT_IN_TABLE:{b6(this,t);break}case H.IN_TEMPLATE:{x6(this,t);break}case H.AFTER_BODY:{zy(this,t);break}case H.IN_FRAMESET:{v6(this,t);break}case H.AFTER_FRAMESET:{k6(this,t);break}case H.AFTER_AFTER_BODY:{Il(this,t);break}}}onEof(t){switch(this.insertionMode){case H.INITIAL:{Sa(this,t);break}case H.BEFORE_HTML:{va(this,t);break}case H.BEFORE_HEAD:{Aa(this,t);break}case H.IN_HEAD:{ka(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Ca(this,t);break}case H.AFTER_HEAD:{Na(this,t);break}case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{Ly(this,t);break}case H.TEXT:{s6(this,t);break}case H.IN_TABLE_TEXT:{Pa(this,t);break}case H.IN_TEMPLATE:{jy(this,t);break}case H.AFTER_BODY:case H.IN_FRAMESET:case H.AFTER_FRAMESET:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{ph(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===I.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 H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.TEXT:case H.IN_COLUMN_GROUP:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{this._insertCharacters(t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:case H.AFTER_BODY:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{ky(this,t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{mh(this,t);break}case H.IN_TABLE_TEXT:{Dy(this,t);break}}}}function nR(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):Ry(e,t),n}function rR(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 iR(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>=eR;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=sR(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function sR(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 oR(e,t,n){const r=e.treeAdapter.getTagName(t),s=Ks(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 aR(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function fh(e,t){for(let n=0;n<ZP;n++){const r=nR(e,t);if(!r)break;const s=rR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=iR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&oR(e,u,a),aR(e,s,r)}}function hh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function uR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function lR(e,t){e._appendCommentNode(t,e.document)}function ph(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function cR(e,t){e._setDocumentType(t);const n=t.forceQuirks?Kn.QUIRKS:HP(t);UP(t)||e._err(t,re.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=H.BEFORE_HTML}function Sa(e,t){e._err(t,re.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Kn.QUIRKS),e.insertionMode=H.BEFORE_HTML,e._processToken(t)}function dR(e,t){t.tagID===g.HTML?(e._insertElement(t,me.HTML),e.insertionMode=H.BEFORE_HEAD):va(e,t)}function fR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&va(e,t)}function va(e,t){e._insertFakeRootElement(),e.insertionMode=H.BEFORE_HEAD,e._processToken(t)}function hR(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.HEAD:{e._insertElement(t,me.HTML),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD;break}default:Aa(e,t)}}function pR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Aa(e,t):e._err(t,re.endTagWithoutMatchingOpenElement)}function Aa(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD,e._processToken(t)}function dr(e,t){switch(t.tagID){case g.HTML:{fn(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,Mt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Mt.RAWTEXT):(e._insertElement(t,me.HTML),e.insertionMode=H.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Mt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Mt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=H.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(H.IN_TEMPLATE);break}case g.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:ka(e,t)}}function mR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=H.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{ka(e,t);break}case g.TEMPLATE:{ss(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function ss(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,re.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,re.endTagWithoutMatchingOpenElement)}function ka(e,t){e.openElements.pop(),e.insertionMode=H.AFTER_HEAD,e._processToken(t)}function gR(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{dr(e,t);break}case g.NOSCRIPT:{e._err(t,re.nestedNoscriptInHead);break}default:Ca(e,t)}}function ER(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=H.IN_HEAD;break}case g.BR:{Ca(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function Ca(e,t){const n=t.type===tt.EOF?re.openElementsLeftAfterEof:re.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=H.IN_HEAD,e._processToken(t)}function yR(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.BODY:{e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=H.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,me.HTML),e.insertionMode=H.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,re.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),dr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:Na(e,t)}}function TR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Na(e,t);break}case g.TEMPLATE:{ss(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function Na(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=H.IN_BODY,vl(e,t)}function vl(e,t){switch(t.type){case tt.CHARACTER:{Cy(e,t);break}case tt.WHITESPACE_CHARACTER:{ky(e,t);break}case tt.COMMENT:{hh(e,t);break}case tt.START_TAG:{fn(e,t);break}case tt.END_TAG:{Al(e,t);break}case tt.EOF:{Ly(e,t);break}}}function ky(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Cy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function bR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function wR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function xR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_FRAMESET)}function _R(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function SR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&lh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,me.HTML)}function vR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function AR(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 kR(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 CR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.tokenizer.state=Mt.PLAINTEXT}function NR(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 OR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(fh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function IR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function PR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(fh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function RR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function LR(e,t){e.treeAdapter.getDocumentMode(e.document)!==Kn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=H.IN_TABLE}function Ny(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Oy(e){const t=uy(e,is.TYPE);return t!=null&&t.toLowerCase()===JP}function DR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),Oy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function MR(e,t){e._appendElement(t,me.HTML),t.ackSelfClosing=!0}function FR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function BR(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Ny(e,t)}function UR(e,t){e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Mt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=H.TEXT}function HR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Mt.RAWTEXT)}function jR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Mt.RAWTEXT)}function Iy(e,t){e._switchToTextParsing(t,Mt.RAWTEXT)}function zR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===H.IN_TABLE||e.insertionMode===H.IN_CAPTION||e.insertionMode===H.IN_TABLE_BODY||e.insertionMode===H.IN_ROW||e.insertionMode===H.IN_CELL?H.IN_SELECT_IN_TABLE:H.IN_SELECT}function $R(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function VR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,me.HTML)}function qR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,me.HTML)}function YR(e,t){e._reconstructActiveFormattingElements(),xy(t),dh(t),t.selfClosing?e._appendElement(t,me.MATHML):e._insertElement(t,me.MATHML),t.ackSelfClosing=!0}function WR(e,t){e._reconstructActiveFormattingElements(),_y(t),dh(t),t.selfClosing?e._appendElement(t,me.SVG):e._insertElement(t,me.SVG),t.ackSelfClosing=!0}function Py(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function fn(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:{IR(e,t);break}case g.A:{OR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{SR(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:{_R(e,t);break}case g.LI:case g.DD:case g.DT:{kR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Ny(e,t);break}case g.HR:{FR(e,t);break}case g.RB:case g.RTC:{VR(e,t);break}case g.RT:case g.RP:{qR(e,t);break}case g.PRE:case g.LISTING:{vR(e,t);break}case g.XMP:{HR(e,t);break}case g.SVG:{WR(e,t);break}case g.HTML:{bR(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:{dr(e,t);break}case g.BODY:{wR(e,t);break}case g.FORM:{AR(e,t);break}case g.NOBR:{PR(e,t);break}case g.MATH:{YR(e,t);break}case g.TABLE:{LR(e,t);break}case g.INPUT:{DR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{MR(e,t);break}case g.IMAGE:{BR(e,t);break}case g.BUTTON:{NR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{RR(e,t);break}case g.IFRAME:{jR(e,t);break}case g.SELECT:{zR(e,t);break}case g.OPTION:case g.OPTGROUP:{$R(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Iy(e,t);break}case g.FRAMESET:{xR(e,t);break}case g.TEXTAREA:{UR(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Iy(e,t):Py(e,t);break}case g.PLAINTEXT:{CR(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:Py(e,t)}}function GR(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=H.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function XR(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=H.AFTER_BODY,zy(e,t))}function KR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function QR(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 JR(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function ZR(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function e6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function t6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function n6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function r6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Ry(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 Al(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{fh(e,t);break}case g.P:{JR(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:{KR(e,t);break}case g.LI:{ZR(e);break}case g.DD:case g.DT:{e6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{t6(e);break}case g.BR:{r6(e);break}case g.BODY:{GR(e,t);break}case g.HTML:{XR(e,t);break}case g.FORM:{QR(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{n6(e,t);break}case g.TEMPLATE:{ss(e,t);break}default:Ry(e,t)}}function Ly(e,t){e.tmplInsertionModeStack.length>0?jy(e,t):ph(e,t)}function i6(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 s6(e,t){e._err(t,re.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function mh(e,t){if(e.openElements.currentTagId!==void 0&&Sy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=H.IN_TABLE_TEXT,t.type){case tt.CHARACTER:{My(e,t);break}case tt.WHITESPACE_CHARACTER:{Dy(e,t);break}}else Ia(e,t)}function o6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_CAPTION}function a6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_COLUMN_GROUP}function u6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=H.IN_COLUMN_GROUP,gh(e,t)}function l6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_TABLE_BODY}function c6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=H.IN_TABLE_BODY,Cl(e,t)}function d6(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function f6(e,t){Oy(t)?e._appendElement(t,me.HTML):Ia(e,t),t.ackSelfClosing=!0}function h6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,me.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Qs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{c6(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{dr(e,t);break}case g.COL:{u6(e,t);break}case g.FORM:{h6(e,t);break}case g.TABLE:{d6(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{l6(e,t);break}case g.INPUT:{f6(e,t);break}case g.CAPTION:{o6(e,t);break}case g.COLGROUP:{a6(e,t);break}default:Ia(e,t)}}function Oa(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{ss(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:Ia(e,t)}}function Ia(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,vl(e,t),e.fosterParentingEnabled=n}function Dy(e,t){e.pendingCharacterTokens.push(t)}function My(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Pa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ia(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Fy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function p6(e,t){const n=t.tagID;Fy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,Qs(e,t)):fn(e,t)}function m6(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=H.IN_TABLE,n===g.TABLE&&Oa(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:Al(e,t)}}function gh(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.COL:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{dr(e,t);break}default:kl(e,t)}}function g6(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case g.TEMPLATE:{ss(e,t);break}case g.COL:break;default:kl(e,t)}}function kl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE,e._processToken(t))}function Cl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,me.HTML),e.insertionMode=H.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=H.IN_ROW,Nl(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=H.IN_TABLE,Qs(e,t));break}default:Qs(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=H.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,Oa(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:Oa(e,t)}}function Nl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,me.HTML),e.insertionMode=H.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=H.IN_TABLE_BODY,Cl(e,t));break}default:Qs(e,t)}}function By(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.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=H.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:Oa(e,t)}}function E6(e,t){const n=t.tagID;Fy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Nl(e,t)):fn(e,t)}function y6(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=H.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),By(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Al(e,t)}}function Uy(e,t){switch(t.tagID){case g.HTML:{fn(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:{dr(e,t);break}}}function Hy(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:{ss(e,t);break}}}function T6(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)):Uy(e,t)}function b6(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)):Hy(e,t)}function w6(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:{dr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=H.IN_TABLE,e.insertionMode=H.IN_TABLE,Qs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=H.IN_COLUMN_GROUP,e.insertionMode=H.IN_COLUMN_GROUP,gh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=H.IN_TABLE_BODY,e.insertionMode=H.IN_TABLE_BODY,Cl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=H.IN_ROW,e.insertionMode=H.IN_ROW,Nl(e,t);break}default:e.tmplInsertionModeStack[0]=H.IN_BODY,e.insertionMode=H.IN_BODY,fn(e,t)}}function x6(e,t){t.tagID===g.TEMPLATE&&ss(e,t)}function jy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ph(e,t)}function _6(e,t){t.tagID===g.HTML?fn(e,t):Ol(e,t)}function zy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=H.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 Ol(e,t)}function Ol(e,t){e.insertionMode=H.IN_BODY,vl(e,t)}function S6(e,t){switch(t.tagID){case g.HTML:{fn(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:{dr(e,t);break}}}function v6(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=H.AFTER_FRAMESET))}function A6(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.NOFRAMES:{dr(e,t);break}}}function k6(e,t){t.tagID===g.HTML&&(e.insertionMode=H.AFTER_AFTER_FRAMESET)}function C6(e,t){t.tagID===g.HTML?fn(e,t):Il(e,t)}function Il(e,t){e.insertionMode=H.IN_BODY,vl(e,t)}function N6(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.NOFRAMES:{dr(e,t);break}}}function O6(e,t){t.chars=kt,e._insertCharacters(t)}function I6(e,t){e._insertCharacters(t),e.framesetOk=!1}function $y(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 P6(e,t){if(WP(t))$y(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===me.MATHML?xy(t):r===me.SVG&&(GP(t),_y(t)),dh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function R6(e,t){if(t.tagID===g.P||t.tagID===g.BR){$y(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 L6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,D6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Vy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function qy(e,t){const n=q6(e),r=ry("type",{handlers:{root:M6,element:F6,text:B6,comment:Wy,doctype:U6,raw:j6},unknown:z6}),s={parser:n?new Ay(Vy):Ay.getFragmentParser(void 0,Vy),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),Js(s,vr());const a=n?s.parser.document:s.parser.getFragment(),u=YI(a,{file:s.options.file});return s.stitches&&bl(u,"comment",function(l,d,f){const m=l;if(m.value.stitch&&f&&d!==void 0){const p=f.children;return p[d]=m.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Yy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function M6(e,t){Yy(e.children,t)}function F6(e,t){$6(e,t),Yy(e.children,t),V6(e,t)}function B6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:tt.CHARACTER,chars:e.value,location:Ra(e)};Js(t,vr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function U6(e,t){const n={type:tt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ra(e)};Js(t,vr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function H6(e,t){t.stitches=!0;const n=Y6(e);if("children"in e&&"children"in n){const r=qy({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:tt.COMMENT,data:n,location:Ra(e)};Js(t,vr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function j6(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,Gy(t,vr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(L6,"&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 z6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))H6(n,t);else{let r="";throw D6.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 Js(e,t){Gy(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=Mt.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 Gy(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 $6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Mt.PLAINTEXT)return;Js(t,vr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:rs.html;s===rs.html&&n==="svg"&&(s=rs.svg);const a=QI(ue(U({},e),{children:[]}),{space:s===rs.svg?"svg":"html"}),u={type:tt.START_TAG,tagName:n,tagID:Ks(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ra(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function V6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&sP.includes(n)||t.parser.tokenizer.state===Mt.PLAINTEXT)return;Js(t,ll(e));const r={type:tt.END_TAG,tagName:n,tagID:Ks(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ra(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Mt.RCDATA||t.parser.tokenizer.state===Mt.RAWTEXT||t.parser.tokenizer.state===Mt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Mt.DATA)}function q6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ra(e){const t=vr(e)||{line:void 0,column:void 0,offset:void 0},n=ll(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 Y6(e){return"children"in e?ns(ue(U({},e),{children:[]})):ns(e)}function Xy(e){return function(t,n){return qy(t,ue(U({},e),{file:n}))}}const os=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ky={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...os,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...os],h2:[["className","sr-only"]],img:[...os,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...os,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...os],table:[...os],ul:[...os,["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"]},Ei={}.hasOwnProperty;function W6(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},Ky),t):Ky,stack:[]},s=Qy(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function Qy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return G6(e,n);case"doctype":return X6(e,n);case"element":return K6(e,n);case"root":return Q6(e,n);case"text":return J6(e,n)}}}function G6(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 La(a,t),a}}function X6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return La(n,t),n}}function K6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Jy(e,t.children),s=Z6(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&&Ei.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 La(u,t),u}function Q6(e,t){const r={type:"root",children:Jy(e,t.children)};return La(r,t),r}function J6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return La(r,t),r}function Jy(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=Qy(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function Z6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&Ei.call(r,n)?r[n]:void 0,u=r&&Ei.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Ei.call(l,f)){const m=l[f];let p=Zy(e,tT(a,f),f,m);p==null&&(p=Zy(e,tT(u,f),f,m)),p!=null&&(d[f]=p)}if(s&&Ei.call(s,n)){const m=s[n];for(f in m)Ei.call(m,f)&&!Ei.call(d,f)&&(d[f]=m[f])}return d}function Zy(e,t,n,r){return t?Array.isArray(r)?e4(e,t,n,r):eT(e,t,n,r):void 0}function e4(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=eT(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function eT(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&t4(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 t4(e,t,n){const r=e.schema.protocols&&Ei.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 m=r[f];if(a===m.length&&s.slice(0,m.length)===m)return!0}return!1}function La(e,t){const n=Y1(t);t.data&&(e.data=ns(t.data)),n&&(e.position=n)}function tT(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 n4(e){return function(t){return W6(t,e)}}const nT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",ue(U(U({className:F(e,`${N}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},r4=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ct();return!e&&!t?null:w.jsx("div",{className:F(n,`${N}-disclaimer`),children:t?w.jsx(GE,{rehypePlugins:[Xy,n4],components:{ul:({children:r})=>w.jsx("ul",{className:F(n,`${N}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:F(n,`${N}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:F(n,`${N}-li`),children:r}),a:({href:r,title:s,children:a})=>w.jsx(nT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>w.jsx("img",{className:F(n,`${N}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>w.jsx("p",{className:F(n,`${N}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:F(n,`${N}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:F(n,`${N}-disclaimer-text`),children:e})})},yh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a,canInitialize:u,messages:l}=bn(),{globalClassName:d,searchConfig:f,enableEscalationToAgent:m}=ct(),p=R.useRef(null),b=R.useRef(l);b.current=l;const y=t||!Yg(s,a,u),x=R.useRef(t);R.useEffect(()=>{var C;const _=x.current&&!t;x.current=t,_&&!y&&((C=p.current)==null||C.focus({preventScroll:!0}))},[t,y]);const S=_=>Fe(null,null,function*(){var O,z;_.preventDefault();const C=(((O=p.current)==null?void 0:O.value)||"").trim();if(C){const W=!s&&!a&&u===!0,D=b.current.length;p.current.value="";const V=yield r(C);W&&V.outcome!=="success"&&b.current.length===D&&((z=p.current)==null?void 0:z.value)===""&&(p.current.value=C,p.current.disabled||p.current.focus({preventScroll:!0}))}}),A=()=>{r("Can you connect me to a human?")};return w.jsxs("div",{className:F(d,e,`cim-${n}-component`,`${N}-search-bar-wrapper`),children:[w.jsxs("form",{className:F(d,e,`cim-${n}-component`,`${N}-search-bar`),name:`${N}-search-form`,onSubmit:S,children:[w.jsx("input",{className:F(d,e,`cim-${n}-component`,`${N}-search-input`),type:"text",ref:p,placeholder:(f==null?void 0:f.placeholder)||"Ask us anything",name:`${N}-user-input`,disabled:y}),w.jsx(DC,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:y}),m&&w.jsx(lr,{className:F(d,`${N}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:y,onClick:A,icon:w.jsx(vC,{})})]}),w.jsx(r4,{})]})};function i4(e){return pt({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 s4(e){return pt({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 rT=R.createContext({isOpen:!1}),Th=R.createContext(null),iT=R.createContext(null),Zs=()=>{var n,r;const e=R.useContext(Th),t=R.useContext(iT);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},sT=({onClearChat:e,componentType:t})=>{const n=Zs(),r=()=>{e(),n()};return w.jsxs("button",{className:F(`${N}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(s4,{}),"Clear chat"]})},oT=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=ct(),r=Zs(),[s,a]=R.useState(!1),u=()=>Fe(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 w.jsxs("button",{className:F(`${N}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[w.jsx(i4,{}),"Download transcript"]})};function o4(e){return e==null?[]:Array.isArray(e)?e:[e]}var a4=(e,...t)=>e.concat(t),u4=(e,...t)=>e.filter(n=>!t.includes(n)),l4=e=>Array.from(new Set(e));function aT(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 c4(e,t,n={}){const{step:r=1,loop:s=!0}=n;return aT(e,t,{step:-r,loop:s})}var d4=e=>Array.isArray(e),uT=e=>e!=null&&typeof e=="object",f4=e=>uT(e)&&!d4(e),Pl=e=>typeof e=="string",eo=e=>typeof e=="function",h4=e=>e==null,p4=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m4=e=>Object.prototype.toString.call(e),lT=Function.prototype.toString,g4=lT.call(Object),E4=e=>{if(!uT(e)||m4(e)!="[object Object]"||b4(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=p4(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&lT.call(n)==g4},y4=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,T4=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,b4=e=>y4(e)||T4(e),w4=e=>e(),x4=()=>{},bh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function _4(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:S4,max:v4}=Math,A4=e=>Number.isNaN(e),k4=e=>A4(e)?0:e,cT=(e,t,n)=>S4(v4(k4(e),t),n);function wh(e){if(!E4(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]=wh(s))}return n}function xh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function C4(e,t){if(e==null)throw new Error(t())}function N4(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 O4=Object.defineProperty,I4=(e,t,n)=>t in e?O4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_h=(e,t,n)=>I4(e,typeof t!="symbol"?t+"":t,n),dT=()=>{},Rl=e=>typeof e=="object"&&e!==null,to=e=>e?"":void 0,fT=e=>e?"true":void 0,P4=1,R4=9,L4=11,Jt=e=>Rl(e)&&e.nodeType===P4&&typeof e.nodeName=="string",Ll=e=>Rl(e)&&e.nodeType===R4,D4=e=>Rl(e)&&e===e.window,hT=e=>Jt(e)?e.localName||"":"#document";function M4(e){return["html","body","#document"].includes(hT(e))}var F4=e=>Rl(e)&&e.nodeType!==void 0,as=e=>F4(e)&&e.nodeType===L4&&"host"in e,B4=e=>Jt(e)&&e.localName==="input",U4=e=>Jt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Da(e){if(!e)return!1;const t=e.getRootNode();return io(t)===e}var H4=/(textarea|select)/;function j4(e){if(e==null||!Jt(e))return!1;try{return B4(e)&&e.selectionStart!=null||H4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function no(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&&as(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Cr(e){var t;return Ll(e)?e:D4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function z4(e){return Cr(e).documentElement}function ro(e){var t,n,r;return as(e)?ro(e.host):Ll(e)?(t=e.defaultView)!=null?t:window:Jt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function io(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 $4(e){if(hT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||as(e)&&e.host||z4(e);return as(t)?t.host:t}function Sh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Ll(t)||as(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var vh=new WeakMap;function so(e){return vh.has(e)||vh.set(e,ro(e).getComputedStyle(e)),vh.get(e)}var Ah=new Set(["menu","listbox","dialog","grid","tree","region"]),V4=e=>Ah.has(e),pT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function mT(e,t){const n=new Set,r=Sh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=pT(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const m=r.getElementById(f);if(m){const p=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";if(p&&V4(p)&&!b&&(m===t||m.contains(t)||s(m)))return!0}}}return!1};return s(e)}function gT(e,t){const n=Sh(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=pT(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const m=n.getElementById(f);if(m){const p=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";p&&Ah.has(p)&&!b&&(t(m),s(m))}}}};s(e)}function q4(e){const t=new Set;return gT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function Y4(e){const t=e.getAttribute("role");return!!(t&&Ah.has(t))}function W4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function G4(e){var t;return W4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function X4(e){if(!e.id)return!1;const t=Sh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&Y4(e))}var kh=()=>typeof document!="undefined";function K4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Ch=e=>kh()&&e.test(K4()),Q4=e=>kh()&&e.test(navigator.vendor),ET=()=>kh()&&!!navigator.maxTouchPoints,J4=()=>Ch(/^iPhone/i),Z4=()=>Ch(/^iPad/i)||Nh()&&navigator.maxTouchPoints>1,Dl=()=>J4()||Z4(),eL=()=>Nh()||Dl(),Nh=()=>Ch(/^Mac/i),tL=()=>eL()&&Q4(/apple/i);function nL(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 fr(e){var n;const t=nL(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var yT=e=>e.button===0,rL=e=>e.button===2||Nh()&&e.ctrlKey&&e.button===0,iL=e=>"touches"in e&&e.touches.length>0,sL={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},TT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function oL(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=sL[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in TT&&(s=TT[s]),s}function bT(e,t="client"){const n=iL(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)}},wT=e=>Jt(e)&&e.tagName==="IFRAME",aL=/^(audio|video|details)$/;function xT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var uL=e=>!Number.isNaN(xT(e)),lL=e=>xT(e)<0;function cL(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 _T(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=cL(d,t);if(f){const m=Array.from(f.querySelectorAll(Ml)).filter(n),p=u.get(d);if(p!==void 0){const b=p+1;r.splice(b,0,...m),m.forEach((y,x)=>{u.set(y,b+x)});for(let y=b+m.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...m),m.forEach((y,x)=>{u.set(y,b+x)})}s.push(...m)}}return r}var Ml="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",ST=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Ml));(n==!0||n=="if-empty"&&s.length===0)&&Jt(e)&&Nr(e)&&s.unshift(e);const u=[];for(const l of s)if(Nr(l)){if(wT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...ST(d,{getShadowRoot:r}));continue}u.push(l)}return r?_T(u,r,Nr):u};function Nr(e){return!Jt(e)||e.closest("[inert]")?!1:e.matches(Ml)&&U4(e)}function oo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Ml));n&&us(e)&&s.unshift(e);const a=[];for(const u of s)if(us(u)){if(wT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...oo(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=_T(a,r,us);return!u.length&&n?s:u}return!a.length&&n?s:a}function us(e){return Jt(e)&&e.tabIndex>0?!0:Nr(e)&&!lL(e)}function dL(e,t={}){const n=oo(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function fL(e,t={}){const{current:n,getShadowRoot:r}=t,s=oo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:io(a);if(!u)return null;const l=s.indexOf(u);return s[l+1]||null}function Ma(e){return e.tabIndex<0&&(aL.test(e.localName)||j4(e))&&!uL(e)?0:e.tabIndex}function vT(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=oo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var hL=class B2{constructor(){_h(this,"id",null),_h(this,"fn_cleanup"),_h(this,"cleanup",()=>{this.cancel()})}static create(){return new B2}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 qt(e){const t=hL.create();return t.request(e),t.cleanup}function AT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function Oh(e){const t=$4(e);return M4(t)?Cr(t).body:Jt(t)&&gL(t)?t:Oh(t)}var pL=/auto|scroll|overlay|hidden|clip/,mL=new Set(["inline","contents"]);function gL(e){const t=ro(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return pL.test(n+s+r)&&!mL.has(a)}var ao="default",Ih="",Fl=new WeakMap;function EL(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return Dl()?(ao==="default"&&(Ih=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),ao="disabled"):t&&(Fl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>yL({target:t,doc:r})}function yL(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(Dl()){if(ao!=="disabled")return;ao="restoring",setTimeout(()=>{AT(()=>{ao==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Ih||""),Ih="",ao="default")})},300)}else if(t&&Fl.has(t)){const a=Fl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Fl.delete(t)}}function TL(e={}){const u=e,{defer:t,target:n}=u,r=vn(u,["defer","target"]),s=t?qt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(EL(ue(U({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function bL(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=bT(l),f=Math.sqrt(bd(d.x,2)+bd(d.y,2)),m=l.pointerType==="touch"?10:5;if(!(f<m)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=bT(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),TL({doc:e})];return()=>{u.forEach(l=>l())}}function wL(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 m=null;const[p,b]=dL(e,{includeContainer:!0,getShadowRoot:a}),y=fL(l,{current:n,getShadowRoot:a}),x=!p&&!b;f.shiftKey&&Da(y)?(s==null||s(),m=b):f.shiftKey&&(Da(p)||x)?m=n:!f.shiftKey&&Da(n)?(s==null||s(),m=p):!f.shiftKey&&(Da(b)||x)&&(m=y),m&&(f.preventDefault(),typeof r=="function"?r(m):m.focus())}return Zt(u,"keydown",d,!0)}function xL(e,t){const l=t,{defer:n,triggerElement:r}=l,s=vn(l,["defer","triggerElement"]),a=n?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(wL(d,U({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function _L(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Bl(e,t){if(!e)return dT;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 SL(e,t,n){if(!e)return dT;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 vL(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 AL(e,t){const{timeout:n,rootNode:r}=t,s=ro(r),a=Cr(r),u=new s.AbortController;return vL(new Promise(l=>{const d=e();if(d){l(d);return}const f=new s.MutationObserver(()=>{const m=e();m&&m.isConnected&&(f.disconnect(),l(m))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var kL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),CL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,kT=e=>{const t={};let n;for(;n=CL.exec(e);)t[n[1]]=n[2];return t},NL=(e,t)=>{if(Pl(e)){if(Pl(t))return`${e};${t}`;e=kT(e)}else Pl(t)&&(t=kT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Yt(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=bh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=kL(t[s],n[s]);continue}if(s==="style"){t[s]=NL(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 WU(e){return e}var uo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(uo||{}),Ph="__init__";function OL(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Cr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>io(t()),a=u=>t().getElementById(u);return ue(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Da,getById:a})}function IL(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var lo=()=>e=>Array.from(new Set(e)),CT=typeof globalThis.document!="undefined"?R.useLayoutEffect:R.useEffect;function Ul(e){var p,b;const t=(p=e().value)!=null?p:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=R.useState(t),[s,a]=R.useState(r),u=e().value!==void 0,l=R.useRef(s);l.current=u?e().value:s;const d=R.useRef(l.current);CT(()=>{d.current=l.current},[s,e().value]);const f=y=>{var A,_;const x=d.current,S=eo(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:x}),u||a(S),n(S,x)||(_=(A=e()).onChange)==null||_.call(A,S,x)};function m(){return u?e().value:s}return{initial:r,ref:l,get:m,set(y){(e().sync?$s.flushSync:w4)(()=>f(y))},invoke(y,x){var S,A;(A=(S=e()).onChange)==null||A.call(S,y,x)},hash(y){var x,S,A;return(A=(S=(x=e()).hash)==null?void 0:S.call(x,y))!=null?A:String(y)}}}Ul.cleanup=e=>{R.useEffect(()=>e,[])},Ul.ref=e=>{const t=R.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function PL(e){const t=R.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var RL=(e,t)=>{const n=R.useRef(!1),r=R.useRef(!1);R.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),R.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Hl(e,t={}){var se,ie,ce,fe,ne,Se;const n=R.useMemo(()=>{const{id:de,ids:J,getRootNode:le}=t;return OL({id:de,ids:J,getRootNode:le})},[t]),r=(...de)=>{e.debug&&console.log(...de)},s=(ie=(se=e.props)==null?void 0:se.call(e,{props:wh(t),scope:n}))!=null?ie:t,a=LL(s),u=(ce=e.context)==null?void 0:ce.call(e,{prop:a,bindable:Ul,scope:n,flush:OT,getContext(){return d},getComputed(){return W},getRefs(){return S},getEvent(){return y()}}),l=NT(u),d={get(de){var J;return(J=l.current)==null?void 0:J[de].ref.current},set(de,J){var le;(le=l.current)==null||le[de].set(J)},initial(de){var J;return(J=l.current)==null?void 0:J[de].initial},hash(de){var le,k;const J=(le=l.current)==null?void 0:le[de].get();return(k=l.current)==null?void 0:k[de].hash(J)}},f=R.useRef(new Map),m=R.useRef(null),p=R.useRef(null),b=R.useRef({type:""}),y=()=>ue(U({},b.current),{current(){return b.current},previous(){return p.current}}),x=()=>ue(U({},D),{matches(...de){return de.includes(D.ref.current)},hasTag(de){var J,le;return!!((le=(J=e.states[D.ref.current])==null?void 0:J.tags)!=null&&le.includes(de))}}),S=PL((ne=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:d}))!=null?ne:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:j,action:_,guard:C,track:RL,refs:S,computed:W,flush:OT,scope:n,choose:z}),_=de=>{const J=eo(de)?de(A()):de;if(!J)return;const le=J.map(k=>{var Z,P;const M=(P=(Z=e.implementations)==null?void 0:Z.actions)==null?void 0:P[k];return M||xh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),M});for(const k of le)k==null||k(A())},C=de=>{var J,le;return eo(de)?de(A()):(le=(J=e.implementations)==null?void 0:J.guards)==null?void 0:le[de](A())},O=de=>{const J=eo(de)?de(A()):de;if(!J)return;const le=J.map(M=>{var P,ve;const Z=(ve=(P=e.implementations)==null?void 0:P.effects)==null?void 0:ve[M];return Z||xh(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),Z}),k=[];for(const M of le){const Z=M==null?void 0:M(A());Z&&k.push(Z)}return()=>k.forEach(M=>M==null?void 0:M())},z=de=>o4(de).find(J=>{let le=!J.guard;return Pl(J.guard)?le=!!C(J.guard):eo(J.guard)&&(le=J.guard(A())),le}),W=de=>{C4(e.computed,()=>"[zag-js] No computed object found on machine");const J=e.computed[de];return J({context:d,event:y(),prop:a,refs:S,scope:n,computed:W})},D=Ul(()=>({defaultValue:e.initialState({prop:a}),onChange(de,J){var k,M,Z,P;if(J){const ve=f.current.get(J);ve==null||ve(),f.current.delete(J)}J&&_((k=e.states[J])==null?void 0:k.exit),_((M=m.current)==null?void 0:M.actions);const le=O((Z=e.states[de])==null?void 0:Z.effects);if(le&&f.current.set(de,le),J===Ph){_(e.entry);const ve=O(e.effects);ve&&f.current.set(Ph,ve)}_((P=e.states[de])==null?void 0:P.entry)}})),V=R.useRef(void 0),K=R.useRef(uo.NotStarted);CT(()=>{queueMicrotask(()=>{var M;const le=K.current===uo.Started;K.current=uo.Started,r(le?"rehydrating...":"initializing...");const k=(M=V.current)!=null?M:D.initial;D.invoke(k,le?D.get():Ph)});const de=f.current,J=D.ref.current;return()=>{r("unmounting..."),V.current=J,K.current=uo.Stopped,de.forEach(le=>le==null?void 0:le()),f.current=new Map,m.current=null,queueMicrotask(()=>{_(e.exit)})}},[]);const ae=()=>"ref"in D?D.ref.current:D.get(),j=de=>{queueMicrotask(()=>{var P,ve,Pe,he,ke;if(K.current!==uo.Started)return;p.current=b.current,b.current=de;let J=ae();const le=(Pe=(P=e.states[J].on)==null?void 0:P[de.type])!=null?Pe:(ve=e.on)==null?void 0:ve[de.type],k=z(le);if(!k)return;m.current=k;const M=(he=k.target)!=null?he:J;r("transition",de.type,k.target||J,`(${k.actions})`);const Z=M!==J;Z?$s.flushSync(()=>D.set(M)):k.reenter&&!Z?D.invoke(J,J):_((ke=k.actions)!=null?ke:[])})};return(Se=e.watch)==null||Se.call(e,A()),{state:x(),send:j,context:d,prop:a,scope:n,refs:S,computed:W,event:y(),getStatus:()=>K.current}}function NT(e){const t=R.useRef(e);return t.current=e,t}function LL(e){const t=NT(e);return function(r){return t.current[r]}}function OT(e){queueMicrotask(()=>{$s.flushSync(()=>e())})}var Rh=IL(e=>e);function jl(...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 DL(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Lh=e=>{const t=R.memo(R.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=vn(f,["asChild","children"]);if(!s)return R.createElement(e,ue(U({},u),{ref:r}),a);if(!R.isValidElement(a))return null;const l=R.Children.only(a),d=DL(l);return R.cloneElement(l,ue(U({},Yt(u,l.props)),{ref:r?jl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},hn=(()=>{const e=new Map;return new Proxy(Lh,{apply(t,n,r){return Lh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Lh(r)),e.get(r)}})})();function ML(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ls(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=R.createContext(u);l.displayName=t;function d(){var m;const f=R.useContext(l);if(!f&&n){const p=new Error(a!=null?a:ML(r,s));throw p.name="ContextError",(m=Error.captureStackTrace)==null||m.call(Error,p,d),p}return f}return[l.Provider,d,l]}const[FL,Dh]=ls({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[IT,Fa]=ls({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),PT=R.forwardRef((e,t)=>{const n=Dh(),r=Fa(),s=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(hn.div,ue(U({},s),{ref:jl(r.ref,t)}))});PT.displayName="PopoverContent";const RT=R.forwardRef((e,t)=>{const n=Dh(),r=Fa(),s=Yt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(hn.div,ue(U({},s),{ref:t}))});RT.displayName="PopoverPositioner";const Ba=()=>(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)]),LT=e=>Ba()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function BL(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 UL={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",so(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"});qt(()=>{var l,d;const u=zl(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})=>{qt(()=>{e.set("prevAnimationName",zl(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 m,p,b;((b=(p=(m=d.composedPath)==null?void 0:m.call(d))==null?void 0:p[0])!=null?b:d.target)===s&&e.set("prevAnimationName",zl(t.get("styles")))},u=d=>{const f=zl(t.get("styles"));fr(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=Bl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),AT(()=>l())}}}}};function zl(e){return(e==null?void 0:e.animationName)||"none"}lo()(["onExitComplete","present","immediate"]);function HL(e,t={}){const{sync:n=!1}=t,r=jL(e);return R.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 jL(e){const t=R.useRef(e);return t.current=e,t}const Mh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=vn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=R.useRef(!1),l=ue(U({},a),{present:r,onExitComplete:HL(e.onExitComplete)}),d=Hl(UL,l),f=BL(d);f.present&&(u.current=!0);const m=!f.present&&!u.current&&t||n&&!f.present&&u.current,p=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:p,present:f.present,unmounted:m}};var cs=(e,t=[])=>({parts:(...n)=>{if(zL(t))return cs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>cs(e,[...t,...n]),omit:(...n)=>cs(e,t.filter(r=>!n.includes(r))),rename:n=>cs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${co(e)}"][data-part="${co(r)}"]`,`& [data-scope="${co(e)}"][data-part="${co(r)}"]`].join(", "),attrs:{"data-scope":co(e),"data-part":co(r)}}}),{})}),co=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),zL=e=>e.length===0;const $L=["top","right","bottom","left"],yi=Math.min,Yr=Math.max,$l=Math.round,Vl=Math.floor,Or=e=>({x:e,y:e}),VL={left:"right",right:"left",bottom:"top",top:"bottom"};function DT(e,t,n){return Yr(e,yi(t,n))}function Wr(e,t){return typeof e=="function"?e(t):e}function Ti(e){return e.split("-")[0]}function fo(e){return e.split("-")[1]}function Fh(e){return e==="x"?"y":"x"}function Bh(e){return e==="y"?"height":"width"}function Ir(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Uh(e){return Fh(Ir(e))}function qL(e,t,n){n===void 0&&(n=!1);const r=fo(e),s=Uh(e),a=Bh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ql(u)),[u,ql(u)]}function YL(e){const t=ql(e);return[Hh(e),t,Hh(t)]}function Hh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const MT=["left","right"],FT=["right","left"],WL=["top","bottom"],GL=["bottom","top"];function XL(e,t,n){switch(e){case"top":case"bottom":return n?t?FT:MT:t?MT:FT;case"left":case"right":return t?WL:GL;default:return[]}}function KL(e,t,n,r){const s=fo(e);let a=XL(Ti(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Hh)))),a}function ql(e){const t=Ti(e);return VL[t]+e.slice(t.length)}function QL(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 BT(e){return typeof e!="number"?QL(e):{top:e,right:e,bottom:e,left:e}}function Yl(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 UT(e,t,n){let{reference:r,floating:s}=e;const a=Ir(t),u=Uh(t),l=Bh(u),d=Ti(t),f=a==="y",m=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,b=r[l]/2-s[l]/2;let y;switch(d){case"top":y={x:m,y:r.y-s.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-s.width,y:p};break;default:y={x:r.x,y:r.y}}const x=fo(t);return x&&(y[u]+=b*(x==="end"?1:-1)*(n&&f?-1:1)),y}function JL(e,t){return Fe(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:m="viewport",elementContext:p="floating",altBoundary:b=!1,padding:y=0}=Wr(t,e),x=BT(y),A=l[b?p==="floating"?"reference":"floating":p],_=Yl(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:m,strategy:d})),C=p==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,O=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),z=(yield a.isElement==null?void 0:a.isElement(O))&&(yield a.getScale==null?void 0:a.getScale(O))||{x:1,y:1},W=Yl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:C,offsetParent:O,strategy:d}):C);return{top:(_.top-W.top+x.top)/z.y,bottom:(W.bottom-_.bottom+x.bottom)/z.y,left:(_.left-W.left+x.left)/z.x,right:(W.right-_.right+x.right)/z.x}})}const ZL=50,e5=(e,t,n)=>Fe(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:ue(U({},u),{detectOverflow:JL}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:p}=UT(f,r,d),b=r,y=0;const x={};for(let S=0;S<a.length;S++){const A=a[S];if(!A)continue;const{name:_,fn:C}=A,{x:O,y:z,data:W,reset:D}=yield C({x:m,y:p,initialPlacement:r,placement:b,strategy:s,middlewareData:x,rects:f,platform:l,elements:{reference:e,floating:t}});m=O!=null?O:m,p=z!=null?z:p,x[_]=U(U({},x[_]),W),D&&y<ZL&&(y++,typeof D=="object"&&(D.placement&&(b=D.placement),D.rects&&(f=D.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:m,y:p}=UT(f,b,d)),S=-1)}return{x:m,y:p,placement:b,strategy:s,middlewareData:x}}),t5=e=>({name:"arrow",options:e,fn(n){return Fe(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:m,padding:p=0}=Wr(e,n)||{};if(m==null)return{};const b=BT(p),y={x:r,y:s},x=Uh(a),S=Bh(x),A=yield l.getDimensions(m),_=x==="y",C=_?"top":"left",O=_?"bottom":"right",z=_?"clientHeight":"clientWidth",W=u.reference[S]+u.reference[x]-y[x]-u.floating[S],D=y[x]-u.reference[x],V=yield l.getOffsetParent==null?void 0:l.getOffsetParent(m);let K=V?V[z]:0;(!K||!(yield l.isElement==null?void 0:l.isElement(V)))&&(K=d.floating[z]||u.floating[S]);const ae=W/2-D/2,j=K/2-A[S]/2-1,se=yi(b[C],j),ie=yi(b[O],j),ce=K-A[S]-ie,fe=K/2-A[S]/2+ae,ne=DT(se,fe,ce),Se=!f.arrow&&fo(a)!=null&&fe!==ne&&u.reference[S]/2-(fe<se?se:ie)-A[S]/2<0,de=Se?fe<se?fe-se:fe-ce:0;return{[x]:y[x]+de,data:U({[x]:ne,centerOffset:fe-ne-de},Se&&{alignmentOffset:de}),reset:Se}})}}),n5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Fe(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:m}=n,ne=Wr(e,n),{mainAxis:p=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:A=!0}=ne,_=vn(ne,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=Ti(a),O=Ir(d),z=Ti(d)===d,W=yield f.isRTL==null?void 0:f.isRTL(m.floating),D=y||(z||!A?[ql(d)]:YL(d)),V=S!=="none";!y&&V&&D.push(...KL(d,A,S,W));const K=[d,...D],ae=yield f.detectOverflow(n,_),j=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(p&&j.push(ae[C]),b){const Se=qL(a,l,W);j.push(ae[Se[0]],ae[Se[1]])}if(se=[...se,{placement:a,overflows:j}],!j.every(Se=>Se<=0)){var ie,ce;const Se=(((ie=u.flip)==null?void 0:ie.index)||0)+1,de=K[Se];if(de&&(!(b==="alignment"?O!==Ir(de):!1)||se.every(k=>Ir(k.placement)===O?k.overflows[0]>0:!0)))return{data:{index:Se,overflows:se},reset:{placement:de}};let J=(ce=se.filter(le=>le.overflows[0]<=0).sort((le,k)=>le.overflows[1]-k.overflows[1])[0])==null?void 0:ce.placement;if(!J)switch(x){case"bestFit":{var fe;const le=(fe=se.filter(k=>{if(V){const M=Ir(k.placement);return M===O||M==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(M=>M>0).reduce((M,Z)=>M+Z,0)]).sort((k,M)=>k[1]-M[1])[0])==null?void 0:fe[0];le&&(J=le);break}case"initialPlacement":J=d;break}if(a!==J)return{reset:{placement:J}}}return{}})}}};function HT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jT(e){return $L.some(t=>e[t]>=0)}const r5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Fe(this,null,function*(){const{rects:r,platform:s}=n,l=Wr(e,n),{strategy:a="referenceHidden"}=l,u=vn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,ue(U({},u),{elementContext:"reference"})),f=HT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:jT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,ue(U({},u),{altBoundary:!0})),f=HT(d,r.floating);return{data:{escapedOffsets:f,escaped:jT(f)}}}default:return{}}})}}},zT=new Set(["left","top"]);function i5(e,t){return Fe(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=Ti(n),l=fo(n),d=Ir(n)==="y",f=zT.has(u)?-1:1,m=a&&d?-1:1,p=Wr(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof x=="number"&&(y=l==="end"?x*-1:x),d?{x:y*m,y:b*f}:{x:b*f,y:y*m}})}const s5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Fe(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield i5(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})}})}}},o5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Fe(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,O=Wr(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:z=>{let{x:W,y:D}=z;return{x:W,y:D}}}}=O,m=vn(O,["mainAxis","crossAxis","limiter"]),p={x:r,y:s},b=yield u.detectOverflow(n,m),y=Ir(a),x=Fh(y);let S=p[x],A=p[y];const _=(z,W)=>DT(W+b[z==="y"?"top":"left"],W,W-b[z==="y"?"bottom":"right"]);l&&(S=_(x,S)),d&&(A=_(y,A));const C=f.fn(ue(U({},n),{[x]:S,[y]:A}));return ue(U({},C),{data:{x:C.x-r,y:C.y-s,enabled:{[x]:l,[y]:d}}})})}}},a5=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:m=!0,crossAxis:p=!0}=Wr(e,t),b={x:s,y:a},y=Ir(u),x=Fh(y);let S=b[x],A=b[y];const _=Wr(f,t),C=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(r=_.crossAxis)!=null?r:0};if(m){const W=x==="y"?"height":"width",D=l.reference[x]-l.floating[W]+C.mainAxis,V=l.reference[x]+l.reference[W]-C.mainAxis;S<D?S=D:S>V&&(S=V)}if(p){var O,z;const W=x==="y"?"width":"height",D=zT.has(Ti(u)),V=l.reference[y]-l.floating[W]+(D&&((O=d.offset)==null?void 0:O[y])||0)+(D?0:C.crossAxis),K=l.reference[y]+l.reference[W]+(D?0:((z=d.offset)==null?void 0:z[y])||0)-(D?C.crossAxis:0);A<V?A=V:A>K&&(A=K)}return{[x]:S,[y]:A}}}},u5=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Fe(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,j=Wr(e,n),{apply:l=()=>{}}=j,d=vn(j,["apply"]),f=yield a.detectOverflow(n,d),m=Ti(r),p=fo(r),b=Ir(r)==="y",{width:y,height:x}=s.floating;let S,A;m==="top"||m==="bottom"?(S=m,A=p===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(A=m,S=p==="end"?"top":"bottom");const _=x-f.top-f.bottom,C=y-f.left-f.right,O=yi(x-f[S],_),z=yi(y-f[A],C),W=n.middlewareData.shift,D=!W;let V=O,K=z;W!=null&&W.enabled.x&&(K=C),W!=null&&W.enabled.y&&(V=_),D&&!p&&(b?K=y-2*Yr(f.left,f.right):V=x-2*Yr(f.top,f.bottom)),yield l(ue(U({},n),{availableWidth:K,availableHeight:V}));const ae=yield a.getDimensions(u.floating);return y!==ae.width||x!==ae.height?{reset:{rects:!0}}:{}})}}};function Wl(){return typeof window!="undefined"}function ho(e){return $T(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=($T(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $T(e){return Wl()?e instanceof Node||e instanceof $n(e).Node:!1}function hr(e){return Wl()?e instanceof Element||e instanceof $n(e).Element:!1}function Rr(e){return Wl()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function VT(e){return!Wl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function Ua(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=pr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function l5(e){return/^(table|td|th)$/.test(ho(e))}function Gl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const c5=/transform|translate|scale|rotate|perspective|filter/,d5=/paint|layout|strict|content/,ds=e=>!!e&&e!=="none";let jh;function zh(e){const t=hr(e)?pr(e):e;return ds(t.transform)||ds(t.translate)||ds(t.scale)||ds(t.rotate)||ds(t.perspective)||!$h()&&(ds(t.backdropFilter)||ds(t.filter))||c5.test(t.willChange||"")||d5.test(t.contain||"")}function f5(e){let t=bi(e);for(;Rr(t)&&!po(t);){if(zh(t))return t;if(Gl(t))return null;t=bi(t)}return null}function $h(){return jh==null&&(jh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),jh}function po(e){return/^(html|body|#document)$/.test(ho(e))}function pr(e){return $n(e).getComputedStyle(e)}function Xl(e){return hr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bi(e){if(ho(e)==="html")return e;const t=e.assignedSlot||e.parentNode||VT(e)&&e.host||Pr(e);return VT(t)?t.host:t}function qT(e){const t=bi(e);return po(t)?(e.ownerDocument||e).body:Rr(t)&&Ua(t)?t:qT(t)}function Ha(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=qT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=$n(s);if(a){const l=Vh(u);return t.concat(u,u.visualViewport||[],Ua(s)?s:[],l&&n?Ha(l):[])}else return t.concat(s,Ha(s,[],n))}function Vh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function YT(e){const t=pr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Rr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=$l(n)!==a||$l(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function qh(e){return hr(e)?e:e.contextElement}function mo(e){const t=qh(e);if(!Rr(t))return Or(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=YT(t);let u=(a?$l(n.width):n.width)/r,l=(a?$l(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const h5=Or(0);function WT(e){const t=$n(e);return!$h()||!t.visualViewport?h5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function p5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function fs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=qh(e);let u=Or(1);t&&(r?hr(r)&&(u=mo(r)):u=mo(e));const l=p5(a,n,r)?WT(a):Or(0);let d=(s.left+l.x)/u.x,f=(s.top+l.y)/u.y,m=s.width/u.x,p=s.height/u.y;if(a){const b=$n(a),y=r&&hr(r)?$n(r):r;let x=b,S=Vh(x);for(;S&&r&&y!==x;){const A=mo(S),_=S.getBoundingClientRect(),C=pr(S),O=_.left+(S.clientLeft+parseFloat(C.paddingLeft))*A.x,z=_.top+(S.clientTop+parseFloat(C.paddingTop))*A.y;d*=A.x,f*=A.y,m*=A.x,p*=A.y,d+=O,f+=z,x=$n(S),S=Vh(x)}}return Yl({width:m,height:p,x:d,y:f})}function Kl(e,t){const n=Xl(e).scrollLeft;return t?t.left+n:fs(Pr(e)).left+n}function GT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Kl(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function m5(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Pr(r),l=t?Gl(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Or(1);const m=Or(0),p=Rr(r);if((p||!p&&!a)&&((ho(r)!=="body"||Ua(u))&&(d=Xl(r)),Rr(r))){const y=fs(r);f=mo(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const b=u&&!p&&!a?GT(u,d):Or(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+b.x,y:n.y*f.y-d.scrollTop*f.y+m.y+b.y}}function g5(e){return Array.from(e.getClientRects())}function E5(e){const t=Pr(e),n=Xl(e),r=e.ownerDocument.body,s=Yr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Yr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Kl(e);const l=-n.scrollTop;return pr(r).direction==="rtl"&&(u+=Yr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const XT=25;function y5(e,t){const n=$n(e),r=Pr(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(s){a=s.width,u=s.height;const m=$h();(!m||m&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=Kl(r);if(f<=0){const m=r.ownerDocument,p=m.body,b=getComputedStyle(p),y=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,x=Math.abs(r.clientWidth-p.clientWidth-y);x<=XT&&(a-=x)}else f<=XT&&(a+=f);return{width:a,height:u,x:l,y:d}}const T5=new Set(["absolute","fixed"]);function b5(e,t){const n=fs(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Rr(e)?mo(e):Or(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 KT(e,t,n){let r;if(t==="viewport")r=y5(e,n);else if(t==="document")r=E5(Pr(e));else if(hr(t))r=b5(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 Yl(r)}function QT(e,t){const n=bi(e);return n===t||!hr(n)||po(n)?!1:pr(n).position==="fixed"||QT(n,t)}function w5(e,t){const n=t.get(e);if(n)return n;let r=Ha(e,[],!1).filter(l=>hr(l)&&ho(l)!=="body"),s=null;const a=pr(e).position==="fixed";let u=a?bi(e):e;for(;hr(u)&&!po(u);){const l=pr(u),d=zh(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&T5.has(s.position)||Ua(u)&&!d&&QT(e,u))?r=r.filter(m=>m!==u):s=l,u=bi(u)}return t.set(e,r),r}function x5(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Gl(t)?[]:w5(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,m)=>{const p=KT(t,m,s);return f.top=Yr(p.top,f.top),f.right=yi(p.right,f.right),f.bottom=yi(p.bottom,f.bottom),f.left=Yr(p.left,f.left),f},KT(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function _5(e){const{width:t,height:n}=YT(e);return{width:t,height:n}}function S5(e,t,n){const r=Rr(t),s=Pr(t),a=n==="fixed",u=fs(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Or(0);function f(){d.x=Kl(s)}if(r||!r&&!a)if((ho(t)!=="body"||Ua(s))&&(l=Xl(t)),r){const y=fs(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const m=s&&!r&&!a?GT(s,l):Or(0),p=u.left+l.scrollLeft-d.x-m.x,b=u.top+l.scrollTop-d.y-m.y;return{x:p,y:b,width:u.width,height:u.height}}function Yh(e){return pr(e).position==="static"}function JT(e,t){if(!Rr(e)||pr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pr(e)===n&&(n=n.ownerDocument.body),n}function ZT(e,t){const n=$n(e);if(Gl(e))return n;if(!Rr(e)){let s=bi(e);for(;s&&!po(s);){if(hr(s)&&!Yh(s))return s;s=bi(s)}return n}let r=JT(e,t);for(;r&&l5(r)&&Yh(r);)r=JT(r,t);return r&&po(r)&&Yh(r)&&!zh(r)?n:r||f5(e)||n}const v5=function(e){return Fe(this,null,function*(){const t=this.getOffsetParent||ZT,n=this.getDimensions,r=yield n(e.floating);return{reference:S5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function A5(e){return pr(e).direction==="rtl"}const k5={convertOffsetParentRelativeRectToViewportRelativeRect:m5,getDocumentElement:Pr,getClippingRect:x5,getOffsetParent:ZT,getElementRects:v5,getClientRects:g5,getDimensions:_5,getScale:mo,isElement:hr,isRTL:A5};function eb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function C5(e,t){let n=null,r;const s=Pr(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:m,top:p,width:b,height:y}=f;if(l||t(),!b||!y)return;const x=Vl(p),S=Vl(s.clientWidth-(m+b)),A=Vl(s.clientHeight-(p+y)),_=Vl(m),O={rootMargin:-x+"px "+-S+"px "+-A+"px "+-_+"px",threshold:Yr(0,yi(1,d))||1};let z=!0;function W(D){const V=D[0].intersectionRatio;if(V!==d){if(!z)return u();V?u(!1,V):r=setTimeout(()=>{u(!1,1e-7)},1e3)}V===1&&!eb(f,e.getBoundingClientRect())&&u(),z=!1}try{n=new IntersectionObserver(W,ue(U({},O),{root:s.ownerDocument}))}catch(D){n=new IntersectionObserver(W,O)}n.observe(e)}return u(!0),a}function N5(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=qh(e),m=s||a?[...f?Ha(f):[],...Ha(t)]:[];m.forEach(_=>{s&&_.addEventListener("scroll",n,{passive:!0}),a&&_.addEventListener("resize",n)});const p=f&&l?C5(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(_=>{let[C]=_;C&&C.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var O;(O=y)==null||O.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let x,S=d?fs(e):null;d&&A();function A(){const _=fs(e);S&&!eb(S,_)&&n(),S=_,x=requestAnimationFrame(A)}return n(),()=>{var _;m.forEach(C=>{s&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),p==null||p(),(_=y)==null||_.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const O5=s5,I5=o5,P5=n5,R5=u5,L5=r5,D5=t5,M5=a5,F5=(e,t,n)=>{const r=new Map,s=U({platform:k5},n),a=ue(U({},s.platform),{_c:r});return e5(e,t,ue(U({},s),{platform:a}))};function tb(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 B5(e){if(!e)return tb();const{x:t,y:n,width:r,height:s}=e;return tb(t,n,r,s)}function U5(e,t){return{contextElement:Jt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?B5(r):n.getBoundingClientRect()}}}var ja=e=>({variable:e,reference:`var(${e})`}),Gr={arrowSize:ja("--arrow-size"),arrowSizeHalf:ja("--arrow-size-half"),arrowBg:ja("--arrow-background"),transformOrigin:ja("--transform-origin"),arrowOffset:ja("--arrow-offset")},H5=e=>e==="top"||e==="bottom"?"y":"x";function j5(e,t){return{name:"transformOrigin",fn(n){var ae,j,se,ie,ce;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=H5(d),m=((ae=s.arrow)==null?void 0:ae.x)||0,p=((j=s.arrow)==null?void 0:j.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=m+b/2,S=p+y/2,A=Math.abs(((se=s.shift)==null?void 0:se.y)||0),_=u.reference.height/2,C=y/2,O=(ce=(ie=e.offset)==null?void 0:ie.mainAxis)!=null?ce:e.gutter,z=typeof O=="number"?O+C:O!=null?O:C,W=A>z,D={top:`${x}px calc(100% + ${z}px)`,bottom:`${x}px ${-z}px`,left:`calc(100% + ${z}px) ${S}px`,right:`${-z}px ${S}px`}[d],V=`${x}px ${u.reference.y+_-l}px`,K=!!e.overlap&&f==="y"&&W;return r.floating.style.setProperty(Gr.transformOrigin.variable,K?V:D),{data:{transformOrigin:K?V:D}}}}}var z5={name:"rects",fn({rects:e}){return{data:e}}},$5=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% + ${Gr.arrowOffset.reference})`}),{}}}};function V5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var q5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function nb(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Wh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function Y5(e,t,n){const r=e||t.createElement("div");return D5({element:r,padding:n.arrowPadding})}function W5(e,t){var n;if(!h4((n=t.offset)!=null?n:t.gutter))return O5(({placement:r})=>{var m,p,b,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(p=(m=t.offset)==null?void 0:m.mainAxis)!=null?p:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:l}=V5(r),d=l?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return wh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function G5(e){if(!e.flip)return;const t=Wh(e.boundary);return P5(ue(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function X5(e){if(!e.slide&&!e.overlap)return;const t=Wh(e.boundary);return I5(ue(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:M5()}))}function K5(e){return R5({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 Q5(e){var t;if(e.hideWhenDetached)return L5({strategy:"referenceHidden",boundary:(t=Wh(e.boundary))!=null?t:"clippingAncestors"})}function J5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function Z5(e,t,n={}){const r=U5(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},q5,n),a=t.querySelector("[data-part=arrow]"),u=[W5(a,s),G5(s),X5(s),Y5(a,t.ownerDocument,s),$5(a),j5({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),K5(s),Q5(s),z5],{placement:l,strategy:d,onComplete:f,onPositioned:m}=s,p=()=>Fe(null,null,function*(){var z;if(!r||!t)return;const S=yield F5(r,t,{placement:l,middleware:u,strategy:d});f==null||f(S),m==null||m({placed:!0});const A=ro(t),_=nb(A,S.x),C=nb(A,S.y);t.style.setProperty("--x",`${_}px`),t.style.setProperty("--y",`${C}px`),s.hideWhenDetached&&(((z=S.middlewareData.hide)==null?void 0:z.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const O=t.firstElementChild;if(O){const W=so(O);t.style.setProperty("--z-index",W.zIndex)}}),b=()=>Fe(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:p,floatingElement:t}),m==null||m({placed:!0})):yield p()}),y=J5(s.listeners),x=s.listeners?N5(r,t,b,y):x4;return b(),()=>{x==null||x(),m==null||m({placed:!1})}}function rb(e,t,n={}){const l=n,{defer:r}=l,s=vn(l,["defer"]),a=r?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(Z5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var eD={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function tD(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:Gr.arrowSize.reference,height:Gr.arrowSize.reference,[Gr.arrowSizeHalf.variable]:`calc(${Gr.arrowSize.reference} / 2)`,[Gr.arrowOffset.variable]:`calc(${Gr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?eD[t.split("-")[0]]:void 0,background:Gr.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 go=new WeakMap,Ql=new WeakMap,Jl={},Gh=0,ib=e=>e&&(e.host||ib(e.parentNode)),nD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ib(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),rD=new Set(["script","output","status","next-route-announcer"]),iD=e=>rD.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),sD=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=nD(n,Array.isArray(e)?e:[e]);Jl[r]||(Jl[r]=new WeakMap);const l=Jl[r],d=[],f=new Set,m=new Set(u),p=y=>{!y||f.has(y)||(f.add(y),p(y.parentNode))};u.forEach(y=>{p(y),a&&Jt(y)&&gT(y,x=>{p(x)})});const b=y=>{!y||m.has(y)||Array.prototype.forEach.call(y.children,x=>{if(f.has(x))b(x);else try{if(iD(x))return;const A=x.getAttribute(s)==="true",_=(go.get(x)||0)+1,C=(l.get(x)||0)+1;go.set(x,_),l.set(x,C),d.push(x),_===1&&A&&Ql.set(x,!0),C===1&&x.setAttribute(r,""),A||x.setAttribute(s,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",x,S)}})};return b(n),f.clear(),Gh++,()=>{d.forEach(y=>{const x=go.get(y)-1,S=l.get(y)-1;go.set(y,x),l.set(y,S),x||(Ql.has(y)||y.removeAttribute(s),Ql.delete(y)),S||y.removeAttribute(r)}),Gh--,Gh||(go=new WeakMap,go=new WeakMap,Ql=new WeakMap,Jl={})}},oD=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,aD=(e,t=oD(e),n="data-aria-hidden",r=!0)=>{if(t)return sD(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},uD=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function sb(e,t={}){const{defer:n=!0}=t,r=n?uD:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(aD(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function lD(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 cD(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 ob="pointerdown.outside",ab="focus.outside";function dD(e){for(const t of e)if(Jt(t)&&Nr(t))return!0;return!1}var ub=e=>"clientY"in e;function fD(e,t){if(!ub(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 hD(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function lb(e,t){if(!t||!ub(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 hD(u,l)?r||a:!1}function pD(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Cr(e),f=ro(e),m=lD(f),p=cD(f);function b(O,z){if(!Jt(z)||!z.isConnected||no(e,z)||fD(e,O)||l&&mT(e,z))return!1;const W=d.querySelector(`[aria-controls="${e.id}"]`);if(W){const V=Oh(W);if(lb(O,V))return!1}const D=Oh(e);return lb(O,D)?!1:!(n!=null&&n(z))}const y=new Set,x=as(e==null?void 0:e.getRootNode());function S(O){function z(W){var ae,j;const D=u&&!ET()?qt:se=>se(),V=W!=null?W:O,K=(j=(ae=V==null?void 0:V.composedPath)==null?void 0:ae.call(V))!=null?j:[V==null?void 0:V.target];D(()=>{const se=x?K[0]:fr(O);if(!(!e||!b(O,se))){if(s||a){const ie=bh(s,a);e.addEventListener(ob,ie,{once:!0})}cb(e,ob,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:rL(V),focusable:dD(K),target:se}})}})}O.pointerType==="touch"?(y.forEach(W=>W()),y.add(Zt(d,"click",z,{once:!0})),y.add(p.addEventListener("click",z,{once:!0})),y.add(m.addEventListener("click",z,{once:!0}))):z()}const A=new Set,_=setTimeout(()=>{A.add(Zt(d,"pointerdown",S,!0)),A.add(p.addEventListener("pointerdown",S,!0)),A.add(m.addEventListener("pointerdown",S,!0))},0);function C(O){(u?qt:W=>W())(()=>{var V,K;const W=(K=(V=O==null?void 0:O.composedPath)==null?void 0:V.call(O))!=null?K:[O==null?void 0:O.target],D=x?W[0]:fr(O);if(!(!e||!b(O,D))){if(r||a){const ae=bh(r,a);e.addEventListener(ab,ae,{once:!0})}cb(e,ab,{bubbles:!1,cancelable:!0,detail:{originalEvent:O,contextmenu:!1,focusable:Nr(D),target:D}})}})}return ET()||(A.add(Zt(d,"focusin",C,!0)),A.add(p.addEventListener("focusin",C,!0)),A.add(m.addEventListener("focusin",C,!0))),()=>{clearTimeout(_),y.forEach(O=>O()),A.forEach(O=>O())}}function mD(e,t){const{defer:n}=t,r=n?qt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(pD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function cb(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function gD(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Zt(Cr(e),"keydown",n,{capture:!0})}var db="layer:request-dismiss",Qn={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=>no(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>no(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=>Qn.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];yD(e,db,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),ED(e,db,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function ED(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 yD(e,t,n){e.addEventListener(t,n,{once:!0})}var fb;function hb(){Qn.layers.forEach(({node:e})=>{e.style.pointerEvents=Qn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function TD(e){e.style.pointerEvents=""}function bD(e,t){const n=Cr(e),r=[];return Qn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(fb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=AL(()=>{const l=s();return Jt(l)?l:null},{timeout:1e3});a.then(l=>r.push(Bl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{Qn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=fb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function wD(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){xh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};Qn.add(f),hb();function m(S){var _,C;const A=fr(S.detail.originalEvent);Qn.isBelowPointerBlockingLayer(e)||Qn.isInBranch(A)||((_=t.onPointerDownOutside)==null||_.call(t,S),(C=t.onInteractOutside)==null||C.call(t,S),!S.defaultPrevented&&(l&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function p(S){var _,C;const A=fr(S.detail.originalEvent);Qn.isInBranch(A)||((_=t.onFocusOutside)==null||_.call(t,S),(C=t.onInteractOutside)==null||C.call(t,S),!S.defaultPrevented&&(l&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var A;Qn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var O;if(!e)return!1;const A=typeof u=="function"?u():u,_=Array.isArray(A)?A:[A],C=(O=t.persistentElements)==null?void 0:O.map(z=>z()).filter(Jt);return C&&_.push(...C),_.some(z=>no(z,S))||Qn.isInNestedLayer(e,S)}const x=[a?bD(e,t.persistentElements):void 0,gD(e,b),mD(e,{exclude:y,onFocusOutside:p,onPointerDownOutside:m,defer:t.defer})];return()=>{Qn.remove(e),hb(),TD(e),x.forEach(S=>S==null?void 0:S())}}function pb(e,t){const{defer:n}=t,r=n?qt:a=>a(),s=[];return s.push(r(()=>{const a=eo(e)?e():e;s.push(wD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var xD=Object.defineProperty,_D=(e,t,n)=>t in e?xD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>_D(e,typeof t!="symbol"?t+"":t,n),mb={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()}},SD=[],vD=class{constructor(e,t){Ct(this,"trapStack"),Ct(this,"config"),Ct(this,"doc"),Ct(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ct(this,"portalContainers",new Set),Ct(this,"listenerCleanups",[]),Ct(this,"handleFocus",r=>{const s=fr(r),a=this.findContainerIndex(s,r)>=0;if(a||Ll(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(Ma(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const m=f.findIndex(p=>p===this.state.mostRecentlyFocusedNode);m>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?m+1<f.length&&(u=f[m+1],l=!1):m-1>=0&&(u=f[m-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Ma(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}),Ct(this,"handlePointerDown",r=>{const s=fr(r);if(!(this.findContainerIndex(s,r)>=0)){if($a(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}$a(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const s=fr(r);this.findContainerIndex(s,r)>=0||$a(this.config.clickOutsideDeactivates,r)||$a(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ct(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;za(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{AD(r)&&$a(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ct(this,"_mutationObserver"),Ct(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 G4(f)?!0:f.id&&!this.state.containers.some(m=>m.contains(f))?X4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ct(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)}))}),Ct(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Nr(r)){const s=io(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}),Ct(this,"tryFocus",r=>{if(r!==!1&&r!==io(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,kD(r)&&r.select()}}),Ct(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(),mb.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=()=>{gb(()=>{if(d){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(m)}u==null||u()})};if(d&&l){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(m).then(f,f),this}return f(),this}),Ct(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}),Ct(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}),Ct(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ct(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),Ct(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),Ct(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}),Ct(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||fr(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 m=this.state.tabbableGroups.findIndex(({firstTabbableNode:p})=>u===p);if(m<0&&((f==null?void 0:f.container)===u||Nr(u)&&!us(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(m=d),m>=0){const p=m===0?this.state.tabbableGroups.length-1:m-1,b=this.state.tabbableGroups[p];l=Ma(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else za(s)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let m=this.state.tabbableGroups.findIndex(({lastTabbableNode:p})=>u===p);if(m<0&&((f==null?void 0:f.container)===u||Nr(u)&&!us(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(m=d),m>=0){const p=m===this.state.tabbableGroups.length-1?0:m+1,b=this.state.tabbableGroups[p];l=Ma(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else za(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||SD;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return za(r)&&!r.shiftKey},isKeyBackward(r){return za(r)&&r.shiftKey}},t);this.doc=n.document||Cr(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=>{q4(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?mT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=oo(e,{getShadowRoot:this.config.getShadowRoot}),n=ST(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(Ma(t[f])>0){l=!0;break}function d(f,m=!0){const p=t.indexOf(f);if(p>=0)return t[p+(m?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(m){for(let y=b+1;y<n.length;y++)if(us(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(us(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 mb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?gb(()=>{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=io(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)}},za=e=>e.key==="Tab",$a=(e,...t)=>typeof e=="function"?e(...t):e,AD=e=>!e.isComposing&&e.key==="Escape",gb=e=>setTimeout(e,0),kD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Eb(e,t={}){let n;const r=qt(()=>{const s=typeof e=="function"?e():e;if(s){n=new vD(s,ue(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Cr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Xh="data-scroll-lock";function CD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function yb(e){const t=so(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Tb(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Xh))return;const u=yb(r)||yb(s),l=n.innerWidth-r.clientWidth;s.setAttribute(Xh,"");const d=()=>SL(r,"--scrollbar-width",`${l}px`),f=CD(r),m=()=>{const x={overflow:"hidden"};return!u&&l>0&&(x[f]=`${l}px`),Bl(s,x)},p=()=>{var W,D;const{scrollX:x,scrollY:S,visualViewport:A}=n,_=(W=A==null?void 0:A.offsetLeft)!=null?W:0,C=(D=A==null?void 0:A.offsetTop)!=null?D:0,O={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(C))}px`,left:`${-(x-Math.floor(_))}px`,right:"0"};!u&&l>0&&(O[f]=`${l}px`);const z=Bl(s,O);return()=>{z==null||z(),n.scrollTo({left:x,top:S,behavior:"instant"})}},b=[d(),Dl()?p():m()];return()=>{b.forEach(x=>x==null?void 0:x()),s.removeAttribute(Xh)}}var ND=cs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Lr=ND.build(),bb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},wb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},OD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},ID=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},_b=e=>e.getById(bb(e)),Eo=e=>e.getById(wb(e)),yo=e=>e.getById(Kh(e)),Sb=e=>e.getById(xb(e)),PD=e=>e.getById(Qh(e)),RD=e=>e.getById(Jh(e));function LD(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),m=a("currentPortalled"),p=r.get("renderedElements"),b=tD(ue(U({},u("positioning")),{placement:f}));return{portalled:m,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:OD(l)},Lr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(ue(U({},Lr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(ue(U({},Lr.anchor.attrs),{dir:u("dir"),id:bb(l)}))},getTriggerProps(){return t.button(ue(U({},Lr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:wb(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Kh(l),onPointerDown(y){yT(y)&&tL()&&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({},Lr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ue(U({id:xb(l)},Lr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(ue(U({},Lr.content.attrs),{dir:u("dir"),id:Kh(l),tabIndex:-1,role:"dialog","aria-modal":fT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":to(d),"aria-labelledby":p.title?Qh(l):void 0,"aria-describedby":p.description?Jh(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(ue(U({},Lr.title.attrs),{id:Qh(l),dir:u("dir")}))},getDescriptionProps(){return t.element(ue(U({},Lr.description.attrs),{id:Jh(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ue(U({},Lr.closeTrigger.attrs),{dir:u("dir"),id:ID(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var DD={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=_b(n))!=null?a:Eo(n);return rb(r,()=>Sb(n),ue(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>yo(n);let s=!0;return pb(r,{type:"popover",pointerBlocking:t("modal"),exclude:Eo(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:xL(()=>yo(t),{triggerElement:Eo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?sb(()=>[yo(t),Eo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Tb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Eb(()=>yo(t),{initialFocus:()=>vT({root:yo(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=_b(n))!=null?u:Eo(n);rb(s,()=>Sb(n),ue(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){qt(()=>{Object.assign(e.get("renderedElements"),{title:!!PD(t),description:!!RD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||qt(()=>{const n=vT({root:yo(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||qt(()=>{const a=Eo(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})}}}};lo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[XU,Zl]=ls({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[KU,Zh]=ls({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),MD=e=>{const t=R.useId(),{getRootNode:n}=Zl(),{dir:r}=Zh(),s=U({id:t,dir:r,getRootNode:n},e),a=Hl(DD,s);return LD(a,Rh)},FD=e=>{const[t,u]=LT(e),l=u,{children:n}=l,r=vn(l,["children"]),s=MD(r),a=Mh(Yt({present:s.open},t));return w.jsx(FL,{value:s,children:w.jsx(IT,{value:a,children:n})})},vb=R.forwardRef((e,t)=>{const n=Dh(),r=Fa(),s=Yt(ue(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(hn.button,ue(U({},s),{ref:t}))});vb.displayName="PopoverTrigger";function BD(e){return pt({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 UD(e){return pt({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 Ab(e){return pt({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 kb(e){return pt({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 HD(e){return pt({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 jD(e){return pt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function ep(e){return pt({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 Cb(e){return pt({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 zD=({className:e,componentType:t,children:n})=>{const[r,s]=R.useState(!1),{globalClassName:a}=ct(),u=f=>{s(f.open)},l=R.useCallback(()=>{s(!1)},[]),d=R.useMemo(()=>({closeMenu:l}),[l]);return w.jsxs(FD,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(vb,{"aria-label":`Overflow menu for ${t}`,className:F(`${N}-overflow-menu-button-trigger`,`${N}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(Cb,{})}),w.jsx(RT,{children:w.jsx(PT,{className:F(`${N}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(iT.Provider,{value:d,children:n})})})]})};function Nb(e){return pt({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 pt({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[$D,hs]=ls({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),tp=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getControlProps(),e);return w.jsx(hn.div,ue(U(U({},r),e),{ref:t}))});tp.displayName="CarouselControl";const np=R.forwardRef((e,t)=>{const[n,r]=Ba()(e,["readOnly","index"]),s=hs(),a=Yt(s.getIndicatorProps(n),r);return w.jsx(hn.button,ue(U({},a),{ref:t}))});np.displayName="CarouselIndicator";const rp=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getIndicatorGroupProps(),e);return w.jsx(hn.div,ue(U({},r),{ref:t}))});rp.displayName="CarouselIndicatorGroup";const ip=R.forwardRef((e,t)=>{const[n,r]=Ba()(e,["index","snapAlign"]),s=hs(),a=Yt(s.getItemProps(n),r);return w.jsx(hn.div,ue(U({},a),{ref:t}))});ip.displayName="CarouselItem";const sp=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getItemGroupProps(),e);return w.jsx(hn.div,ue(U({},r),{ref:t}))});sp.displayName="CarouselItemGroup";const op=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getNextTriggerProps(),e);return w.jsx(hn.button,ue(U({},r),{ref:t}))});op.displayName="CarouselNextTrigger";const ap=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getPrevTriggerProps(),e);return w.jsx(hn.button,ue(U({},r),{ref:t}))});ap.displayName="CarouselPrevTrigger";function VD(e){const t=so(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(b,y){let x=parseFloat(b);return/%/.test(b)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=l(r,n.width),f=l(s,n.height),m=l(a,n.width),p=l(u,n.height);return{x:{before:d,after:m},y:{before:f,after:p}}}function qD(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 Ib(e){let t=[];for(const n of e.children)t=t.concat(n,Ib(n));return t}function Pb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?Ib(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 m of s){const p=m.getBoundingClientRect();if(!qD(n,p,u))continue;const b=so(m);let[y,x]=b.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const S=a==="x"?x:y,A=p[l]-n[l]+e[f];switch(S){case"none":break;case"start":r[a].start.push({node:m,position:A});break;case"center":r[a].center.push({node:m,position:A+p[d]/2});break;case"end":r[a].end.push({node:m,position:A+p[d]});break}}}return r}function Rb(e){const t=e.getBoundingClientRect(),n=VD(e),r=Pb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Lb([...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:Lb([...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 YD(e,t,n){const r=Pb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var Lb=e=>[...new Set(e)],Db=(e,t)=>n=>Math.max(e,Math.min(t,n)),WD=cs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Xr=WD.build(),GD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},XD=(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}`},ec=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},KD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},QD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},JD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Mb=(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}`},Pn=e=>e.getById(ec(e)),Fb=e=>_L(Pn(e),"[data-part=item]"),ZD=(e,t)=>e.getById(Mb(e,t)),Bb=e=>{const t=Pn(e);if(!t)return;const n=oo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function e8(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),m=s("canScrollNext"),p=s("canScrollPrev"),b=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),S=l("slidesPerPage"),A=l("padding"),_=l("translations");return{isPlaying:d,isDragging:f,page:x,pageSnapPoints:y,canScrollNext:m,canScrollPrev:p,getProgress(){return x/y.length},scrollToIndex(C,O){a({type:"INDEX.SET",index:C,instant:O})},scrollTo(C,O){a({type:"PAGE.SET",index:C,instant:O})},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(ue(U({},Xr.root.attrs),{id:GD(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":S,"--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({},Xr.itemGroup.attrs),{id:ec(u),"data-orientation":l("orientation"),"data-dragging":to(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(C){no(C.currentTarget,fr(C))&&a({type:"VIEWPORT.FOCUS"})},onBlur(C){no(C.currentTarget,C.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(C){if(C.defaultPrevented||!l("allowMouseDrag")||!yT(C))return;const O=fr(C);Nr(O)&&O!==C.currentTarget||(C.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:_4(C=>{const O=l("orientation")==="horizontal"?"deltaX":"deltaY";C[O]<0&&!s("canScrollPrev")||C[O]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",l("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:A,[b?"paddingInline":"paddingBlock"]:A,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(C){const O=r.get("slidesInView").includes(C.index);return t.element(ue(U({},Xr.item.attrs),{id:XD(u,C.index),dir:l("dir"),role:"group","data-index":C.index,"data-inview":to(O),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":_.item(C.index,l("slideCount")),"aria-hidden":fT(!O),style:{scrollSnapAlign:(()=>{var K;const z=(K=C.snapAlign)!=null?K:"start",W=l("slidesPerMove"),D=W==="auto"?Math.floor(l("slidesPerPage")):W;return(C.index+D)%D===0?z:void 0})()}}))},getControlProps(){return t.element(ue(U({},Xr.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(ue(U({},Xr.prevTrigger.attrs),{id:QD(u),type:"button",disabled:!p,dir:l("dir"),"aria-label":_.prevTrigger,"data-orientation":l("orientation"),"aria-controls":ec(u),onClick(C){C.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ue(U({},Xr.nextTrigger.attrs),{dir:l("dir"),id:KD(u),type:"button","aria-label":_.nextTrigger,"data-orientation":l("orientation"),"aria-controls":ec(u),disabled:!m,onClick(C){C.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ue(U({},Xr.indicatorGroup.attrs),{dir:l("dir"),id:JD(u),"data-orientation":l("orientation"),onKeyDown(C){if(C.defaultPrevented)return;const O="indicator",z={ArrowDown(V){b||(a({type:"PAGE.NEXT",src:O}),V.preventDefault())},ArrowUp(V){b||(a({type:"PAGE.PREV",src:O}),V.preventDefault())},ArrowRight(V){b&&(a({type:"PAGE.NEXT",src:O}),V.preventDefault())},ArrowLeft(V){b&&(a({type:"PAGE.PREV",src:O}),V.preventDefault())},Home(V){a({type:"PAGE.SET",index:0,src:O}),V.preventDefault()},End(V){a({type:"PAGE.SET",index:y.length-1,src:O}),V.preventDefault()}},W=oL(C,{dir:l("dir"),orientation:l("orientation")}),D=z[W];D==null||D(C)}}))},getIndicatorProps(C){return t.button(ue(U({},Xr.indicator.attrs),{dir:l("dir"),id:Mb(u,C.index),type:"button","data-orientation":l("orientation"),"data-index":C.index,"data-readonly":to(C.readOnly),"data-current":to(C.index===x),"aria-label":_.indicator(C.index),onClick(O){O.defaultPrevented||C.readOnly||a({type:"PAGE.SET",index:C.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ue(U({},Xr.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":to(d),"aria-label":d?_.autoplayStop:_.autoplayStart,onClick(C){C.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var t8={props({props:e}){return N4(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:n8(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 f4(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(Pn(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=Pn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Bb(e)});return Bb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Pn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};qt(()=>{s(),qt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return Fb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Pn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var b;const m=f.target,p=Number((b=m.dataset.index)!=null?b:"-1");return p==null||Number.isNaN(p)||p===-1?d:f.isIntersecting?a4(d,p):u4(d,p)},n.get("slidesInView"));n.set("slidesInView",l4(l))},{root:r,threshold:t("inViewThreshold")});return Fb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Pn(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 bL(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=cT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Pn(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=Pn(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=aT(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=c4(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Pn(r);if(!s)return;const a=YD(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=cT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Pn(n);if(!r)return;const s=Rb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Pn(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=Pn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Pn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=Rb(r),l=u.x.reduce((f,m)=>Math.abs(m-s)<Math.abs(f-s)?m:f,u.x[0]),d=u.y.reduce((f,m)=>Math.abs(m-a)<Math.abs(f-a)?m:f,u.y[0]);qt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const m=r.dataset.scrollSnapType;m&&(r.style.setProperty("scroll-snap-type",m),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=ZD(n,e.get("page"));r&&qt(()=>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 n8(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}lo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),lo()(["index","readOnly"]),lo()(["index","snapAlign"]);const r8=e=>{const t=R.useId(),{getRootNode:n}=Zl(),{dir:r}=Zh(),s=U({id:t,dir:r,getRootNode:n},e),a=Hl(t8,s);return e8(a,Rh)},up=R.forwardRef((e,t)=>{const[n,r]=Ba()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=r8(n),a=Yt(s.getRootProps(),r);return w.jsx($D,{value:s,children:w.jsx(hn.div,ue(U({},a),{ref:t}))})});up.displayName="CarouselRoot";const i8=180,s8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},o8=({globalClassName:e,className:t,itemMinWidth:n=i8,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,onPageChange:d,ariaLabel:f="Product carousel",children:m})=>{const p=Array.from(m).map((K,ae)=>({node:K,key:R.isValidElement(K)&&K.key!=null?K.key:`carousel-item-${ae}`})),b=p.length,y=R.useRef(null),[x,S]=R.useState(0),{width:A}=sv();R.useLayoutEffect(()=>{y.current&&S(y.current.getBoundingClientRect().width)},[A,b]);const _=s8(r),C=n+_,O=x>0?(x+_)/C:1,z=Math.max(1,Math.floor(O));if(b===0)return null;const W=b>z,D=Math.ceil(b/z),V=W?Math.max(1,O):z;return w.jsxs(up,{ref:y,className:F(e,t,`${N}-carousel`),slidesPerPage:V,slidesPerMove:z,spacing:r,loop:s,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":f,children:[w.jsx(sp,{className:F(e,`${N}-carousel__item-group`,{"carousel-row-container":!W}),children:p.map(({node:K,key:ae},j)=>w.jsx(ip,{index:j,className:F(e,`${N}-carousel__item`),children:K},ae))}),l&&W&&w.jsxs(tp,{className:F(e,`${N}-carousel__control`),children:[w.jsx(ap,{className:F(e,`${N}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(Ab,{size:"16px"})}),w.jsx(op,{className:F(e,`${N}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(kb,{size:"16px"})})]}),u&&W&&w.jsx(rp,{className:F(e,`${N}-carousel__indicator-group`),children:Array.from({length:D},(K,ae)=>w.jsx(np,{index:ae,className:F(e,`${N}-carousel__indicator`),"aria-label":`Go to slide group ${ae+1}`},ae))})]})},a8=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:F(e,`${N}-close-button`),disabled:r,onClick:n,children:w.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.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"})})}),[u8,l8]=ls({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),c8=e=>Ba()(e,["lazyMount","unmountOnExit"]),[d8,Va]=ls({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Ub=R.forwardRef((e,t)=>{const n=Va(),r=l8(),s=Mh(ue(U({},r),{present:n.open})),a=Yt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:w.jsx(hn.div,ue(U({},a),{ref:jl(s.ref,t)}))});Ub.displayName="DialogBackdrop";const lp=R.forwardRef((e,t)=>{const n=Va(),r=Fa(),s=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(hn.div,ue(U({},s),{ref:jl(r.ref,t)}))});lp.displayName="DialogContent";const cp=R.forwardRef((e,t)=>{const n=Va(),r=Yt(n.getDescriptionProps(),e);return w.jsx(hn.div,ue(U({},r),{ref:t}))});cp.displayName="DialogDescription";const dp=R.forwardRef((e,t)=>{const n=Va(),r=Yt(n.getPositionerProps(),e);return Fa().unmounted?null:w.jsx(hn.div,ue(U({},r),{ref:t}))});dp.displayName="DialogPositioner";var f8=cs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),ps=f8.build(),Hb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},jb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},fp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},zb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},hp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},pp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},$b=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},tc=e=>e.getById(fp(e)),h8=e=>e.getById(Hb(e)),p8=e=>e.getById(jb(e)),m8=e=>e.getById(zb(e)),g8=e=>e.getById(hp(e)),E8=e=>e.getById(pp(e)),y8=e=>e.getById($b(e));function T8(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({},ps.trigger.attrs),{dir:a("dir"),id:zb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":fp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ue(U({},ps.backdrop.attrs),{dir:a("dir"),hidden:!d,id:jb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ue(U({},ps.positioner.attrs),{dir:a("dir"),id:Hb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(ue(U({},ps.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:fp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:hp(u),"aria-describedby":f.description?pp(u):void 0}))},getTitleProps(){return t.element(ue(U({},ps.title.attrs),{dir:a("dir"),id:hp(u)}))},getDescriptionProps(){return t.element(ue(U({},ps.description.attrs),{dir:a("dir"),id:pp(u)}))},getCloseTriggerProps(){return t.button(ue(U({},ps.closeTrigger.attrs),{dir:a("dir"),id:$b(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var b8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>y8(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 pb(()=>tc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[m8(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 Tb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Eb(()=>tc(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")?sb(()=>[tc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){qt(()=>{e.set("rendered",{title:!!g8(t),description:!!E8(t)})})},syncZIndex({scope:e}){qt(()=>{const t=tc(e);if(!t)return;const n=so(t);[h8(e),p8(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})}}}};lo()(["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 w8=e=>{const t=R.useId(),{getRootNode:n}=Zl(),{dir:r}=Zh(),s=U({id:t,getRootNode:n,dir:r},e),a=Hl(b8,s);return T8(a,Rh)},Vb=e=>{const[t,l]=LT(e),d=l,{children:n}=d,r=vn(d,["children"]),[s]=c8(t),a=w8(r),u=Mh(Yt({present:a.open},t));return w.jsx(d8,{value:a,children:w.jsx(u8,{value:s,children:w.jsx(IT,{value:u,children:n})})})},qb=R.forwardRef((e,t)=>{const n=Va(),r=Yt(n.getTitleProps(),e);return w.jsx(hn.h2,ue(U({},r),{ref:t}))});qb.displayName="DialogTitle";const x8=({children:e})=>{const[t,n]=R.useState(!1),r=R.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=R.useMemo(()=>({isOpen:t}),[t]);return w.jsx(Th.Provider,{value:r,children:w.jsx(rT.Provider,{value:s,children:e})})},Yb=()=>R.useContext(rT),Wb=()=>{const e=R.useContext(Th);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},_8=`${N}-overflow-menu-button-trigger`,S8=({componentType:e,children:t})=>{const{isOpen:n}=Yb(),{closeMenu:r}=Wb(),{globalClassName:s}=ct(),a=R.useRef(null);return R.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${_8}`)||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?w.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:F(`${N}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},v8=({componentType:e,className:t})=>{const{toggleMenu:n}=Wb(),{isOpen:r}=Yb(),{globalClassName:s}=ct();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:F(`${N}-overflow-menu-button-trigger`,`${N}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:w.jsx(Cb,{})})};class A8{constructor(){Je(this,"initialState",W0);Je(this,"promptsStateProxy");Je(this,"promptsParamsProxy");Je(this,"_fullGet",(t,n)=>Reflect.get(t,n));Je(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return N8(n,r),Reflect.set(t,n,r)});Je(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Je(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Je(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 wi=new A8,k8=e=>{window.addEventListener(Bd,e)},C8=e=>{window.removeEventListener(Bd,e)},N8=(e,t)=>{const n=new CustomEvent(Bd,{detail:{property:e,value:t}});window.dispatchEvent(n)},Gb=e=>{const t=wi.isOpen,n=typeof e=="boolean"?e:!t;wi.promptsStateProxy.isOpen=n},O8=e=>{const t=wi.isInline,n=typeof e=="boolean"?e:!t;wi.promptsStateProxy.isInline=n},I8=({elementId:e,entryType:t,params:n,isInline:r})=>{wi.promptsStateProxy.elementId=e,t&&(wi.promptsStateProxy.entryType=t),typeof r=="boolean"&&O8(r),n&&wi.updatePromptsParamsProxy(n),wi.isOpen||Gb(!0)},P8=()=>{const e=R.useContext(l1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},R8=()=>{const e=R.useContext(u1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},nc=()=>{const e=R.useContext(a1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},L8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{previousComponentType:r}=Vr(),s=Zs(),a=()=>{Bu(r||"dialog"),s()};return t?w.jsx(lr,{className:F(n,`${N}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(Nb,{})}):w.jsxs("button",{className:F(n,`${N}-overflow-menu-button`,`${N}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(Nb,{}),"Show ",r||"dialog"]})},D8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{isModalFullscreen:r}=Vr(),s=Zs(),a=()=>{Hd(!r),s()},u=r?IC:PC,l="Toggle Fullscreen";return t?w.jsx(lr,{ariaLabel:l,title:l,className:F(n,`${N}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:F(n,`${N}-overflow-menu-button`,`${N}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),l]})},M8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{dialogPosition:r}=Vr(),s=Zs(),a=r==="bottom-left",u=()=>{jd(a?"bottom-right":"bottom-left"),s()},l=a?UD:BD,d=a?"Move right":"Move left";return t?w.jsx(lr,{className:F(n,`${N}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(l,{})}):w.jsxs("button",{className:F(n,`${N}-overflow-menu-button`,`${N}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(l,{}),d]})},Xb=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:l}=ct(),{mode:d}=Vr(),f=u==="messaging"&&l&&!!r,m=d==="standalone",p=e==="modal",b=p?L8:Qb,y=p?D8:M8,x=R.useMemo(()=>s?AC(s):{},[s]);return w.jsx(x8,{children:w.jsxs("div",{className:F(a,`${N}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:F(a,`${N}-${e}-header`,{standalone:m,embedded:!m}),style:x,children:[(s==null?void 0:s.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:F(a,`${N}-${e}-logo`,{standalone:m,embedded:!m}),src:s.logoUrl}),w.jsx(qb,{className:F(a,`${N}-${e}-title`,{standalone:m,embedded:!m}),children:s==null?void 0:s.headerText}),w.jsxs("div",{className:F(a,`${N}-${e}-controls`),children:[w.jsx(b,{componentType:e,isIcon:!0}),w.jsx(v8,{componentType:e}),w.jsx(a8,{className:F(a,`cim-${e}-component`),onClick:n})]})]}),w.jsxs(S8,{componentType:e,children:[w.jsx(y,{componentType:e}),w.jsx(j8,{componentType:e}),w.jsx(sT,{componentType:e,onClearChat:t}),f&&w.jsx(oT,{componentType:e,onDownloadTranscript:r})]})]})})},To="USD",rc=(...e)=>e.flatMap(t=>t!=null?t:[]).reduce((t,n)=>{const r=n.promotionalPrice;return typeof r!="number"||!Number.isFinite(r)?t:t===void 0||r<t?r:t},void 0),Kr=(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}`}},F8=({retailPrice:e,discountPrice:t,currencyCode:n=To})=>{const r=n||To,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:Kr(a,r),comparePrice:Kr(u,r),hasDiscount:s}},ic=e=>typeof e=="number"&&Number.isFinite(e),mp=({min:e,max:t,currencyCode:n=To})=>{if(!ic(e)||!ic(t))return null;const r=n||To,s=Kr(e,r),a=Kr(t,r);if(s===null||a===null)return null;const u=e!==t;return{value:u?`${s} – ${a}`:s,low:s,high:a,isRange:u}},B8=({priceBreakdown:e,currencyCode:t=To})=>{if(!e)return null;const n=t||To,r=[e.promotional,e.sales,e.original],s=r.map(f=>f==null?void 0:f.min).filter(ic),a=r.map(f=>f==null?void 0:f.max).filter(ic);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=mp({min:u,max:l,currencyCode:n});return d?{range:d.value,low:d.low,high:d.high}:null},gp=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=F8({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return w.jsxs("div",{className:F(s,a,`${N}-price`),style:f,children:[w.jsx("span",{className:`${N}-visually-hidden`,children:"Current price: "}),w.jsx("span",{className:F(s,`${N}-price__amount`),children:u}),d&&l&&w.jsxs("span",{className:F(s,`${N}-price__compare`),children:[w.jsx("span",{className:`${N}-visually-hidden`,children:"Original price: "}),l]})]})},U8={sparkle:ep,plus:HD,"paper-plane":jD},Kb=({icon:e,className:t})=>{const n=U8[e];return n?w.jsx(n,{className:t,"aria-hidden":"true"}):null},H8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=ct(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",m=x=>()=>{a(x)},p={"has-icon":!!l,"icon-right":!!l&&d==="right"},b=x=>w.jsxs(w.Fragment,{children:[l&&w.jsx(Kb,{icon:l,className:`${N}-suggestion-button-icon`}),w.jsx("span",{children:x})]});return w.jsx("div",{className:F(t,`${N}-suggestion-container ${f}`,e),children:n.map(x=>s?w.jsx(Sf,{disabled:r,className:F(t,`${N}-suggestion-button standalone`,p),onClick:m(x),children:b(x)},x):w.jsx("button",{disabled:r,className:F(t,`${N}-suggestion-button embedded`,p),onClick:m(x),children:b(x)},x))})},j8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ct();if(!r)return null;const s=()=>{$r(!1),Ls(!0)};return t?w.jsx(lr,{className:F(n,`${N}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:w.jsx(x1,{})}):w.jsxs("button",{className:F(n,`${N}-overflow-menu-button`,`${N}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(x1,{}),"Minimize"]})},Qb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),r=Zs(),s=()=>{Bu("modal"),r()};return t?w.jsx(lr,{className:F(n,`${N}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:w.jsx(Ob,{})}):w.jsxs("button",{className:F(n,`${N}-overflow-menu-button`,`${N}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(Ob,{}),"Show modal"]})},z8=["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"],$8=3e3,V8=400,q8=({globalClassName:e,isWidgetStandalone:t,messages:n=z8})=>{const[r,s]=R.useState(0),[a,u]=R.useState(!0);return R.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},V8)},$8);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),w.jsxs("div",{className:F(e,`${N}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[w.jsxs("div",{className:`${N}-connecting-pulse-wrapper`,children:[w.jsx("div",{className:`${N}-connecting-pulse`}),w.jsx("div",{className:`${N}-connecting-ring`})]}),w.jsx("span",{className:F(`${N}-connecting-text`,a&&`${N}-connecting-text--visible`),children:n[r]})]})},Y8=({shouldShow:e,loadingText:t})=>e?w.jsx("span",{className:`${N}-processing-text`,children:t}):null,W8=({shouldShow:e})=>e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${N}-processing-shimmer-bar`}),w.jsx("div",{className:`${N}-processing-shimmer-bar`}),w.jsx("div",{className:`${N}-processing-shimmer-bar`})]}):null,Ep=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>w.jsxs("div",{className:F(e,`${N}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[w.jsx(Y8,{shouldShow:!!n,loadingText:n}),w.jsx(W8,{shouldShow:!n})]});function Jb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function G8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function X8(e,t,n){const s=yl((n||{}).ignore||[]),a=K8(t);let u=-1;for(;++u<a.length;)FE(e,"text",l);function l(f,m){let p=-1,b;for(;++p<m.length;){const y=m[p],x=b?b.children:void 0;if(s(y,x?x.indexOf(y):void 0,b))return;b=y}if(b)return d(f,m)}function d(f,m){const p=m[m.length-1],b=a[u][0],y=a[u][1];let x=0;const A=p.children.indexOf(f);let _=!1,C=[];b.lastIndex=0;let O=b.exec(f.value);for(;O;){const z=O.index,W={index:O.index,input:O.input,stack:[...m,f]};let D=y(...O,W);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=z+1:(x!==z&&C.push({type:"text",value:f.value.slice(x,z)}),Array.isArray(D)?C.push(...D):D&&C.push(D),x=z+O[0].length,_=!0),!b.global)break;O=b.exec(f.value)}return _?(x<f.value.length&&C.push({type:"text",value:f.value.slice(x)}),p.children.splice(A,1,...C)):C=[f],A+C.length}}function K8(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([Q8(s[0]),J8(s[1])])}return t}function Q8(e){return typeof e=="string"?new RegExp(G8(e),"g"):e}function J8(e){return typeof e=="function"?e:function(){return e}}const yp="phrasing",Tp=["autolink","link","image","label"];function Z8(){return{transforms:[oM],enter:{literalAutolink:tM,literalAutolinkEmail:bp,literalAutolinkHttp:bp,literalAutolinkWww:bp},exit:{literalAutolink:sM,literalAutolinkEmail:iM,literalAutolinkHttp:nM,literalAutolinkWww:rM}}}function eM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:yp,notInConstruct:Tp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:yp,notInConstruct:Tp},{character:":",before:"[ps]",after:"\\/",inConstruct:yp,notInConstruct:Tp}]}}function tM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function bp(e){this.config.enter.autolinkProtocol.call(this,e)}function nM(e){this.config.exit.autolinkProtocol.call(this,e)}function rM(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 iM(e){this.config.exit.autolinkEmail.call(this,e)}function sM(e){this.exit(e)}function oM(e){X8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),uM]],{ignore:["link","linkReference"]})}function aM(e,t,n,r,s){let a="";if(!Zb(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!lM(n)))return!1;const u=cM(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 uM(e,t,n,r){return!Zb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function lM(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 cM(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=Jb(e,"(");let a=Jb(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 Zb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||es(n)||dl(n))&&(!t||n!==47)}ew.peek=TM;function dM(){this.buffer()}function fM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function hM(){this.buffer()}function pM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function mM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gM(e){this.exit(e)}function EM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yM(e){this.exit(e)}function TM(){return"["}function ew(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 bM(){return{enter:{gfmFootnoteCallString:dM,gfmFootnoteCall:fM,gfmFootnoteDefinitionLabelString:hM,gfmFootnoteDefinition:pM},exit:{gfmFootnoteCallString:mM,gfmFootnoteCall:gM,gfmFootnoteDefinitionLabelString:EM,gfmFootnoteDefinition:yM}}}function wM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ew},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"),m=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),m(),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?tw:xM))),f(),d}}function xM(e,t,n){return t===0?e:tw(e,t,n)}function tw(e,t,n){return(n?"":" ")+e}const _M=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];nw.peek=CM;function SM(){return{canContainEols:["delete"],enter:{strikethrough:AM},exit:{strikethrough:kM}}}function vM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_M}],handlers:{delete:nw}}}function AM(e){this.enter({type:"delete",children:[]},e)}function kM(e){this.exit(e)}function nw(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 CM(){return"~"}function NM(e){return e.length}function OM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||NM,a=[],u=[],l=[],d=[];let f=0,m=-1;for(;++m<e.length;){const S=[],A=[];let _=-1;for(e[m].length>f&&(f=e[m].length);++_<e[m].length;){const C=IM(e[m][_]);if(n.alignDelimiters!==!1){const O=s(C);A[_]=O,(d[_]===void 0||O>d[_])&&(d[_]=O)}S.push(C)}u[m]=S,l[m]=A}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)a[p]=rw(r[p]);else{const S=rw(r);for(;++p<f;)a[p]=S}p=-1;const b=[],y=[];for(;++p<f;){const S=a[p];let A="",_="";S===99?(A=":",_=":"):S===108?A=":":S===114&&(_=":");let C=n.alignDelimiters===!1?1:Math.max(1,d[p]-A.length-_.length);const O=A+"-".repeat(C)+_;n.alignDelimiters!==!1&&(C=A.length+C+_.length,C>d[p]&&(d[p]=C),y[p]=C),b[p]=O}u.splice(1,0,b),l.splice(1,0,y),m=-1;const x=[];for(;++m<u.length;){const S=u[m],A=l[m];p=-1;const _=[];for(;++p<f;){const C=S[p]||"";let O="",z="";if(n.alignDelimiters!==!1){const W=d[p]-(A[p]||0),D=a[p];D===114?O=" ".repeat(W):D===99?W%2?(O=" ".repeat(W/2+.5),z=" ".repeat(W/2-.5)):(O=" ".repeat(W/2),z=O):z=" ".repeat(W)}n.delimiterStart!==!1&&!p&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||p)&&_.push(" "),n.alignDelimiters!==!1&&_.push(O),_.push(C),n.alignDelimiters!==!1&&_.push(z),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&_.push("|")}x.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return x.join(`
36
+ `},s),a}function aI(e,t){return e&&"run"in e?function(n,r){return Fe(this,null,function*(){const s=UE(n,H({file:r},t));yield e.run(s,r)})}:function(n,r){return UE(n,H({file:r},e||t))}}function HE(e){if(e)throw e}var Gf,jE;function uI(){if(jE)return Gf;jE=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 m=e.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!m&&!p)return!1;var b;for(b in f);return typeof b=="undefined"||e.call(f,b)},u=function(f,m){n&&m.name==="__proto__"?n(f,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):f[m.name]=m.newValue},l=function(f,m){if(m==="__proto__")if(e.call(f,m)){if(r)return r(f,m).value}else return;return f[m]};return Gf=function d(){var f,m,p,b,y,x,S=arguments[0],A=1,_=arguments.length,k=!1;for(typeof S=="boolean"&&(k=S,S=arguments[1]||{},A=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});A<_;++A)if(f=arguments[A],f!=null)for(m in f)p=l(S,m),b=l(f,m),S!==b&&(k&&b&&(a(b)||(y=s(b)))?(y?(y=!1,x=p&&s(p)?p:[]):x=p&&a(p)?p:{},u(S,{name:m,newValue:d(k,x,b)})):typeof b!="undefined"&&u(S,{name:m,newValue:b}));return S},Gf}var lI=uI();const Xf=rt(lI);function Kf(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function cI(){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 m=e[++a];let p=-1;if(d){u(d);return}for(;++p<s.length;)(f[p]===null||f[p]===void 0)&&(f[p]=s[p]);s=f,m?dI(m,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 dI(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 m=f;if(l&&n)throw m;return s(m)}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 Ar={basename:fI,dirname:hI,extname:pI,join:mI,sep:"/"};function fI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');xa(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 hI(e){if(xa(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 pI(e){xa(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 mI(...e){let t=-1,n;for(;++t<e.length;)xa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":gI(n)}function gI(e){xa(e);const t=e.codePointAt(0)===47;let n=EI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function EI(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 xa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const yI={cwd:TI};function TI(){return"/"}function Qf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function bI(e){if(typeof e=="string")e=new URL(e);else if(!Qf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return wI(e)}function wI(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Jf=["history","path","basename","stem","extname","dirname"];class zE{constructor(t){let n;t?Qf(t)?n={path:t}:typeof t=="string"||xI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":yI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Jf.length;){const a=Jf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)Jf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ar.basename(this.path):void 0}set basename(t){eh(t,"basename"),Zf(t,"basename"),this.path=Ar.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ar.dirname(this.path):void 0}set dirname(t){$E(this.basename,"dirname"),this.path=Ar.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ar.extname(this.path):void 0}set extname(t){if(Zf(t,"extname"),$E(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=Ar.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qf(t)&&(t=bI(t)),eh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ar.basename(this.path,this.extname):void 0}set stem(t){eh(t,"stem"),Zf(t,"stem"),this.path=Ar.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 cn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Zf(e,t){if(e&&e.includes(Ar.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ar.sep+"`")}function eh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function $E(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function xI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _I=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),SI={}.hasOwnProperty;class th extends _I{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=cI()}copy(){const t=new th;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Xf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ih("data",this.frozen),this.namespace[t]=n,this):SI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ih("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=bl(t),r=this.parser||this.Parser;return nh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),nh("process",this.parser||this.Parser),rh("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const l=bl(t),d=r.parse(l);r.run(d,l,function(m,p,b){if(m||!p||!b)return f(m);const y=p,x=r.stringify(y,b);CI(x)?b.value=x:b.result=x,f(m,b)});function f(m,p){m||!p?u(m):a?a(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),nh("processSync",this.parser||this.Parser),rh("processSync",this.compiler||this.Compiler),this.process(t,s),qE("processSync","process",n),r;function s(a,u){n=!0,HE(a),r=u}}run(t,n,r){VE(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=bl(n);s.run(t,d,f);function f(m,p,b){const y=p||t;m?l(m):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),qE("runSync","run",r),s;function a(u,l){HE(u),s=l,r=!0}}stringify(t,n){this.freeze();const r=bl(n),s=this.compiler||this.Compiler;return rh("stringify",s),VE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(ih("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?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[m,...p]=f;d(m,p)}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=Xf(!0,s.settings,f.settings))}function l(f){let m=-1;if(f!=null)if(Array.isArray(f))for(;++m<f.length;){const p=f[m];a(p)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,m){let p=-1,b=-1;for(;++p<r.length;)if(r[p][0]===f){b=p;break}if(b===-1)r.push([f,...m]);else if(m.length>0){let[y,...x]=m;const S=r[b][1];Kf(S)&&Kf(y)&&(y=Xf(!0,S,y)),r[b]=[f,y,...x]}}}}const vI=new th().freeze();function nh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ih(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function VE(e){if(!Kf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function bl(e){return AI(e)?e:new zE(e)}function AI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function CI(e){return typeof e=="string"||kI(e)}function kI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",YE=[],WE={allowDangerousHtml:!0},OI=/^(https?|ircs?|mailto|xmpp)$/i,II=[{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 GE(e){const t=PI(e),n=RI(e);return LI(t.runSync(t.parse(n),n),e)}function PI(e){const t=e.rehypePlugins||YE,n=e.remarkPlugins||YE,r=e.remarkRehypeOptions?H(H({},e.remarkRehypeOptions),WE):WE;return vI().use(hO).use(n).use(aI,r).use(t)}function RI(e){const t=e.children||"",n=new zE;return typeof t=="string"&&(n.value=t),n}function LI(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||DI;for(const m of II)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+NI+m.id,void 0);return Tl(e,f),sN(e,{Fragment:w.Fragment,components:s,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function f(m,p,b){if(m.type==="raw"&&b&&typeof p=="number")return u?b.children.splice(p,1):b.children[p]={type:"text",value:m.value},p;if(m.type==="element"){let y;for(y in Lf)if(Object.hasOwn(Lf,y)&&Object.hasOwn(m.properties,y)){const x=m.properties[y],S=Lf[y];(S===null||S.includes(m.tagName))&&(m.properties[y]=d(String(x||""),y,m))}}if(m.type==="element"){let y=n?!n.includes(m.tagName):a?a.includes(m.tagName):!1;if(!y&&r&&typeof p=="number"&&(y=!r(m,p,b)),y&&b&&typeof p=="number")return l&&m.children?b.children.splice(p,1,...m.children):b.children.splice(p,1),p}}}function DI(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||OI.test(e.slice(0,t))?e:""}const XE=/[#.]/g;function MI(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){XE.lastIndex=s;const l=XE.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 KE(e,t,n){const r=n?HI(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=MI(a,t);const f=d.tagName.toLowerCase(),m=r?r.get(f):void 0;if(d.tagName=m||f,FI(u))l.unshift(u);else for(const[p,b]of Object.entries(u))BI(e,d.properties,p,b)}for(const f of l)sh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function FI(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 BI(e,t,n,r){const s=al(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=U1(r):s.commaSeparated?a=A1(r):s.commaOrSpaceSeparated?a=U1(A1(r).join(" ")):a=QE(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?UI(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(QE(s,s.property,l));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function sh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)sh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?sh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function QE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||da(n)===da(t)))return!0}return n}function UI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function HI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const jI=["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"],zI=KE(fa,"div"),$I=KE(di,"g",jI);function VI(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=JE(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=JE(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 JE(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 rs={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/"},ZE={}.hasOwnProperty,qI=Object.prototype;function YI(e,t){const n=t||{};return oh({file:n.file||void 0,location:!1,schema:n.space==="svg"?di:fa,verbose:n.verbose||!1},e)}function oh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},wl(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:ey(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=VI(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"},wl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},wl(e,r,n),n}default:return n=WI(e,t),n}}function ey(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=oh(e,t[n]);r.push(s)}return r}function WI(e,t){const n=e.schema;e.schema=t.namespaceURI===rs.svg?di:fa;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;ZE.call(qI,d)||(s[d]=l.value)}const u=(e.schema.space==="svg"?$I:zI)(t.tagName,s,ey(e,t.childNodes));if(wl(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&Gs(d.startTag),m=d&&d.endTag&&Gs(d.endTag),p=oh(e,l.content);f&&m&&e.file&&(p.position={start:f.end,end:m.start}),u.content=p}return e.schema=n,u}function wl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=GI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function GI(e,t,n){const r=Gs(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)ZE.call(n.attrs,u)&&(a[al(e.schema,u).property]=Gs(n.attrs[u]));n.startTag;const l=Gs(n.startTag),d=n.endTag?Gs(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Gs(e){const t=ty({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ty({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ty(e){return e.line&&e.column?e:void 0}const ny={}.hasOwnProperty;function ry(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const l=r.handlers;if(s&&ny.call(s,e)){const d=String(s[e]);u=ny.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 XI={},KI={}.hasOwnProperty,iy=ry("type",{handlers:{root:JI,element:rP,text:tP,comment:nP,doctype:eP}});function QI(e,t){const r=(t||XI).space;return iy(e,r==="svg"?di:fa)}function JI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ah(e.children,n,t),Xs(e,n),n}function ZI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ah(e.children,n,t),Xs(e,n),n}function eP(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Xs(e,t),t}function tP(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Xs(e,t),t}function nP(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Xs(e,t),t}function rP(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=di);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&KI.call(e.properties,a)){const d=iP(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:rs[u],childNodes:[],parentNode:null};return l.childNodes=ah(e.children,l,r),Xs(e,l),e.tagName==="template"&&e.content&&(l.content=ZI(e.content,r)),l}function iP(e,t,n){const r=al(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?C1(n):H1(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=rs[r.space]}return s}function ah(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=iy(e[r],n);a.parentNode=t,s.push(a)}return s}function Xs(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 sP=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],oP=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]),Ct="�";var I;(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"})(I||(I={}));const In={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function sy(e){return e>=55296&&e<=57343}function aP(e){return e>=56320&&e<=57343}function uP(e,t){return(e-55296)*1024+9216+t}function oy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ay(e){return e>=64976&&e<=65007||oP.has(e)}var re;(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"})(re||(re={}));const lP=65536;class cP{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=lP,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(aP(n))return this.pos++,this._addGap(),uP(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(re.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,I.EOF;const r=this.html.charCodeAt(n);return r===I.CARRIAGE_RETURN?I.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,I.EOF;let t=this.html.charCodeAt(this.pos);return t===I.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,I.LINE_FEED):t===I.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,sy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===I.LINE_FEED||t===I.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){oy(t)?this._err(re.controlCharacterInInputStream):ay(t)&&this._err(re.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var tt;(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"})(tt||(tt={}));function uy(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 dP=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))),fP=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 hP(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=fP.get(e))!==null&&t!==void 0?t:e}var Kt;(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"})(Kt||(Kt={}));const pP=32;var pi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(pi||(pi={}));function uh(e){return e>=Kt.ZERO&&e<=Kt.NINE}function mP(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_F||e>=Kt.LOWER_A&&e<=Kt.LOWER_F}function gP(e){return e>=Kt.UPPER_A&&e<=Kt.UPPER_Z||e>=Kt.LOWER_A&&e<=Kt.LOWER_Z||uh(e)}function EP(e){return e===Kt.EQUALS||gP(e)}var Qt;(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"})(Qt||(Qt={}));var qr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(qr||(qr={}));class yP{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=qr.Strict}startEntity(t){this.decodeMode=t,this.state=Qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Qt.EntityStart:return t.charCodeAt(n)===Kt.NUM?(this.state=Qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Qt.NamedEntity,this.stateNamedEntity(t,n));case Qt.NumericStart:return this.stateNumericStart(t,n);case Qt.NumericDecimal:return this.stateNumericDecimal(t,n);case Qt.NumericHex:return this.stateNumericHex(t,n);case Qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|pP)===Kt.LOWER_X?(this.state=Qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Qt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(uh(s)||mP(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(uh(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Kt.SEMI)this.consumed+=1;else if(this.decodeMode===qr.Strict)return 0;return this.emitCodePoint(hP(this.result),this.consumed),this.errors&&(t!==Kt.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&pi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=TP(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===qr.Attribute&&(a===0||EP(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&pi.VALUE_LENGTH)>>14,a!==0){if(u===Kt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==qr.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]&pi.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]&~pi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Qt.NamedEntity:return this.result!==0&&(this.decodeMode!==qr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Qt.NumericDecimal:return this.emitNumericEntity(0,2);case Qt.NumericHex:return this.emitNumericEntity(0,3);case Qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Qt.EntityStart:return 0}}}function TP(e,t,n,r){const s=(t&pi.BRANCH_LENGTH)>>7,a=t&pi.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 is;(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"})(is||(is={}));var Kn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Kn||(Kn={}));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 bP=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 Ks(e){var t;return(t=bP.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const ye=g,wP={[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},lh=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 Mt={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function xP(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function _a(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function _P(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function mi(e){return _P(e)||_a(e)}function ly(e){return mi(e)||xP(e)}function xl(e){return e+32}function cy(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function dy(e){return cy(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function SP(e){return e===I.NULL?re.nullCharacterReference:e>1114111?re.characterReferenceOutsideUnicodeRange:sy(e)?re.surrogateCharacterReference:ay(e)?re.noncharacterCharacterReference:oy(e)||e===I.CARRIAGE_RETURN?re.controlCharacterReference:null}class vP{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 cP(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new yP(dP,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(re.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(re.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=SP(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:tt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:tt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:tt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:tt.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(uy(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(re.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=Ks(t.tagName),t.type===tt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(re.endTagWithAttributes),t.selfClosing&&this._err(re.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 tt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case tt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case tt.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:tt.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=cy(t)?tt.WHITESPACE_CHARACTER:t===I.NULL?tt.NULL_CHARACTER:tt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(tt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?qr.Attribute:qr.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 I.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitCodePoint(t);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case I.AMPERSAND:{this._startCharacterReference();break}case I.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Ct);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Ct);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Ct);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Ct);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(mi(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(re.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(re.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(mi(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(re.missingEndTagName),this.state=L.DATA;break}case I.EOF:{this._err(re.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(re.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.tagName+=Ct;break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(_a(t)?xl(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){mi(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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case I.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===I.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){mi(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 I.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case I.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){mi(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===I.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.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 I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Ct);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(Ct);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(Ct);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:mi(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){mi(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(In.SCRIPT,!1)&&dy(this.preprocessor.peek(In.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<In.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 I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(re.unexpectedNullCharacter),this._emitChars(Ct);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ct);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ct);break}case I.EOF:{this._err(re.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.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(In.SCRIPT,!1)&&dy(this.preprocessor.peek(In.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<In.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(re.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this._leaveAttrName(),this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(re.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.name+=Ct;break}default:this.currentAttr.name+=String.fromCodePoint(_a(t)?xl(t):t)}}_stateAfterAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{this.state=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=Ct;break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=Ct;break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(re.unexpectedNullCharacter),this.currentAttr.value+=Ct;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(re.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(re.eofInTag),this._emitEOFToken();break}default:this._err(re.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.data+=Ct;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(In.DASH_DASH,!0)?(this._createCommentToken(In.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(In.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(In.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(In.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(re.cdataInHtmlContent),this._createCommentToken(In.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(re.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(re.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 I.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(re.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 I.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.data+=Ct;break}case I.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case I.EXCLAMATION_MARK:{n.data+="!",this.state=L.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(re.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case I.EOF:{this._err(re.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 I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case I.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{n.data+="-";break}case I.EOF:{this._err(re.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 I.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(re.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(re.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(re.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(_a(t))this._createDoctypeToken(String.fromCharCode(xl(t))),this.state=L.DOCTYPE_NAME;else switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.NULL:{this._err(re.unexpectedNullCharacter),this._createDoctypeToken(Ct),this.state=L.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(re.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.name+=Ct;break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(_a(t)?xl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(In.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(In.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(re.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=Ct;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(re.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 I.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.publicId+=Ct;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(re.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.QUOTATION_MARK:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(re.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(re.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(re.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=Ct;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(re.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 I.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(re.unexpectedNullCharacter),n.systemId+=Ct;break}case I.GREATER_THAN_SIGN:{this._err(re.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(re.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(re.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(re.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.NULL:{this._err(re.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(re.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=L.DATA;break}case I.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(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ly(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ly(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(re.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const fy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),hy=new Set([...fy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),_l=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),AP=new Set([..._l,g.OL,g.UL]),CP=new Set([..._l,g.BUTTON]),py=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),my=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),kP=new Set([g.TR,g.TEMPLATE,g.HTML]),NP=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),OP=new Set([g.TABLE,g.TEMPLATE,g.HTML]),IP=new Set([g.TD,g.TH]);class PP{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(lh,me.HTML)}popUntilTableCellPopped(){this.popUntilPopped(IP,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(OP,me.HTML)}clearBackToTableBodyContext(){this.clearBackTo(NP,me.HTML)}clearBackToTableRowContext(){this.clearBackTo(kP,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(my.has(s))return!1;break}case me.MATHML:{if(py.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,_l)}hasInListItemScope(t){return this.hasInDynamicScope(t,AP)}hasInButtonScope(t){return this.hasInDynamicScope(t,CP)}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(lh.has(n))return!0;if(_l.has(n))return!1;break}case me.SVG:{if(my.has(n))return!1;break}case me.MATHML:{if(py.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&&fy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&hy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&hy.has(this.currentTagId);)this.pop()}}const ch=3;var Cr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Cr||(Cr={}));const gy={type:Cr.Marker};class RP{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===Cr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const m=this.treeAdapter.getAttrList(f);m.length===s&&r.push({idx:l,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ch)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ch)return;const s=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const l=r[u];l.attrs.every(d=>s.get(d.name)===d.value)&&(a+=1,a>=ch&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(gy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Cr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Cr.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(gy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Cr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Cr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Cr.Element&&n.element===t)}}const gi={createDocument(){return{nodeName:"#document",mode:Kn.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};gi.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(gi.isTextNode(n)){n.value+=t;return}}gi.appendChild(e,gi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&gi.isTextNode(r)?r.value+=t:gi.insertBefore(e,gi.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=H(H({},e.sourceCodeLocation),t)}},Ey="html",LP="about:legacy-compat",DP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",yy=["+//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//"],MP=[...yy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],FP=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ty=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],BP=[...Ty,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function by(e,t){return t.some(n=>e.startsWith(n))}function UP(e){return e.name===Ey&&e.publicId===null&&(e.systemId===null||e.systemId===LP)}function HP(e){if(e.name!==Ey)return Kn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===DP)return Kn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),FP.has(n))return Kn.QUIRKS;let r=t===null?MP:yy;if(by(n,r))return Kn.QUIRKS;if(r=t===null?Ty:BP,by(n,r))return Kn.LIMITED_QUIRKS}return Kn.NO_QUIRKS}const wy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},jP="definitionurl",zP="definitionURL",$P=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])),VP=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}]]),qP=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])),YP=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 WP(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===is.COLOR||r===is.SIZE||r===is.FACE)||YP.has(t)}function xy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===jP){e.attrs[t].name=zP;break}}function _y(e){for(let t=0;t<e.attrs.length;t++){const n=$P.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function dh(e){for(let t=0;t<e.attrs.length;t++){const n=VP.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 GP(e){const t=qP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ks(e.tagName))}function XP(e,t){return t===me.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function KP(e,t,n){if(t===me.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===is.ENCODING){const s=n[r].value.toLowerCase();return s===wy.TEXT_HTML||s===wy.APPLICATION_XML}}return t===me.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function QP(e,t,n,r){return(!r||r===me.HTML)&&KP(e,t,n)||(!r||r===me.MATHML)&&XP(e,t)}const JP="hidden",ZP=8,eR=3;var j;(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"})(j||(j={}));const tR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Sy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),vy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gi,onParseError:null};class Ay{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=j.INITIAL,this.originalInsertionMode=j.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=H(H({},vy),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 vP(this.options,this),this.activeFormattingElements=new RP(this.treeAdapter),this.fragmentContextID=r?Ks(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new PP(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=H(H({},vy),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(j.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:tR,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=j.TEXT}switchToPlaintextParsing(){this.insertionMode=j.TEXT,this.originalInsertionMode=j.IN_BODY,this.tokenizer.state=Mt.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=Mt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Mt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Mt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Mt.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&&oe(H({},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:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:m})}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===tt.END_TAG&&s===n.tagName?{endTag:H({},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 tt.CHARACTER:{this.onCharacter(t);break}case tt.NULL_CHARACTER:{this.onNullCharacter(t);break}case tt.COMMENT:{this.onComment(t);break}case tt.DOCTYPE:{this.onDoctype(t);break}case tt.START_TAG:{this._processStartTag(t);break}case tt.END_TAG:{this.onEndTag(t);break}case tt.EOF:{this.onEof(t);break}case tt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return QP(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Cr.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=j.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=j.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=j.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=j.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=j.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=j.IN_TABLE;return}case g.BODY:{this.insertionMode=j.IN_BODY;return}case g.FRAMESET:{this.insertionMode=j.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?j.AFTER_HEAD:j.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=j.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=j.IN_HEAD;return}break}}this.insertionMode=j.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=j.IN_SELECT_IN_TABLE;return}}this.insertionMode=j.IN_SELECT}_isElementCausesFosterParenting(t){return Sy.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 wP[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){I6(this,t);return}switch(this.insertionMode){case j.INITIAL:{Sa(this,t);break}case j.BEFORE_HTML:{va(this,t);break}case j.BEFORE_HEAD:{Aa(this,t);break}case j.IN_HEAD:{Ca(this,t);break}case j.IN_HEAD_NO_SCRIPT:{ka(this,t);break}case j.AFTER_HEAD:{Na(this,t);break}case j.IN_BODY:case j.IN_CAPTION:case j.IN_CELL:case j.IN_TEMPLATE:{ky(this,t);break}case j.TEXT:case j.IN_SELECT:case j.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case j.IN_TABLE:case j.IN_TABLE_BODY:case j.IN_ROW:{mh(this,t);break}case j.IN_TABLE_TEXT:{My(this,t);break}case j.IN_COLUMN_GROUP:{Al(this,t);break}case j.AFTER_BODY:{Nl(this,t);break}case j.AFTER_AFTER_BODY:{Ol(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){O6(this,t);return}switch(this.insertionMode){case j.INITIAL:{Sa(this,t);break}case j.BEFORE_HTML:{va(this,t);break}case j.BEFORE_HEAD:{Aa(this,t);break}case j.IN_HEAD:{Ca(this,t);break}case j.IN_HEAD_NO_SCRIPT:{ka(this,t);break}case j.AFTER_HEAD:{Na(this,t);break}case j.TEXT:{this._insertCharacters(t);break}case j.IN_TABLE:case j.IN_TABLE_BODY:case j.IN_ROW:{mh(this,t);break}case j.IN_COLUMN_GROUP:{Al(this,t);break}case j.AFTER_BODY:{Nl(this,t);break}case j.AFTER_AFTER_BODY:{Ol(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){hh(this,t);return}switch(this.insertionMode){case j.INITIAL:case j.BEFORE_HTML:case j.BEFORE_HEAD:case j.IN_HEAD:case j.IN_HEAD_NO_SCRIPT:case j.AFTER_HEAD:case j.IN_BODY:case j.IN_TABLE:case j.IN_CAPTION:case j.IN_COLUMN_GROUP:case j.IN_TABLE_BODY:case j.IN_ROW:case j.IN_CELL:case j.IN_SELECT:case j.IN_SELECT_IN_TABLE:case j.IN_TEMPLATE:case j.IN_FRAMESET:case j.AFTER_FRAMESET:{hh(this,t);break}case j.IN_TABLE_TEXT:{Pa(this,t);break}case j.AFTER_BODY:{uR(this,t);break}case j.AFTER_AFTER_BODY:case j.AFTER_AFTER_FRAMESET:{lR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case j.INITIAL:{cR(this,t);break}case j.BEFORE_HEAD:case j.IN_HEAD:case j.IN_HEAD_NO_SCRIPT:case j.AFTER_HEAD:{this._err(t,re.misplacedDoctype);break}case j.IN_TABLE_TEXT:{Pa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,re.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?P6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case j.INITIAL:{Sa(this,t);break}case j.BEFORE_HTML:{dR(this,t);break}case j.BEFORE_HEAD:{hR(this,t);break}case j.IN_HEAD:{dr(this,t);break}case j.IN_HEAD_NO_SCRIPT:{gR(this,t);break}case j.AFTER_HEAD:{yR(this,t);break}case j.IN_BODY:{fn(this,t);break}case j.IN_TABLE:{Qs(this,t);break}case j.IN_TABLE_TEXT:{Pa(this,t);break}case j.IN_CAPTION:{p6(this,t);break}case j.IN_COLUMN_GROUP:{gh(this,t);break}case j.IN_TABLE_BODY:{Cl(this,t);break}case j.IN_ROW:{kl(this,t);break}case j.IN_CELL:{E6(this,t);break}case j.IN_SELECT:{Uy(this,t);break}case j.IN_SELECT_IN_TABLE:{T6(this,t);break}case j.IN_TEMPLATE:{w6(this,t);break}case j.AFTER_BODY:{_6(this,t);break}case j.IN_FRAMESET:{S6(this,t);break}case j.AFTER_FRAMESET:{A6(this,t);break}case j.AFTER_AFTER_BODY:{k6(this,t);break}case j.AFTER_AFTER_FRAMESET:{N6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?R6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case j.INITIAL:{Sa(this,t);break}case j.BEFORE_HTML:{fR(this,t);break}case j.BEFORE_HEAD:{pR(this,t);break}case j.IN_HEAD:{mR(this,t);break}case j.IN_HEAD_NO_SCRIPT:{ER(this,t);break}case j.AFTER_HEAD:{TR(this,t);break}case j.IN_BODY:{vl(this,t);break}case j.TEXT:{i6(this,t);break}case j.IN_TABLE:{Oa(this,t);break}case j.IN_TABLE_TEXT:{Pa(this,t);break}case j.IN_CAPTION:{m6(this,t);break}case j.IN_COLUMN_GROUP:{g6(this,t);break}case j.IN_TABLE_BODY:{Eh(this,t);break}case j.IN_ROW:{By(this,t);break}case j.IN_CELL:{y6(this,t);break}case j.IN_SELECT:{Hy(this,t);break}case j.IN_SELECT_IN_TABLE:{b6(this,t);break}case j.IN_TEMPLATE:{x6(this,t);break}case j.AFTER_BODY:{zy(this,t);break}case j.IN_FRAMESET:{v6(this,t);break}case j.AFTER_FRAMESET:{C6(this,t);break}case j.AFTER_AFTER_BODY:{Ol(this,t);break}}}onEof(t){switch(this.insertionMode){case j.INITIAL:{Sa(this,t);break}case j.BEFORE_HTML:{va(this,t);break}case j.BEFORE_HEAD:{Aa(this,t);break}case j.IN_HEAD:{Ca(this,t);break}case j.IN_HEAD_NO_SCRIPT:{ka(this,t);break}case j.AFTER_HEAD:{Na(this,t);break}case j.IN_BODY:case j.IN_TABLE:case j.IN_CAPTION:case j.IN_COLUMN_GROUP:case j.IN_TABLE_BODY:case j.IN_ROW:case j.IN_CELL:case j.IN_SELECT:case j.IN_SELECT_IN_TABLE:{Ly(this,t);break}case j.TEXT:{s6(this,t);break}case j.IN_TABLE_TEXT:{Pa(this,t);break}case j.IN_TEMPLATE:{jy(this,t);break}case j.AFTER_BODY:case j.IN_FRAMESET:case j.AFTER_FRAMESET:case j.AFTER_AFTER_BODY:case j.AFTER_AFTER_FRAMESET:{ph(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===I.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 j.IN_HEAD:case j.IN_HEAD_NO_SCRIPT:case j.AFTER_HEAD:case j.TEXT:case j.IN_COLUMN_GROUP:case j.IN_SELECT:case j.IN_SELECT_IN_TABLE:case j.IN_FRAMESET:case j.AFTER_FRAMESET:{this._insertCharacters(t);break}case j.IN_BODY:case j.IN_CAPTION:case j.IN_CELL:case j.IN_TEMPLATE:case j.AFTER_BODY:case j.AFTER_AFTER_BODY:case j.AFTER_AFTER_FRAMESET:{Cy(this,t);break}case j.IN_TABLE:case j.IN_TABLE_BODY:case j.IN_ROW:{mh(this,t);break}case j.IN_TABLE_TEXT:{Dy(this,t);break}}}}function nR(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):Ry(e,t),n}function rR(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 iR(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>=eR;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=sR(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function sR(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 oR(e,t,n){const r=e.treeAdapter.getTagName(t),s=Ks(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 aR(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function fh(e,t){for(let n=0;n<ZP;n++){const r=nR(e,t);if(!r)break;const s=rR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=iR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&oR(e,u,a),aR(e,s,r)}}function hh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function uR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function lR(e,t){e._appendCommentNode(t,e.document)}function ph(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function cR(e,t){e._setDocumentType(t);const n=t.forceQuirks?Kn.QUIRKS:HP(t);UP(t)||e._err(t,re.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=j.BEFORE_HTML}function Sa(e,t){e._err(t,re.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Kn.QUIRKS),e.insertionMode=j.BEFORE_HTML,e._processToken(t)}function dR(e,t){t.tagID===g.HTML?(e._insertElement(t,me.HTML),e.insertionMode=j.BEFORE_HEAD):va(e,t)}function fR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&va(e,t)}function va(e,t){e._insertFakeRootElement(),e.insertionMode=j.BEFORE_HEAD,e._processToken(t)}function hR(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.HEAD:{e._insertElement(t,me.HTML),e.headElement=e.openElements.current,e.insertionMode=j.IN_HEAD;break}default:Aa(e,t)}}function pR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Aa(e,t):e._err(t,re.endTagWithoutMatchingOpenElement)}function Aa(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=j.IN_HEAD,e._processToken(t)}function dr(e,t){switch(t.tagID){case g.HTML:{fn(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,Mt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Mt.RAWTEXT):(e._insertElement(t,me.HTML),e.insertionMode=j.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Mt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Mt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=j.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(j.IN_TEMPLATE);break}case g.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:Ca(e,t)}}function mR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=j.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Ca(e,t);break}case g.TEMPLATE:{ss(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function ss(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,re.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,re.endTagWithoutMatchingOpenElement)}function Ca(e,t){e.openElements.pop(),e.insertionMode=j.AFTER_HEAD,e._processToken(t)}function gR(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{dr(e,t);break}case g.NOSCRIPT:{e._err(t,re.nestedNoscriptInHead);break}default:ka(e,t)}}function ER(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=j.IN_HEAD;break}case g.BR:{ka(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function ka(e,t){const n=t.type===tt.EOF?re.openElementsLeftAfterEof:re.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=j.IN_HEAD,e._processToken(t)}function yR(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.BODY:{e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=j.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,me.HTML),e.insertionMode=j.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,re.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),dr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,re.misplacedStartTagForHeadElement);break}default:Na(e,t)}}function TR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Na(e,t);break}case g.TEMPLATE:{ss(e,t);break}default:e._err(t,re.endTagWithoutMatchingOpenElement)}}function Na(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=j.IN_BODY,Sl(e,t)}function Sl(e,t){switch(t.type){case tt.CHARACTER:{ky(e,t);break}case tt.WHITESPACE_CHARACTER:{Cy(e,t);break}case tt.COMMENT:{hh(e,t);break}case tt.START_TAG:{fn(e,t);break}case tt.END_TAG:{vl(e,t);break}case tt.EOF:{Ly(e,t);break}}}function Cy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ky(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function bR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function wR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function xR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,me.HTML),e.insertionMode=j.IN_FRAMESET)}function _R(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML)}function SR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&lh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,me.HTML)}function vR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function AR(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 CR(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 kR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.tokenizer.state=Mt.PLAINTEXT}function NR(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 OR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(fh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function IR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function PR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(fh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,me.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function RR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function LR(e,t){e.treeAdapter.getDocumentMode(e.document)!==Kn.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=j.IN_TABLE}function Ny(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Oy(e){const t=uy(e,is.TYPE);return t!=null&&t.toLowerCase()===JP}function DR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,me.HTML),Oy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function MR(e,t){e._appendElement(t,me.HTML),t.ackSelfClosing=!0}function FR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,me.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function BR(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Ny(e,t)}function UR(e,t){e._insertElement(t,me.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Mt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=j.TEXT}function HR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Mt.RAWTEXT)}function jR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Mt.RAWTEXT)}function Iy(e,t){e._switchToTextParsing(t,Mt.RAWTEXT)}function zR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===j.IN_TABLE||e.insertionMode===j.IN_CAPTION||e.insertionMode===j.IN_TABLE_BODY||e.insertionMode===j.IN_ROW||e.insertionMode===j.IN_CELL?j.IN_SELECT_IN_TABLE:j.IN_SELECT}function $R(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function VR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,me.HTML)}function qR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,me.HTML)}function YR(e,t){e._reconstructActiveFormattingElements(),xy(t),dh(t),t.selfClosing?e._appendElement(t,me.MATHML):e._insertElement(t,me.MATHML),t.ackSelfClosing=!0}function WR(e,t){e._reconstructActiveFormattingElements(),_y(t),dh(t),t.selfClosing?e._appendElement(t,me.SVG):e._insertElement(t,me.SVG),t.ackSelfClosing=!0}function Py(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,me.HTML)}function fn(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:{IR(e,t);break}case g.A:{OR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{SR(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:{_R(e,t);break}case g.LI:case g.DD:case g.DT:{CR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Ny(e,t);break}case g.HR:{FR(e,t);break}case g.RB:case g.RTC:{VR(e,t);break}case g.RT:case g.RP:{qR(e,t);break}case g.PRE:case g.LISTING:{vR(e,t);break}case g.XMP:{HR(e,t);break}case g.SVG:{WR(e,t);break}case g.HTML:{bR(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:{dr(e,t);break}case g.BODY:{wR(e,t);break}case g.FORM:{AR(e,t);break}case g.NOBR:{PR(e,t);break}case g.MATH:{YR(e,t);break}case g.TABLE:{LR(e,t);break}case g.INPUT:{DR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{MR(e,t);break}case g.IMAGE:{BR(e,t);break}case g.BUTTON:{NR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{RR(e,t);break}case g.IFRAME:{jR(e,t);break}case g.SELECT:{zR(e,t);break}case g.OPTION:case g.OPTGROUP:{$R(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Iy(e,t);break}case g.FRAMESET:{xR(e,t);break}case g.TEXTAREA:{UR(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Iy(e,t):Py(e,t);break}case g.PLAINTEXT:{kR(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:Py(e,t)}}function GR(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=j.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function XR(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=j.AFTER_BODY,zy(e,t))}function KR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function QR(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 JR(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function ZR(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function e6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function t6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function n6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function r6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Ry(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 vl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{fh(e,t);break}case g.P:{JR(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:{KR(e,t);break}case g.LI:{ZR(e);break}case g.DD:case g.DT:{e6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{t6(e);break}case g.BR:{r6(e);break}case g.BODY:{GR(e,t);break}case g.HTML:{XR(e,t);break}case g.FORM:{QR(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{n6(e,t);break}case g.TEMPLATE:{ss(e,t);break}default:Ry(e,t)}}function Ly(e,t){e.tmplInsertionModeStack.length>0?jy(e,t):ph(e,t)}function i6(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 s6(e,t){e._err(t,re.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function mh(e,t){if(e.openElements.currentTagId!==void 0&&Sy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=j.IN_TABLE_TEXT,t.type){case tt.CHARACTER:{My(e,t);break}case tt.WHITESPACE_CHARACTER:{Dy(e,t);break}}else Ia(e,t)}function o6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,me.HTML),e.insertionMode=j.IN_CAPTION}function a6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=j.IN_COLUMN_GROUP}function u6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=j.IN_COLUMN_GROUP,gh(e,t)}function l6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,me.HTML),e.insertionMode=j.IN_TABLE_BODY}function c6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=j.IN_TABLE_BODY,Cl(e,t)}function d6(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function f6(e,t){Oy(t)?e._appendElement(t,me.HTML):Ia(e,t),t.ackSelfClosing=!0}function h6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,me.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Qs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{c6(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{dr(e,t);break}case g.COL:{u6(e,t);break}case g.FORM:{h6(e,t);break}case g.TABLE:{d6(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{l6(e,t);break}case g.INPUT:{f6(e,t);break}case g.CAPTION:{o6(e,t);break}case g.COLGROUP:{a6(e,t);break}default:Ia(e,t)}}function Oa(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{ss(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:Ia(e,t)}}function Ia(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Sl(e,t),e.fosterParentingEnabled=n}function Dy(e,t){e.pendingCharacterTokens.push(t)}function My(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Pa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ia(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Fy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function p6(e,t){const n=t.tagID;Fy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=j.IN_TABLE,Qs(e,t)):fn(e,t)}function m6(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=j.IN_TABLE,n===g.TABLE&&Oa(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:vl(e,t)}}function gh(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.COL:{e._appendElement(t,me.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{dr(e,t);break}default:Al(e,t)}}function g6(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=j.IN_TABLE);break}case g.TEMPLATE:{ss(e,t);break}case g.COL:break;default:Al(e,t)}}function Al(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=j.IN_TABLE,e._processToken(t))}function Cl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,me.HTML),e.insertionMode=j.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=j.IN_ROW,kl(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=j.IN_TABLE,Qs(e,t));break}default:Qs(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=j.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=j.IN_TABLE,Oa(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:Oa(e,t)}}function kl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,me.HTML),e.insertionMode=j.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=j.IN_TABLE_BODY,Cl(e,t));break}default:Qs(e,t)}}function By(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=j.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=j.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=j.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:Oa(e,t)}}function E6(e,t){const n=t.tagID;Fy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),kl(e,t)):fn(e,t)}function y6(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=j.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),By(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:vl(e,t)}}function Uy(e,t){switch(t.tagID){case g.HTML:{fn(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:{dr(e,t);break}}}function Hy(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:{ss(e,t);break}}}function T6(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)):Uy(e,t)}function b6(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)):Hy(e,t)}function w6(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:{dr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=j.IN_TABLE,e.insertionMode=j.IN_TABLE,Qs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=j.IN_COLUMN_GROUP,e.insertionMode=j.IN_COLUMN_GROUP,gh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=j.IN_TABLE_BODY,e.insertionMode=j.IN_TABLE_BODY,Cl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=j.IN_ROW,e.insertionMode=j.IN_ROW,kl(e,t);break}default:e.tmplInsertionModeStack[0]=j.IN_BODY,e.insertionMode=j.IN_BODY,fn(e,t)}}function x6(e,t){t.tagID===g.TEMPLATE&&ss(e,t)}function jy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ph(e,t)}function _6(e,t){t.tagID===g.HTML?fn(e,t):Nl(e,t)}function zy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=j.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 Nl(e,t)}function Nl(e,t){e.insertionMode=j.IN_BODY,Sl(e,t)}function S6(e,t){switch(t.tagID){case g.HTML:{fn(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:{dr(e,t);break}}}function v6(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=j.AFTER_FRAMESET))}function A6(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.NOFRAMES:{dr(e,t);break}}}function C6(e,t){t.tagID===g.HTML&&(e.insertionMode=j.AFTER_AFTER_FRAMESET)}function k6(e,t){t.tagID===g.HTML?fn(e,t):Ol(e,t)}function Ol(e,t){e.insertionMode=j.IN_BODY,Sl(e,t)}function N6(e,t){switch(t.tagID){case g.HTML:{fn(e,t);break}case g.NOFRAMES:{dr(e,t);break}}}function O6(e,t){t.chars=Ct,e._insertCharacters(t)}function I6(e,t){e._insertCharacters(t),e.framesetOk=!1}function $y(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 P6(e,t){if(WP(t))$y(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===me.MATHML?xy(t):r===me.SVG&&(GP(t),_y(t)),dh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function R6(e,t){if(t.tagID===g.P||t.tagID===g.BR){$y(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 L6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,D6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Vy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function qy(e,t){const n=q6(e),r=ry("type",{handlers:{root:M6,element:F6,text:B6,comment:Wy,doctype:U6,raw:j6},unknown:z6}),s={parser:n?new Ay(Vy):Ay.getFragmentParser(void 0,Vy),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),Js(s,vr());const a=n?s.parser.document:s.parser.getFragment(),u=YI(a,{file:s.options.file});return s.stitches&&Tl(u,"comment",function(l,d,f){const m=l;if(m.value.stitch&&f&&d!==void 0){const p=f.children;return p[d]=m.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Yy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function M6(e,t){Yy(e.children,t)}function F6(e,t){$6(e,t),Yy(e.children,t),V6(e,t)}function B6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:tt.CHARACTER,chars:e.value,location:Ra(e)};Js(t,vr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function U6(e,t){const n={type:tt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ra(e)};Js(t,vr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function H6(e,t){t.stitches=!0;const n=Y6(e);if("children"in e&&"children"in n){const r=qy({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:tt.COMMENT,data:n,location:Ra(e)};Js(t,vr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function j6(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,Gy(t,vr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(L6,"&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 z6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))H6(n,t);else{let r="";throw D6.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 Js(e,t){Gy(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=Mt.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 Gy(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 $6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Mt.PLAINTEXT)return;Js(t,vr(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:rs.html;s===rs.html&&n==="svg"&&(s=rs.svg);const a=QI(oe(H({},e),{children:[]}),{space:s===rs.svg?"svg":"html"}),u={type:tt.START_TAG,tagName:n,tagID:Ks(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ra(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function V6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&sP.includes(n)||t.parser.tokenizer.state===Mt.PLAINTEXT)return;Js(t,ul(e));const r={type:tt.END_TAG,tagName:n,tagID:Ks(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ra(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Mt.RCDATA||t.parser.tokenizer.state===Mt.RAWTEXT||t.parser.tokenizer.state===Mt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Mt.DATA)}function q6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ra(e){const t=vr(e)||{line:void 0,column:void 0,offset:void 0},n=ul(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 Y6(e){return"children"in e?ns(oe(H({},e),{children:[]})):ns(e)}function Xy(e){return function(t,n){return qy(t,oe(H({},e),{file:n}))}}const os=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ky={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...os,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...os],h2:[["className","sr-only"]],img:[...os,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...os,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...os],table:[...os],ul:[...os,["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"]},Ei={}.hasOwnProperty;function W6(e,t){let n={type:"root",children:[]};const r={schema:t?H(H({},Ky),t):Ky,stack:[]},s=Qy(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function Qy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return G6(e,n);case"doctype":return X6(e,n);case"element":return K6(e,n);case"root":return Q6(e,n);case"text":return J6(e,n)}}}function G6(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 La(a,t),a}}function X6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return La(n,t),n}}function K6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Jy(e,t.children),s=Z6(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&&Ei.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 La(u,t),u}function Q6(e,t){const r={type:"root",children:Jy(e,t.children)};return La(r,t),r}function J6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return La(r,t),r}function Jy(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=Qy(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function Z6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&Ei.call(r,n)?r[n]:void 0,u=r&&Ei.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Ei.call(l,f)){const m=l[f];let p=Zy(e,tT(a,f),f,m);p==null&&(p=Zy(e,tT(u,f),f,m)),p!=null&&(d[f]=p)}if(s&&Ei.call(s,n)){const m=s[n];for(f in m)Ei.call(m,f)&&!Ei.call(d,f)&&(d[f]=m[f])}return d}function Zy(e,t,n,r){return t?Array.isArray(r)?e4(e,t,n,r):eT(e,t,n,r):void 0}function e4(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=eT(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function eT(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&t4(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 t4(e,t,n){const r=e.schema.protocols&&Ei.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 m=r[f];if(a===m.length&&s.slice(0,m.length)===m)return!0}return!1}function La(e,t){const n=Y1(t);t.data&&(e.data=ns(t.data)),n&&(e.position=n)}function tT(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 n4(e){return function(t){return W6(t,e)}}const nT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return w.jsx("a",oe(H(H({className:F(e,`${N}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},r4=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ct();return!e&&!t?null:w.jsx("div",{className:F(n,`${N}-disclaimer`),children:t?w.jsx(GE,{rehypePlugins:[Xy,n4],components:{ul:({children:r})=>w.jsx("ul",{className:F(n,`${N}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:F(n,`${N}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:F(n,`${N}-li`),children:r}),a:({href:r,title:s,children:a})=>w.jsx(nT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>w.jsx("img",{className:F(n,`${N}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>w.jsx("p",{className:F(n,`${N}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:F(n,`${N}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:F(n,`${N}-disclaimer-text`),children:e})})},yh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:s,sessionExpired:a,canInitialize:u,messages:l}=bn(),{globalClassName:d,searchConfig:f,enableEscalationToAgent:m}=ct(),p=R.useRef(null),b=R.useRef(l);b.current=l;const y=t||!Yg(s,a,u),x=R.useRef(t);R.useEffect(()=>{var k;const _=x.current&&!t;x.current=t,_&&!y&&((k=p.current)==null||k.focus({preventScroll:!0}))},[t,y]);const S=_=>Fe(null,null,function*(){var O,z;_.preventDefault();const k=(((O=p.current)==null?void 0:O.value)||"").trim();if(k){const W=!s&&!a&&u===!0,D=b.current.length;p.current.value="";const V=yield r(k);W&&V.outcome!=="success"&&b.current.length===D&&((z=p.current)==null?void 0:z.value)===""&&(p.current.value=k,p.current.disabled||p.current.focus({preventScroll:!0}))}}),A=()=>{r("Can you connect me to a human?")};return w.jsxs("div",{className:F(d,e,`cim-${n}-component`,`${N}-search-bar-wrapper`),children:[w.jsxs("form",{className:F(d,e,`cim-${n}-component`,`${N}-search-bar`),name:`${N}-search-form`,onSubmit:S,children:[w.jsx("input",{className:F(d,e,`cim-${n}-component`,`${N}-search-input`),type:"text",ref:p,placeholder:(f==null?void 0:f.placeholder)||"Ask us anything",name:`${N}-user-input`,disabled:y}),w.jsx(Dk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:y}),m&&w.jsx(lr,{className:F(d,`${N}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:y,onClick:A,icon:w.jsx(vk,{})})]}),w.jsx(r4,{})]})};function i4(e){return pt({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 s4(e){return pt({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 rT=R.createContext({isOpen:!1}),Th=R.createContext(null),iT=R.createContext(null),Zs=()=>{var n,r;const e=R.useContext(Th),t=R.useContext(iT);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},sT=({onClearChat:e,componentType:t})=>{const n=Zs(),r=()=>{e(),n()};return w.jsxs("button",{className:F(`${N}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(s4,{}),"Clear chat"]})},oT=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=ct(),r=Zs(),[s,a]=R.useState(!1),u=()=>Fe(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 w.jsxs("button",{className:F(`${N}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[w.jsx(i4,{}),"Download transcript"]})};function o4(e){return e==null?[]:Array.isArray(e)?e:[e]}var a4=(e,...t)=>e.concat(t),u4=(e,...t)=>e.filter(n=>!t.includes(n)),l4=e=>Array.from(new Set(e));function aT(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 c4(e,t,n={}){const{step:r=1,loop:s=!0}=n;return aT(e,t,{step:-r,loop:s})}var d4=e=>Array.isArray(e),uT=e=>e!=null&&typeof e=="object",f4=e=>uT(e)&&!d4(e),Il=e=>typeof e=="string",eo=e=>typeof e=="function",h4=e=>e==null,p4=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m4=e=>Object.prototype.toString.call(e),lT=Function.prototype.toString,g4=lT.call(Object),E4=e=>{if(!uT(e)||m4(e)!="[object Object]"||b4(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=p4(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&lT.call(n)==g4},y4=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,T4=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,b4=e=>y4(e)||T4(e),w4=e=>e(),x4=()=>{},bh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function _4(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:S4,max:v4}=Math,A4=e=>Number.isNaN(e),C4=e=>A4(e)?0:e,cT=(e,t,n)=>S4(v4(C4(e),t),n);function wh(e){if(!E4(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]=wh(s))}return n}function xh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function k4(e,t){if(e==null)throw new Error(t())}function N4(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 O4=Object.defineProperty,I4=(e,t,n)=>t in e?O4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_h=(e,t,n)=>I4(e,typeof t!="symbol"?t+"":t,n),dT=()=>{},Pl=e=>typeof e=="object"&&e!==null,to=e=>e?"":void 0,fT=e=>e?"true":void 0,P4=1,R4=9,L4=11,Jt=e=>Pl(e)&&e.nodeType===P4&&typeof e.nodeName=="string",Rl=e=>Pl(e)&&e.nodeType===R4,D4=e=>Pl(e)&&e===e.window,hT=e=>Jt(e)?e.localName||"":"#document";function M4(e){return["html","body","#document"].includes(hT(e))}var F4=e=>Pl(e)&&e.nodeType!==void 0,as=e=>F4(e)&&e.nodeType===L4&&"host"in e,B4=e=>Jt(e)&&e.localName==="input",U4=e=>Jt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Da(e){if(!e)return!1;const t=e.getRootNode();return io(t)===e}var H4=/(textarea|select)/;function j4(e){if(e==null||!Jt(e))return!1;try{return B4(e)&&e.selectionStart!=null||H4.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function no(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&&as(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function kr(e){var t;return Rl(e)?e:D4(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function z4(e){return kr(e).documentElement}function ro(e){var t,n,r;return as(e)?ro(e.host):Rl(e)?(t=e.defaultView)!=null?t:window:Jt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function io(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 $4(e){if(hT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||as(e)&&e.host||z4(e);return as(t)?t.host:t}function Sh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Rl(t)||as(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var vh=new WeakMap;function so(e){return vh.has(e)||vh.set(e,ro(e).getComputedStyle(e)),vh.get(e)}var Ah=new Set(["menu","listbox","dialog","grid","tree","region"]),V4=e=>Ah.has(e),pT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function mT(e,t){const n=new Set,r=Sh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=pT(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const m=r.getElementById(f);if(m){const p=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";if(p&&V4(p)&&!b&&(m===t||m.contains(t)||s(m)))return!0}}}return!1};return s(e)}function gT(e,t){const n=Sh(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=pT(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const m=n.getElementById(f);if(m){const p=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";p&&Ah.has(p)&&!b&&(t(m),s(m))}}}};s(e)}function q4(e){const t=new Set;return gT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function Y4(e){const t=e.getAttribute("role");return!!(t&&Ah.has(t))}function W4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function G4(e){var t;return W4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function X4(e){if(!e.id)return!1;const t=Sh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&Y4(e))}var Ch=()=>typeof document!="undefined";function K4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var kh=e=>Ch()&&e.test(K4()),Q4=e=>Ch()&&e.test(navigator.vendor),ET=()=>Ch()&&!!navigator.maxTouchPoints,J4=()=>kh(/^iPhone/i),Z4=()=>kh(/^iPad/i)||Nh()&&navigator.maxTouchPoints>1,Ll=()=>J4()||Z4(),eL=()=>Nh()||Ll(),Nh=()=>kh(/^Mac/i),tL=()=>eL()&&Q4(/apple/i);function nL(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 fr(e){var n;const t=nL(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var yT=e=>e.button===0,rL=e=>e.button===2||Nh()&&e.ctrlKey&&e.button===0,iL=e=>"touches"in e&&e.touches.length>0,sL={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},TT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function oL(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=sL[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in TT&&(s=TT[s]),s}function bT(e,t="client"){const n=iL(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)}},wT=e=>Jt(e)&&e.tagName==="IFRAME",aL=/^(audio|video|details)$/;function xT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var uL=e=>!Number.isNaN(xT(e)),lL=e=>xT(e)<0;function cL(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 _T(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=cL(d,t);if(f){const m=Array.from(f.querySelectorAll(Dl)).filter(n),p=u.get(d);if(p!==void 0){const b=p+1;r.splice(b,0,...m),m.forEach((y,x)=>{u.set(y,b+x)});for(let y=b+m.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...m),m.forEach((y,x)=>{u.set(y,b+x)})}s.push(...m)}}return r}var Dl="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",ST=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Dl));(n==!0||n=="if-empty"&&s.length===0)&&Jt(e)&&Nr(e)&&s.unshift(e);const u=[];for(const l of s)if(Nr(l)){if(wT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...ST(d,{getShadowRoot:r}));continue}u.push(l)}return r?_T(u,r,Nr):u};function Nr(e){return!Jt(e)||e.closest("[inert]")?!1:e.matches(Dl)&&U4(e)}function oo(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll(Dl));n&&us(e)&&s.unshift(e);const a=[];for(const u of s)if(us(u)){if(wT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...oo(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=_T(a,r,us);return!u.length&&n?s:u}return!a.length&&n?s:a}function us(e){return Jt(e)&&e.tabIndex>0?!0:Nr(e)&&!lL(e)}function dL(e,t={}){const n=oo(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function fL(e,t={}){const{current:n,getShadowRoot:r}=t,s=oo(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:io(a);if(!u)return null;const l=s.indexOf(u);return s[l+1]||null}function Ma(e){return e.tabIndex<0&&(aL.test(e.localName)||j4(e))&&!uL(e)?0:e.tabIndex}function vT(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=oo(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var hL=class B2{constructor(){_h(this,"id",null),_h(this,"fn_cleanup"),_h(this,"cleanup",()=>{this.cancel()})}static create(){return new B2}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 qt(e){const t=hL.create();return t.request(e),t.cleanup}function AT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function Oh(e){const t=$4(e);return M4(t)?kr(t).body:Jt(t)&&gL(t)?t:Oh(t)}var pL=/auto|scroll|overlay|hidden|clip/,mL=new Set(["inline","contents"]);function gL(e){const t=ro(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return pL.test(n+s+r)&&!mL.has(a)}var ao="default",Ih="",Ml=new WeakMap;function EL(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return Ll()?(ao==="default"&&(Ih=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),ao="disabled"):t&&(Ml.set(t,t.style.userSelect),t.style.userSelect="none"),()=>yL({target:t,doc:r})}function yL(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(Ll()){if(ao!=="disabled")return;ao="restoring",setTimeout(()=>{AT(()=>{ao==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Ih||""),Ih="",ao="default")})},300)}else if(t&&Ml.has(t)){const a=Ml.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Ml.delete(t)}}function TL(e={}){const u=e,{defer:t,target:n}=u,r=vn(u,["defer","target"]),s=t?qt:l=>l(),a=[];return a.push(s(()=>{const l=typeof n=="function"?n():n;a.push(EL(oe(H({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function bL(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=l=>{const d=bT(l),f=Math.sqrt(bd(d.x,2)+bd(d.y,2)),m=l.pointerType==="touch"?10:5;if(!(f<m)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=bT(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),TL({doc:e})];return()=>{u.forEach(l=>l())}}function wL(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 m=null;const[p,b]=dL(e,{includeContainer:!0,getShadowRoot:a}),y=fL(l,{current:n,getShadowRoot:a}),x=!p&&!b;f.shiftKey&&Da(y)?(s==null||s(),m=b):f.shiftKey&&(Da(p)||x)?m=n:!f.shiftKey&&Da(n)?(s==null||s(),m=p):!f.shiftKey&&(Da(b)||x)&&(m=y),m&&(f.preventDefault(),typeof r=="function"?r(m):m.focus())}return Zt(u,"keydown",d,!0)}function xL(e,t){const l=t,{defer:n,triggerElement:r}=l,s=vn(l,["defer","triggerElement"]),a=n?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(wL(d,H({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function _L(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Fl(e,t){if(!e)return dT;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 SL(e,t,n){if(!e)return dT;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 vL(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 AL(e,t){const{timeout:n,rootNode:r}=t,s=ro(r),a=kr(r),u=new s.AbortController;return vL(new Promise(l=>{const d=e();if(d){l(d);return}const f=new s.MutationObserver(()=>{const m=e();m&&m.isConnected&&(f.disconnect(),l(m))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var CL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),kL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,CT=e=>{const t={};let n;for(;n=kL.exec(e);)t[n[1]]=n[2];return t},NL=(e,t)=>{if(Il(e)){if(Il(t))return`${e};${t}`;e=CT(e)}else Il(t)&&(t=CT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Yt(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=bh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=CL(t[s],n[s]);continue}if(s==="style"){t[s]=NL(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 XU(e){return e}var uo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(uo||{}),Ph="__init__";function OL(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>kr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>io(t()),a=u=>t().getElementById(u);return oe(H({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:Da,getById:a})}function IL(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var lo=()=>e=>Array.from(new Set(e)),kT=typeof globalThis.document!="undefined"?R.useLayoutEffect:R.useEffect;function Bl(e){var p,b;const t=(p=e().value)!=null?p:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=R.useState(t),[s,a]=R.useState(r),u=e().value!==void 0,l=R.useRef(s);l.current=u?e().value:s;const d=R.useRef(l.current);kT(()=>{d.current=l.current},[s,e().value]);const f=y=>{var A,_;const x=d.current,S=eo(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:x}),u||a(S),n(S,x)||(_=(A=e()).onChange)==null||_.call(A,S,x)};function m(){return u?e().value:s}return{initial:r,ref:l,get:m,set(y){(e().sync?$s.flushSync:w4)(()=>f(y))},invoke(y,x){var S,A;(A=(S=e()).onChange)==null||A.call(S,y,x)},hash(y){var x,S,A;return(A=(S=(x=e()).hash)==null?void 0:S.call(x,y))!=null?A:String(y)}}}Bl.cleanup=e=>{R.useEffect(()=>e,[])},Bl.ref=e=>{const t=R.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function PL(e){const t=R.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var RL=(e,t)=>{const n=R.useRef(!1),r=R.useRef(!1);R.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),R.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Ul(e,t={}){var ie,se,ue,fe,ne,Se;const n=R.useMemo(()=>{const{id:de,ids:Q,getRootNode:le}=t;return OL({id:de,ids:Q,getRootNode:le})},[t]),r=(...de)=>{e.debug&&console.log(...de)},s=(se=(ie=e.props)==null?void 0:ie.call(e,{props:wh(t),scope:n}))!=null?se:t,a=LL(s),u=(ue=e.context)==null?void 0:ue.call(e,{prop:a,bindable:Bl,scope:n,flush:OT,getContext(){return d},getComputed(){return W},getRefs(){return S},getEvent(){return y()}}),l=NT(u),d={get(de){var Q;return(Q=l.current)==null?void 0:Q[de].ref.current},set(de,Q){var le;(le=l.current)==null||le[de].set(Q)},initial(de){var Q;return(Q=l.current)==null?void 0:Q[de].initial},hash(de){var le,C;const Q=(le=l.current)==null?void 0:le[de].get();return(C=l.current)==null?void 0:C[de].hash(Q)}},f=R.useRef(new Map),m=R.useRef(null),p=R.useRef(null),b=R.useRef({type:""}),y=()=>oe(H({},b.current),{current(){return b.current},previous(){return p.current}}),x=()=>oe(H({},D),{matches(...de){return de.includes(D.ref.current)},hasTag(de){var Q,le;return!!((le=(Q=e.states[D.ref.current])==null?void 0:Q.tags)!=null&&le.includes(de))}}),S=PL((ne=(fe=e.refs)==null?void 0:fe.call(e,{prop:a,context:d}))!=null?ne:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:U,action:_,guard:k,track:RL,refs:S,computed:W,flush:OT,scope:n,choose:z}),_=de=>{const Q=eo(de)?de(A()):de;if(!Q)return;const le=Q.map(C=>{var Z,P;const M=(P=(Z=e.implementations)==null?void 0:Z.actions)==null?void 0:P[C];return M||xh(`[zag-js] No implementation found for action "${JSON.stringify(C)}"`),M});for(const C of le)C==null||C(A())},k=de=>{var Q,le;return eo(de)?de(A()):(le=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:le[de](A())},O=de=>{const Q=eo(de)?de(A()):de;if(!Q)return;const le=Q.map(M=>{var P,ve;const Z=(ve=(P=e.implementations)==null?void 0:P.effects)==null?void 0:ve[M];return Z||xh(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),Z}),C=[];for(const M of le){const Z=M==null?void 0:M(A());Z&&C.push(Z)}return()=>C.forEach(M=>M==null?void 0:M())},z=de=>o4(de).find(Q=>{let le=!Q.guard;return Il(Q.guard)?le=!!k(Q.guard):eo(Q.guard)&&(le=Q.guard(A())),le}),W=de=>{k4(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[de];return Q({context:d,event:y(),prop:a,refs:S,scope:n,computed:W})},D=Bl(()=>({defaultValue:e.initialState({prop:a}),onChange(de,Q){var C,M,Z,P;if(Q){const ve=f.current.get(Q);ve==null||ve(),f.current.delete(Q)}Q&&_((C=e.states[Q])==null?void 0:C.exit),_((M=m.current)==null?void 0:M.actions);const le=O((Z=e.states[de])==null?void 0:Z.effects);if(le&&f.current.set(de,le),Q===Ph){_(e.entry);const ve=O(e.effects);ve&&f.current.set(Ph,ve)}_((P=e.states[de])==null?void 0:P.entry)}})),V=R.useRef(void 0),J=R.useRef(uo.NotStarted);kT(()=>{queueMicrotask(()=>{var M;const le=J.current===uo.Started;J.current=uo.Started,r(le?"rehydrating...":"initializing...");const C=(M=V.current)!=null?M:D.initial;D.invoke(C,le?D.get():Ph)});const de=f.current,Q=D.ref.current;return()=>{r("unmounting..."),V.current=Q,J.current=uo.Stopped,de.forEach(le=>le==null?void 0:le()),f.current=new Map,m.current=null,queueMicrotask(()=>{_(e.exit)})}},[]);const ce=()=>"ref"in D?D.ref.current:D.get(),U=de=>{queueMicrotask(()=>{var P,ve,Pe,he,Ce;if(J.current!==uo.Started)return;p.current=b.current,b.current=de;let Q=ce();const le=(Pe=(P=e.states[Q].on)==null?void 0:P[de.type])!=null?Pe:(ve=e.on)==null?void 0:ve[de.type],C=z(le);if(!C)return;m.current=C;const M=(he=C.target)!=null?he:Q;r("transition",de.type,C.target||Q,`(${C.actions})`);const Z=M!==Q;Z?$s.flushSync(()=>D.set(M)):C.reenter&&!Z?D.invoke(Q,Q):_((Ce=C.actions)!=null?Ce:[])})};return(Se=e.watch)==null||Se.call(e,A()),{state:x(),send:U,context:d,prop:a,scope:n,refs:S,computed:W,event:y(),getStatus:()=>J.current}}function NT(e){const t=R.useRef(e);return t.current=e,t}function LL(e){const t=NT(e);return function(r){return t.current[r]}}function OT(e){queueMicrotask(()=>{$s.flushSync(()=>e())})}var Rh=IL(e=>e);function Hl(...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 DL(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Lh=e=>{const t=R.memo(R.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=vn(f,["asChild","children"]);if(!s)return R.createElement(e,oe(H({},u),{ref:r}),a);if(!R.isValidElement(a))return null;const l=R.Children.only(a),d=DL(l);return R.cloneElement(l,oe(H({},Yt(u,l.props)),{ref:r?Hl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},hn=(()=>{const e=new Map;return new Proxy(Lh,{apply(t,n,r){return Lh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Lh(r)),e.get(r)}})})();function ML(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ls(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,l=R.createContext(u);l.displayName=t;function d(){var m;const f=R.useContext(l);if(!f&&n){const p=new Error(a!=null?a:ML(r,s));throw p.name="ContextError",(m=Error.captureStackTrace)==null||m.call(Error,p,d),p}return f}return[l.Provider,d,l]}const[FL,Dh]=ls({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[IT,Fa]=ls({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),PT=R.forwardRef((e,t)=>{const n=Dh(),r=Fa(),s=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(hn.div,oe(H({},s),{ref:Hl(r.ref,t)}))});PT.displayName="PopoverContent";const RT=R.forwardRef((e,t)=>{const n=Dh(),r=Fa(),s=Yt(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(hn.div,oe(H({},s),{ref:t}))});RT.displayName="PopoverPositioner";const Ba=()=>(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]},[{},H({},e)]),LT=e=>Ba()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function BL(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 UL={props({props:e}){return oe(H({},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",so(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"});qt(()=>{var l,d;const u=jl(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})=>{qt(()=>{e.set("prevAnimationName",jl(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 m,p,b;((b=(p=(m=d.composedPath)==null?void 0:m.call(d))==null?void 0:p[0])!=null?b:d.target)===s&&e.set("prevAnimationName",jl(t.get("styles")))},u=d=>{const f=jl(t.get("styles"));fr(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=Fl(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),AT(()=>l())}}}}};function jl(e){return(e==null?void 0:e.animationName)||"none"}lo()(["onExitComplete","present","immediate"]);function HL(e,t={}){const{sync:n=!1}=t,r=jL(e);return R.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 jL(e){const t=R.useRef(e);return t.current=e,t}const Mh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=vn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=R.useRef(!1),l=oe(H({},a),{present:r,onExitComplete:HL(e.onExitComplete)}),d=Ul(UL,l),f=BL(d);f.present&&(u.current=!0);const m=!f.present&&!u.current&&t||n&&!f.present&&u.current,p=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:p,present:f.present,unmounted:m}};var cs=(e,t=[])=>({parts:(...n)=>{if(zL(t))return cs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>cs(e,[...t,...n]),omit:(...n)=>cs(e,t.filter(r=>!n.includes(r))),rename:n=>cs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${co(e)}"][data-part="${co(r)}"]`,`& [data-scope="${co(e)}"][data-part="${co(r)}"]`].join(", "),attrs:{"data-scope":co(e),"data-part":co(r)}}}),{})}),co=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),zL=e=>e.length===0;const $L=["top","right","bottom","left"],yi=Math.min,Yr=Math.max,zl=Math.round,$l=Math.floor,Or=e=>({x:e,y:e}),VL={left:"right",right:"left",bottom:"top",top:"bottom"};function DT(e,t,n){return Yr(e,yi(t,n))}function Wr(e,t){return typeof e=="function"?e(t):e}function Ti(e){return e.split("-")[0]}function fo(e){return e.split("-")[1]}function Fh(e){return e==="x"?"y":"x"}function Bh(e){return e==="y"?"height":"width"}function Ir(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Uh(e){return Fh(Ir(e))}function qL(e,t,n){n===void 0&&(n=!1);const r=fo(e),s=Uh(e),a=Bh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Vl(u)),[u,Vl(u)]}function YL(e){const t=Vl(e);return[Hh(e),t,Hh(t)]}function Hh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const MT=["left","right"],FT=["right","left"],WL=["top","bottom"],GL=["bottom","top"];function XL(e,t,n){switch(e){case"top":case"bottom":return n?t?FT:MT:t?MT:FT;case"left":case"right":return t?WL:GL;default:return[]}}function KL(e,t,n,r){const s=fo(e);let a=XL(Ti(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Hh)))),a}function Vl(e){const t=Ti(e);return VL[t]+e.slice(t.length)}function QL(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 BT(e){return typeof e!="number"?QL(e):{top:e,right:e,bottom:e,left:e}}function ql(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 UT(e,t,n){let{reference:r,floating:s}=e;const a=Ir(t),u=Uh(t),l=Bh(u),d=Ti(t),f=a==="y",m=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,b=r[l]/2-s[l]/2;let y;switch(d){case"top":y={x:m,y:r.y-s.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-s.width,y:p};break;default:y={x:r.x,y:r.y}}const x=fo(t);return x&&(y[u]+=b*(x==="end"?1:-1)*(n&&f?-1:1)),y}function JL(e,t){return Fe(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:m="viewport",elementContext:p="floating",altBoundary:b=!1,padding:y=0}=Wr(t,e),x=BT(y),A=l[b?p==="floating"?"reference":"floating":p],_=ql(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:m,strategy:d})),k=p==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,O=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),z=(yield a.isElement==null?void 0:a.isElement(O))&&(yield a.getScale==null?void 0:a.getScale(O))||{x:1,y:1},W=ql(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:O,strategy:d}):k);return{top:(_.top-W.top+x.top)/z.y,bottom:(W.bottom-_.bottom+x.bottom)/z.y,left:(_.left-W.left+x.left)/z.x,right:(W.right-_.right+x.right)/z.x}})}const ZL=50,e5=(e,t,n)=>Fe(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:oe(H({},u),{detectOverflow:JL}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:p}=UT(f,r,d),b=r,y=0;const x={};for(let S=0;S<a.length;S++){const A=a[S];if(!A)continue;const{name:_,fn:k}=A,{x:O,y:z,data:W,reset:D}=yield k({x:m,y:p,initialPlacement:r,placement:b,strategy:s,middlewareData:x,rects:f,platform:l,elements:{reference:e,floating:t}});m=O!=null?O:m,p=z!=null?z:p,x[_]=H(H({},x[_]),W),D&&y<ZL&&(y++,typeof D=="object"&&(D.placement&&(b=D.placement),D.rects&&(f=D.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:m,y:p}=UT(f,b,d)),S=-1)}return{x:m,y:p,placement:b,strategy:s,middlewareData:x}}),t5=e=>({name:"arrow",options:e,fn(n){return Fe(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:m,padding:p=0}=Wr(e,n)||{};if(m==null)return{};const b=BT(p),y={x:r,y:s},x=Uh(a),S=Bh(x),A=yield l.getDimensions(m),_=x==="y",k=_?"top":"left",O=_?"bottom":"right",z=_?"clientHeight":"clientWidth",W=u.reference[S]+u.reference[x]-y[x]-u.floating[S],D=y[x]-u.reference[x],V=yield l.getOffsetParent==null?void 0:l.getOffsetParent(m);let J=V?V[z]:0;(!J||!(yield l.isElement==null?void 0:l.isElement(V)))&&(J=d.floating[z]||u.floating[S]);const ce=W/2-D/2,U=J/2-A[S]/2-1,ie=yi(b[k],U),se=yi(b[O],U),ue=J-A[S]-se,fe=J/2-A[S]/2+ce,ne=DT(ie,fe,ue),Se=!f.arrow&&fo(a)!=null&&fe!==ne&&u.reference[S]/2-(fe<ie?ie:se)-A[S]/2<0,de=Se?fe<ie?fe-ie:fe-ue:0;return{[x]:y[x]+de,data:H({[x]:ne,centerOffset:fe-ne-de},Se&&{alignmentOffset:de}),reset:Se}})}}),n5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Fe(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:m}=n,ne=Wr(e,n),{mainAxis:p=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:A=!0}=ne,_=vn(ne,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=Ti(a),O=Ir(d),z=Ti(d)===d,W=yield f.isRTL==null?void 0:f.isRTL(m.floating),D=y||(z||!A?[Vl(d)]:YL(d)),V=S!=="none";!y&&V&&D.push(...KL(d,A,S,W));const J=[d,...D],ce=yield f.detectOverflow(n,_),U=[];let ie=((s=u.flip)==null?void 0:s.overflows)||[];if(p&&U.push(ce[k]),b){const Se=qL(a,l,W);U.push(ce[Se[0]],ce[Se[1]])}if(ie=[...ie,{placement:a,overflows:U}],!U.every(Se=>Se<=0)){var se,ue;const Se=(((se=u.flip)==null?void 0:se.index)||0)+1,de=J[Se];if(de&&(!(b==="alignment"?O!==Ir(de):!1)||ie.every(C=>Ir(C.placement)===O?C.overflows[0]>0:!0)))return{data:{index:Se,overflows:ie},reset:{placement:de}};let Q=(ue=ie.filter(le=>le.overflows[0]<=0).sort((le,C)=>le.overflows[1]-C.overflows[1])[0])==null?void 0:ue.placement;if(!Q)switch(x){case"bestFit":{var fe;const le=(fe=ie.filter(C=>{if(V){const M=Ir(C.placement);return M===O||M==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(M=>M>0).reduce((M,Z)=>M+Z,0)]).sort((C,M)=>C[1]-M[1])[0])==null?void 0:fe[0];le&&(Q=le);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function HT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jT(e){return $L.some(t=>e[t]>=0)}const r5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Fe(this,null,function*(){const{rects:r,platform:s}=n,l=Wr(e,n),{strategy:a="referenceHidden"}=l,u=vn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,oe(H({},u),{elementContext:"reference"})),f=HT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:jT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,oe(H({},u),{altBoundary:!0})),f=HT(d,r.floating);return{data:{escapedOffsets:f,escaped:jT(f)}}}default:return{}}})}}},zT=new Set(["left","top"]);function i5(e,t){return Fe(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=Ti(n),l=fo(n),d=Ir(n)==="y",f=zT.has(u)?-1:1,m=a&&d?-1:1,p=Wr(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof x=="number"&&(y=l==="end"?x*-1:x),d?{x:y*m,y:b*f}:{x:b*f,y:y*m}})}const s5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Fe(this,null,function*(){var r,s;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield i5(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:oe(H({},f),{placement:l})}})}}},o5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Fe(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,O=Wr(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:z=>{let{x:W,y:D}=z;return{x:W,y:D}}}}=O,m=vn(O,["mainAxis","crossAxis","limiter"]),p={x:r,y:s},b=yield u.detectOverflow(n,m),y=Ir(a),x=Fh(y);let S=p[x],A=p[y];const _=(z,W)=>DT(W+b[z==="y"?"top":"left"],W,W-b[z==="y"?"bottom":"right"]);l&&(S=_(x,S)),d&&(A=_(y,A));const k=f.fn(oe(H({},n),{[x]:S,[y]:A}));return oe(H({},k),{data:{x:k.x-r,y:k.y-s,enabled:{[x]:l,[y]:d}}})})}}},a5=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:m=!0,crossAxis:p=!0}=Wr(e,t),b={x:s,y:a},y=Ir(u),x=Fh(y);let S=b[x],A=b[y];const _=Wr(f,t),k=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(r=_.crossAxis)!=null?r:0};if(m){const W=x==="y"?"height":"width",D=l.reference[x]-l.floating[W]+k.mainAxis,V=l.reference[x]+l.reference[W]-k.mainAxis;S<D?S=D:S>V&&(S=V)}if(p){var O,z;const W=x==="y"?"width":"height",D=zT.has(Ti(u)),V=l.reference[y]-l.floating[W]+(D&&((O=d.offset)==null?void 0:O[y])||0)+(D?0:k.crossAxis),J=l.reference[y]+l.reference[W]+(D?0:((z=d.offset)==null?void 0:z[y])||0)-(D?k.crossAxis:0);A<V?A=V:A>J&&(A=J)}return{[x]:S,[y]:A}}}},u5=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Fe(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,U=Wr(e,n),{apply:l=()=>{}}=U,d=vn(U,["apply"]),f=yield a.detectOverflow(n,d),m=Ti(r),p=fo(r),b=Ir(r)==="y",{width:y,height:x}=s.floating;let S,A;m==="top"||m==="bottom"?(S=m,A=p===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(A=m,S=p==="end"?"top":"bottom");const _=x-f.top-f.bottom,k=y-f.left-f.right,O=yi(x-f[S],_),z=yi(y-f[A],k),W=n.middlewareData.shift,D=!W;let V=O,J=z;W!=null&&W.enabled.x&&(J=k),W!=null&&W.enabled.y&&(V=_),D&&!p&&(b?J=y-2*Yr(f.left,f.right):V=x-2*Yr(f.top,f.bottom)),yield l(oe(H({},n),{availableWidth:J,availableHeight:V}));const ce=yield a.getDimensions(u.floating);return y!==ce.width||x!==ce.height?{reset:{rects:!0}}:{}})}}};function Yl(){return typeof window!="undefined"}function ho(e){return $T(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=($T(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $T(e){return Yl()?e instanceof Node||e instanceof $n(e).Node:!1}function hr(e){return Yl()?e instanceof Element||e instanceof $n(e).Element:!1}function Rr(e){return Yl()?e instanceof HTMLElement||e instanceof $n(e).HTMLElement:!1}function VT(e){return!Yl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function Ua(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=pr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function l5(e){return/^(table|td|th)$/.test(ho(e))}function Wl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const c5=/transform|translate|scale|rotate|perspective|filter/,d5=/paint|layout|strict|content/,ds=e=>!!e&&e!=="none";let jh;function zh(e){const t=hr(e)?pr(e):e;return ds(t.transform)||ds(t.translate)||ds(t.scale)||ds(t.rotate)||ds(t.perspective)||!$h()&&(ds(t.backdropFilter)||ds(t.filter))||c5.test(t.willChange||"")||d5.test(t.contain||"")}function f5(e){let t=bi(e);for(;Rr(t)&&!po(t);){if(zh(t))return t;if(Wl(t))return null;t=bi(t)}return null}function $h(){return jh==null&&(jh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),jh}function po(e){return/^(html|body|#document)$/.test(ho(e))}function pr(e){return $n(e).getComputedStyle(e)}function Gl(e){return hr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bi(e){if(ho(e)==="html")return e;const t=e.assignedSlot||e.parentNode||VT(e)&&e.host||Pr(e);return VT(t)?t.host:t}function qT(e){const t=bi(e);return po(t)?(e.ownerDocument||e).body:Rr(t)&&Ua(t)?t:qT(t)}function Ha(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=qT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=$n(s);if(a){const l=Vh(u);return t.concat(u,u.visualViewport||[],Ua(s)?s:[],l&&n?Ha(l):[])}else return t.concat(s,Ha(s,[],n))}function Vh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function YT(e){const t=pr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Rr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,l=zl(n)!==a||zl(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function qh(e){return hr(e)?e:e.contextElement}function mo(e){const t=qh(e);if(!Rr(t))return Or(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=YT(t);let u=(a?zl(n.width):n.width)/r,l=(a?zl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const h5=Or(0);function WT(e){const t=$n(e);return!$h()||!t.visualViewport?h5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function p5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function fs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=qh(e);let u=Or(1);t&&(r?hr(r)&&(u=mo(r)):u=mo(e));const l=p5(a,n,r)?WT(a):Or(0);let d=(s.left+l.x)/u.x,f=(s.top+l.y)/u.y,m=s.width/u.x,p=s.height/u.y;if(a){const b=$n(a),y=r&&hr(r)?$n(r):r;let x=b,S=Vh(x);for(;S&&r&&y!==x;){const A=mo(S),_=S.getBoundingClientRect(),k=pr(S),O=_.left+(S.clientLeft+parseFloat(k.paddingLeft))*A.x,z=_.top+(S.clientTop+parseFloat(k.paddingTop))*A.y;d*=A.x,f*=A.y,m*=A.x,p*=A.y,d+=O,f+=z,x=$n(S),S=Vh(x)}}return ql({width:m,height:p,x:d,y:f})}function Xl(e,t){const n=Gl(e).scrollLeft;return t?t.left+n:fs(Pr(e)).left+n}function GT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Xl(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function m5(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Pr(r),l=t?Wl(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Or(1);const m=Or(0),p=Rr(r);if((p||!p&&!a)&&((ho(r)!=="body"||Ua(u))&&(d=Gl(r)),Rr(r))){const y=fs(r);f=mo(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const b=u&&!p&&!a?GT(u,d):Or(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+b.x,y:n.y*f.y-d.scrollTop*f.y+m.y+b.y}}function g5(e){return Array.from(e.getClientRects())}function E5(e){const t=Pr(e),n=Gl(e),r=e.ownerDocument.body,s=Yr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Yr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Xl(e);const l=-n.scrollTop;return pr(r).direction==="rtl"&&(u+=Yr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:l}}const XT=25;function y5(e,t){const n=$n(e),r=Pr(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(s){a=s.width,u=s.height;const m=$h();(!m||m&&t==="fixed")&&(l=s.offsetLeft,d=s.offsetTop)}const f=Xl(r);if(f<=0){const m=r.ownerDocument,p=m.body,b=getComputedStyle(p),y=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,x=Math.abs(r.clientWidth-p.clientWidth-y);x<=XT&&(a-=x)}else f<=XT&&(a+=f);return{width:a,height:u,x:l,y:d}}const T5=new Set(["absolute","fixed"]);function b5(e,t){const n=fs(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Rr(e)?mo(e):Or(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 KT(e,t,n){let r;if(t==="viewport")r=y5(e,n);else if(t==="document")r=E5(Pr(e));else if(hr(t))r=b5(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 ql(r)}function QT(e,t){const n=bi(e);return n===t||!hr(n)||po(n)?!1:pr(n).position==="fixed"||QT(n,t)}function w5(e,t){const n=t.get(e);if(n)return n;let r=Ha(e,[],!1).filter(l=>hr(l)&&ho(l)!=="body"),s=null;const a=pr(e).position==="fixed";let u=a?bi(e):e;for(;hr(u)&&!po(u);){const l=pr(u),d=zh(u);!d&&l.position==="fixed"&&(s=null),(a?!d&&!s:!d&&l.position==="static"&&!!s&&T5.has(s.position)||Ua(u)&&!d&&QT(e,u))?r=r.filter(m=>m!==u):s=l,u=bi(u)}return t.set(e,r),r}function x5(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?Wl(t)?[]:w5(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,m)=>{const p=KT(t,m,s);return f.top=Yr(p.top,f.top),f.right=yi(p.right,f.right),f.bottom=yi(p.bottom,f.bottom),f.left=Yr(p.left,f.left),f},KT(t,l,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function _5(e){const{width:t,height:n}=YT(e);return{width:t,height:n}}function S5(e,t,n){const r=Rr(t),s=Pr(t),a=n==="fixed",u=fs(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Or(0);function f(){d.x=Xl(s)}if(r||!r&&!a)if((ho(t)!=="body"||Ua(s))&&(l=Gl(t)),r){const y=fs(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const m=s&&!r&&!a?GT(s,l):Or(0),p=u.left+l.scrollLeft-d.x-m.x,b=u.top+l.scrollTop-d.y-m.y;return{x:p,y:b,width:u.width,height:u.height}}function Yh(e){return pr(e).position==="static"}function JT(e,t){if(!Rr(e)||pr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pr(e)===n&&(n=n.ownerDocument.body),n}function ZT(e,t){const n=$n(e);if(Wl(e))return n;if(!Rr(e)){let s=bi(e);for(;s&&!po(s);){if(hr(s)&&!Yh(s))return s;s=bi(s)}return n}let r=JT(e,t);for(;r&&l5(r)&&Yh(r);)r=JT(r,t);return r&&po(r)&&Yh(r)&&!zh(r)?n:r||f5(e)||n}const v5=function(e){return Fe(this,null,function*(){const t=this.getOffsetParent||ZT,n=this.getDimensions,r=yield n(e.floating);return{reference:S5(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function A5(e){return pr(e).direction==="rtl"}const C5={convertOffsetParentRelativeRectToViewportRelativeRect:m5,getDocumentElement:Pr,getClippingRect:x5,getOffsetParent:ZT,getElementRects:v5,getClientRects:g5,getDimensions:_5,getScale:mo,isElement:hr,isRTL:A5};function eb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function k5(e,t){let n=null,r;const s=Pr(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:m,top:p,width:b,height:y}=f;if(l||t(),!b||!y)return;const x=$l(p),S=$l(s.clientWidth-(m+b)),A=$l(s.clientHeight-(p+y)),_=$l(m),O={rootMargin:-x+"px "+-S+"px "+-A+"px "+-_+"px",threshold:Yr(0,yi(1,d))||1};let z=!0;function W(D){const V=D[0].intersectionRatio;if(V!==d){if(!z)return u();V?u(!1,V):r=setTimeout(()=>{u(!1,1e-7)},1e3)}V===1&&!eb(f,e.getBoundingClientRect())&&u(),z=!1}try{n=new IntersectionObserver(W,oe(H({},O),{root:s.ownerDocument}))}catch(D){n=new IntersectionObserver(W,O)}n.observe(e)}return u(!0),a}function N5(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=qh(e),m=s||a?[...f?Ha(f):[],...Ha(t)]:[];m.forEach(_=>{s&&_.addEventListener("scroll",n,{passive:!0}),a&&_.addEventListener("resize",n)});const p=f&&l?k5(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(_=>{let[k]=_;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var O;(O=y)==null||O.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let x,S=d?fs(e):null;d&&A();function A(){const _=fs(e);S&&!eb(S,_)&&n(),S=_,x=requestAnimationFrame(A)}return n(),()=>{var _;m.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),p==null||p(),(_=y)==null||_.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const O5=s5,I5=o5,P5=n5,R5=u5,L5=r5,D5=t5,M5=a5,F5=(e,t,n)=>{const r=new Map,s=H({platform:C5},n),a=oe(H({},s.platform),{_c:r});return e5(e,t,oe(H({},s),{platform:a}))};function tb(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 oe(H({},s),{toJSON:()=>s})}function B5(e){if(!e)return tb();const{x:t,y:n,width:r,height:s}=e;return tb(t,n,r,s)}function U5(e,t){return{contextElement:Jt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?B5(r):n.getBoundingClientRect()}}}var ja=e=>({variable:e,reference:`var(${e})`}),Gr={arrowSize:ja("--arrow-size"),arrowSizeHalf:ja("--arrow-size-half"),arrowBg:ja("--arrow-background"),transformOrigin:ja("--transform-origin"),arrowOffset:ja("--arrow-offset")},H5=e=>e==="top"||e==="bottom"?"y":"x";function j5(e,t){return{name:"transformOrigin",fn(n){var ce,U,ie,se,ue;const{elements:r,middlewareData:s,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=H5(d),m=((ce=s.arrow)==null?void 0:ce.x)||0,p=((U=s.arrow)==null?void 0:U.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=m+b/2,S=p+y/2,A=Math.abs(((ie=s.shift)==null?void 0:ie.y)||0),_=u.reference.height/2,k=y/2,O=(ue=(se=e.offset)==null?void 0:se.mainAxis)!=null?ue:e.gutter,z=typeof O=="number"?O+k:O!=null?O:k,W=A>z,D={top:`${x}px calc(100% + ${z}px)`,bottom:`${x}px ${-z}px`,left:`calc(100% + ${z}px) ${S}px`,right:`${-z}px ${S}px`}[d],V=`${x}px ${u.reference.y+_-l}px`,J=!!e.overlap&&f==="y"&&W;return r.floating.style.setProperty(Gr.transformOrigin.variable,J?V:D),{data:{transformOrigin:J?V:D}}}}}var z5={name:"rects",fn({rects:e}){return{data:e}}},$5=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% + ${Gr.arrowOffset.reference})`}),{}}}};function V5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var q5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function nb(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Wh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function Y5(e,t,n){const r=e||t.createElement("div");return D5({element:r,padding:n.arrowPadding})}function W5(e,t){var n;if(!h4((n=t.offset)!=null?n:t.gutter))return O5(({placement:r})=>{var m,p,b,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(p=(m=t.offset)==null?void 0:m.mainAxis)!=null?p:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:l}=V5(r),d=l?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return wh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function G5(e){if(!e.flip)return;const t=Wh(e.boundary);return P5(oe(H({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function X5(e){if(!e.slide&&!e.overlap)return;const t=Wh(e.boundary);return I5(oe(H({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:M5()}))}function K5(e){return R5({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 Q5(e){var t;if(e.hideWhenDetached)return L5({strategy:"referenceHidden",boundary:(t=Wh(e.boundary))!=null?t:"clippingAncestors"})}function J5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function Z5(e,t,n={}){const r=U5(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},q5,n),a=t.querySelector("[data-part=arrow]"),u=[W5(a,s),G5(s),X5(s),Y5(a,t.ownerDocument,s),$5(a),j5({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),K5(s),Q5(s),z5],{placement:l,strategy:d,onComplete:f,onPositioned:m}=s,p=()=>Fe(null,null,function*(){var z;if(!r||!t)return;const S=yield F5(r,t,{placement:l,middleware:u,strategy:d});f==null||f(S),m==null||m({placed:!0});const A=ro(t),_=nb(A,S.x),k=nb(A,S.y);t.style.setProperty("--x",`${_}px`),t.style.setProperty("--y",`${k}px`),s.hideWhenDetached&&(((z=S.middlewareData.hide)==null?void 0:z.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const O=t.firstElementChild;if(O){const W=so(O);t.style.setProperty("--z-index",W.zIndex)}}),b=()=>Fe(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:p,floatingElement:t}),m==null||m({placed:!0})):yield p()}),y=J5(s.listeners),x=s.listeners?N5(r,t,b,y):x4;return b(),()=>{x==null||x(),m==null||m({placed:!1})}}function rb(e,t,n={}){const l=n,{defer:r}=l,s=vn(l,["defer"]),a=r?qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(Z5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var eD={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function tD(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:Gr.arrowSize.reference,height:Gr.arrowSize.reference,[Gr.arrowSizeHalf.variable]:`calc(${Gr.arrowSize.reference} / 2)`,[Gr.arrowOffset.variable]:`calc(${Gr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?eD[t.split("-")[0]]:void 0,background:Gr.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 go=new WeakMap,Kl=new WeakMap,Ql={},Gh=0,ib=e=>e&&(e.host||ib(e.parentNode)),nD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ib(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),rD=new Set(["script","output","status","next-route-announcer"]),iD=e=>rD.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),sD=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=nD(n,Array.isArray(e)?e:[e]);Ql[r]||(Ql[r]=new WeakMap);const l=Ql[r],d=[],f=new Set,m=new Set(u),p=y=>{!y||f.has(y)||(f.add(y),p(y.parentNode))};u.forEach(y=>{p(y),a&&Jt(y)&&gT(y,x=>{p(x)})});const b=y=>{!y||m.has(y)||Array.prototype.forEach.call(y.children,x=>{if(f.has(x))b(x);else try{if(iD(x))return;const A=x.getAttribute(s)==="true",_=(go.get(x)||0)+1,k=(l.get(x)||0)+1;go.set(x,_),l.set(x,k),d.push(x),_===1&&A&&Kl.set(x,!0),k===1&&x.setAttribute(r,""),A||x.setAttribute(s,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",x,S)}})};return b(n),f.clear(),Gh++,()=>{d.forEach(y=>{const x=go.get(y)-1,S=l.get(y)-1;go.set(y,x),l.set(y,S),x||(Kl.has(y)||y.removeAttribute(s),Kl.delete(y)),S||y.removeAttribute(r)}),Gh--,Gh||(go=new WeakMap,go=new WeakMap,Kl=new WeakMap,Ql={})}},oD=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,aD=(e,t=oD(e),n="data-aria-hidden",r=!0)=>{if(t)return sD(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},uD=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function sb(e,t={}){const{defer:n=!0}=t,r=n?uD:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(aD(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function lD(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 cD(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 ob="pointerdown.outside",ab="focus.outside";function dD(e){for(const t of e)if(Jt(t)&&Nr(t))return!0;return!1}var ub=e=>"clientY"in e;function fD(e,t){if(!ub(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 hD(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function lb(e,t){if(!t||!ub(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 hD(u,l)?r||a:!1}function pD(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=kr(e),f=ro(e),m=lD(f),p=cD(f);function b(O,z){if(!Jt(z)||!z.isConnected||no(e,z)||fD(e,O)||l&&mT(e,z))return!1;const W=d.querySelector(`[aria-controls="${e.id}"]`);if(W){const V=Oh(W);if(lb(O,V))return!1}const D=Oh(e);return lb(O,D)?!1:!(n!=null&&n(z))}const y=new Set,x=as(e==null?void 0:e.getRootNode());function S(O){function z(W){var ce,U;const D=u&&!ET()?qt:ie=>ie(),V=W!=null?W:O,J=(U=(ce=V==null?void 0:V.composedPath)==null?void 0:ce.call(V))!=null?U:[V==null?void 0:V.target];D(()=>{const ie=x?J[0]:fr(O);if(!(!e||!b(O,ie))){if(s||a){const se=bh(s,a);e.addEventListener(ob,se,{once:!0})}cb(e,ob,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:rL(V),focusable:dD(J),target:ie}})}})}O.pointerType==="touch"?(y.forEach(W=>W()),y.add(Zt(d,"click",z,{once:!0})),y.add(p.addEventListener("click",z,{once:!0})),y.add(m.addEventListener("click",z,{once:!0}))):z()}const A=new Set,_=setTimeout(()=>{A.add(Zt(d,"pointerdown",S,!0)),A.add(p.addEventListener("pointerdown",S,!0)),A.add(m.addEventListener("pointerdown",S,!0))},0);function k(O){(u?qt:W=>W())(()=>{var V,J;const W=(J=(V=O==null?void 0:O.composedPath)==null?void 0:V.call(O))!=null?J:[O==null?void 0:O.target],D=x?W[0]:fr(O);if(!(!e||!b(O,D))){if(r||a){const ce=bh(r,a);e.addEventListener(ab,ce,{once:!0})}cb(e,ab,{bubbles:!1,cancelable:!0,detail:{originalEvent:O,contextmenu:!1,focusable:Nr(D),target:D}})}})}return ET()||(A.add(Zt(d,"focusin",k,!0)),A.add(p.addEventListener("focusin",k,!0)),A.add(m.addEventListener("focusin",k,!0))),()=>{clearTimeout(_),y.forEach(O=>O()),A.forEach(O=>O())}}function mD(e,t){const{defer:n}=t,r=n?qt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(pD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function cb(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function gD(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Zt(kr(e),"keydown",n,{capture:!0})}var db="layer:request-dismiss",Qn={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=>no(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>no(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=>Qn.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];yD(e,db,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),ED(e,db,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function ED(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 yD(e,t,n){e.addEventListener(t,n,{once:!0})}var fb;function hb(){Qn.layers.forEach(({node:e})=>{e.style.pointerEvents=Qn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function TD(e){e.style.pointerEvents=""}function bD(e,t){const n=kr(e),r=[];return Qn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(fb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=AL(()=>{const l=s();return Jt(l)?l:null},{timeout:1e3});a.then(l=>r.push(Fl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{Qn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=fb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function wD(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){xh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};Qn.add(f),hb();function m(S){var _,k;const A=fr(S.detail.originalEvent);Qn.isBelowPointerBlockingLayer(e)||Qn.isInBranch(A)||((_=t.onPointerDownOutside)==null||_.call(t,S),(k=t.onInteractOutside)==null||k.call(t,S),!S.defaultPrevented&&(l&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function p(S){var _,k;const A=fr(S.detail.originalEvent);Qn.isInBranch(A)||((_=t.onFocusOutside)==null||_.call(t,S),(k=t.onInteractOutside)==null||k.call(t,S),!S.defaultPrevented&&(l&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var A;Qn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var O;if(!e)return!1;const A=typeof u=="function"?u():u,_=Array.isArray(A)?A:[A],k=(O=t.persistentElements)==null?void 0:O.map(z=>z()).filter(Jt);return k&&_.push(...k),_.some(z=>no(z,S))||Qn.isInNestedLayer(e,S)}const x=[a?bD(e,t.persistentElements):void 0,gD(e,b),mD(e,{exclude:y,onFocusOutside:p,onPointerDownOutside:m,defer:t.defer})];return()=>{Qn.remove(e),hb(),TD(e),x.forEach(S=>S==null?void 0:S())}}function pb(e,t){const{defer:n}=t,r=n?qt:a=>a(),s=[];return s.push(r(()=>{const a=eo(e)?e():e;s.push(wD(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var xD=Object.defineProperty,_D=(e,t,n)=>t in e?xD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kt=(e,t,n)=>_D(e,typeof t!="symbol"?t+"":t,n),mb={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()}},SD=[],vD=class{constructor(e,t){kt(this,"trapStack"),kt(this,"config"),kt(this,"doc"),kt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),kt(this,"portalContainers",new Set),kt(this,"listenerCleanups",[]),kt(this,"handleFocus",r=>{const s=fr(r),a=this.findContainerIndex(s,r)>=0;if(a||Rl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(Ma(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const m=f.findIndex(p=>p===this.state.mostRecentlyFocusedNode);m>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?m+1<f.length&&(u=f[m+1],l=!1):m-1>=0&&(u=f[m-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Ma(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}),kt(this,"handlePointerDown",r=>{const s=fr(r);if(!(this.findContainerIndex(s,r)>=0)){if($a(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}$a(this.config.allowOutsideClick,r)||r.preventDefault()}}),kt(this,"handleClick",r=>{const s=fr(r);this.findContainerIndex(s,r)>=0||$a(this.config.clickOutsideDeactivates,r)||$a(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),kt(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;za(r)&&r.preventDefault(),this.tryFocus(a)}}),kt(this,"handleEscapeKey",r=>{AD(r)&&$a(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),kt(this,"_mutationObserver"),kt(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 G4(f)?!0:f.id&&!this.state.containers.some(m=>m.contains(f))?X4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),kt(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)}))}),kt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Nr(r)){const s=io(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}),kt(this,"tryFocus",r=>{if(r!==!1&&r!==io(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,CD(r)&&r.select()}}),kt(this,"deactivate",r=>{if(!this.state.active)return this;const s=H({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(),mb.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=()=>{gb(()=>{if(d){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(m)}u==null||u()})};if(d&&l){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(m).then(f,f),this}return f(),this}),kt(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}),kt(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}),kt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),kt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),kt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),kt(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}),kt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||fr(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 m=this.state.tabbableGroups.findIndex(({firstTabbableNode:p})=>u===p);if(m<0&&((f==null?void 0:f.container)===u||Nr(u)&&!us(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(m=d),m>=0){const p=m===0?this.state.tabbableGroups.length-1:m-1,b=this.state.tabbableGroups[p];l=Ma(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else za(s)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let m=this.state.tabbableGroups.findIndex(({lastTabbableNode:p})=>u===p);if(m<0&&((f==null?void 0:f.container)===u||Nr(u)&&!us(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(m=d),m>=0){const p=m===this.state.tabbableGroups.length-1?0:m+1,b=this.state.tabbableGroups[p];l=Ma(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else za(s)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||SD;const n=H({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return za(r)&&!r.shiftKey},isKeyBackward(r){return za(r)&&r.shiftKey}},t);this.doc=n.document||kr(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=>{q4(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?mT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=oo(e,{getShadowRoot:this.config.getShadowRoot}),n=ST(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(Ma(t[f])>0){l=!0;break}function d(f,m=!0){const p=t.indexOf(f);if(p>=0)return t[p+(m?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(m){for(let y=b+1;y<n.length;y++)if(us(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(us(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 mb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?gb(()=>{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=io(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)}},za=e=>e.key==="Tab",$a=(e,...t)=>typeof e=="function"?e(...t):e,AD=e=>!e.isComposing&&e.key==="Escape",gb=e=>setTimeout(e,0),CD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Eb(e,t={}){let n;const r=qt(()=>{const s=typeof e=="function"?e():e;if(s){n=new vD(s,oe(H({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:kr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Xh="data-scroll-lock";function kD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function yb(e){const t=so(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Tb(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Xh))return;const u=yb(r)||yb(s),l=n.innerWidth-r.clientWidth;s.setAttribute(Xh,"");const d=()=>SL(r,"--scrollbar-width",`${l}px`),f=kD(r),m=()=>{const x={overflow:"hidden"};return!u&&l>0&&(x[f]=`${l}px`),Fl(s,x)},p=()=>{var W,D;const{scrollX:x,scrollY:S,visualViewport:A}=n,_=(W=A==null?void 0:A.offsetLeft)!=null?W:0,k=(D=A==null?void 0:A.offsetTop)!=null?D:0,O={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(k))}px`,left:`${-(x-Math.floor(_))}px`,right:"0"};!u&&l>0&&(O[f]=`${l}px`);const z=Fl(s,O);return()=>{z==null||z(),n.scrollTo({left:x,top:S,behavior:"instant"})}},b=[d(),Ll()?p():m()];return()=>{b.forEach(x=>x==null?void 0:x()),s.removeAttribute(Xh)}}var ND=cs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Lr=ND.build(),bb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},wb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},OD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},ID=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},_b=e=>e.getById(bb(e)),Eo=e=>e.getById(wb(e)),yo=e=>e.getById(Kh(e)),Sb=e=>e.getById(xb(e)),PD=e=>e.getById(Qh(e)),RD=e=>e.getById(Jh(e));function LD(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),m=a("currentPortalled"),p=r.get("renderedElements"),b=tD(oe(H({},u("positioning")),{placement:f}));return{portalled:m,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(oe(H({id:OD(l)},Lr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(oe(H({},Lr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(oe(H({},Lr.anchor.attrs),{dir:u("dir"),id:bb(l)}))},getTriggerProps(){return t.button(oe(H({},Lr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:wb(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Kh(l),onPointerDown(y){yT(y)&&tL()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(oe(H({},Lr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(oe(H({id:xb(l)},Lr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(oe(H({},Lr.content.attrs),{dir:u("dir"),id:Kh(l),tabIndex:-1,role:"dialog","aria-modal":fT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":to(d),"aria-labelledby":p.title?Qh(l):void 0,"aria-describedby":p.description?Jh(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(oe(H({},Lr.title.attrs),{id:Qh(l),dir:u("dir")}))},getDescriptionProps(){return t.element(oe(H({},Lr.description.attrs),{id:Jh(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(oe(H({},Lr.closeTrigger.attrs),{dir:u("dir"),id:ID(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var DD={props({props:e}){return oe(H({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:H({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=_b(n))!=null?a:Eo(n);return rb(r,()=>Sb(n),oe(H({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>yo(n);let s=!0;return pb(r,{type:"popover",pointerBlocking:t("modal"),exclude:Eo(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:xL(()=>yo(t),{triggerElement:Eo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?sb(()=>[yo(t),Eo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Tb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Eb(()=>yo(t),{initialFocus:()=>vT({root:yo(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=_b(n))!=null?u:Eo(n);rb(s,()=>Sb(n),oe(H(H({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){qt(()=>{Object.assign(e.get("renderedElements"),{title:!!PD(t),description:!!RD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||qt(()=>{const n=vT({root:yo(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||qt(()=>{const a=Eo(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})}}}};lo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[QU,Jl]=ls({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[JU,Zh]=ls({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),MD=e=>{const t=R.useId(),{getRootNode:n}=Jl(),{dir:r}=Zh(),s=H({id:t,dir:r,getRootNode:n},e),a=Ul(DD,s);return LD(a,Rh)},FD=e=>{const[t,u]=LT(e),l=u,{children:n}=l,r=vn(l,["children"]),s=MD(r),a=Mh(Yt({present:s.open},t));return w.jsx(FL,{value:s,children:w.jsx(IT,{value:a,children:n})})},vb=R.forwardRef((e,t)=>{const n=Dh(),r=Fa(),s=Yt(oe(H({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(hn.button,oe(H({},s),{ref:t}))});vb.displayName="PopoverTrigger";function BD(e){return pt({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 UD(e){return pt({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 Ab(e){return pt({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 Cb(e){return pt({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 HD(e){return pt({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 jD(e){return pt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function ep(e){return pt({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 kb(e){return pt({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 zD=({className:e,componentType:t,children:n})=>{const[r,s]=R.useState(!1),{globalClassName:a}=ct(),u=f=>{s(f.open)},l=R.useCallback(()=>{s(!1)},[]),d=R.useMemo(()=>({closeMenu:l}),[l]);return w.jsxs(FD,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(vb,{"aria-label":`Overflow menu for ${t}`,className:F(`${N}-overflow-menu-button-trigger`,`${N}-icon-button`,a,e,`cim-${t}-component`),children:w.jsx(kb,{})}),w.jsx(RT,{children:w.jsx(PT,{className:F(`${N}-overflow-menu-list`,a,`cim-${t}-component`),children:w.jsx(iT.Provider,{value:d,children:n})})})]})};function Nb(e){return pt({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 pt({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[$D,hs]=ls({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),tp=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getControlProps(),e);return w.jsx(hn.div,oe(H(H({},r),e),{ref:t}))});tp.displayName="CarouselControl";const np=R.forwardRef((e,t)=>{const[n,r]=Ba()(e,["readOnly","index"]),s=hs(),a=Yt(s.getIndicatorProps(n),r);return w.jsx(hn.button,oe(H({},a),{ref:t}))});np.displayName="CarouselIndicator";const rp=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getIndicatorGroupProps(),e);return w.jsx(hn.div,oe(H({},r),{ref:t}))});rp.displayName="CarouselIndicatorGroup";const ip=R.forwardRef((e,t)=>{const[n,r]=Ba()(e,["index","snapAlign"]),s=hs(),a=Yt(s.getItemProps(n),r);return w.jsx(hn.div,oe(H({},a),{ref:t}))});ip.displayName="CarouselItem";const sp=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getItemGroupProps(),e);return w.jsx(hn.div,oe(H({},r),{ref:t}))});sp.displayName="CarouselItemGroup";const op=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getNextTriggerProps(),e);return w.jsx(hn.button,oe(H({},r),{ref:t}))});op.displayName="CarouselNextTrigger";const ap=R.forwardRef((e,t)=>{const n=hs(),r=Yt(n.getPrevTriggerProps(),e);return w.jsx(hn.button,oe(H({},r),{ref:t}))});ap.displayName="CarouselPrevTrigger";function VD(e){const t=so(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(b,y){let x=parseFloat(b);return/%/.test(b)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=l(r,n.width),f=l(s,n.height),m=l(a,n.width),p=l(u,n.height);return{x:{before:d,after:m},y:{before:f,after:p}}}function qD(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 Ib(e){let t=[];for(const n of e.children)t=t.concat(n,Ib(n));return t}function Pb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?Ib(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 m of s){const p=m.getBoundingClientRect();if(!qD(n,p,u))continue;const b=so(m);let[y,x]=b.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const S=a==="x"?x:y,A=p[l]-n[l]+e[f];switch(S){case"none":break;case"start":r[a].start.push({node:m,position:A});break;case"center":r[a].center.push({node:m,position:A+p[d]/2});break;case"end":r[a].end.push({node:m,position:A+p[d]});break}}}return r}function Rb(e){const t=e.getBoundingClientRect(),n=VD(e),r=Pb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Lb([...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:Lb([...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 YD(e,t,n){const r=Pb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var Lb=e=>[...new Set(e)],Db=(e,t)=>n=>Math.max(e,Math.min(t,n)),WD=cs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Xr=WD.build(),GD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},XD=(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}`},Zl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},KD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},QD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},JD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Mb=(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}`},Pn=e=>e.getById(Zl(e)),Fb=e=>_L(Pn(e),"[data-part=item]"),ZD=(e,t)=>e.getById(Mb(e,t)),Bb=e=>{const t=Pn(e);if(!t)return;const n=oo(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function e8(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),m=s("canScrollNext"),p=s("canScrollPrev"),b=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),S=l("slidesPerPage"),A=l("padding"),_=l("translations");return{isPlaying:d,isDragging:f,page:x,pageSnapPoints:y,canScrollNext:m,canScrollPrev:p,getProgress(){return x/y.length},scrollToIndex(k,O){a({type:"INDEX.SET",index:k,instant:O})},scrollTo(k,O){a({type:"PAGE.SET",index:k,instant:O})},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(oe(H({},Xr.root.attrs),{id:GD(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":S,"--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(oe(H({},Xr.itemGroup.attrs),{id:Zl(u),"data-orientation":l("orientation"),"data-dragging":to(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(k){no(k.currentTarget,fr(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){no(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!l("allowMouseDrag")||!yT(k))return;const O=fr(k);Nr(O)&&O!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:_4(k=>{const O=l("orientation")==="horizontal"?"deltaX":"deltaY";k[O]<0&&!s("canScrollPrev")||k[O]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",l("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:A,[b?"paddingInline":"paddingBlock"]:A,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const O=r.get("slidesInView").includes(k.index);return t.element(oe(H({},Xr.item.attrs),{id:XD(u,k.index),dir:l("dir"),role:"group","data-index":k.index,"data-inview":to(O),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":_.item(k.index,l("slideCount")),"aria-hidden":fT(!O),style:{scrollSnapAlign:(()=>{var J;const z=(J=k.snapAlign)!=null?J:"start",W=l("slidesPerMove"),D=W==="auto"?Math.floor(l("slidesPerPage")):W;return(k.index+D)%D===0?z:void 0})()}}))},getControlProps(){return t.element(oe(H({},Xr.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(oe(H({},Xr.prevTrigger.attrs),{id:QD(u),type:"button",disabled:!p,dir:l("dir"),"aria-label":_.prevTrigger,"data-orientation":l("orientation"),"aria-controls":Zl(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(oe(H({},Xr.nextTrigger.attrs),{dir:l("dir"),id:KD(u),type:"button","aria-label":_.nextTrigger,"data-orientation":l("orientation"),"aria-controls":Zl(u),disabled:!m,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(oe(H({},Xr.indicatorGroup.attrs),{dir:l("dir"),id:JD(u),"data-orientation":l("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const O="indicator",z={ArrowDown(V){b||(a({type:"PAGE.NEXT",src:O}),V.preventDefault())},ArrowUp(V){b||(a({type:"PAGE.PREV",src:O}),V.preventDefault())},ArrowRight(V){b&&(a({type:"PAGE.NEXT",src:O}),V.preventDefault())},ArrowLeft(V){b&&(a({type:"PAGE.PREV",src:O}),V.preventDefault())},Home(V){a({type:"PAGE.SET",index:0,src:O}),V.preventDefault()},End(V){a({type:"PAGE.SET",index:y.length-1,src:O}),V.preventDefault()}},W=oL(k,{dir:l("dir"),orientation:l("orientation")}),D=z[W];D==null||D(k)}}))},getIndicatorProps(k){return t.button(oe(H({},Xr.indicator.attrs),{dir:l("dir"),id:Mb(u,k.index),type:"button","data-orientation":l("orientation"),"data-index":k.index,"data-readonly":to(k.readOnly),"data-current":to(k.index===x),"aria-label":_.indicator(k.index),onClick(O){O.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(oe(H({},Xr.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":to(d),"aria-label":d?_.autoplayStop:_.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var t8={props({props:e}){return N4(e,["slideCount"],"carousel"),oe(H({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:H({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:n8(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 f4(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(Pn(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=Pn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Bb(e)});return Bb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Pn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};qt(()=>{s(),qt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return Fb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Pn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var b;const m=f.target,p=Number((b=m.dataset.index)!=null?b:"-1");return p==null||Number.isNaN(p)||p===-1?d:f.isIntersecting?a4(d,p):u4(d,p)},n.get("slidesInView"));n.set("slidesInView",l4(l))},{root:r,threshold:t("inViewThreshold")});return Fb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Pn(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 bL(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=cT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Pn(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=Pn(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=aT(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=c4(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Pn(r);if(!s)return;const a=YD(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=cT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Pn(n);if(!r)return;const s=Rb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Pn(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=Pn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Pn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=Rb(r),l=u.x.reduce((f,m)=>Math.abs(m-s)<Math.abs(f-s)?m:f,u.x[0]),d=u.y.reduce((f,m)=>Math.abs(m-a)<Math.abs(f-a)?m:f,u.y[0]);qt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const m=r.dataset.scrollSnapType;m&&(r.style.setProperty("scroll-snap-type",m),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=ZD(n,e.get("page"));r&&qt(()=>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 n8(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}lo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),lo()(["index","readOnly"]),lo()(["index","snapAlign"]);const r8=e=>{const t=R.useId(),{getRootNode:n}=Jl(),{dir:r}=Zh(),s=H({id:t,dir:r,getRootNode:n},e),a=Ul(t8,s);return e8(a,Rh)},up=R.forwardRef((e,t)=>{const[n,r]=Ba()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=r8(n),a=Yt(s.getRootProps(),r);return w.jsx($D,{value:s,children:w.jsx(hn.div,oe(H({},a),{ref:t}))})});up.displayName="CarouselRoot";const i8=180,s8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},o8=({globalClassName:e,className:t,itemMinWidth:n=i8,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,onPageChange:d,ariaLabel:f="Product carousel",children:m})=>{const p=Array.from(m).map((J,ce)=>({node:J,key:R.isValidElement(J)&&J.key!=null?J.key:`carousel-item-${ce}`})),b=p.length,y=R.useRef(null),[x,S]=R.useState(0),{width:A}=sv();R.useLayoutEffect(()=>{y.current&&S(y.current.getBoundingClientRect().width)},[A,b]);const _=s8(r),k=n+_,O=x>0?(x+_)/k:1,z=Math.max(1,Math.floor(O));if(b===0)return null;const W=b>z,D=Math.ceil(b/z),V=W?Math.max(1,O):z;return w.jsxs(up,{ref:y,className:F(e,t,`${N}-carousel`),slidesPerPage:V,slidesPerMove:z,spacing:r,loop:s,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":f,children:[w.jsx(sp,{className:F(e,`${N}-carousel__item-group`,{"carousel-row-container":!W}),children:p.map(({node:J,key:ce},U)=>w.jsx(ip,{index:U,className:F(e,`${N}-carousel__item`),children:J},ce))}),l&&W&&w.jsxs(tp,{className:F(e,`${N}-carousel__control`),children:[w.jsx(ap,{className:F(e,`${N}-carousel__prev-trigger`),"aria-label":"Previous slide",children:w.jsx(Ab,{size:"16px"})}),w.jsx(op,{className:F(e,`${N}-carousel__next-trigger`),"aria-label":"Next slide",children:w.jsx(Cb,{size:"16px"})})]}),u&&W&&w.jsx(rp,{className:F(e,`${N}-carousel__indicator-group`),children:Array.from({length:D},(J,ce)=>w.jsx(np,{index:ce,className:F(e,`${N}-carousel__indicator`),"aria-label":`Go to slide group ${ce+1}`},ce))})]})},a8=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:F(e,`${N}-close-button`),disabled:r,onClick:n,children:w.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.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"})})}),[u8,l8]=ls({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),c8=e=>Ba()(e,["lazyMount","unmountOnExit"]),[d8,Va]=ls({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Ub=R.forwardRef((e,t)=>{const n=Va(),r=l8(),s=Mh(oe(H({},r),{present:n.open})),a=Yt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:w.jsx(hn.div,oe(H({},a),{ref:Hl(s.ref,t)}))});Ub.displayName="DialogBackdrop";const lp=R.forwardRef((e,t)=>{const n=Va(),r=Fa(),s=Yt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(hn.div,oe(H({},s),{ref:Hl(r.ref,t)}))});lp.displayName="DialogContent";const cp=R.forwardRef((e,t)=>{const n=Va(),r=Yt(n.getDescriptionProps(),e);return w.jsx(hn.div,oe(H({},r),{ref:t}))});cp.displayName="DialogDescription";const dp=R.forwardRef((e,t)=>{const n=Va(),r=Yt(n.getPositionerProps(),e);return Fa().unmounted?null:w.jsx(hn.div,oe(H({},r),{ref:t}))});dp.displayName="DialogPositioner";var f8=cs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),ps=f8.build(),Hb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},jb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},fp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},zb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},hp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},pp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},$b=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},ec=e=>e.getById(fp(e)),h8=e=>e.getById(Hb(e)),p8=e=>e.getById(jb(e)),m8=e=>e.getById(zb(e)),g8=e=>e.getById(hp(e)),E8=e=>e.getById(pp(e)),y8=e=>e.getById($b(e));function T8(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(oe(H({},ps.trigger.attrs),{dir:a("dir"),id:zb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":fp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(oe(H({},ps.backdrop.attrs),{dir:a("dir"),hidden:!d,id:jb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(oe(H({},ps.positioner.attrs),{dir:a("dir"),id:Hb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(oe(H({},ps.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:fp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:hp(u),"aria-describedby":f.description?pp(u):void 0}))},getTitleProps(){return t.element(oe(H({},ps.title.attrs),{dir:a("dir"),id:hp(u)}))},getDescriptionProps(){return t.element(oe(H({},ps.description.attrs),{dir:a("dir"),id:pp(u)}))},getCloseTriggerProps(){return t.button(oe(H({},ps.closeTrigger.attrs),{dir:a("dir"),id:$b(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var b8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>y8(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return H({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 pb(()=>ec(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[m8(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 Tb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Eb(()=>ec(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")?sb(()=>[ec(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){qt(()=>{e.set("rendered",{title:!!g8(t),description:!!E8(t)})})},syncZIndex({scope:e}){qt(()=>{const t=ec(e);if(!t)return;const n=so(t);[h8(e),p8(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})}}}};lo()(["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 w8=e=>{const t=R.useId(),{getRootNode:n}=Jl(),{dir:r}=Zh(),s=H({id:t,getRootNode:n,dir:r},e),a=Ul(b8,s);return T8(a,Rh)},Vb=e=>{const[t,l]=LT(e),d=l,{children:n}=d,r=vn(d,["children"]),[s]=c8(t),a=w8(r),u=Mh(Yt({present:a.open},t));return w.jsx(d8,{value:a,children:w.jsx(u8,{value:s,children:w.jsx(IT,{value:u,children:n})})})},qb=R.forwardRef((e,t)=>{const n=Va(),r=Yt(n.getTitleProps(),e);return w.jsx(hn.h2,oe(H({},r),{ref:t}))});qb.displayName="DialogTitle";const x8=({children:e})=>{const[t,n]=R.useState(!1),r=R.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=R.useMemo(()=>({isOpen:t}),[t]);return w.jsx(Th.Provider,{value:r,children:w.jsx(rT.Provider,{value:s,children:e})})},Yb=()=>R.useContext(rT),Wb=()=>{const e=R.useContext(Th);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},_8=`${N}-overflow-menu-button-trigger`,S8=({componentType:e,children:t})=>{const{isOpen:n}=Yb(),{closeMenu:r}=Wb(),{globalClassName:s}=ct(),a=R.useRef(null);return R.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},l=d=>{const f=d.target;f instanceof Element&&f.closest(`.${_8}`)||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?w.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:F(`${N}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},v8=({componentType:e,className:t})=>{const{toggleMenu:n}=Wb(),{isOpen:r}=Yb(),{globalClassName:s}=ct();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:F(`${N}-overflow-menu-button-trigger`,`${N}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:w.jsx(kb,{})})};class A8{constructor(){Je(this,"initialState",W0);Je(this,"promptsStateProxy");Je(this,"promptsParamsProxy");Je(this,"_fullGet",(t,n)=>Reflect.get(t,n));Je(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return N8(n,r),Reflect.set(t,n,r)});Je(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Je(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Je(this,"updatePromptsParamsProxy",t=>new Proxy(H({},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 wi=new A8,C8=e=>{window.addEventListener(Bd,e)},k8=e=>{window.removeEventListener(Bd,e)},N8=(e,t)=>{const n=new CustomEvent(Bd,{detail:{property:e,value:t}});window.dispatchEvent(n)},Gb=e=>{const t=wi.isOpen,n=typeof e=="boolean"?e:!t;wi.promptsStateProxy.isOpen=n},O8=e=>{const t=wi.isInline,n=typeof e=="boolean"?e:!t;wi.promptsStateProxy.isInline=n},I8=({elementId:e,entryType:t,params:n,isInline:r})=>{wi.promptsStateProxy.elementId=e,t&&(wi.promptsStateProxy.entryType=t),typeof r=="boolean"&&O8(r),n&&wi.updatePromptsParamsProxy(n),wi.isOpen||Gb(!0)},P8=()=>{const e=R.useContext(l1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},R8=()=>{const e=R.useContext(u1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},tc=()=>{const e=R.useContext(a1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},L8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{previousComponentType:r}=Vr(),s=Zs(),a=()=>{Fu(r||"dialog"),s()};return t?w.jsx(lr,{className:F(n,`${N}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:w.jsx(Nb,{})}):w.jsxs("button",{className:F(n,`${N}-overflow-menu-button`,`${N}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(Nb,{}),"Show ",r||"dialog"]})},D8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{isModalFullscreen:r}=Vr(),s=Zs(),a=()=>{Hd(!r),s()},u=r?Ik:Pk,l="Toggle Fullscreen";return t?w.jsx(lr,{ariaLabel:l,title:l,className:F(n,`${N}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:a}):w.jsxs("button",{className:F(n,`${N}-overflow-menu-button`,`${N}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[w.jsx(u,{}),l]})},M8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),{dialogPosition:r}=Vr(),s=Zs(),a=r==="bottom-left",u=()=>{jd(a?"bottom-right":"bottom-left"),s()},l=a?UD:BD,d=a?"Move right":"Move left";return t?w.jsx(lr,{className:F(n,`${N}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(l,{})}):w.jsxs("button",{className:F(n,`${N}-overflow-menu-button`,`${N}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(l,{}),d]})},Xb=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:l}=ct(),{mode:d}=Vr(),f=u==="messaging"&&l&&!!r,m=d==="standalone",p=e==="modal",b=p?L8:Qb,y=p?D8:M8,x=R.useMemo(()=>s?Ak(s):{},[s]);return w.jsx(x8,{children:w.jsxs("div",{className:F(a,`${N}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:F(a,`${N}-${e}-header`,{standalone:m,embedded:!m}),style:x,children:[(s==null?void 0:s.logoUrl)&&w.jsx("img",{alt:"",role:"img",className:F(a,`${N}-${e}-logo`,{standalone:m,embedded:!m}),src:s.logoUrl}),w.jsx(qb,{className:F(a,`${N}-${e}-title`,{standalone:m,embedded:!m}),children:s==null?void 0:s.headerText}),w.jsxs("div",{className:F(a,`${N}-${e}-controls`),children:[w.jsx(b,{componentType:e,isIcon:!0}),w.jsx(v8,{componentType:e}),w.jsx(a8,{className:F(a,`cim-${e}-component`),onClick:n})]})]}),w.jsxs(S8,{componentType:e,children:[w.jsx(y,{componentType:e}),w.jsx(j8,{componentType:e}),w.jsx(sT,{componentType:e,onClearChat:t}),f&&w.jsx(oT,{componentType:e,onDownloadTranscript:r})]})]})})},To="USD",nc=(...e)=>e.flatMap(t=>t!=null?t:[]).reduce((t,n)=>{const r=n.promotionalPrice;return typeof r!="number"||!Number.isFinite(r)?t:t===void 0||r<t?r:t},void 0),Kr=(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}`}},F8=({retailPrice:e,discountPrice:t,currencyCode:n=To})=>{const r=n||To,s=typeof t=="number"&&typeof e=="number"&&t<e,a=s?t:e||t||null,u=s?e:null;return{price:Kr(a,r),comparePrice:Kr(u,r),hasDiscount:s}},rc=e=>typeof e=="number"&&Number.isFinite(e),mp=({min:e,max:t,currencyCode:n=To})=>{if(!rc(e)||!rc(t))return null;const r=n||To,s=Kr(e,r),a=Kr(t,r);if(s===null||a===null)return null;const u=e!==t;return{value:u?`${s} – ${a}`:s,low:s,high:a,isRange:u}},B8=({priceBreakdown:e,currencyCode:t=To})=>{if(!e)return null;const n=t||To,r=[e.promotional,e.sales,e.original],s=r.map(f=>f==null?void 0:f.min).filter(rc),a=r.map(f=>f==null?void 0:f.max).filter(rc);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=mp({min:u,max:l,currencyCode:n});return d?{range:d.value,low:d.low,high:d.high}:null},gp=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:s,className:a})=>{const{price:u,comparePrice:l,hasDiscount:d}=F8({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return w.jsxs("div",{className:F(s,a,`${N}-price`),style:f,children:[w.jsx("span",{className:`${N}-visually-hidden`,children:"Current price: "}),w.jsx("span",{className:F(s,`${N}-price__amount`),children:u}),d&&l&&w.jsxs("span",{className:F(s,`${N}-price__compare`),children:[w.jsx("span",{className:`${N}-visually-hidden`,children:"Original price: "}),l]})]})},U8={sparkle:ep,plus:HD,"paper-plane":jD},Kb=({icon:e,className:t})=>{const n=U8[e];return n?w.jsx(n,{className:t,"aria-hidden":"true"}):null},H8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=ct(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",m=x=>()=>{a(x)},p={"has-icon":!!l,"icon-right":!!l&&d==="right"},b=x=>w.jsxs(w.Fragment,{children:[l&&w.jsx(Kb,{icon:l,className:`${N}-suggestion-button-icon`}),w.jsx("span",{children:x})]});return w.jsx("div",{className:F(t,`${N}-suggestion-container ${f}`,e),children:n.map(x=>s?w.jsx(Sf,{disabled:r,className:F(t,`${N}-suggestion-button standalone`,p),onClick:m(x),children:b(x)},x):w.jsx("button",{disabled:r,className:F(t,`${N}-suggestion-button embedded`,p),onClick:m(x),children:b(x)},x))})},j8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ct();if(!r)return null;const s=()=>{$r(!1),Ls(!0)};return t?w.jsx(lr,{className:F(n,`${N}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:w.jsx(x1,{})}):w.jsxs("button",{className:F(n,`${N}-overflow-menu-button`,`${N}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(x1,{}),"Minimize"]})},Qb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ct(),r=Zs(),s=()=>{Fu("modal"),r()};return t?w.jsx(lr,{className:F(n,`${N}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:w.jsx(Ob,{})}):w.jsxs("button",{className:F(n,`${N}-overflow-menu-button`,`${N}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(Ob,{}),"Show modal"]})},z8=["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"],$8=3e3,V8=400,q8=({globalClassName:e,isWidgetStandalone:t,messages:n=z8})=>{const[r,s]=R.useState(0),[a,u]=R.useState(!0);return R.useEffect(()=>{let l;const d=setInterval(()=>{u(!1),l=setTimeout(()=>{s(f=>(f+1)%n.length),u(!0)},V8)},$8);return()=>{clearInterval(d),clearTimeout(l)}},[n.length]),w.jsxs("div",{className:F(e,`${N}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[w.jsxs("div",{className:`${N}-connecting-pulse-wrapper`,children:[w.jsx("div",{className:`${N}-connecting-pulse`}),w.jsx("div",{className:`${N}-connecting-ring`})]}),w.jsx("span",{className:F(`${N}-connecting-text`,a&&`${N}-connecting-text--visible`),children:n[r]})]})},Y8=({shouldShow:e,loadingText:t})=>e?w.jsx("span",{className:`${N}-processing-text`,children:t}):null,W8=({shouldShow:e})=>e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${N}-processing-shimmer-bar`}),w.jsx("div",{className:`${N}-processing-shimmer-bar`}),w.jsx("div",{className:`${N}-processing-shimmer-bar`})]}):null,Ep=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>w.jsxs("div",{className:F(e,`${N}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[w.jsx(Y8,{shouldShow:!!n,loadingText:n}),w.jsx(W8,{shouldShow:!n})]});function Jb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function G8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function X8(e,t,n){const s=El((n||{}).ignore||[]),a=K8(t);let u=-1;for(;++u<a.length;)FE(e,"text",l);function l(f,m){let p=-1,b;for(;++p<m.length;){const y=m[p],x=b?b.children:void 0;if(s(y,x?x.indexOf(y):void 0,b))return;b=y}if(b)return d(f,m)}function d(f,m){const p=m[m.length-1],b=a[u][0],y=a[u][1];let x=0;const A=p.children.indexOf(f);let _=!1,k=[];b.lastIndex=0;let O=b.exec(f.value);for(;O;){const z=O.index,W={index:O.index,input:O.input,stack:[...m,f]};let D=y(...O,W);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=z+1:(x!==z&&k.push({type:"text",value:f.value.slice(x,z)}),Array.isArray(D)?k.push(...D):D&&k.push(D),x=z+O[0].length,_=!0),!b.global)break;O=b.exec(f.value)}return _?(x<f.value.length&&k.push({type:"text",value:f.value.slice(x)}),p.children.splice(A,1,...k)):k=[f],A+k.length}}function K8(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([Q8(s[0]),J8(s[1])])}return t}function Q8(e){return typeof e=="string"?new RegExp(G8(e),"g"):e}function J8(e){return typeof e=="function"?e:function(){return e}}const yp="phrasing",Tp=["autolink","link","image","label"];function Z8(){return{transforms:[oM],enter:{literalAutolink:tM,literalAutolinkEmail:bp,literalAutolinkHttp:bp,literalAutolinkWww:bp},exit:{literalAutolink:sM,literalAutolinkEmail:iM,literalAutolinkHttp:nM,literalAutolinkWww:rM}}}function eM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:yp,notInConstruct:Tp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:yp,notInConstruct:Tp},{character:":",before:"[ps]",after:"\\/",inConstruct:yp,notInConstruct:Tp}]}}function tM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function bp(e){this.config.enter.autolinkProtocol.call(this,e)}function nM(e){this.config.exit.autolinkProtocol.call(this,e)}function rM(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 iM(e){this.config.exit.autolinkEmail.call(this,e)}function sM(e){this.exit(e)}function oM(e){X8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),uM]],{ignore:["link","linkReference"]})}function aM(e,t,n,r,s){let a="";if(!Zb(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!lM(n)))return!1;const u=cM(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 uM(e,t,n,r){return!Zb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function lM(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 cM(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=Jb(e,"(");let a=Jb(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 Zb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||es(n)||cl(n))&&(!t||n!==47)}ew.peek=TM;function dM(){this.buffer()}function fM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function hM(){this.buffer()}function pM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function mM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gM(e){this.exit(e)}function EM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yM(e){this.exit(e)}function TM(){return"["}function ew(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 bM(){return{enter:{gfmFootnoteCallString:dM,gfmFootnoteCall:fM,gfmFootnoteDefinitionLabelString:hM,gfmFootnoteDefinition:pM},exit:{gfmFootnoteCallString:mM,gfmFootnoteCall:gM,gfmFootnoteDefinitionLabelString:EM,gfmFootnoteDefinition:yM}}}function wM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ew},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"),m=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),m(),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?tw:xM))),f(),d}}function xM(e,t,n){return t===0?e:tw(e,t,n)}function tw(e,t,n){return(n?"":" ")+e}const _M=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];nw.peek=kM;function SM(){return{canContainEols:["delete"],enter:{strikethrough:AM},exit:{strikethrough:CM}}}function vM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_M}],handlers:{delete:nw}}}function AM(e){this.enter({type:"delete",children:[]},e)}function CM(e){this.exit(e)}function nw(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,oe(H({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function kM(){return"~"}function NM(e){return e.length}function OM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||NM,a=[],u=[],l=[],d=[];let f=0,m=-1;for(;++m<e.length;){const S=[],A=[];let _=-1;for(e[m].length>f&&(f=e[m].length);++_<e[m].length;){const k=IM(e[m][_]);if(n.alignDelimiters!==!1){const O=s(k);A[_]=O,(d[_]===void 0||O>d[_])&&(d[_]=O)}S.push(k)}u[m]=S,l[m]=A}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)a[p]=rw(r[p]);else{const S=rw(r);for(;++p<f;)a[p]=S}p=-1;const b=[],y=[];for(;++p<f;){const S=a[p];let A="",_="";S===99?(A=":",_=":"):S===108?A=":":S===114&&(_=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[p]-A.length-_.length);const O=A+"-".repeat(k)+_;n.alignDelimiters!==!1&&(k=A.length+k+_.length,k>d[p]&&(d[p]=k),y[p]=k),b[p]=O}u.splice(1,0,b),l.splice(1,0,y),m=-1;const x=[];for(;++m<u.length;){const S=u[m],A=l[m];p=-1;const _=[];for(;++p<f;){const k=S[p]||"";let O="",z="";if(n.alignDelimiters!==!1){const W=d[p]-(A[p]||0),D=a[p];D===114?O=" ".repeat(W):D===99?W%2?(O=" ".repeat(W/2+.5),z=" ".repeat(W/2-.5)):(O=" ".repeat(W/2),z=O):z=" ".repeat(W)}n.delimiterStart!==!1&&!p&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||p)&&_.push(" "),n.alignDelimiters!==!1&&_.push(O),_.push(k),n.alignDelimiters!==!1&&_.push(z),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&_.push("|")}x.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return x.join(`
39
39
  `)}function IM(e){return e==null?"":String(e)}function rw(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 PM(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()),RM);return s(),u}function RM(e,t,n){return">"+(n?"":" ")+e}function LM(e,t){return iw(e,t.inConstruct,!0)&&!iw(e,t.notInConstruct,!1)}function iw(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 sw(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
40
40
  `&&LM(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
- `}function DM(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 MM(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 FM(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 BM(e,t,n,r){const s=FM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(MM(e,n)){const p=n.enter("codeIndented"),b=n.indentLines(a,UM);return p(),b}const l=n.createTracker(r),d=s.repeat(Math.max(DM(a,s)+1,3)),f=n.enter("codeFenced");let m=l.move(d);if(e.lang){const p=n.enter(`codeFencedLang${u}`);m+=l.move(n.safe(e.lang,U({before:m,after:" ",encode:["`"]},l.current()))),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${u}`);m+=l.move(" "),m+=l.move(n.safe(e.meta,U({before:m,after:`
41
+ `}function DM(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 MM(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 FM(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 BM(e,t,n,r){const s=FM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(MM(e,n)){const p=n.enter("codeIndented"),b=n.indentLines(a,UM);return p(),b}const l=n.createTracker(r),d=s.repeat(Math.max(DM(a,s)+1,3)),f=n.enter("codeFenced");let m=l.move(d);if(e.lang){const p=n.enter(`codeFencedLang${u}`);m+=l.move(n.safe(e.lang,H({before:m,after:" ",encode:["`"]},l.current()))),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${u}`);m+=l.move(" "),m+=l.move(n.safe(e.meta,H({before:m,after:`
42
42
  `,encode:["`"]},l.current()))),p()}return m+=l.move(`
43
43
  `),a&&(m+=l.move(a+`
44
- `)),m+=l.move(d),f(),m}function UM(e,t,n){return(n?"":" ")+e}function wp(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 HM(e,t,n,r){const s=wp(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 jM(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 qa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function sc(e,t,n){const r=Ws(e),s=Ws(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}}ow.peek=zM;function ow(e,t,n,r){const s=jM(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),m=sc(r.before.charCodeAt(r.before.length-1),f,s);m.inside&&(d=qa(f)+d.slice(1));const p=d.charCodeAt(d.length-1),b=sc(r.after.charCodeAt(0),p,s);b.inside&&(d=d.slice(0,-1)+qa(p));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},l+d+y}function zM(e,t,n){return n.options.emphasis||"*"}function $M(e,t){let n=!1;return bl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Yf}),!!((!e.depth||e.depth<3)&&Df(e)&&(t.options.setext||n))}function VM(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if($M(e,n)){const m=n.enter("headingSetext"),p=n.enter("phrasing"),b=n.containerPhrasing(e,ue(U({},a.current()),{before:`
44
+ `)),m+=l.move(d),f(),m}function UM(e,t,n){return(n?"":" ")+e}function wp(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 HM(e,t,n,r){const s=wp(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),H({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,H({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({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,H({before:f,after:s},d.current()))),f+=d.move(s),l()),u(),f}function jM(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 qa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ic(e,t,n){const r=Ws(e),s=Ws(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}}ow.peek=zM;function ow(e,t,n,r){const s=jM(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(s);let d=u.move(n.containerPhrasing(e,H({after:s,before:l},u.current())));const f=d.charCodeAt(0),m=ic(r.before.charCodeAt(r.before.length-1),f,s);m.inside&&(d=qa(f)+d.slice(1));const p=d.charCodeAt(d.length-1),b=ic(r.after.charCodeAt(0),p,s);b.inside&&(d=d.slice(0,-1)+qa(p));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},l+d+y}function zM(e,t,n){return n.options.emphasis||"*"}function $M(e,t){let n=!1;return Tl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Yf}),!!((!e.depth||e.depth<3)&&Df(e)&&(t.options.setext||n))}function VM(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if($M(e,n)){const m=n.enter("headingSetext"),p=n.enter("phrasing"),b=n.containerPhrasing(e,oe(H({},a.current()),{before:`
46
46
  `,after:`
47
47
  `}));return p(),m(),b+`
48
48
  `+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
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=qa(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}aw.peek=qM;function aw(e){return e.value||""}function qM(){return"<"}uw.peek=YM;function uw(e,t,n,r){const s=wp(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 YM(){return"!"}lw.peek=WM;function lw(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 m=n.stack;n.stack=[],u=n.enter("reference");const p=n.safe(n.associationId(e),U({before:d,after:"]"},l.current()));return u(),n.stack=m,a(),s==="full"||!f||f!==p?d+=l.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function WM(){return"!"}cw.peek=GM;function cw(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 GM(){return"`"}function dw(e,t){const n=Df(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}fw.peek=XM;function fw(e,t,n,r){const s=wp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(dw(e,n)){const m=n.stack;n.stack=[],l=n.enter("autolink");let p=u.move("<");return p+=u.move(n.containerPhrasing(e,U({before:p,after:">"},u.current()))),p+=u.move(">"),l(),n.stack=m,p}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 XM(e,t,n){return dw(e,n)?"<":"["}hw.peek=KM;function hw(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 m=n.stack;n.stack=[],u=n.enter("reference");const p=n.safe(n.associationId(e),U({before:d,after:"]"},l.current()));return u(),n.stack=m,a(),s==="full"||!f||f!==p?d+=l.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function KM(){return"["}function xp(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 QM(e){const t=xp(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 JM(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 pw(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 ZM(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?JM(n):xp(n);const l=e.ordered?u==="."?")":".":QM(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&m&&(!m.children||!m.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),pw(n)===u&&m){let p=-1;for(;++p<e.children.length;){const b=e.children[p];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.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 e9(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 t9(e,t,n,r){const s=e9(n);let a=n.bulletCurrent||xp(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()),m);return d(),f;function m(p,b,y){return b?(y?"":" ".repeat(u))+p:(y?a:a+" ".repeat(u-a.length))+p}}function n9(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const r9=yl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function i9(e,t,n,r){return(e.children.some(function(u){return r9(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function s9(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}mw.peek=o9;function mw(e,t,n,r){const s=s9(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),m=sc(r.before.charCodeAt(r.before.length-1),f,s);m.inside&&(d=qa(f)+d.slice(1));const p=d.charCodeAt(d.length-1),b=sc(r.after.charCodeAt(0),p,s);b.inside&&(d=d.slice(0,-1)+qa(p));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},l+d+y}function o9(e,t,n){return n.options.strong||"*"}function a9(e,t,n,r){return n.safe(e.value,r)}function u9(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 l9(e,t,n){const r=(pw(n)+(n.options.ruleSpaces?" ":"")).repeat(u9(n));return n.options.ruleSpaces?r.slice(0,-1):r}const gw={blockquote:PM,break:sw,code:BM,definition:HM,emphasis:ow,hardBreak:sw,heading:VM,html:aw,image:uw,imageReference:lw,inlineCode:cw,link:fw,linkReference:hw,list:ZM,listItem:t9,paragraph:n9,root:i9,strong:mw,text:a9,thematicBreak:l9};function c9(){return{enter:{table:d9,tableData:Ew,tableHeader:Ew,tableRow:h9},exit:{codeText:p9,table:f9,tableData:_p,tableHeader:_p,tableRow:_p}}}function d9(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 f9(e){this.exit(e),this.data.inTable=void 0}function h9(e){this.enter({type:"tableRow",children:[]},e)}function _p(e){this.exit(e)}function Ew(e){this.enter({type:"tableCell",children:[]},e)}function p9(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,m9));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function m9(e,t){return t==="|"?t:e}function g9(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:b,table:u,tableCell:d,tableRow:l}};function u(y,x,S,A){return f(m(y,S,A),y.align)}function l(y,x,S,A){const _=p(y,S,A),C=f([_]);return C.slice(0,C.indexOf(`
52
- `))}function d(y,x,S,A){const _=S.enter("tableCell"),C=S.enter("phrasing"),O=S.containerPhrasing(y,ue(U({},A),{before:a,after:a}));return C(),_(),O}function f(y,x){return OM(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function m(y,x,S){const A=y.children;let _=-1;const C=[],O=x.enter("table");for(;++_<A.length;)C[_]=p(A[_],x,S);return O(),C}function p(y,x,S){const A=y.children;let _=-1;const C=[],O=x.enter("tableRow");for(;++_<A.length;)C[_]=d(A[_],y,x,S);return O(),C}function b(y,x,S){let A=gw.inlineCode(y,x,S);return S.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function E9(){return{exit:{taskListCheckValueChecked:yw,taskListCheckValueUnchecked:yw,paragraph:T9}}}function y9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:b9}}}function yw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function T9(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 b9(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=gw.listItem(e,t,n,U(U({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(m){return m+u}}function w9(){return[Z8(),bM(),SM(),c9(),E9()]}function x9(e){return{extensions:[eM(),wM(e),vM(),g9(e),y9()]}}const _9={tokenize:N9,partial:!0},Tw={tokenize:O9,partial:!0},bw={tokenize:I9,partial:!0},ww={tokenize:P9,partial:!0},S9={tokenize:R9,partial:!0},xw={name:"wwwAutolink",tokenize:k9,previous:Sw},_w={name:"protocolAutolink",tokenize:C9,previous:vw},Qr={name:"emailAutolink",tokenize:A9,previous:Aw},Dr={};function v9(){return{text:Dr}}let ms=48;for(;ms<123;)Dr[ms]=Qr,ms++,ms===58?ms=65:ms===91&&(ms=97);Dr[43]=Qr,Dr[45]=Qr,Dr[46]=Qr,Dr[95]=Qr,Dr[72]=[Qr,_w],Dr[104]=[Qr,_w],Dr[87]=[Qr,xw],Dr[119]=[Qr,xw];function A9(e,t,n){const r=this;let s,a;return u;function u(p){return!Sp(p)||!Aw.call(r,r.previous)||vp(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(p))}function l(p){return Sp(p)?(e.consume(p),l):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(S9,m,f)(p):p===45||p===95||dn(p)?(a=!0,e.consume(p),d):m(p)}function f(p){return e.consume(p),s=!0,d}function m(p){return a&&s&&wn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function k9(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!Sw.call(r,r.previous)||vp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_9,e.attempt(Tw,e.attempt(bw,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function C9(e,t,n){const r=this;let s="",a=!1;return u;function u(p){return(p===72||p===104)&&vw.call(r,r.previous)&&!vp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),e.consume(p),l):n(p)}function l(p){if(wn(p)&&s.length<5)return s+=String.fromCodePoint(p),e.consume(p),l;if(p===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),a?f:(a=!0,d)):n(p)}function f(p){return p===null||cl(p)||yt(p)||es(p)||dl(p)?n(p):e.attempt(Tw,e.attempt(bw,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function N9(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 O9(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(ww,d,l)(f):f===null||yt(f)||es(f)||f!==45&&dl(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 I9(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(ww,t,a)(u):u===null||yt(u)||es(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function P9(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||yt(l)||es(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||yt(l)||es(l)?t(l):r(l)}function a(l){return wn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):wn(l)?(e.consume(l),u):n(l)}}function R9(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return dn(a)?n(a):t(a)}}function Sw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function vw(e){return!wn(e)}function Aw(e){return!(e===47||Sp(e))}function Sp(e){return e===43||e===45||e===46||e===95||dn(e)}function vp(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 L9={tokenize:z9,partial:!0};function D9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:U9,continuation:{tokenize:H9},exit:j9}},text:{91:{name:"gfmFootnoteCall",tokenize:B9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:M9,resolveTo:F9}}}}function M9(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=cr(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 F9(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 B9(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return l;function l(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(a>999||p===93&&!u||p===null||p===91||yt(p))return n(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(cr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return yt(p)||(u=!0),a++,e.consume(p),p===92?m:f}function m(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function U9(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",m):n(x)}function m(x){if(u>999||x===93&&!l||x===null||x===91||yt(x))return n(x);if(x===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=cr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return yt(x)||(l=!0),u++,e.consume(x),x===92?p:m}function p(x){return x===91||x===92||x===93?(e.consume(x),u++,m):m(x)}function b(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),at(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function H9(e,t,n){return e.check(Ea,t,e.attempt(L9,t,n))}function j9(e){e.exit("gfmFootnoteDefinition")}function z9(e,t,n){const r=this;return at(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 $9(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 m={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},p={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",m,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",p,l]],y=l.parser.constructs.insideSpan.null;y&&zn(b,b.length,0,fl(y,u.slice(f+1,d),l)),zn(b,b.length,0,[["exit",p,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",m,l]]),zn(u,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,m=this.events;let p=0;return b;function b(x){return f===126&&m[m.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const S=Ws(f);if(x===126)return p>1?d(x):(u.consume(x),p++,y);if(p<2&&!n)return d(x);const A=u.exit("strikethroughSequenceTemporary"),_=Ws(x);return A._open=!_||_===2&&!!S,A._close=!S||S===2&&!!_,l(x)}}}class V9{constructor(){this.map=[]}add(t,n,r){q9(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 q9(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 Y9(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 W9(){return{flow:{null:{name:"table",tokenize:G9,resolveAll:X9}}}}function G9(e,t,n){const r=this;let s=0,a=0,u;return l;function l(j){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 ie=se>-1?r.events[se][1].type:null,ce=ie==="tableHead"||ie==="tableRow"?D:d;return ce===D&&r.parser.lazy[r.now().line]?n(j):ce(j)}function d(j){return e.enter("tableHead"),e.enter("tableRow"),f(j)}function f(j){return j===124||(u=!0,a+=1),m(j)}function m(j){return j===null?n(j):qe(j)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),y):n(j):it(j)?at(e,m,"whitespace")(j):(a+=1,u&&(u=!1,s+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),u=!0,m):(e.enter("data"),p(j)))}function p(j){return j===null||j===124||yt(j)?(e.exit("data"),m(j)):(e.consume(j),j===92?b:p)}function b(j){return j===92||j===124?(e.consume(j),p):p(j)}function y(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),u=!1,it(j)?at(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):x(j))}function x(j){return j===45||j===58?A(j):j===124?(u=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),S):W(j)}function S(j){return it(j)?at(e,A,"whitespace")(j):A(j)}function A(j){return j===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),_):j===45?(a+=1,_(j)):j===null||qe(j)?z(j):W(j)}function _(j){return j===45?(e.enter("tableDelimiterFiller"),C(j)):W(j)}function C(j){return j===45?(e.consume(j),C):j===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),O):(e.exit("tableDelimiterFiller"),O(j))}function O(j){return it(j)?at(e,z,"whitespace")(j):z(j)}function z(j){return j===124?x(j):j===null||qe(j)?!u||s!==a?W(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):W(j)}function W(j){return n(j)}function D(j){return e.enter("tableRow"),V(j)}function V(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),V):j===null||qe(j)?(e.exit("tableRow"),t(j)):it(j)?at(e,V,"whitespace")(j):(e.enter("data"),K(j))}function K(j){return j===null||j===124||yt(j)?(e.exit("data"),V(j)):(e.consume(j),j===92?ae:K)}function ae(j){return j===92||j===124?(e.consume(j),K):K(j)}}function X9(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,m,p;const b=new V9;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(l=!1,d!==0&&(kw(b,t,d,f,m),m=void 0,d=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",f,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,p=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,m={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",m,t]])),s=x.type==="tableDelimiterRow"?2:m?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],p=oc(b,t,a,s,void 0,p),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],p=oc(b,t,a,s,void 0,p)),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],p=oc(b,t,a,s,n,p)):u[1]!==0&&(p=oc(b,t,u,s,n,p)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&kw(b,t,d,f,m),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Y9(t.events,n))}return e}function oc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},bo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=bo(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=bo(t.events,n[2]),m=bo(t.events,n[3]),p={type:l,start:Object.assign({},f),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,S=n[3]-n[2]-1;e.add(x,S,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return s!==void 0&&(a.end=Object.assign({},bo(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function kw(e,t,n,r,s){const a=[],u=bo(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 bo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const K9={name:"tasklistCheck",tokenize:J9};function Q9(){return{text:{91:K9}}}function J9(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 yt(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 qe(d)?t(d):it(d)?e.check({tokenize:Z9},t,n)(d):n(d)}}function Z9(e,t,n){return at(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function eF(e){return rE([v9(),D9(),$9(e),W9(),Q9()])}const tF={};function nF(e){const t=this,n=e||tF,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(eF(n)),a.push(w9()),u.push(x9(n))}const rF=()=>w.jsx("span",{className:`${N}-blinking-cursor`,children:w.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),wo=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(GE,{remarkPlugins:[nF],rehypePlugins:[Xy],components:{h1:({children:s})=>w.jsx("h1",{className:F(e,`${N}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:F(e,`${N}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:F(e,`${N}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:F(e,`${N}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:F(e,`${N}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:F(e,`${N}-li`),children:s}),a:({href:s,children:a})=>w.jsx(nT,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>w.jsx("div",{className:F(e,`${N}-table-container`),children:w.jsx("table",{className:F(e,`${N}-table`),children:s})}),thead:({children:s})=>w.jsx("thead",{className:F(e,`${N}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:F(e,`${N}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:F(e,`${N}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:F(e,`${N}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:F(e,`${N}-td`),children:s}),span:({className:s,children:a})=>s===`${N}-blinking-cursor`?w.jsx(rF,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${N}-blinking-cursor'></span>`:"")});function iF(){const{messages:e}=bn();return R.useMemo(()=>ik(e,"cart"),[e])}const xo=()=>R.useContext(c1),_o=()=>{const{sendMessage:e,loading:t,isConnected:n}=bn(),{mode:r,status:s}=Vr();return R.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function sF(e){return e.includes("-")&&e===e.toLowerCase()}function So({tagName:e,props:t,label:n}){const r=R.useRef(null),s=R.useRef(null),a=R.useRef(e),u=R.useRef(null);return R.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!sF(e)){u.current!==e&&(u.current=e,_t(!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){_t(!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 m=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(m)?f:null}catch(f){_t(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),R.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),w.jsx("div",{ref:r,"data-override":n||"custom"})}class oF extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){_t(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function aF(e){return pt({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 uF="(max-width: 576px)";function lF(e){return e?!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey:!0}function ac({event:e,openLinksInNewTab:t,isCartMgmtSupported:n=!1}={}){n||t||lF(e)&&typeof window!="undefined"&&window.matchMedia(uF).matches&&(Ls(!0),qS())}const cF=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=bn();return w.jsx("div",{className:F(t,`${N}-msg-product-card__image-wrapper`),children:e?n?w.jsx("button",{type:"button",className:F(t,`${N}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:w.jsx("img",{className:F(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,onClick:f=>ac({event:f,openLinksInNewTab:s,isCartMgmtSupported:n}),children:w.jsx("img",{className:F(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):w.jsx("img",{className:F(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):w.jsx("div",{className:F(t,`${N}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:w.jsx(aF,{"aria-hidden":"true"})})})},dF=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=bn();return n?w.jsx("button",{type:"button",disabled:l,onClick:u,className:F(t,`${N}-msg-product-card__title-link`),"aria-label":a,children:e}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:F(t,`${N}-msg-product-card__title-link`),"aria-label":a,onClick:d=>ac({event:d,openLinksInNewTab:s,isCartMgmtSupported:n}),children:e}):w.jsx("p",{className:F(t,`${N}-msg-product-card__title`),children:e})},fF=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=ct(),{overrides:u,isInitialized:l}=xo(),{sendMessage:d,loading:f}=bn(),m=_o(),p=l?u.ProductTile:void 0;if(p){const j={name:"ProductTile",payload:s!=null?s:{},api:m};return w.jsx(So,{tagName:p,props:j,label:"ProductTile"})}const{id:b,name:y,imageUrl:x,description:S,productPageUrl:A,price:_,priceBreakdown:C,discountPrice:O,listPrice:z,currencyCode:W}=e,D=O!=null?O:_,V=B8({priceBreakdown:C,currencyCode:W}),K=()=>{if(f)return;const j=y||"this product",se=b?` [SKU: ${b}]`:"";d(`Show me details for ${j}${se}`)},ae=r?`View details for ${y}`:`Go to product page for ${y}`;return w.jsxs("div",{className:F(t,`${N}-msg-product-card`),children:[w.jsx(cF,{imageUrl:x||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:ae,name:y,showInWidgetDetails:K}),w.jsxs("div",{className:F(t,`${N}-msg-product-card__content`),children:[w.jsxs("div",{className:F(t,`${N}-msg-product-card__content-header`),children:[w.jsx(dF,{name:y||b,globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:ae,showInWidgetDetails:K}),a&&S&&w.jsx("div",{className:F(t,`${N}-msg-product-card__description`),title:S,children:w.jsx(wo,{globalClassName:t,text:S})})]}),w.jsx("div",{className:F(t,`${N}-msg-product-card__price-row`),children:V?w.jsx("span",{className:F(t,`${N}-msg-product-card__price`),"aria-label":`Price from ${V.low} to ${V.high}`,children:V.range}):w.jsx(gp,{globalClassName:t,retailPrice:z,discountPrice:D,currencyCode:W})})]})]})},hF=e=>{var n,r,s;const t=rc(e.data.promotions,(n=e.data.extendedData)==null?void 0:n.productPromotions);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:t!=null?t:e.data.discountPrice,listPrice:(r=e.data.listPrice)!=null?r:t===void 0?void 0:e.data.price,priceBreakdown:(s=e.data.priceBreakdown)!=null?s:void 0,currencyCode:e.data.currencyCode}},pF=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=ct(),{overrides:l,isInitialized:d}=xo(),f=_o(),m=d?l.ProductCarousel:void 0;if(m){const p={name:"ProductCarousel",payload:{title:e,products:t},api:f};return w.jsx(So,{tagName:m,props:p,label:"ProductCarousel"})}return w.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&w.jsx("p",{className:F(n,`${N}-product-carousel-title`),children:e}),w.jsx(o8,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(p=>w.jsxs("div",{className:F(n,`${N}-product-carousel-item`),children:[w.jsx(fF,{product:hF(p),rawProduct:p,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&w.jsx("p",{className:F(n,`${N}-product-carousel-caption`),title:p.caption,children:p.caption})]},p.id))})]})},Ap=44,mF=400,gF=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?Ap:Math.min(Math.max(Math.round(t),Ap),mF)},EF=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},yF="parentOrigin",TF=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(yF,t),n.toString()}catch(n){return e}},bF=(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}},Cw=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=R.useRef(null),[s,a]=R.useState(!1),[u,l]=R.useState(Ap),d=typeof window!="undefined"?window.location.origin:"",f=TF(e,d),m=EF(e);return R.useEffect(()=>{const p=b=>{var x,S,A;if(m&&b.origin!==m||r.current&&b.source!==r.current.contentWindow)return;const y=b.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),l(gF((x=y.payload)==null?void 0:x.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((A=(S=y.payload)==null?void 0:S.orderId)!=null?A:null);break}};return window.addEventListener("message",p),()=>window.removeEventListener("message",p)},[m,n]),w.jsx("div",{className:F(t,`${N}-cart-express`,{[`${N}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:w.jsx("iframe",{ref:r,className:F(t,`${N}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},uc=({code:e,globalClassName:t,inactive:n})=>w.jsxs("span",{className:F(t,`${N}-cart-chip`,{inactive:n}),title:n?"Not applied":void 0,children:[w.jsx(v1,{"aria-hidden":"true"}),w.jsx("span",{children:e})]}),Rn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")f=Kr(u?-Math.abs(n):n,r);else if(l)f=l;else return null;return w.jsxs("div",{className:F(s,`${N}-cart-total-row`,{emphasized:a}),children:[w.jsxs("span",{className:F(s,`${N}-cart-total-label`),children:[e,t&&w.jsx("span",{className:F(s,`${N}-cart-total-badge`),children:t})]}),w.jsx("span",{className:F(s,`${N}-cart-total-value`),children:d?w.jsx("span",{className:F(s,`${N}-cart-total-shimmer`)}):f})]})};function Nw(e){var a;const n=((a=e.variants)!=null?a:[]).filter(u=>u.value).map(u=>`${u.lbl}: ${u.value}`).join(", "),r=n?` (${n})`:"",s=e.productId?` [SKU: ${e.productId}]`:"";return`${e.name}${r}${s}`}function Ow(e){var r;const n=((r=e.variants)!=null?r:[]).filter(s=>s.value).map(s=>s.value).join(", ");return n?`${e.name} (${n})`:e.name}function kp(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function Cp(e){return(e!=null?e:[]).map(kp).filter(t=>t!==null)}function Iw(e){return e&&typeof e=="object"&&typeof e.status=="string"?e.status:void 0}function wF(e,t){var s;const n=new Map;for(const a of t!=null?t:[]){const u=kp(a),l=Iw(a);u!==null&&l!==void 0&&n.set(u.toLowerCase(),l)}const r=[];for(const a of e!=null?e:[]){const u=kp(a);if(u===null)continue;const l=(s=Iw(a))!=null?s:n.get(u.toLowerCase());r.push({code:u,applied:l==null||l==="applied"})}return r}function Pw(e,t,n){const r=new Set((e!=null?e:[]).flatMap(s=>Cp(s.coupons)).map(s=>s.toLowerCase()));return wF(t,n).filter(s=>!r.has(s.code.toLowerCase()))}const xF=({quantity:e,disabled:t,globalClassName:n,onChange:r})=>{const[s,a]=R.useState(e.toString());R.useEffect(()=>{a(e.toString())},[e]);const u=f=>{if(t)return;const m=f.target.value;/^\d*$/.test(m)&&a(m)},l=()=>{const f=parseInt(s,10);!t&&!isNaN(f)&&f>0&&f!==e?r(f):a(e.toString())},d=f=>{f.key==="Enter"&&(f.preventDefault(),l())};return w.jsx("div",{className:F(n,`${N}-cart-qty-input-wrapper`),children:w.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:F(n,`${N}-cart-qty-input`),value:s,disabled:t,onChange:u,onBlur:l,onKeyDown:d,"aria-label":"Quantity"})})},_F=({item:e,currencyCode:t,disabled:n,globalClassName:r,onRemove:s,onQuantityChange:a})=>{var d,f;const u=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,l=Cp(e.coupons);return w.jsxs("li",{className:F(r,`${N}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:F(r,`${N}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:F(r,`${N}-cart-item-details`),children:[w.jsx("p",{className:F(r,`${N}-cart-item-name`),children:e.name}),w.jsxs("div",{className:F(r,`${N}-cart-item-attrs`),children:[((d=e.variants)!=null?d:[]).map(m=>w.jsxs("p",{className:F(r,`${N}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((f=e.promotions)!=null?f:[]).map(m=>w.jsxs("p",{className:F(r,`${N}-cart-item-attr`),children:["Promotion: ",m]},m))]}),l.length>0&&w.jsx("div",{className:F(r,`${N}-cart-chips`),children:l.map(m=>w.jsx(uc,{code:m,globalClassName:r},m))}),w.jsxs("span",{className:F(r,`${N}-cart-item-price`),children:[u&&w.jsx("span",{className:F(r,`${N}-cart-item-original-price`),children:Kr(e.originalSubtotal,t)}),w.jsx("span",{className:F(r,`${N}-cart-item-final-price`),children:Kr(e.itemSubtotal,t)})]}),w.jsxs("div",{className:F(r,`${N}-cart-item-footer`),children:[w.jsx("span",{className:F(r,`${N}-cart-qty-heading`),children:"Quantity"}),w.jsx(xF,{quantity:e.quantity,disabled:n,globalClassName:r,onChange:m=>a(e,m)}),w.jsx("button",{type:"button",className:F(r,`${N}-cart-item-remove`),disabled:n,onClick:()=>s(e),children:"Remove"})]})]})]})},SF=({cart:e,readOnly:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s,loading:a}=bn(),[u,l]=R.useState(!1),[d,f]=R.useState(""),m=a||!!t,{items:p=[],currencyCode:b="USD",subtotal:y,total:x,taxes:S,shippingCost:A,shippingDiscount:_,shippingPromotions:C=[],promotionsDiscount:O,promotions:z=[],couponsDiscount:W,bodyMessage:D,footerMessage:V,checkoutButtonUrl:K,expressPaymentUrl:ae}=e,j=Pw(p,e.couponsApplied,e.coupons),se=ne=>{m||s(`Remove ${Nw(ne)} from my cart`,{displayContent:`Remove ${Ow(ne)} from cart`})},ie=ne=>{s(ne?`I completed express payment. Show my order confirmation for order ${ne}.`:"I completed express payment. Show my order confirmation.")},ce=(ne,Se)=>{m||Se<1||s(`Update ${Nw(ne)} quantity to ${Se}`,{displayContent:`Update ${Ow(ne)} to qty ${Se}`})},fe=()=>{const ne=d.trim();!ne||m||(s(`Apply coupon code ${ne}`),f(""))};return w.jsxs("div",{className:F(n,`${N}-cart`,m&&`${N}-cart-busy`),children:[w.jsxs("div",{className:F(n,`${N}-cart-box`),children:[D&&w.jsxs("button",{type:"button",className:F(n,`${N}-cart-summary`),"aria-expanded":u,onClick:()=>l(ne=>!ne),children:[w.jsx("span",{className:F(n,`${N}-cart-summary-text`),children:w.jsx(wo,{text:D,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1})}),w.jsx("span",{className:F(n,`${N}-cart-summary-toggle`),"aria-hidden":"true",children:u?w.jsx(_1,{}):w.jsx(S1,{})})]}),u&&w.jsxs("div",{className:F(n,`${N}-cart-expanded`),children:[w.jsxs("div",{className:F(n,`${N}-cart-items-section`),children:[w.jsx("ul",{className:F(n,`${N}-cart-items`),children:p.map(ne=>w.jsx(_F,{item:ne,currencyCode:b,disabled:m,globalClassName:n,onRemove:se,onQuantityChange:ce},ne.itemId))}),j.length>0&&w.jsx("div",{className:F(n,`${N}-cart-chips`,`${N}-cart-applied-coupons`),children:j.map(ne=>w.jsx(uc,{code:ne.code,inactive:!ne.applied,globalClassName:n},ne.code))})]}),w.jsxs("div",{className:F(n,`${N}-cart-totals`),children:[w.jsx(Rn,{label:"Subtotal",value:y,currencyCode:b,globalClassName:n,loading:!1}),w.jsx(Rn,{label:"Coupon",value:W,currencyCode:b,globalClassName:n,isDiscount:!0,loading:!1}),w.jsx(Rn,{label:"Promotions",badge:z[0],value:O,currencyCode:b,globalClassName:n,isDiscount:!0,loading:!1}),w.jsx(Rn,{label:"Shipping",value:A,currencyCode:b,globalClassName:n,fallback:"TBD",loading:!1}),w.jsx(Rn,{label:"Shipping Discount",badge:C[0],value:_,currencyCode:b,globalClassName:n,isDiscount:!0,loading:!1}),w.jsx(Rn,{label:"Tax",value:S,currencyCode:b,globalClassName:n,fallback:"TBD",loading:!1}),w.jsx(Rn,{label:"Total",value:x,currencyCode:b,globalClassName:n,emphasized:!0,loading:!1})]})]})]}),w.jsxs("div",{className:F(n,`${N}-cart-coupon`),children:[w.jsxs("div",{className:F(n,`${N}-cart-coupon-field`),children:[w.jsx("span",{className:F(n,`${N}-cart-coupon-icon`),"aria-hidden":"true",children:w.jsx(v1,{})}),w.jsx("input",{type:"text",className:F(n,`${N}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:d,disabled:m,onChange:ne=>f(ne.target.value),onKeyDown:ne=>{ne.key==="Enter"&&(ne.preventDefault(),fe())}})]}),w.jsx("button",{type:"button",className:F(n,`${N}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:m||!d.trim(),onClick:fe,children:w.jsx(NC,{"aria-hidden":"true"})})]}),ae&&w.jsx(Cw,{expressPaymentUrl:ae,globalClassName:n,onOrderComplete:ie}),K&&w.jsxs("a",{className:F(n,`${N}-cart-checkout-button`),href:K,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[w.jsx(kC,{"aria-hidden":"true"}),w.jsx("span",{children:"Checkout"})]}),w.jsx("p",{className:F(n,`${N}-cart-footer`),children:V||"Shipping and taxes calculated at checkout."})]})},vF=({item:e,currencyCode:t,globalClassName:n})=>{var a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,s=Cp(e.coupons);return w.jsxs("li",{className:F(n,`${N}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:F(n,`${N}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:F(n,`${N}-cart-item-details`),children:[w.jsx("p",{className:F(n,`${N}-cart-item-name`),children:e.name}),w.jsxs("div",{className:F(n,`${N}-cart-item-attrs`),children:[((a=e.variants)!=null?a:[]).map(l=>w.jsxs("p",{className:F(n,`${N}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((u=e.promotions)!=null?u:[]).map(l=>w.jsxs("p",{className:F(n,`${N}-cart-item-attr`),children:["Promotion: ",l]},l))]}),s.length>0&&w.jsx("div",{className:F(n,`${N}-cart-chips`),children:s.map(l=>w.jsx(uc,{code:l,globalClassName:n},l))}),w.jsxs("span",{className:F(n,`${N}-cart-item-price`),children:[r&&w.jsx("span",{className:F(n,`${N}-cart-item-original-price`),children:Kr(e.originalSubtotal,t)}),w.jsx("span",{className:F(n,`${N}-cart-item-final-price`),children:Kr(e.itemSubtotal,t)})]}),w.jsx("div",{className:F(n,`${N}-cart-item-footer`),children:w.jsxs("span",{className:F(n,`${N}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},AF=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},kF=({order:e,globalClassName:t})=>{const[n,r]=R.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:m,shippingCost:p,shippingDiscount:b,shippingPromotions:y=[],promotionsDiscount:x,promotions:S=[],couponsDiscount:A,bodyMessage:_,footerMessage:C}=e,O=Pw(u,e.couponsApplied);return w.jsxs("div",{className:F(t,`${N}-cart`),children:[w.jsxs("div",{className:F(t,`${N}-cart-banner`),children:[w.jsx("span",{className:F(t,`${N}-cart-banner-icon`),"aria-hidden":"true",children:w.jsx(OC,{})}),w.jsx("p",{className:F(t,`${N}-cart-banner-text`),children:"Your order is confirmed!"})]}),w.jsxs("div",{className:F(t,`${N}-order-confirmation-meta`),children:[w.jsxs("span",{children:["Order No: ",s]}),w.jsxs("span",{children:["Ordered On: ",AF(a)]})]}),w.jsxs("div",{className:F(t,`${N}-cart-box`),children:[_&&w.jsxs("button",{type:"button",className:F(t,`${N}-cart-summary`),"aria-expanded":n,onClick:()=>r(z=>!z),children:[w.jsx("span",{className:F(t,`${N}-cart-summary-text`),children:w.jsx(wo,{text:_,globalClassName:t,showIsLoading:!1})}),w.jsx("span",{className:F(t,`${N}-cart-summary-toggle`),"aria-hidden":"true",children:n?w.jsx(_1,{}):w.jsx(S1,{})})]}),n&&w.jsxs("div",{className:F(t,`${N}-cart-expanded`),children:[w.jsx("ul",{className:F(t,`${N}-cart-items`),children:u.map(z=>w.jsx(vF,{item:z,currencyCode:l,globalClassName:t},z.itemId))}),O.length>0&&w.jsx("div",{className:F(t,`${N}-cart-chips`,`${N}-cart-applied-coupons`),children:O.map(z=>w.jsx(uc,{code:z.code,globalClassName:t},z.code))}),w.jsxs("div",{className:F(t,`${N}-cart-totals`),children:[w.jsx(Rn,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),w.jsx(Rn,{label:"Coupon",value:A,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Rn,{label:"Promotions",badge:S[0],value:x,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Rn,{label:"Shipping",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Rn,{label:"Shipping Discount",badge:y[0],value:b,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Rn,{label:"Tax",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Rn,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),w.jsx("p",{className:F(t,`${N}-cart-footer`),children:C||"Shipping and taxes calculated at checkout."})]})},CF=({image:e,alt:t,globalClassName:n})=>{const[r,s]=R.useState(e.src),[a,u]=R.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return w.jsx("img",{className:F(n,`${N}-pdp-gallery__image`,{[`${N}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},NF=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return w.jsxs(up,{className:F(n,`${N}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[w.jsx(sp,{className:F(n,`${N}-pdp-gallery__item-group`),children:e.map((s,a)=>w.jsx(ip,{index:a,className:F(n,`${N}-pdp-gallery__item`),children:w.jsx(CF,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&w.jsxs(tp,{className:F(n,`${N}-pdp-gallery__control`),children:[w.jsx(ap,{className:F(n,`${N}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:w.jsx(Ab,{size:"16px"})}),w.jsx(op,{className:F(n,`${N}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:w.jsx(kb,{size:"16px"})})]}),r&&w.jsx(rp,{className:F(n,`${N}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>w.jsx(np,{index:a,className:F(n,`${N}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},lc=(e,t)=>{if(/^(https?:)?\/\//i.test(t)||/^data:/i.test(t)||!e)return t;try{return new URL(t,e).href}catch(n){return`${e}${t}`}},Ya="color",OF=e=>e.replace(/(^|\/)large\//,"$1medium/"),Rw=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Ya&&n.vals.includes(t)),Lw=(e,t)=>{const n=OF(t),r=lc(e,n);return n===t?{src:r}:{src:r,fallbackSrc:lc(e,t)}},IF=(e,t)=>{var l,d;const n=((l=e.imgGroups)!=null?l:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>Rw(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=>Lw(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[Lw(e.baseUrl,e.imageUrl)]:[]},PF=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&Rw(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?lc(e.baseUrl,r):""},cc=(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})}),RF=(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]}))},LF=(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,m])=>{var p;return f===n||((p=l.vars)==null?void 0:p[f])===m})});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})},Dw=(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,m])=>{var p;return((p=d.vars)==null?void 0:p[f])===m}));return(l=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?l:null},DF=(e,t)=>{var a;const n=rc(e.promotions,(a=e.extendedData)==null?void 0:a.productPromotions),r=typeof n=="number"?ue(U({},e.pr),{prom:n}):e.pr;if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return r;const s=e.vmat.find(u=>u.ord!==!1&&Object.entries(t).every(([l,d])=>{var f;return((f=u.vars)==null?void 0:f[l])===d}));return s!=null&&s.pr?s.pr:r},Np=e=>{const t=e.filter(n=>typeof n=="number"&&Number.isFinite(n));if(t.length!==0)return{min:Math.min(...t),max:Math.max(...t)}},MF=e=>{var y,x,S;if(!((y=e.vmat)!=null&&y.length))return;const t=rc(e.promotions,(x=e.extendedData)==null?void 0:x.productPromotions),n=t===void 0?e.pr:ue(U({},e.pr),{prom:t}),r=e.vmat.filter(A=>A.ord!==!1).map(A=>{var _;return(_=A.pr)!=null?_:n}).filter(A=>A!==void 0);if(r.length===0)return;const s=Np(r.map(A=>A.prom)),a=Np(r.map(A=>A.cur)),u=Np(r.map(A=>A.orig)),l=r.some(A=>typeof A.cur=="number"&&typeof A.orig=="number"&&A.cur<A.orig),d=s!=null?s:a,f=s||l?u:void 0;if(!d)return;const m=d.min!==d.max,p=f&&f.min!==f.max,b=d.min!==((S=n==null?void 0:n.prom)!=null?S:n==null?void 0:n.cur)||f!==void 0&&f.min!==(n==null?void 0:n.orig);if(!(!m&&!p&&!b))return U({active:d},f?{compare:f}:{})},Mw=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>cc(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},FF=300,BF=e=>{const{overrides:t,isInitialized:n}=xo(),r=_o(),s=n?t.ProductDetailCard:void 0;if(s){const a={name:"ProductDetailCard",payload:e.product,api:r};return w.jsx(So,{tagName:s,props:a,label:"ProductDetailCard"})}return w.jsx(UF,U({},e))},UF=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var Nt,Ft,xn,pn,Bt,$e,St,Wt;const{addToCart:s,sendMessage:a,loading:u}=bn(),l=e.data,d=(Nt=l.vattr)!=null?Nt:[],[f,m]=R.useState(()=>Mw(l)),[p,b]=R.useState(!1);R.useEffect(()=>{m(Mw(l)),b(!1)},[l,e.id]);const y=RF(l.vmat,f),x=(xn=(Ft=l.quantity)==null?void 0:Ft.minQuantity)!=null?xn:1,S=(Bt=(pn=l.quantity)==null?void 0:pn.maxQuantity)!=null?Bt:Number.POSITIVE_INFINITY,A=(St=($e=l.quantity)==null?void 0:$e.increment)!=null?St:1,[_,C]=R.useState(x),[O,z]=R.useState(!1),W=R.useRef(!1);R.useEffect(()=>{O&&(u?W.current=!0:W.current&&(W.current=!1,z(!1)))},[O,u]);const D=f[Ya],V=R.useMemo(()=>IF(l,D),[l,D]),K=R.useMemo(()=>DF(l,f),[l,f]),ae=R.useMemo(()=>MF(l),[l]),j=ae?mp(ue(U({},ae.active),{currencyCode:l.ccy})):null,se=ae!=null&&ae.compare?mp(ue(U({},ae.compare),{currencyCode:l.ccy})):null,ie=d.find(Ie=>Ie.id===Ya),ce=d.filter(Ie=>Ie.id!==Ya),fe=Dw(l,f),[ne,Se]=R.useState(_),de=R.useRef(fe),J=de.current===fe?ne:_;R.useEffect(()=>{if(de.current!==fe){de.current=fe,Se(_);return}const Ie=window.setTimeout(()=>Se(_),FF);return()=>window.clearTimeout(Ie)},[_,fe]);const le=_===ne,k=R.useMemo(()=>y&&(de.current!==fe||le)?bF(l.expressPaymentUrl,fe,J):null,[l.expressPaymentUrl,fe,J,y,le]),M=R.useCallback(Ie=>{a(Ie?`I completed express payment. Show my order confirmation for order ${Ie}.`:"I completed express payment. Show my order confirmation.")},[a]),Z=(Ie,Xe)=>()=>{b(!0),m(ot=>{const ft=!cc(l.vmat,Ie,Xe,ot);return Ie===Ya||ft?LF(l.vmat,d,Ie,Xe,ot):ue(U({},ot),{[Ie]:Xe})})},P=()=>{if(u)return;const Ie=Dw(l,f);if(!Ie)return;const Xe=d.map(ot=>{const ft=ot.opts.find(Jn=>Jn.val===f[ot.id]);return ft?{label:ot.lbl||ot.id,value:ft.name||ft.val}:null}).filter(ot=>ot!==null);z(!0),s({productName:l.name,sku:Ie,quantity:_,variants:Xe})},ve=!y||_-A<x,Pe=!y||_+A>S,he=Ie=>{var ot;const Xe=f[Ie.id];return(ot=Ie.opts.find(ft=>ft.val===Xe))==null?void 0:ot.name},ke=()=>C(Ie=>Math.max(x,Ie-A)),Me=()=>C(Ie=>Math.min(S,Ie+A)),He=Ie=>w.jsxs("div",{className:F(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:F(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Ie.id}`,className:F(t,`${N}-msg-pdp__variant-name`),children:Ie.lbl||Ie.id}),he(Ie)&&w.jsx("span",{className:F(t,`${N}-msg-pdp__variant-value`),children:he(Ie)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ie.id}`,className:F(t,`${N}-msg-pdp__chips`),children:Ie.opts.map(Xe=>{const ot=cc(l.vmat,Ie.id,Xe.val,f),ft=f[Ie.id]===Xe.val;return w.jsxs("label",{className:F(`${N}-msg-pdp__chip`,{selected:ft,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Ie.id}`,value:Xe.val,checked:ft,"aria-description":ot?void 0:"unavailable",onChange:Z(Ie.id,Xe.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("span",{children:Xe.name||Xe.val})]},Xe.val)})})]},Ie.id),nt=Ie=>w.jsxs("div",{className:F(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:F(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Ie.id}`,className:F(t,`${N}-msg-pdp__variant-name`),children:Ie.lbl||"Color"}),he(Ie)&&w.jsx("span",{className:F(t,`${N}-msg-pdp__variant-value`),children:he(Ie)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ie.id}`,className:F(t,`${N}-msg-pdp__swatches`),children:Ie.opts.map(Xe=>{const ot=cc(l.vmat,Ie.id,Xe.val,f),ft=f[Ie.id]===Xe.val,Jn=PF(l,Xe.val);return Jn?w.jsxs("label",{className:F(`${N}-msg-pdp__swatch`,{selected:ft,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Ie.id}`,value:Xe.val,checked:ft,"aria-label":Xe.name||Xe.val,"aria-description":ot?void 0:"unavailable",onChange:Z(Ie.id,Xe.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("img",{className:F(t,`${N}-msg-pdp__swatch-image`),src:Jn,alt:Xe.name||Xe.val,loading:"lazy"})]},Xe.val):w.jsxs("label",{className:F(`${N}-msg-pdp__chip`,{selected:ft,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Ie.id}`,value:Xe.val,checked:ft,"aria-description":ot?void 0:"unavailable",onChange:Z(Ie.id,Xe.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("span",{children:Xe.name||Xe.val})]},Xe.val)})})]});return w.jsx("div",{className:F(t,`${N}-msg-pdp`),children:w.jsxs("div",{className:F(t,`${N}-msg-pdp__card`),children:[w.jsx("div",{className:F(t,`${N}-msg-pdp__gallery`),children:w.jsx(NF,{images:V,altText:l.name,globalClassName:t})}),w.jsxs("div",{className:F(t,`${N}-msg-pdp__content`),children:[l.slugUrl?w.jsx("a",{href:l.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:F(t,`${N}-msg-pdp__title-link`),"aria-label":`Go to product page for ${l.name}`,onClick:Ie=>ac({event:Ie,openLinksInNewTab:n,isCartMgmtSupported:r}),children:l.name}):w.jsx("p",{className:F(t,`${N}-msg-pdp__title`),children:l.name}),w.jsx("div",{"aria-live":"polite","aria-atomic":"true",children:!p&&j?w.jsxs("div",{className:F(t,`${N}-price`,`${N}-msg-pdp__price`),style:{fontSize:"14px"},children:[w.jsxs("span",{className:`${N}-visually-hidden`,children:["Current price",j.isRange?" range":"",":"]}),w.jsx("span",{className:F(t,`${N}-price__amount`),children:j.value}),se&&w.jsxs("span",{className:F(t,`${N}-price__compare`),children:[w.jsxs("span",{className:`${N}-visually-hidden`,children:["Original price",se.isRange?" range":"",":"]}),se.value]})]}):w.jsx(gp,{globalClassName:t,className:`${N}-msg-pdp__price`,retailPrice:K==null?void 0:K.orig,discountPrice:(Wt=K==null?void 0:K.prom)!=null?Wt:K==null?void 0:K.cur,currencyCode:l.ccy,fontSize:"14px"})}),l.dscr&&w.jsx("div",{className:F(t,`${N}-msg-pdp__description`),children:w.jsx(wo,{globalClassName:t,text:l.dscr})}),ie&&nt(ie),ce.map(He),r&&w.jsxs("div",{className:F(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:F(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{className:F(t,`${N}-msg-pdp__variant-name`),children:"Quantity"}),w.jsx("span",{className:F(t,`${N}-msg-pdp__variant-value`),children:_})]}),w.jsxs("div",{className:F(t,`${N}-msg-pdp__stepper`),children:[w.jsx(lr,{className:`${N}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:w.jsx(TC,{}),disabled:ve,onClick:ke}),w.jsx("span",{className:F(t,`${N}-msg-pdp__quantity`),children:_}),w.jsx(lr,{className:`${N}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:w.jsx(bC,{}),disabled:Pe,onClick:Me})]})]}),r&&w.jsxs("div",{className:F(t,`${N}-msg-pdp__actions`),children:[k&&w.jsx(Cw,{expressPaymentUrl:k,globalClassName:t,onOrderComplete:M},k),w.jsx(Sf,{className:`${N}-msg-pdp__add-to-cart`,disabled:!y||u||O,onClick:P,children:O?"Adding...":"Add to cart"})]})]})]})})},HF=({products:e,table:t,globalClassName:n,openLinksInNewTab:r})=>{const{isCartMgmtSupported:s}=ct(),{overrides:a,isInitialized:u}=xo(),l=_o(),d=u?a.ProductComparison:void 0;if(d){const p={name:"ProductComparison",payload:{products:e,table:t},api:l};return w.jsx(So,{tagName:d,props:p,label:"ProductComparison"})}if(!e.length)return null;const f=`auto repeat(${e.length}, 1fr)`,m=`${90+e.length*140}px`;return w.jsx("div",{className:F(n,`${N}-product-comparison`),children:w.jsxs("div",{className:`${N}-product-comparison__grid`,style:{gridTemplateColumns:f,minWidth:m},children:[w.jsxs("div",{className:`${N}-product-comparison__header`,children:[w.jsx("div",{className:`${N}-product-comparison__header-spacer`}),e.map(p=>{var x,S,A,_,C,O,z;const b=p.imageUrl?lc(p.baseUrl,p.imageUrl):void 0,y=rc(p.promotions,(x=p.extendedData)==null?void 0:x.productPromotions);return w.jsxs("div",{className:F(n,`${N}-product-comparison__product-col`),children:[b&&w.jsx("img",{className:F(n,`${N}-product-comparison__image`),src:b,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?w.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:F(n,`${N}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,onClick:W=>ac({event:W,openLinksInNewTab:r,isCartMgmtSupported:s}),children:p.name}):w.jsx("span",{className:F(n,`${N}-product-comparison__name`),children:p.name}),w.jsx(gp,{globalClassName:n,retailPrice:(_=(S=p.pr)==null?void 0:S.orig)!=null?_:(A=p.pr)==null?void 0:A.cur,discountPrice:(z=y!=null?y:(C=p.pr)==null?void 0:C.prom)!=null?z:(O=p.pr)==null?void 0:O.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),w.jsx("div",{className:`${N}-product-comparison__table`,children:t.map(p=>w.jsxs("div",{className:`${N}-product-comparison__row`,children:[w.jsx("div",{className:F(n,`${N}-product-comparison__row-label`),children:p.row_name}),e.map((b,y)=>w.jsx("div",{className:F(n,`${N}-product-comparison__row-value`),children:p.values[y]},`${p.row_name}-${b.id}`))]},p.row_name))})]})})},Fw=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{sendMessage:a,loading:u}=bn(),l=iF(),{isCartMgmtSupported:d,logger:f}=ct(),{overrides:m,isInitialized:p}=xo(),b=_o(),y=R.useMemo(()=>e.response.flatMap(rk),[e.response]);return w.jsx(w.Fragment,{children:y.map((x,S)=>{var A,_,C,O,z,W,D,V,K,ae,j,se,ie,ce,fe,ne,Se,de,J,le,k,M,Z,P,ve,Pe;switch(x.type){case"markdown":{const he=(_=(A=x.data)==null?void 0:A.content)!=null?_:"";return x.index===li&&Hg(he)?null:w.jsx(wo,{text:he,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${x.type}-${(C=x.index)!=null?C:S}`)}case"product_carousel":return w.jsx(pF,{title:(z=(O=x.data)==null?void 0:O.title)!=null?z:"",products:(D=(W=x.data)==null?void 0:W.products)!=null?D:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(V=x.index)!=null?V:S}`);case"product_tile":return w.jsx(BF,{product:x.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(K=x.index)!=null?K:S}`);case"product_comparison":return w.jsx(HF,{products:(j=(ae=x.data)==null?void 0:ae.products)!=null?j:[],table:(ie=(se=x.data)==null?void 0:se.table)!=null?ie:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${x.type}-${(ce=x.index)!=null?ce:S}`);case"cart":{const he=(Se=(ne=(fe=x.data)==null?void 0:fe.cart)==null?void 0:ne.cartSummary)==null?void 0:Se.cartDetails;return he?w.jsx(SF,{cart:he,productsToHighlight:x.data.products_to_highlight,readOnly:t!==l,globalClassName:n,openLinksInNewTab:r},`${x.type}-${(de=x.index)!=null?de:S}`):null}case"order_confirmation":{const he=x.data,ke=(k=(J=he==null?void 0:he.order)==null?void 0:J.orderDetails)!=null?k:(le=he==null?void 0:he.data)==null?void 0:le.orderConfirmation;return ke?w.jsx(kF,{order:ke,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${x.type}-${(M=x.index)!=null?M:S}`):null}case"tool_results":{const he=x.data,ke=x.output_name,Me=p&&ke&&Object.prototype.hasOwnProperty.call(m,ke)?m[ke]:void 0,He=typeof Me=="string"?Me:void 0;if(!He||!ke)return f!=null&&f.isDevelopment&&(ke?f.warn(`🦜 tool_results "${ke}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${ke}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(m),payload:he}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:he})),null;const nt={name:ke,payload:he,api:b};return w.jsx(oF,{overrideName:ke,children:w.jsx(So,{tagName:He,props:nt,label:`toolResult:${ke}`})},`${x.type}-${ke}-${(Z=x.index)!=null?Z:S}`)}case"suggestions":return w.jsx("div",{style:{marginTop:"0.5rem"},children:w.jsx(H8,{disabled:u,suggestions:(ve=(P=x.data)==null?void 0:P.display_text)!=null?ve:[],globalClassName:n,isWidgetStandalone:s,onSuggestionClick:a})},`${x.type}-${(Pe=x.index)!=null?Pe:S}`);default:return null}})})};class Bw extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){_t(!0,"error","Message content threw during render:",t,n.componentStack)}render(){return this.state.hasError?w.jsx("p",{className:F(this.props.globalClassName,`${N}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}const jF=({message:e,globalClassName:t,isWidgetStandalone:n})=>{const{logger:r}=ct();return Mk(e.content)?(r==null||r.debug("Omitting structured user message from transcript",e.content),null):w.jsx("div",{className:F(t,`${N}-message`,n?"standalone":"embedded"),children:w.jsx("div",{className:F(t,`${N}-user-message`,n?"standalone":"embedded"),children:w.jsxs("div",{className:F(t,`${N}-user-message-row`,n?"standalone":"embedded"),children:[w.jsx("span",{className:F(t,`${N}-message-icon user-message-icon`,n?"standalone":"embedded"),children:w.jsx(CC,{})}),w.jsx("p",{className:F(t,`${N}-user-message-text`,n?"standalone":"embedded"),children:e.content})]})})})},zF=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=ct(),a=R.useMemo(()=>{if(typeof e.content!="string")return null;const l=Ku(e.content);if(l)return l;const d=Bg(e.content);return d?{response:[d]}:null},[e.content]),u=R.useMemo(()=>{var f;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 m=JSON.parse(d);if(typeof m=="object"&&m!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),(f=Mg(m))!=null?f:l}catch(m){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 w.jsx(jF,{message:e,globalClassName:t,isWidgetStandalone:r});case"agent":return w.jsx("div",{className:F(t,`${N}-message-group`,r?"standalone":"embedded"),children:w.jsx("div",{className:`${N}-message-group-child`,children:a?w.jsx(Bw,{globalClassName:t,children:w.jsx(Fw,{content:a,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):w.jsx(wo,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return w.jsx("div",{className:F(t,`${N}-message`,r?"standalone":"embedded"),children:w.jsx("p",{className:F(t,`${N}-reset-message`),children:e.content})})}},$F=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>w.jsxs("div",{className:F(n,`${N}-send-error`,r?"standalone":"embedded"),role:"alert",children:[w.jsx("span",{className:F(n,`${N}-send-error-text`),children:e}),w.jsxs("button",{type:"button",className:F(n,`${N}-retry-button`),onClick:t,children:[w.jsx(RC,{"aria-hidden":"true"})," Retry"]})]}),VF="You are offline or we couldn't reach the assistant. Check connection and try again.",Op=({isWidgetStandalone:e})=>{var j,se;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=ct(),{messages:a,streamingBlocks:u,isAgentTyping:l,loading:d,progressMessage:f,connectionStatus:m,error:p,sendError:b,retryLastMessage:y,retryConnection:x}=bn(),S=R.useRef(null),A=a.length>0,_=u.some(sk),C=a[a.length-1],O=C?Ug(C.content,"suggestions"):!1,z=A&&(d||l)&&!_&&!O,W=m==="reconnecting"&&!z,D=m==="error";let V=null;D?V={message:p!=null?p:VF,kind:"connection",onRetry:x}:b&&(V={message:b.message,kind:"send",onRetry:y}),R.useEffect(()=>{var ie;(ie=S.current)==null||ie.scrollIntoView({behavior:"smooth"})},[]),R.useEffect(()=>{var ie;s&&((ie=S.current)==null||ie.scrollIntoView({behavior:"smooth"}))},[a,u,b,p,s]);const K=(j=V==null?void 0:V.message)!=null?j:null,ae=(se=V==null?void 0:V.kind)!=null?se:null;return R.useEffect(()=>{K&&(r==null||r.error("Error message shown to user",{message:K,kind:ae}))},[K,ae,r]),w.jsxs(w.Fragment,{children:[d&&!A&&w.jsx(q8,{globalClassName:t,isWidgetStandalone:e}),a.map(ie=>w.jsx(zF,{message:ie,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},ie.id)),V&&w.jsx($F,{message:V.message,onRetry:V.onRetry,globalClassName:t,isWidgetStandalone:e}),_&&w.jsxs("div",{className:F(t,`${N}-message-group`,e?"standalone":"embedded"),children:[w.jsx(Bw,{globalClassName:t,children:w.jsx(Fw,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e})}),(d||l)&&w.jsx(Ep,{globalClassName:t,isWidgetStandalone:e})]}),z&&w.jsx(Ep,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),W&&w.jsx(Ep,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),w.jsx("div",{ref:S})]})},qF=()=>w.jsxs("svg",{className:`${N}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),w.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),YF=()=>w.jsx("svg",{className:`${N}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.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"})}),WF=(e,t)=>e===0?[]:e<0?t:t.slice(-e),Ip=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=ct(),s=e!=null?e:r,{overrides:a,isInitialized:u}=xo(),l=_o();if(t.length===0||s===0)return null;const d=WF(s,t),f=u?a.ProgressSteps:void 0;if(f){const m={name:"ProgressSteps",payload:{steps:d},api:l};return w.jsx(So,{tagName:f,props:m,label:"ProgressSteps"})}return w.jsx("div",{className:F(n,`${N}-progress-steps-panel`),children:w.jsx("div",{className:`${N}-progress-steps`,children:w.jsx("ul",{className:`${N}-progress-steps-list`,children:d.map((m,p)=>{const b=p<d.length-1,y=p===d.length-1;return w.jsxs("li",{className:F(`${N}-progress-step`,y&&"active"),children:[y&&w.jsx("span",{className:`${N}-progress-step-arc`}),w.jsx("span",{className:`${N}-progress-step-text`,children:m}),w.jsx("span",{className:F(`${N}-progress-step-icon`,b?"done":"active"),children:b?w.jsx(qF,{}):w.jsx(YF,{})})]},`${p}-${m}`)})})})})},Uw=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=ct(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:l,downloadTranscript:d}=bn(),f=s;return w.jsxs("div",{className:F(e,`${N}-container`,`${N}-embedded-chat`),style:t,children:[w.jsx("div",{className:F(e,`${N}-message-container`,`container-${n}`,"embedded"),children:w.jsx(Op,{isWidgetStandalone:!1})}),w.jsx(Ip,{steps:l,globalClassName:e}),w.jsx(yh,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:m=>a(m)}),w.jsx("div",{className:F(`${N}-embedded-chat-menu`),children:w.jsxs(zD,{componentType:"chat",children:[w.jsx(Qb,{componentType:"chat"}),w.jsx(sT,{componentType:"chat",onClearChat:u}),r&&w.jsx(oT,{componentType:"chat",onDownloadTranscript:d})]})})]})},Hw=e=>{var d;const{children:t,disabled:n}=e,[r,s]=R.useState((d=e.container)==null?void 0:d.current),a=R.useSyncExternalStore(XF,()=>!1,()=>!0),{getRootNode:u}=Zl();if(R.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return w.jsx(w.Fragment,{children:t});const l=r!=null?r:GF(u);return w.jsx(w.Fragment,{children:R.Children.map(t,f=>$s.createPortal(f,l))})},GF=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return as(n)?n:Cr(t).body},XF=()=>()=>{},jw=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ct(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=Vr(),{loading:d,isAgentTyping:f,sendMessage:m,resetConversation:p,progressSteps:b,downloadTranscript:y}=bn(),{isOpen:x}=s||{},S=!!s.isOpen,A=r==="standalone",_=f||d,C=()=>{$r(!1)};return S?w.jsx(Vb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:S,children:w.jsx(Hw,{children:w.jsx(dp,{className:F(e,`${N}-container`,`${N}-dialog`,a,u&&"full-height"),style:U(U({},t),l&&{width:l}),children:w.jsxs(lp,{className:F(e,`${N}-dialog-content`,{standalone:A,embedded:!A}),children:[w.jsx(Xb,{componentType:"dialog",onClearChat:p,onClose:C,onDownloadTranscript:y}),w.jsx(cp,{className:F(e,`${N}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:w.jsx(Op,{isWidgetStandalone:A,isOpen:x})}),w.jsx(Ip,{steps:b,globalClassName:e}),w.jsx(yh,{componentType:"dialog",isLoading:_,onSubmit:O=>m(O)})]})})})}):null},zw=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ct(),{mode:r,status:s,isModalFullscreen:a}=Vr(),{loading:u,isAgentTyping:l,sendMessage:d,resetConversation:f,progressSteps:m,downloadTranscript:p}=bn(),{isOpen:b}=s||{},y=!!s.isOpen,x=r==="standalone",S=l||u,A=({open:C})=>{$r(C)},_=()=>{$r(!1)};return y?w.jsx(Vb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:w.jsx(Hw,{children:w.jsxs("div",{className:F(e,`${N}-modal-container`),style:t,children:[w.jsx(Ub,{className:F(e,`${N}-modal-backdrop`)}),w.jsx(dp,{className:F(e,`${N}-container`,`${N}-modal`,{fullscreen:a,standalone:x,embedded:!x}),children:w.jsxs(lp,{className:F(e,`${N}-modal-content`,{standalone:x,embedded:!x}),children:[w.jsx(Xb,{componentType:"modal",onClearChat:f,onClose:_,onDownloadTranscript:p}),w.jsx(cp,{className:F(e,`${N}-message-container`,`container-${n}`,{standalone:x,embedded:!x}),children:w.jsx(Op,{isWidgetStandalone:x,isOpen:b})}),w.jsx(Ip,{steps:m,globalClassName:e}),w.jsx(yh,{componentType:"modal",isLoading:S,onSubmit:C=>d(C)})]})})]})})}):null},KF=()=>{const e=Vr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx(SC,{}):t==="dialog"?w.jsx(jw,{}):t==="modal"?w.jsx(zw,{}):w.jsx(Uw,{})},QF=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=R8();R.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 k8(a),()=>{C8(a)}},[e,t,n,r,s])},$w=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function JF({isReady:e,hasError:t,transmit:n}){const r=R.useRef([]),s=R.useRef(e);s.current=e;const a=R.useRef(n);a.current=n;const u=R.useCallback((l,d)=>{s.current?$w(a.current,l,d):r.current.push({prompt:l,options:d})},[]);return R.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(({prompt:d,options:f})=>$w(a.current,d,f))}},[e]),R.useEffect(()=>{t&&(r.current=[])},[t]),u}const Vw={copilot:"Ask Copilot",messaging:"Ask a question"},ZF=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ct(),{placeholder:s,isResponseLoading:a}=nc(),u=s||Vw[r],[l,d]=R.useState(""),f=t||a,m=p=>{const b=l.trim();b&&(p.preventDefault(),e(b),d(""))};return w.jsxs("form",{className:F(n,`${N}-prompts-input-container`),name:`${N}-prompts-form`,onSubmit:m,children:[w.jsx("label",{htmlFor:`${N}-prompts-input`,"aria-label":u,children:w.jsx(ep,{className:F(n,`${N}-prompts-input-icon`)})}),w.jsx("input",{id:`${N}-prompts-input`,className:F(n,`${N}-prompts-input`),name:`${N}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:p=>d(p.target.value)}),w.jsx(lr,{className:F(n,`${N}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(_f,{}),disabled:f})]})},eB=()=>{const{globalClassName:e,mode:t}=ct(),{placeholder:n}=nc(),r=n||Vw[t];return w.jsxs("div",{className:F(e,`${N}-prompts-header`),children:[w.jsx(ep,{className:F(e,`${N}-prompts-input-icon`),"aria-hidden":"true"}),w.jsx("span",{className:F(e,`${N}-prompts-header-text`),children:r})]})},qw=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:s}=ct(),a=s==null?void 0:s.icon,u=(l=s==null?void 0:s.iconPosition)!=null?l:"left";return w.jsxs("button",{className:F(r,`${N}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&w.jsx(Kb,{icon:a,className:`${N}-suggestion-button-icon`}),w.jsx("span",{children:e})]})},tB="Ask me something else",nB=({label:e,disabled:t=!1})=>w.jsx(qw,{label:e||tB,disabled:t,onClick:()=>$r(!0)}),rB=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=ct(),{staticQuestions:r,askElseButtonLabel:s,disableAskElseButton:a}=nc();if(!(r!=null&&r.length))return null;const u=l=>()=>{const d=l.trim();d&&e(d)};return w.jsxs("div",{className:F(n,`${N}-prompts-button-group`),children:[r.map(l=>w.jsx(qw,{label:l,disabled:t,onClick:u(l)},l)),!a&&w.jsx(nB,{label:s,disabled:t})]})},iB=()=>{const{globalClassName:e,themeVariables:t}=ct(),{isOpen:n,elementId:r,promptsDisplay:s}=nc(),{isConnected:a,sessionExpired:u,sendMessage:l,connectionStatus:d}=bn(),{productId:f}=P8(),m=s!=="buttons",p=s!=="input",[b,y]=R.useState(null),x=d==="error",S=d==="connecting",A=Yg(a,u),_=JF({isReady:A,hasError:x,transmit:l});R.useEffect(()=>{if(!r||b)return;const O=document.getElementById(r);O&&y(O)},[r,b]);const C=R.useCallback(O=>{if($r(!0),f){_(`${O} (Viewing product details for: ${f})`,{displayContent:O});return}_(O)},[_,f]);return!n||!b?null:$s.createPortal(w.jsxs("div",{className:F(e,`${N}-prompts-extension-container`),style:t,children:[m&&w.jsx(ZF,{onSubmit:C,disabled:x}),!m&&w.jsx(eB,{}),p&&w.jsx(rB,{onPromptClick:C,disabled:x}),!x&&S&&w.jsx("p",{className:F(e,`${N}-prompts-connecting-message`),children:"Connecting to agent..."}),x&&w.jsx("p",{className:F(e,`${N}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),b)},sB=()=>(QF(),w.jsx(iB,{})),Yw=e=>w.jsxs(d1,ue(U({},e),{children:[w.jsx(KF,{}),w.jsx(sB,{})]}));var dc={},Ww;function oB(){if(Ww)return dc;Ww=1;var e=g1();return dc.createRoot=e.createRoot,dc.hydrateRoot=e.hydrateRoot,dc}var aB=oB();const Gw=new WeakMap,Xw=(e,t,n,r)=>{var a;(a=Gw.get(e))==null||a.unmount();const s=aB.createRoot(e);Gw.set(e,s),s.render(w.jsx(Yw,ue(U({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},uB=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=vn(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let l;const d=(m,p)=>{for(const b of m)if(b.type==="childList"&&b.addedNodes.length)for(const y of b.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(_t(!0,"log","Target element found, rendering Messaging Widget"),p.disconnect(),clearTimeout(l),Xw(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),_t(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},lB=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=vn(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){_t(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){_t(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){_t(!0,"warn","Container element not found for id:",t),_t(!0,"warn","Beginning observation for element"),uB(U({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}Xw(l,s,n,r)};class cB extends HTMLElement{constructor(){super(...arguments);Je(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const dB={components:{setEntryType:q0,toggleWidgetOpen:$r,toggleWidgetMinimized:Ls,toggleModalFullscreen:Hd,setWidgetType:Bu,setWidgetDialogPosition:jd,loadPromptsComponent:I8,togglePromptsExtensionOpen:Gb}};function fB(){return Fe(this,null,function*(){return zk().getAuthLinkKey()})}Ue.AgentForceWidget=Yw,Ue.AgentforceWidgetProvider=d1,Ue.CIMULATE_WIDGET_READY_EVENT=$0,Ue.MessagingDialog=jw,Ue.MessagingEmbed=Uw,Ue.MessagingModal=zw,Ue.MessagingProvider=Xg,Ue.OverrideElement=cB,Ue.eventHandlers=dB,Ue.getAuthLinkKey=fB,Ue.injectMessagingWidget=lB,Ue.useMessaging=bn,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"})}));
49
+ `))+1))}const u="#".repeat(s),l=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,H({before:"# ",after:`
50
+ `},a.current()));return/^[\t ]/.test(f)&&(f=qa(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}aw.peek=qM;function aw(e){return e.value||""}function qM(){return"<"}uw.peek=YM;function uw(e,t,n,r){const s=wp(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,H({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,H({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({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,H({before:f,after:s},d.current()))),f+=d.move(s),l()),f+=d.move(")"),u(),f}function YM(){return"!"}lw.peek=WM;function lw(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,H({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const p=n.safe(n.associationId(e),H({before:d,after:"]"},l.current()));return u(),n.stack=m,a(),s==="full"||!f||f!==p?d+=l.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function WM(){return"!"}cw.peek=GM;function cw(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 GM(){return"`"}function dw(e,t){const n=Df(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}fw.peek=XM;function fw(e,t,n,r){const s=wp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(dw(e,n)){const m=n.stack;n.stack=[],l=n.enter("autolink");let p=u.move("<");return p+=u.move(n.containerPhrasing(e,H({before:p,after:">"},u.current()))),p+=u.move(">"),l(),n.stack=m,p}l=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,H({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,H({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,H({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,H({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),l(),f}function XM(e,t,n){return dw(e,n)?"<":"["}hw.peek=KM;function hw(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,H({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const p=n.safe(n.associationId(e),H({before:d,after:"]"},l.current()));return u(),n.stack=m,a(),s==="full"||!f||f!==p?d+=l.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function KM(){return"["}function xp(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 QM(e){const t=xp(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 JM(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 pw(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 ZM(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?JM(n):xp(n);const l=e.ordered?u==="."?")":".":QM(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&m&&(!m.children||!m.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),pw(n)===u&&m){let p=-1;for(;++p<e.children.length;){const b=e.children[p];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.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 e9(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 t9(e,t,n,r){const s=e9(n);let a=n.bulletCurrent||xp(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()),m);return d(),f;function m(p,b,y){return b?(y?"":" ".repeat(u))+p:(y?a:a+" ".repeat(u-a.length))+p}}function n9(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const r9=El(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function i9(e,t,n,r){return(e.children.some(function(u){return r9(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function s9(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}mw.peek=o9;function mw(e,t,n,r){const s=s9(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(s+s);let d=u.move(n.containerPhrasing(e,H({after:s,before:l},u.current())));const f=d.charCodeAt(0),m=ic(r.before.charCodeAt(r.before.length-1),f,s);m.inside&&(d=qa(f)+d.slice(1));const p=d.charCodeAt(d.length-1),b=ic(r.after.charCodeAt(0),p,s);b.inside&&(d=d.slice(0,-1)+qa(p));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},l+d+y}function o9(e,t,n){return n.options.strong||"*"}function a9(e,t,n,r){return n.safe(e.value,r)}function u9(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 l9(e,t,n){const r=(pw(n)+(n.options.ruleSpaces?" ":"")).repeat(u9(n));return n.options.ruleSpaces?r.slice(0,-1):r}const gw={blockquote:PM,break:sw,code:BM,definition:HM,emphasis:ow,hardBreak:sw,heading:VM,html:aw,image:uw,imageReference:lw,inlineCode:cw,link:fw,linkReference:hw,list:ZM,listItem:t9,paragraph:n9,root:i9,strong:mw,text:a9,thematicBreak:l9};function c9(){return{enter:{table:d9,tableData:Ew,tableHeader:Ew,tableRow:h9},exit:{codeText:p9,table:f9,tableData:_p,tableHeader:_p,tableRow:_p}}}function d9(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 f9(e){this.exit(e),this.data.inTable=void 0}function h9(e){this.enter({type:"tableRow",children:[]},e)}function _p(e){this.exit(e)}function Ew(e){this.enter({type:"tableCell",children:[]},e)}function p9(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,m9));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function m9(e,t){return t==="|"?t:e}function g9(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:b,table:u,tableCell:d,tableRow:l}};function u(y,x,S,A){return f(m(y,S,A),y.align)}function l(y,x,S,A){const _=p(y,S,A),k=f([_]);return k.slice(0,k.indexOf(`
52
+ `))}function d(y,x,S,A){const _=S.enter("tableCell"),k=S.enter("phrasing"),O=S.containerPhrasing(y,oe(H({},A),{before:a,after:a}));return k(),_(),O}function f(y,x){return OM(y,{align:x,alignDelimiters:r,padding:n,stringLength:s})}function m(y,x,S){const A=y.children;let _=-1;const k=[],O=x.enter("table");for(;++_<A.length;)k[_]=p(A[_],x,S);return O(),k}function p(y,x,S){const A=y.children;let _=-1;const k=[],O=x.enter("tableRow");for(;++_<A.length;)k[_]=d(A[_],y,x,S);return O(),k}function b(y,x,S){let A=gw.inlineCode(y,x,S);return S.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function E9(){return{exit:{taskListCheckValueChecked:yw,taskListCheckValueUnchecked:yw,paragraph:T9}}}function y9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:b9}}}function yw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function T9(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 b9(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=gw.listItem(e,t,n,H(H({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(m){return m+u}}function w9(){return[Z8(),bM(),SM(),c9(),E9()]}function x9(e){return{extensions:[eM(),wM(e),vM(),g9(e),y9()]}}const _9={tokenize:N9,partial:!0},Tw={tokenize:O9,partial:!0},bw={tokenize:I9,partial:!0},ww={tokenize:P9,partial:!0},S9={tokenize:R9,partial:!0},xw={name:"wwwAutolink",tokenize:C9,previous:Sw},_w={name:"protocolAutolink",tokenize:k9,previous:vw},Qr={name:"emailAutolink",tokenize:A9,previous:Aw},Dr={};function v9(){return{text:Dr}}let ms=48;for(;ms<123;)Dr[ms]=Qr,ms++,ms===58?ms=65:ms===91&&(ms=97);Dr[43]=Qr,Dr[45]=Qr,Dr[46]=Qr,Dr[95]=Qr,Dr[72]=[Qr,_w],Dr[104]=[Qr,_w],Dr[87]=[Qr,xw],Dr[119]=[Qr,xw];function A9(e,t,n){const r=this;let s,a;return u;function u(p){return!Sp(p)||!Aw.call(r,r.previous)||vp(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(p))}function l(p){return Sp(p)?(e.consume(p),l):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(S9,m,f)(p):p===45||p===95||dn(p)?(a=!0,e.consume(p),d):m(p)}function f(p){return e.consume(p),s=!0,d}function m(p){return a&&s&&wn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function C9(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!Sw.call(r,r.previous)||vp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_9,e.attempt(Tw,e.attempt(bw,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function k9(e,t,n){const r=this;let s="",a=!1;return u;function u(p){return(p===72||p===104)&&vw.call(r,r.previous)&&!vp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),e.consume(p),l):n(p)}function l(p){if(wn(p)&&s.length<5)return s+=String.fromCodePoint(p),e.consume(p),l;if(p===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),a?f:(a=!0,d)):n(p)}function f(p){return p===null||ll(p)||yt(p)||es(p)||cl(p)?n(p):e.attempt(Tw,e.attempt(bw,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function N9(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 O9(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(ww,d,l)(f):f===null||yt(f)||es(f)||f!==45&&cl(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 I9(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(ww,t,a)(u):u===null||yt(u)||es(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function P9(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||yt(l)||es(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||yt(l)||es(l)?t(l):r(l)}function a(l){return wn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):wn(l)?(e.consume(l),u):n(l)}}function R9(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return dn(a)?n(a):t(a)}}function Sw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function vw(e){return!wn(e)}function Aw(e){return!(e===47||Sp(e))}function Sp(e){return e===43||e===45||e===46||e===95||dn(e)}function vp(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 L9={tokenize:z9,partial:!0};function D9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:U9,continuation:{tokenize:H9},exit:j9}},text:{91:{name:"gfmFootnoteCall",tokenize:B9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:M9,resolveTo:F9}}}}function M9(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=cr(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 F9(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 B9(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return l;function l(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(a>999||p===93&&!u||p===null||p===91||yt(p))return n(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(cr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return yt(p)||(u=!0),a++,e.consume(p),p===92?m:f}function m(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function U9(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",m):n(x)}function m(x){if(u>999||x===93&&!l||x===null||x===91||yt(x))return n(x);if(x===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=cr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return yt(x)||(l=!0),u++,e.consume(x),x===92?p:m}function p(x){return x===91||x===92||x===93?(e.consume(x),u++,m):m(x)}function b(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(a)||s.push(a),at(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function H9(e,t,n){return e.check(Ea,t,e.attempt(L9,t,n))}function j9(e){e.exit("gfmFootnoteDefinition")}function z9(e,t,n){const r=this;return at(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 $9(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 m={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},p={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",m,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",p,l]],y=l.parser.constructs.insideSpan.null;y&&zn(b,b.length,0,dl(y,u.slice(f+1,d),l)),zn(b,b.length,0,[["exit",p,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",m,l]]),zn(u,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,m=this.events;let p=0;return b;function b(x){return f===126&&m[m.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const S=Ws(f);if(x===126)return p>1?d(x):(u.consume(x),p++,y);if(p<2&&!n)return d(x);const A=u.exit("strikethroughSequenceTemporary"),_=Ws(x);return A._open=!_||_===2&&!!S,A._close=!S||S===2&&!!_,l(x)}}}class V9{constructor(){this.map=[]}add(t,n,r){q9(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 q9(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 Y9(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 W9(){return{flow:{null:{name:"table",tokenize:G9,resolveAll:X9}}}}function G9(e,t,n){const r=this;let s=0,a=0,u;return l;function l(U){let ie=r.events.length-1;for(;ie>-1;){const fe=r.events[ie][1].type;if(fe==="lineEnding"||fe==="linePrefix")ie--;else break}const se=ie>-1?r.events[ie][1].type:null,ue=se==="tableHead"||se==="tableRow"?D:d;return ue===D&&r.parser.lazy[r.now().line]?n(U):ue(U)}function d(U){return e.enter("tableHead"),e.enter("tableRow"),f(U)}function f(U){return U===124||(u=!0,a+=1),m(U)}function m(U){return U===null?n(U):qe(U)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),y):n(U):it(U)?at(e,m,"whitespace")(U):(a+=1,u&&(u=!1,s+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),u=!0,m):(e.enter("data"),p(U)))}function p(U){return U===null||U===124||yt(U)?(e.exit("data"),m(U)):(e.consume(U),U===92?b:p)}function b(U){return U===92||U===124?(e.consume(U),p):p(U)}function y(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(U):(e.enter("tableDelimiterRow"),u=!1,it(U)?at(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):x(U))}function x(U){return U===45||U===58?A(U):U===124?(u=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),S):W(U)}function S(U){return it(U)?at(e,A,"whitespace")(U):A(U)}function A(U){return U===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),_):U===45?(a+=1,_(U)):U===null||qe(U)?z(U):W(U)}function _(U){return U===45?(e.enter("tableDelimiterFiller"),k(U)):W(U)}function k(U){return U===45?(e.consume(U),k):U===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),O):(e.exit("tableDelimiterFiller"),O(U))}function O(U){return it(U)?at(e,z,"whitespace")(U):z(U)}function z(U){return U===124?x(U):U===null||qe(U)?!u||s!==a?W(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):W(U)}function W(U){return n(U)}function D(U){return e.enter("tableRow"),V(U)}function V(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),V):U===null||qe(U)?(e.exit("tableRow"),t(U)):it(U)?at(e,V,"whitespace")(U):(e.enter("data"),J(U))}function J(U){return U===null||U===124||yt(U)?(e.exit("data"),V(U)):(e.consume(U),U===92?ce:J)}function ce(U){return U===92||U===124?(e.consume(U),J):J(U)}}function X9(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,m,p;const b=new V9;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(l=!1,d!==0&&(Cw(b,t,d,f,m),m=void 0,d=0),f={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",f,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,p=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,m={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",m,t]])),s=x.type==="tableDelimiterRow"?2:m?3:1):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],p=sc(b,t,a,s,void 0,p),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],p=sc(b,t,a,s,void 0,p)),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],p=sc(b,t,a,s,n,p)):u[1]!==0&&(p=sc(b,t,u,s,n,p)),s=0):s&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&Cw(b,t,d,f,m),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Y9(t.events,n))}return e}function sc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},bo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=bo(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=bo(t.events,n[2]),m=bo(t.events,n[3]),p={type:l,start:Object.assign({},f),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,S=n[3]-n[2]-1;e.add(x,S,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return s!==void 0&&(a.end=Object.assign({},bo(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function Cw(e,t,n,r,s){const a=[],u=bo(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 bo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const K9={name:"tasklistCheck",tokenize:J9};function Q9(){return{text:{91:K9}}}function J9(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 yt(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 qe(d)?t(d):it(d)?e.check({tokenize:Z9},t,n)(d):n(d)}}function Z9(e,t,n){return at(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function eF(e){return rE([v9(),D9(),$9(e),W9(),Q9()])}const tF={};function nF(e){const t=this,n=e||tF,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(eF(n)),a.push(w9()),u.push(x9(n))}const rF=()=>w.jsx("span",{className:`${N}-blinking-cursor`,children:w.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),wo=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>w.jsx(GE,{remarkPlugins:[nF],rehypePlugins:[Xy],components:{h1:({children:s})=>w.jsx("h1",{className:F(e,`${N}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:F(e,`${N}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:F(e,`${N}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:F(e,`${N}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:F(e,`${N}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:F(e,`${N}-li`),children:s}),a:({href:s,children:a})=>w.jsx(nT,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>w.jsx("div",{className:F(e,`${N}-table-container`),children:w.jsx("table",{className:F(e,`${N}-table`),children:s})}),thead:({children:s})=>w.jsx("thead",{className:F(e,`${N}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:F(e,`${N}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:F(e,`${N}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:F(e,`${N}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:F(e,`${N}-td`),children:s}),span:({className:s,children:a})=>s===`${N}-blinking-cursor`?w.jsx(rF,{}):w.jsx("span",{children:a})},children:r+(n?`<span className='${N}-blinking-cursor'></span>`:"")});function iF(){const{messages:e}=bn();return R.useMemo(()=>iC(e,"cart"),[e])}const xo=()=>R.useContext(c1),_o=()=>{const{sendMessage:e,loading:t,isConnected:n}=bn(),{mode:r,status:s}=Vr();return R.useMemo(()=>({sendMessage:e,isLoading:t,isConnected:n,componentType:s.type,mode:r}),[e,t,n,s.type,r])};function sF(e){return e.includes("-")&&e===e.toLowerCase()}function So({tagName:e,props:t,label:n}){const r=R.useRef(null),s=R.useRef(null),a=R.useRef(e),u=R.useRef(null);return R.useEffect(()=>{const l=r.current;if(!l)return;if(a.current!==e&&(a.current=e,s.current=null),!sF(e)){u.current!==e&&(u.current=e,_t(!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){_t(!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 m=f.localName;s.current=typeof customElements!="undefined"&&customElements.get(m)?f:null}catch(f){_t(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,f),s.current=null,l.replaceChildren()}},[e,t,n]),R.useEffect(()=>{const l=r.current;return()=>{s.current=null,l==null||l.replaceChildren()}},[]),w.jsx("div",{ref:r,"data-override":n||"custom"})}class oF extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){_t(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack)}render(){return this.state.hasError?null:this.props.children}}function aF(e){return pt({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 uF="(max-width: 576px)";function lF(e){return e?!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey:!0}function oc({event:e,openLinksInNewTab:t,isCartMgmtSupported:n=!1}={}){n||t||lF(e)&&typeof window!="undefined"&&window.matchMedia(uF).matches&&(Ls(!0),qS())}const cF=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,name:u,showInWidgetDetails:l})=>{const{loading:d}=bn();return w.jsx("div",{className:F(t,`${N}-msg-product-card__image-wrapper`),children:e?n?w.jsx("button",{type:"button",className:F(t,`${N}-msg-product-card__image-button`),onClick:l,disabled:d,"aria-label":a,children:w.jsx("img",{className:F(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener","aria-label":a,onClick:f=>oc({event:f,openLinksInNewTab:s,isCartMgmtSupported:n}),children:w.jsx("img",{className:F(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):w.jsx("img",{className:F(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):w.jsx("div",{className:F(t,`${N}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:w.jsx(aF,{"aria-hidden":"true"})})})},dF=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:s,ariaLabel:a,showInWidgetDetails:u})=>{const{loading:l}=bn();return n?w.jsx("button",{type:"button",disabled:l,onClick:u,className:F(t,`${N}-msg-product-card__title-link`),"aria-label":a,children:e}):r?w.jsx("a",{href:r,target:s?"_blank":"_self",rel:"noopener",className:F(t,`${N}-msg-product-card__title-link`),"aria-label":a,onClick:d=>oc({event:d,openLinksInNewTab:s,isCartMgmtSupported:n}),children:e}):w.jsx("p",{className:F(t,`${N}-msg-product-card__title`),children:e})},fF=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:s})=>{const{showProductDescription:a}=ct(),{overrides:u,isInitialized:l}=xo(),{sendMessage:d,loading:f}=bn(),m=_o(),p=l?u.ProductTile:void 0;if(p){const U={name:"ProductTile",payload:s!=null?s:{},api:m};return w.jsx(So,{tagName:p,props:U,label:"ProductTile"})}const{id:b,name:y,imageUrl:x,description:S,productPageUrl:A,price:_,priceBreakdown:k,discountPrice:O,listPrice:z,currencyCode:W}=e,D=O!=null?O:_,V=B8({priceBreakdown:k,currencyCode:W}),J=()=>{if(f)return;const U=y||"this product",ie=b?` [SKU: ${b}]`:"";d(`Show me details for ${U}${ie}`)},ce=r?`View details for ${y}`:`Go to product page for ${y}`;return w.jsxs("div",{className:F(t,`${N}-msg-product-card`),children:[w.jsx(cF,{imageUrl:x||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:ce,name:y,showInWidgetDetails:J}),w.jsxs("div",{className:F(t,`${N}-msg-product-card__content`),children:[w.jsxs("div",{className:F(t,`${N}-msg-product-card__content-header`),children:[w.jsx(dF,{name:y||b,globalClassName:t,isCartMgmtSupported:r,productPageUrl:A,openLinksInNewTab:n,ariaLabel:ce,showInWidgetDetails:J}),a&&S&&w.jsx("div",{className:F(t,`${N}-msg-product-card__description`),title:S,children:w.jsx(wo,{globalClassName:t,text:S})})]}),w.jsx("div",{className:F(t,`${N}-msg-product-card__price-row`),children:V?w.jsx("span",{className:F(t,`${N}-msg-product-card__price`),"aria-label":`Price from ${V.low} to ${V.high}`,children:V.range}):w.jsx(gp,{globalClassName:t,retailPrice:z,discountPrice:D,currencyCode:W})})]})]})},hF=e=>{var n,r,s;const t=nc(e.data.promotions,(n=e.data.extendedData)==null?void 0:n.productPromotions);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:t!=null?t:e.data.discountPrice,listPrice:(r=e.data.listPrice)!=null?r:t===void 0?void 0:e.data.price,priceBreakdown:(s=e.data.priceBreakdown)!=null?s:void 0,currencyCode:e.data.currencyCode}},pF=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:a=!1})=>{const{showProductCaptions:u}=ct(),{overrides:l,isInitialized:d}=xo(),f=_o(),m=d?l.ProductCarousel:void 0;if(m){const p={name:"ProductCarousel",payload:{title:e,products:t},api:f};return w.jsx(So,{tagName:m,props:p,label:"ProductCarousel"})}return w.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&w.jsx("p",{className:F(n,`${N}-product-carousel-title`),children:e}),w.jsx(o8,{globalClassName:n,spacing:s?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(p=>w.jsxs("div",{className:F(n,`${N}-product-carousel-item`),children:[w.jsx(fF,{product:hF(p),rawProduct:p,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:a}),u&&w.jsx("p",{className:F(n,`${N}-product-carousel-caption`),title:p.caption,children:p.caption})]},p.id))})]})},Ap=44,mF=400,gF=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?Ap:Math.min(Math.max(Math.round(t),Ap),mF)},EF=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},yF="parentOrigin",TF=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(yF,t),n.toString()}catch(n){return e}},bF=(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}},kw=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=R.useRef(null),[s,a]=R.useState(!1),[u,l]=R.useState(Ap),d=typeof window!="undefined"?window.location.origin:"",f=TF(e,d),m=EF(e);return R.useEffect(()=>{const p=b=>{var x,S,A;if(m&&b.origin!==m||r.current&&b.source!==r.current.contentWindow)return;const y=b.data;if(!(!y||typeof y.type!="string"))switch(y.type){case"express.payment.available":a(!0),l(gF((x=y.payload)==null?void 0:x.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((A=(S=y.payload)==null?void 0:S.orderId)!=null?A:null);break}};return window.addEventListener("message",p),()=>window.removeEventListener("message",p)},[m,n]),w.jsx("div",{className:F(t,`${N}-cart-express`,{[`${N}-cart-express-ready`]:s}),style:s?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!s,children:w.jsx("iframe",{ref:r,className:F(t,`${N}-cart-express-frame`),src:f,title:"Express payment",allow:"payment *",scrolling:"no"})})},ac=({code:e,globalClassName:t,inactive:n})=>w.jsxs("span",{className:F(t,`${N}-cart-chip`,{inactive:n}),title:n?"Not applied":void 0,children:[w.jsx(v1,{"aria-hidden":"true"}),w.jsx("span",{children:e})]}),Rn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:s,emphasized:a,isDiscount:u,fallback:l,loading:d})=>{let f;if(typeof n=="number")f=Kr(u?-Math.abs(n):n,r);else if(l)f=l;else return null;return w.jsxs("div",{className:F(s,`${N}-cart-total-row`,{emphasized:a}),children:[w.jsxs("span",{className:F(s,`${N}-cart-total-label`),children:[e,t&&w.jsx("span",{className:F(s,`${N}-cart-total-badge`),children:t})]}),w.jsx("span",{className:F(s,`${N}-cart-total-value`),children:d?w.jsx("span",{className:F(s,`${N}-cart-total-shimmer`)}):f})]})};function Nw(e){var a;const n=((a=e.variants)!=null?a:[]).filter(u=>u.value).map(u=>`${u.lbl}: ${u.value}`).join(", "),r=n?` (${n})`:"",s=e.productId?` [SKU: ${e.productId}]`:"";return`${e.name}${r}${s}`}function Ow(e){var r;const n=((r=e.variants)!=null?r:[]).filter(s=>s.value).map(s=>s.value).join(", ");return n?`${e.name} (${n})`:e.name}function Cp(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function kp(e){return(e!=null?e:[]).map(Cp).filter(t=>t!==null)}function Iw(e){return e&&typeof e=="object"&&typeof e.status=="string"?e.status:void 0}function wF(e,t){var s;const n=new Map;for(const a of t!=null?t:[]){const u=Cp(a),l=Iw(a);u!==null&&l!==void 0&&n.set(u.toLowerCase(),l)}const r=[];for(const a of e!=null?e:[]){const u=Cp(a);if(u===null)continue;const l=(s=Iw(a))!=null?s:n.get(u.toLowerCase());r.push({code:u,applied:l==null||l==="applied"})}return r}function Pw(e,t,n){const r=new Set((e!=null?e:[]).flatMap(s=>kp(s.coupons)).map(s=>s.toLowerCase()));return wF(t,n).filter(s=>!r.has(s.code.toLowerCase()))}const xF=({quantity:e,disabled:t,globalClassName:n,onChange:r})=>{const[s,a]=R.useState(e.toString());R.useEffect(()=>{a(e.toString())},[e]);const u=f=>{if(t)return;const m=f.target.value;/^\d*$/.test(m)&&a(m)},l=()=>{const f=parseInt(s,10);!t&&!isNaN(f)&&f>0&&f!==e?r(f):a(e.toString())},d=f=>{f.key==="Enter"&&(f.preventDefault(),l())};return w.jsx("div",{className:F(n,`${N}-cart-qty-input-wrapper`),children:w.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:F(n,`${N}-cart-qty-input`),value:s,disabled:t,onChange:u,onBlur:l,onKeyDown:d,"aria-label":"Quantity"})})},_F=({item:e,currencyCode:t,disabled:n,globalClassName:r,onRemove:s,onQuantityChange:a})=>{var d,f;const u=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,l=kp(e.coupons);return w.jsxs("li",{className:F(r,`${N}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:F(r,`${N}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:F(r,`${N}-cart-item-details`),children:[w.jsx("p",{className:F(r,`${N}-cart-item-name`),children:e.name}),w.jsxs("div",{className:F(r,`${N}-cart-item-attrs`),children:[((d=e.variants)!=null?d:[]).map(m=>w.jsxs("p",{className:F(r,`${N}-cart-item-attr`),children:[m.lbl,": ",m.value]},`${m.type}-${m.value}`)),((f=e.promotions)!=null?f:[]).map(m=>w.jsxs("p",{className:F(r,`${N}-cart-item-attr`),children:["Promotion: ",m]},m))]}),l.length>0&&w.jsx("div",{className:F(r,`${N}-cart-chips`),children:l.map(m=>w.jsx(ac,{code:m,globalClassName:r},m))}),w.jsxs("span",{className:F(r,`${N}-cart-item-price`),children:[u&&w.jsx("span",{className:F(r,`${N}-cart-item-original-price`),children:Kr(e.originalSubtotal,t)}),w.jsx("span",{className:F(r,`${N}-cart-item-final-price`),children:Kr(e.itemSubtotal,t)})]}),w.jsxs("div",{className:F(r,`${N}-cart-item-footer`),children:[w.jsx("span",{className:F(r,`${N}-cart-qty-heading`),children:"Quantity"}),w.jsx(xF,{quantity:e.quantity,disabled:n,globalClassName:r,onChange:m=>a(e,m)}),w.jsx("button",{type:"button",className:F(r,`${N}-cart-item-remove`),disabled:n,onClick:()=>s(e),children:"Remove"})]})]})]})},SF=({cart:e,readOnly:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:s,loading:a}=bn(),[u,l]=R.useState(!1),[d,f]=R.useState(""),m=a||!!t,{items:p=[],currencyCode:b="USD",subtotal:y,total:x,taxes:S,shippingCost:A,shippingDiscount:_,shippingPromotions:k=[],promotionsDiscount:O,promotions:z=[],couponsDiscount:W,bodyMessage:D,footerMessage:V,checkoutButtonUrl:J,expressPaymentUrl:ce}=e,U=Pw(p,e.couponsApplied,e.coupons),ie=ne=>{m||s(`Remove ${Nw(ne)} from my cart`,{displayContent:`Remove ${Ow(ne)} from cart`})},se=ne=>{s(ne?`I completed express payment. Show my order confirmation for order ${ne}.`:"I completed express payment. Show my order confirmation.")},ue=(ne,Se)=>{m||Se<1||s(`Update ${Nw(ne)} quantity to ${Se}`,{displayContent:`Update ${Ow(ne)} to qty ${Se}`})},fe=()=>{const ne=d.trim();!ne||m||(s(`Apply coupon code ${ne}`),f(""))};return w.jsxs("div",{className:F(n,`${N}-cart`,m&&`${N}-cart-busy`),children:[w.jsxs("div",{className:F(n,`${N}-cart-box`),children:[D&&w.jsxs("button",{type:"button",className:F(n,`${N}-cart-summary`),"aria-expanded":u,onClick:()=>l(ne=>!ne),children:[w.jsx("span",{className:F(n,`${N}-cart-summary-text`),children:w.jsx(wo,{text:D,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1})}),w.jsx("span",{className:F(n,`${N}-cart-summary-toggle`),"aria-hidden":"true",children:u?w.jsx(_1,{}):w.jsx(S1,{})})]}),u&&w.jsxs("div",{className:F(n,`${N}-cart-expanded`),children:[w.jsxs("div",{className:F(n,`${N}-cart-items-section`),children:[w.jsx("ul",{className:F(n,`${N}-cart-items`),children:p.map(ne=>w.jsx(_F,{item:ne,currencyCode:b,disabled:m,globalClassName:n,onRemove:ie,onQuantityChange:ue},ne.itemId))}),U.length>0&&w.jsx("div",{className:F(n,`${N}-cart-chips`,`${N}-cart-applied-coupons`),children:U.map(ne=>w.jsx(ac,{code:ne.code,inactive:!ne.applied,globalClassName:n},ne.code))})]}),w.jsxs("div",{className:F(n,`${N}-cart-totals`),children:[w.jsx(Rn,{label:"Subtotal",value:y,currencyCode:b,globalClassName:n,loading:!1}),w.jsx(Rn,{label:"Coupon",value:W,currencyCode:b,globalClassName:n,isDiscount:!0,loading:!1}),w.jsx(Rn,{label:"Promotions",badge:z[0],value:O,currencyCode:b,globalClassName:n,isDiscount:!0,loading:!1}),w.jsx(Rn,{label:"Shipping",value:A,currencyCode:b,globalClassName:n,fallback:"TBD",loading:!1}),w.jsx(Rn,{label:"Shipping Discount",badge:k[0],value:_,currencyCode:b,globalClassName:n,isDiscount:!0,loading:!1}),w.jsx(Rn,{label:"Tax",value:S,currencyCode:b,globalClassName:n,fallback:"TBD",loading:!1}),w.jsx(Rn,{label:"Total",value:x,currencyCode:b,globalClassName:n,emphasized:!0,loading:!1})]})]})]}),w.jsxs("div",{className:F(n,`${N}-cart-coupon`),children:[w.jsxs("div",{className:F(n,`${N}-cart-coupon-field`),children:[w.jsx("span",{className:F(n,`${N}-cart-coupon-icon`),"aria-hidden":"true",children:w.jsx(v1,{})}),w.jsx("input",{type:"text",className:F(n,`${N}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:d,disabled:m,onChange:ne=>f(ne.target.value),onKeyDown:ne=>{ne.key==="Enter"&&(ne.preventDefault(),fe())}})]}),w.jsx("button",{type:"button",className:F(n,`${N}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:m||!d.trim(),onClick:fe,children:w.jsx(Nk,{"aria-hidden":"true"})})]}),ce&&w.jsx(kw,{expressPaymentUrl:ce,globalClassName:n,onOrderComplete:se}),J&&w.jsxs("a",{className:F(n,`${N}-cart-checkout-button`),href:J,target:r?"_blank":"_self",rel:"noopener noreferrer",children:[w.jsx(Ck,{"aria-hidden":"true"}),w.jsx("span",{children:"Checkout"})]}),w.jsx("p",{className:F(n,`${N}-cart-footer`),children:V||"Shipping and taxes calculated at checkout."})]})},vF=({item:e,currencyCode:t,globalClassName:n})=>{var a,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,s=kp(e.coupons);return w.jsxs("li",{className:F(n,`${N}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:F(n,`${N}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:F(n,`${N}-cart-item-details`),children:[w.jsx("p",{className:F(n,`${N}-cart-item-name`),children:e.name}),w.jsxs("div",{className:F(n,`${N}-cart-item-attrs`),children:[((a=e.variants)!=null?a:[]).map(l=>w.jsxs("p",{className:F(n,`${N}-cart-item-attr`),children:[l.lbl,": ",l.value]},`${l.type}-${l.value}`)),((u=e.promotions)!=null?u:[]).map(l=>w.jsxs("p",{className:F(n,`${N}-cart-item-attr`),children:["Promotion: ",l]},l))]}),s.length>0&&w.jsx("div",{className:F(n,`${N}-cart-chips`),children:s.map(l=>w.jsx(ac,{code:l,globalClassName:n},l))}),w.jsxs("span",{className:F(n,`${N}-cart-item-price`),children:[r&&w.jsx("span",{className:F(n,`${N}-cart-item-original-price`),children:Kr(e.originalSubtotal,t)}),w.jsx("span",{className:F(n,`${N}-cart-item-final-price`),children:Kr(e.itemSubtotal,t)})]}),w.jsx("div",{className:F(n,`${N}-cart-item-footer`),children:w.jsxs("span",{className:F(n,`${N}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},AF=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},CF=({order:e,globalClassName:t})=>{const[n,r]=R.useState(!0),{id:s,orderedOn:a,items:u=[],currencyCode:l="USD",subtotal:d,total:f,taxes:m,shippingCost:p,shippingDiscount:b,shippingPromotions:y=[],promotionsDiscount:x,promotions:S=[],couponsDiscount:A,bodyMessage:_,footerMessage:k}=e,O=Pw(u,e.couponsApplied);return w.jsxs("div",{className:F(t,`${N}-cart`),children:[w.jsxs("div",{className:F(t,`${N}-cart-banner`),children:[w.jsx("span",{className:F(t,`${N}-cart-banner-icon`),"aria-hidden":"true",children:w.jsx(Ok,{})}),w.jsx("p",{className:F(t,`${N}-cart-banner-text`),children:"Your order is confirmed!"})]}),w.jsxs("div",{className:F(t,`${N}-order-confirmation-meta`),children:[w.jsxs("span",{children:["Order No: ",s]}),w.jsxs("span",{children:["Ordered On: ",AF(a)]})]}),w.jsxs("div",{className:F(t,`${N}-cart-box`),children:[_&&w.jsxs("button",{type:"button",className:F(t,`${N}-cart-summary`),"aria-expanded":n,onClick:()=>r(z=>!z),children:[w.jsx("span",{className:F(t,`${N}-cart-summary-text`),children:w.jsx(wo,{text:_,globalClassName:t,showIsLoading:!1})}),w.jsx("span",{className:F(t,`${N}-cart-summary-toggle`),"aria-hidden":"true",children:n?w.jsx(_1,{}):w.jsx(S1,{})})]}),n&&w.jsxs("div",{className:F(t,`${N}-cart-expanded`),children:[w.jsx("ul",{className:F(t,`${N}-cart-items`),children:u.map(z=>w.jsx(vF,{item:z,currencyCode:l,globalClassName:t},z.itemId))}),O.length>0&&w.jsx("div",{className:F(t,`${N}-cart-chips`,`${N}-cart-applied-coupons`),children:O.map(z=>w.jsx(ac,{code:z.code,globalClassName:t},z.code))}),w.jsxs("div",{className:F(t,`${N}-cart-totals`),children:[w.jsx(Rn,{label:"Subtotal",value:d,currencyCode:l,globalClassName:t}),w.jsx(Rn,{label:"Coupon",value:A,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Rn,{label:"Promotions",badge:S[0],value:x,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Rn,{label:"Shipping",value:p,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Rn,{label:"Shipping Discount",badge:y[0],value:b,currencyCode:l,globalClassName:t,isDiscount:!0}),w.jsx(Rn,{label:"Tax",value:m,currencyCode:l,globalClassName:t,fallback:"TBD"}),w.jsx(Rn,{label:"Total",value:f,currencyCode:l,globalClassName:t,emphasized:!0})]})]})]}),w.jsx("p",{className:F(t,`${N}-cart-footer`),children:k||"Shipping and taxes calculated at checkout."})]})},kF=({image:e,alt:t,globalClassName:n})=>{const[r,s]=R.useState(e.src),[a,u]=R.useState(!1),l=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&s(e.fallbackSrc)};return w.jsx("img",{className:F(n,`${N}-pdp-gallery__image`,{[`${N}-pdp-gallery__image--loaded`]:a}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:l})},NF=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return w.jsxs(up,{className:F(n,`${N}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[w.jsx(sp,{className:F(n,`${N}-pdp-gallery__item-group`),children:e.map((s,a)=>w.jsx(ip,{index:a,className:F(n,`${N}-pdp-gallery__item`),children:w.jsx(kF,{image:s,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,globalClassName:n})},s.src))}),r&&w.jsxs(tp,{className:F(n,`${N}-pdp-gallery__control`),children:[w.jsx(ap,{className:F(n,`${N}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:w.jsx(Ab,{size:"16px"})}),w.jsx(op,{className:F(n,`${N}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:w.jsx(Cb,{size:"16px"})})]}),r&&w.jsx(rp,{className:F(n,`${N}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(s,a)=>w.jsx(np,{index:a,className:F(n,`${N}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},uc=(e,t)=>{if(/^(https?:)?\/\//i.test(t)||/^data:/i.test(t)||!e)return t;try{return new URL(t,e).href}catch(n){return`${e}${t}`}},OF="color",lc=e=>(e!=null?e:"").toLowerCase()===OF,IF=e=>e.replace(/(^|\/)large\//,"$1medium/"),Rw=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>lc(n.id)&&n.vals.includes(t)),Lw=(e,t)=>{const n=IF(t),r=uc(e,n);return n===t?{src:r}:{src:r,fallbackSrc:uc(e,t)}},PF=(e,t)=>{var l,d;const n=((l=e.imgGroups)!=null?l:[]).filter(f=>f.viewType==="large"),r=t&&n.find(f=>Rw(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=>Lw(e.baseUrl,f.url));return u.length>0?u:e.imageUrl?[Lw(e.baseUrl,e.imageUrl)]:[]},RF=(e,t)=>{var s,a,u;const n=((s=e.imgGroups)!=null?s:[]).find(l=>l.viewType==="swatch"&&Rw(l,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?uc(e.baseUrl,r):""},LF=e=>{const t=e.vattr,n=e.vmat;if(!t||t.length===0||!n||n.length===0)return e;const r=new Set(t.map(f=>f.id)),s=[...new Set(n.flatMap(f=>Object.keys(f.vars)))];if(s.every(f=>r.has(f)))return e;const a={},u=new Set;for(const f of s){if(r.has(f)){a[f]=f,u.add(f);continue}const m=new Set(n.map(b=>b.vars[f]).filter(Boolean));if(m.size===0)continue;const p=t.filter(b=>!u.has(b.id)&&b.opts.length>0&&[...m].every(y=>b.opts.some(x=>x.val===y)));p.length===1&&(a[f]=p[0].id,u.add(p[0].id))}const l=s.filter(f=>!r.has(f)).length;return Object.keys(a).filter(f=>a[f]!==f).length<l?e:oe(H({},e),{vmat:n.map(f=>oe(H({},f),{vars:Object.fromEntries(Object.entries(f.vars).map(([m,p])=>{var b;return[(b=a[m])!=null?b:m,p]}))}))})},cc=(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})}),DF=(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]}))},MF=(e,t,n,r,s)=>{if(!e||e.length===0)return oe(H({},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,m])=>{var p;return f===n||((p=l.vars)==null?void 0:p[f])===m})});if(a)return H({},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?H({},u.vars):oe(H({},s),{[n]:r})},Dw=(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,m])=>{var p;return((p=d.vars)==null?void 0:p[f])===m}));return(l=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?l:null},FF=(e,t)=>{var a;const n=nc(e.promotions,(a=e.extendedData)==null?void 0:a.productPromotions),r=typeof n=="number"?oe(H({},e.pr),{prom:n}):e.pr;if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return r;const s=e.vmat.find(u=>u.ord!==!1&&Object.entries(t).every(([l,d])=>{var f;return((f=u.vars)==null?void 0:f[l])===d}));return s!=null&&s.pr?s.pr:r},Np=e=>{const t=e.filter(n=>typeof n=="number"&&Number.isFinite(n));if(t.length!==0)return{min:Math.min(...t),max:Math.max(...t)}},BF=e=>{var y,x,S;if(!((y=e.vmat)!=null&&y.length))return;const t=nc(e.promotions,(x=e.extendedData)==null?void 0:x.productPromotions),n=t===void 0?e.pr:oe(H({},e.pr),{prom:t}),r=e.vmat.filter(A=>A.ord!==!1).map(A=>{var _;return(_=A.pr)!=null?_:n}).filter(A=>A!==void 0);if(r.length===0)return;const s=Np(r.map(A=>A.prom)),a=Np(r.map(A=>A.cur)),u=Np(r.map(A=>A.orig)),l=r.some(A=>typeof A.cur=="number"&&typeof A.orig=="number"&&A.cur<A.orig),d=s!=null?s:a,f=s||l?u:void 0;if(!d)return;const m=d.min!==d.max,p=f&&f.min!==f.max,b=d.min!==((S=n==null?void 0:n.prom)!=null?S:n==null?void 0:n.cur)||f!==void 0&&f.min!==(n==null?void 0:n.orig);if(!(!m&&!p&&!b))return H({active:d},f?{compare:f}:{})},Mw=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const s=r.opts.find(u=>cc(e.vmat,r.id,u.val)),a=s!=null?s:r.opts[0];a&&(t[r.id]=a.val)}return t},UF=300,HF=e=>{const{overrides:t,isInitialized:n}=xo(),r=_o(),s=n?t.ProductDetailCard:void 0;if(s){const a={name:"ProductDetailCard",payload:e.product,api:r};return w.jsx(So,{tagName:s,props:a,label:"ProductDetailCard"})}return w.jsx(jF,H({},e))},jF=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var Nt,Ft,xn,pn,Bt,$e,St,Wt;const{addToCart:s,sendMessage:a,loading:u}=bn(),l=R.useMemo(()=>LF(e.data),[e.data]),d=(Nt=l.vattr)!=null?Nt:[],[f,m]=R.useState(()=>Mw(l)),[p,b]=R.useState(!1);R.useEffect(()=>{m(Mw(l)),b(!1)},[l,e.id]);const y=DF(l.vmat,f),x=(xn=(Ft=l.quantity)==null?void 0:Ft.minQuantity)!=null?xn:1,S=(Bt=(pn=l.quantity)==null?void 0:pn.maxQuantity)!=null?Bt:Number.POSITIVE_INFINITY,A=(St=($e=l.quantity)==null?void 0:$e.increment)!=null?St:1,[_,k]=R.useState(x),[O,z]=R.useState(!1),W=R.useRef(!1);R.useEffect(()=>{O&&(u?W.current=!0:W.current&&(W.current=!1,z(!1)))},[O,u]);const D=d.find(Ie=>lc(Ie.id)),V=d.filter(Ie=>!lc(Ie.id)),J=D?f[D.id]:void 0,ce=R.useMemo(()=>PF(l,J),[l,J]),U=R.useMemo(()=>FF(l,f),[l,f]),ie=R.useMemo(()=>BF(l),[l]),se=ie?mp(oe(H({},ie.active),{currencyCode:l.ccy})):null,ue=ie!=null&&ie.compare?mp(oe(H({},ie.compare),{currencyCode:l.ccy})):null,fe=Dw(l,f),[ne,Se]=R.useState(_),de=R.useRef(fe),Q=de.current===fe?ne:_;R.useEffect(()=>{if(de.current!==fe){de.current=fe,Se(_);return}const Ie=window.setTimeout(()=>Se(_),UF);return()=>window.clearTimeout(Ie)},[_,fe]);const le=_===ne,C=R.useMemo(()=>y&&(de.current!==fe||le)?bF(l.expressPaymentUrl,fe,Q):null,[l.expressPaymentUrl,fe,Q,y,le]),M=R.useCallback(Ie=>{a(Ie?`I completed express payment. Show my order confirmation for order ${Ie}.`:"I completed express payment. Show my order confirmation.")},[a]),Z=(Ie,Xe)=>()=>{b(!0),m(ot=>{const ft=!cc(l.vmat,Ie,Xe,ot);return lc(Ie)||ft?MF(l.vmat,d,Ie,Xe,ot):oe(H({},ot),{[Ie]:Xe})})},P=()=>{if(u)return;const Ie=Dw(l,f);if(!Ie)return;const Xe=d.map(ot=>{const ft=ot.opts.find(Jn=>Jn.val===f[ot.id]);return ft?{label:ot.lbl||ot.id,value:ft.name||ft.val}:null}).filter(ot=>ot!==null);z(!0),s({productName:l.name,sku:Ie,quantity:_,variants:Xe})},ve=!y||_-A<x,Pe=!y||_+A>S,he=Ie=>{var ot;const Xe=f[Ie.id];return(ot=Ie.opts.find(ft=>ft.val===Xe))==null?void 0:ot.name},Ce=()=>k(Ie=>Math.max(x,Ie-A)),Me=()=>k(Ie=>Math.min(S,Ie+A)),He=Ie=>w.jsxs("div",{className:F(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:F(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Ie.id}`,className:F(t,`${N}-msg-pdp__variant-name`),children:Ie.lbl||Ie.id}),he(Ie)&&w.jsx("span",{className:F(t,`${N}-msg-pdp__variant-value`),children:he(Ie)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ie.id}`,className:F(t,`${N}-msg-pdp__chips`),children:Ie.opts.map(Xe=>{const ot=cc(l.vmat,Ie.id,Xe.val,f),ft=f[Ie.id]===Xe.val;return w.jsxs("label",{className:F(`${N}-msg-pdp__chip`,{selected:ft,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Ie.id}`,value:Xe.val,checked:ft,"aria-description":ot?void 0:"unavailable",onChange:Z(Ie.id,Xe.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("span",{children:Xe.name||Xe.val})]},Xe.val)})})]},Ie.id),nt=Ie=>w.jsxs("div",{className:F(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:F(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${Ie.id}`,className:F(t,`${N}-msg-pdp__variant-name`),children:Ie.lbl||"Color"}),he(Ie)&&w.jsx("span",{className:F(t,`${N}-msg-pdp__variant-value`),children:he(Ie)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${Ie.id}`,className:F(t,`${N}-msg-pdp__swatches`),children:Ie.opts.map(Xe=>{const ot=cc(l.vmat,Ie.id,Xe.val,f),ft=f[Ie.id]===Xe.val,Jn=RF(l,Xe.val);return Jn?w.jsxs("label",{className:F(`${N}-msg-pdp__swatch`,{selected:ft,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Ie.id}`,value:Xe.val,checked:ft,"aria-label":Xe.name||Xe.val,"aria-description":ot?void 0:"unavailable",onChange:Z(Ie.id,Xe.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("img",{className:F(t,`${N}-msg-pdp__swatch-image`),src:Jn,alt:Xe.name||Xe.val,loading:"lazy"})]},Xe.val):w.jsxs("label",{className:F(`${N}-msg-pdp__chip`,{selected:ft,unavailable:!ot}),children:[w.jsx("input",{type:"radio",name:`variant-${Ie.id}`,value:Xe.val,checked:ft,"aria-description":ot?void 0:"unavailable",onChange:Z(Ie.id,Xe.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("span",{children:Xe.name||Xe.val})]},Xe.val)})})]});return w.jsx("div",{className:F(t,`${N}-msg-pdp`),children:w.jsxs("div",{className:F(t,`${N}-msg-pdp__card`),children:[w.jsx("div",{className:F(t,`${N}-msg-pdp__gallery`),children:w.jsx(NF,{images:ce,altText:l.name,globalClassName:t})}),w.jsxs("div",{className:F(t,`${N}-msg-pdp__content`),children:[l.slugUrl?w.jsx("a",{href:l.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:F(t,`${N}-msg-pdp__title-link`),"aria-label":`Go to product page for ${l.name}`,onClick:Ie=>oc({event:Ie,openLinksInNewTab:n,isCartMgmtSupported:r}),children:l.name}):w.jsx("p",{className:F(t,`${N}-msg-pdp__title`),children:l.name}),w.jsx("div",{"aria-live":"polite","aria-atomic":"true",children:!p&&se?w.jsxs("div",{className:F(t,`${N}-price`,`${N}-msg-pdp__price`),style:{fontSize:"14px"},children:[w.jsxs("span",{className:`${N}-visually-hidden`,children:["Current price",se.isRange?" range":"",":"]}),w.jsx("span",{className:F(t,`${N}-price__amount`),children:se.value}),ue&&w.jsxs("span",{className:F(t,`${N}-price__compare`),children:[w.jsxs("span",{className:`${N}-visually-hidden`,children:["Original price",ue.isRange?" range":"",":"]}),ue.value]})]}):w.jsx(gp,{globalClassName:t,className:`${N}-msg-pdp__price`,retailPrice:U==null?void 0:U.orig,discountPrice:(Wt=U==null?void 0:U.prom)!=null?Wt:U==null?void 0:U.cur,currencyCode:l.ccy,fontSize:"14px"})}),l.dscr&&w.jsx("div",{className:F(t,`${N}-msg-pdp__description`),children:w.jsx(wo,{globalClassName:t,text:l.dscr})}),D&&nt(D),V.map(He),r&&w.jsxs("div",{className:F(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:F(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{className:F(t,`${N}-msg-pdp__variant-name`),children:"Quantity"}),w.jsx("span",{className:F(t,`${N}-msg-pdp__variant-value`),children:_})]}),w.jsxs("div",{className:F(t,`${N}-msg-pdp__stepper`),children:[w.jsx(lr,{className:`${N}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:w.jsx(Tk,{}),disabled:ve,onClick:Ce}),w.jsx("span",{className:F(t,`${N}-msg-pdp__quantity`),children:_}),w.jsx(lr,{className:`${N}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:w.jsx(bk,{}),disabled:Pe,onClick:Me})]})]}),r&&w.jsxs("div",{className:F(t,`${N}-msg-pdp__actions`),children:[C&&w.jsx(kw,{expressPaymentUrl:C,globalClassName:t,onOrderComplete:M},C),w.jsx(Sf,{className:`${N}-msg-pdp__add-to-cart`,disabled:!y||u||O,onClick:P,children:O?"Adding...":"Add to cart"})]})]})]})})},zF=({products:e,table:t,globalClassName:n,openLinksInNewTab:r})=>{const{isCartMgmtSupported:s}=ct(),{overrides:a,isInitialized:u}=xo(),l=_o(),d=u?a.ProductComparison:void 0;if(d){const p={name:"ProductComparison",payload:{products:e,table:t},api:l};return w.jsx(So,{tagName:d,props:p,label:"ProductComparison"})}if(!e.length)return null;const f=`auto repeat(${e.length}, 1fr)`,m=`${90+e.length*140}px`;return w.jsx("div",{className:F(n,`${N}-product-comparison`),children:w.jsxs("div",{className:`${N}-product-comparison__grid`,style:{gridTemplateColumns:f,minWidth:m},children:[w.jsxs("div",{className:`${N}-product-comparison__header`,children:[w.jsx("div",{className:`${N}-product-comparison__header-spacer`}),e.map(p=>{var x,S,A,_,k,O,z;const b=p.imageUrl?uc(p.baseUrl,p.imageUrl):void 0,y=nc(p.promotions,(x=p.extendedData)==null?void 0:x.productPromotions);return w.jsxs("div",{className:F(n,`${N}-product-comparison__product-col`),children:[b&&w.jsx("img",{className:F(n,`${N}-product-comparison__image`),src:b,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?w.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:F(n,`${N}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,onClick:W=>oc({event:W,openLinksInNewTab:r,isCartMgmtSupported:s}),children:p.name}):w.jsx("span",{className:F(n,`${N}-product-comparison__name`),children:p.name}),w.jsx(gp,{globalClassName:n,retailPrice:(_=(S=p.pr)==null?void 0:S.orig)!=null?_:(A=p.pr)==null?void 0:A.cur,discountPrice:(z=y!=null?y:(k=p.pr)==null?void 0:k.prom)!=null?z:(O=p.pr)==null?void 0:O.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),w.jsx("div",{className:`${N}-product-comparison__table`,children:t.map(p=>w.jsxs("div",{className:`${N}-product-comparison__row`,children:[w.jsx("div",{className:F(n,`${N}-product-comparison__row-label`),children:p.row_name}),e.map((b,y)=>w.jsx("div",{className:F(n,`${N}-product-comparison__row-value`),children:p.values[y]},`${p.row_name}-${b.id}`))]},p.row_name))})]})})},Fw=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s})=>{const{sendMessage:a,loading:u}=bn(),l=iF(),{isCartMgmtSupported:d,logger:f}=ct(),{overrides:m,isInitialized:p}=xo(),b=_o(),y=R.useMemo(()=>e.response.flatMap(rC),[e.response]);return w.jsx(w.Fragment,{children:y.map((x,S)=>{var A,_,k,O,z,W,D,V,J,ce,U,ie,se,ue,fe,ne,Se,de,Q,le,C,M,Z,P,ve,Pe;switch(x.type){case"markdown":{const he=(_=(A=x.data)==null?void 0:A.content)!=null?_:"";return x.index===li&&Hg(he)?null:w.jsx(wo,{text:he,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1},`${x.type}-${(k=x.index)!=null?k:S}`)}case"product_carousel":return w.jsx(pF,{title:(z=(O=x.data)==null?void 0:O.title)!=null?z:"",products:(D=(W=x.data)==null?void 0:W.products)!=null?D:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(V=x.index)!=null?V:S}`);case"product_tile":return w.jsx(HF,{product:x.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s,isCartMgmtSupported:d},`${x.type}-${(J=x.index)!=null?J:S}`);case"product_comparison":return w.jsx(zF,{products:(U=(ce=x.data)==null?void 0:ce.products)!=null?U:[],table:(se=(ie=x.data)==null?void 0:ie.table)!=null?se:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${x.type}-${(ue=x.index)!=null?ue:S}`);case"cart":{const he=(Se=(ne=(fe=x.data)==null?void 0:fe.cart)==null?void 0:ne.cartSummary)==null?void 0:Se.cartDetails;return he?w.jsx(SF,{cart:he,productsToHighlight:x.data.products_to_highlight,readOnly:t!==l,globalClassName:n,openLinksInNewTab:r},`${x.type}-${(de=x.index)!=null?de:S}`):null}case"order_confirmation":{const he=x.data,Ce=(C=(Q=he==null?void 0:he.order)==null?void 0:Q.orderDetails)!=null?C:(le=he==null?void 0:he.data)==null?void 0:le.orderConfirmation;return Ce?w.jsx(CF,{order:Ce,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:s},`${x.type}-${(M=x.index)!=null?M:S}`):null}case"tool_results":{const he=x.data,Ce=x.output_name,Me=p&&Ce&&Object.prototype.hasOwnProperty.call(m,Ce)?m[Ce]:void 0,He=typeof Me=="string"?Me:void 0;if(!He||!Ce)return f!=null&&f.isDevelopment&&(Ce?f.warn(`🦜 tool_results "${Ce}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${Ce}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(m),payload:he}):f.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:he})),null;const nt={name:Ce,payload:he,api:b};return w.jsx(oF,{overrideName:Ce,children:w.jsx(So,{tagName:He,props:nt,label:`toolResult:${Ce}`})},`${x.type}-${Ce}-${(Z=x.index)!=null?Z:S}`)}case"suggestions":return w.jsx("div",{style:{marginTop:"0.5rem"},children:w.jsx(H8,{disabled:u,suggestions:(ve=(P=x.data)==null?void 0:P.display_text)!=null?ve:[],globalClassName:n,isWidgetStandalone:s,onSuggestionClick:a})},`${x.type}-${(Pe=x.index)!=null?Pe:S}`);default:return null}})})};class Bw extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){_t(!0,"error","Message content threw during render:",t,n.componentStack)}render(){return this.state.hasError?w.jsx("p",{className:F(this.props.globalClassName,`${N}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}const $F=({message:e,globalClassName:t,isWidgetStandalone:n})=>{const{logger:r}=ct();return MC(e.content)?(r==null||r.debug("Omitting structured user message from transcript",e.content),null):w.jsx("div",{className:F(t,`${N}-message`,n?"standalone":"embedded"),children:w.jsx("div",{className:F(t,`${N}-user-message`,n?"standalone":"embedded"),children:w.jsxs("div",{className:F(t,`${N}-user-message-row`,n?"standalone":"embedded"),children:[w.jsx("span",{className:F(t,`${N}-message-icon user-message-icon`,n?"standalone":"embedded"),children:w.jsx(kk,{})}),w.jsx("p",{className:F(t,`${N}-user-message-text`,n?"standalone":"embedded"),children:e.content})]})})})},VF=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:s}=ct(),a=R.useMemo(()=>{if(typeof e.content!="string")return null;const l=Xu(e.content);if(l)return l;const d=Bg(e.content);return d?{response:[d]}:null},[e.content]),u=R.useMemo(()=>{var f;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 m=JSON.parse(d);if(typeof m=="object"&&m!==null)return s==null||s.debug("Detected JSON object instead of array of responses in message content",e.content),(f=Mg(m))!=null?f:l}catch(m){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 w.jsx($F,{message:e,globalClassName:t,isWidgetStandalone:r});case"agent":return w.jsx("div",{className:F(t,`${N}-message-group`,r?"standalone":"embedded"),children:w.jsx("div",{className:`${N}-message-group-child`,children:a?w.jsx(Bw,{globalClassName:t,children:w.jsx(Fw,{content:a,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):w.jsx(wo,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return w.jsx("div",{className:F(t,`${N}-message`,r?"standalone":"embedded"),children:w.jsx("p",{className:F(t,`${N}-reset-message`),children:e.content})})}},qF=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>w.jsxs("div",{className:F(n,`${N}-send-error`,r?"standalone":"embedded"),role:"alert",children:[w.jsx("span",{className:F(n,`${N}-send-error-text`),children:e}),w.jsxs("button",{type:"button",className:F(n,`${N}-retry-button`),onClick:t,children:[w.jsx(Rk,{"aria-hidden":"true"})," Retry"]})]}),YF="You are offline or we couldn't reach the assistant. Check connection and try again.",Op=({isWidgetStandalone:e})=>{var U,ie;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:s}=ct(),{messages:a,streamingBlocks:u,isAgentTyping:l,loading:d,progressMessage:f,connectionStatus:m,error:p,sendError:b,retryLastMessage:y,retryConnection:x}=bn(),S=R.useRef(null),A=a.length>0,_=u.some(sC),k=a[a.length-1],O=k?Ug(k.content,"suggestions"):!1,z=A&&(d||l)&&!_&&!O,W=m==="reconnecting"&&!z,D=m==="error";let V=null;D?V={message:p!=null?p:YF,kind:"connection",onRetry:x}:b&&(V={message:b.message,kind:"send",onRetry:y}),R.useEffect(()=>{var se;(se=S.current)==null||se.scrollIntoView({behavior:"smooth"})},[]),R.useEffect(()=>{var se;s&&((se=S.current)==null||se.scrollIntoView({behavior:"smooth"}))},[a,u,b,p,s]);const J=(U=V==null?void 0:V.message)!=null?U:null,ce=(ie=V==null?void 0:V.kind)!=null?ie:null;return R.useEffect(()=>{J&&(r==null||r.error("Error message shown to user",{message:J,kind:ce}))},[J,ce,r]),w.jsxs(w.Fragment,{children:[d&&!A&&w.jsx(q8,{globalClassName:t,isWidgetStandalone:e}),a.map(se=>w.jsx(VF,{message:se,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},se.id)),V&&w.jsx(qF,{message:V.message,onRetry:V.onRetry,globalClassName:t,isWidgetStandalone:e}),_&&w.jsxs("div",{className:F(t,`${N}-message-group`,e?"standalone":"embedded"),children:[w.jsx(Bw,{globalClassName:t,children:w.jsx(Fw,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e})}),(d||l)&&w.jsx(Ep,{globalClassName:t,isWidgetStandalone:e})]}),z&&w.jsx(Ep,{globalClassName:t,isWidgetStandalone:e,loadingText:f}),W&&w.jsx(Ep,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),w.jsx("div",{ref:S})]})},WF=()=>w.jsxs("svg",{className:`${N}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),w.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),GF=()=>w.jsx("svg",{className:`${N}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.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"})}),XF=(e,t)=>e===0?[]:e<0?t:t.slice(-e),Ip=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=ct(),s=e!=null?e:r,{overrides:a,isInitialized:u}=xo(),l=_o();if(t.length===0||s===0)return null;const d=XF(s,t),f=u?a.ProgressSteps:void 0;if(f){const m={name:"ProgressSteps",payload:{steps:d},api:l};return w.jsx(So,{tagName:f,props:m,label:"ProgressSteps"})}return w.jsx("div",{className:F(n,`${N}-progress-steps-panel`),children:w.jsx("div",{className:`${N}-progress-steps`,children:w.jsx("ul",{className:`${N}-progress-steps-list`,children:d.map((m,p)=>{const b=p<d.length-1,y=p===d.length-1;return w.jsxs("li",{className:F(`${N}-progress-step`,y&&"active"),children:[y&&w.jsx("span",{className:`${N}-progress-step-arc`}),w.jsx("span",{className:`${N}-progress-step-text`,children:m}),w.jsx("span",{className:F(`${N}-progress-step-icon`,b?"done":"active"),children:b?w.jsx(WF,{}):w.jsx(GF,{})})]},`${p}-${m}`)})})})})},Uw=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=ct(),{isAgentTyping:s,sendMessage:a,resetConversation:u,progressSteps:l,downloadTranscript:d}=bn(),f=s;return w.jsxs("div",{className:F(e,`${N}-container`,`${N}-embedded-chat`),style:t,children:[w.jsx("div",{className:F(e,`${N}-message-container`,`container-${n}`,"embedded"),children:w.jsx(Op,{isWidgetStandalone:!1})}),w.jsx(Ip,{steps:l,globalClassName:e}),w.jsx(yh,{componentType:"chat",className:"embedded-chat",isLoading:f,onSubmit:m=>a(m)}),w.jsx("div",{className:F(`${N}-embedded-chat-menu`),children:w.jsxs(zD,{componentType:"chat",children:[w.jsx(Qb,{componentType:"chat"}),w.jsx(sT,{componentType:"chat",onClearChat:u}),r&&w.jsx(oT,{componentType:"chat",onDownloadTranscript:d})]})})]})},Hw=e=>{var d;const{children:t,disabled:n}=e,[r,s]=R.useState((d=e.container)==null?void 0:d.current),a=R.useSyncExternalStore(QF,()=>!1,()=>!0),{getRootNode:u}=Jl();if(R.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return w.jsx(w.Fragment,{children:t});const l=r!=null?r:KF(u);return w.jsx(w.Fragment,{children:R.Children.map(t,f=>$s.createPortal(f,l))})},KF=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return as(n)?n:kr(t).body},QF=()=>()=>{},jw=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ct(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:l}=Vr(),{loading:d,isAgentTyping:f,sendMessage:m,resetConversation:p,progressSteps:b,downloadTranscript:y}=bn(),{isOpen:x}=s||{},S=!!s.isOpen,A=r==="standalone",_=f||d,k=()=>{$r(!1)};return S?w.jsx(Vb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:S,children:w.jsx(Hw,{children:w.jsx(dp,{className:F(e,`${N}-container`,`${N}-dialog`,a,u&&"full-height"),style:H(H({},t),l&&{width:l}),children:w.jsxs(lp,{className:F(e,`${N}-dialog-content`,{standalone:A,embedded:!A}),children:[w.jsx(Xb,{componentType:"dialog",onClearChat:p,onClose:k,onDownloadTranscript:y}),w.jsx(cp,{className:F(e,`${N}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:w.jsx(Op,{isWidgetStandalone:A,isOpen:x})}),w.jsx(Ip,{steps:b,globalClassName:e}),w.jsx(yh,{componentType:"dialog",isLoading:_,onSubmit:O=>m(O)})]})})})}):null},zw=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ct(),{mode:r,status:s,isModalFullscreen:a}=Vr(),{loading:u,isAgentTyping:l,sendMessage:d,resetConversation:f,progressSteps:m,downloadTranscript:p}=bn(),{isOpen:b}=s||{},y=!!s.isOpen,x=r==="standalone",S=l||u,A=({open:k})=>{$r(k)},_=()=>{$r(!1)};return y?w.jsx(Vb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:w.jsx(Hw,{children:w.jsxs("div",{className:F(e,`${N}-modal-container`),style:t,children:[w.jsx(Ub,{className:F(e,`${N}-modal-backdrop`)}),w.jsx(dp,{className:F(e,`${N}-container`,`${N}-modal`,{fullscreen:a,standalone:x,embedded:!x}),children:w.jsxs(lp,{className:F(e,`${N}-modal-content`,{standalone:x,embedded:!x}),children:[w.jsx(Xb,{componentType:"modal",onClearChat:f,onClose:_,onDownloadTranscript:p}),w.jsx(cp,{className:F(e,`${N}-message-container`,`container-${n}`,{standalone:x,embedded:!x}),children:w.jsx(Op,{isWidgetStandalone:x,isOpen:b})}),w.jsx(Ip,{steps:m,globalClassName:e}),w.jsx(yh,{componentType:"modal",isLoading:S,onSubmit:k=>d(k)})]})})]})})}):null},JF=()=>{const e=Vr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?w.jsx(Sk,{}):t==="dialog"?w.jsx(jw,{}):t==="modal"?w.jsx(zw,{}):w.jsx(Uw,{})},ZF=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=R8();R.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 C8(a),()=>{k8(a)}},[e,t,n,r,s])},$w=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function eB({isReady:e,hasError:t,transmit:n}){const r=R.useRef([]),s=R.useRef(e);s.current=e;const a=R.useRef(n);a.current=n;const u=R.useCallback((l,d)=>{s.current?$w(a.current,l,d):r.current.push({prompt:l,options:d})},[]);return R.useEffect(()=>{if(e&&r.current.length){const l=r.current;r.current=[],l.forEach(({prompt:d,options:f})=>$w(a.current,d,f))}},[e]),R.useEffect(()=>{t&&(r.current=[])},[t]),u}const Vw={copilot:"Ask Copilot",messaging:"Ask a question"},tB=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ct(),{placeholder:s,isResponseLoading:a}=tc(),u=s||Vw[r],[l,d]=R.useState(""),f=t||a,m=p=>{const b=l.trim();b&&(p.preventDefault(),e(b),d(""))};return w.jsxs("form",{className:F(n,`${N}-prompts-input-container`),name:`${N}-prompts-form`,onSubmit:m,children:[w.jsx("label",{htmlFor:`${N}-prompts-input`,"aria-label":u,children:w.jsx(ep,{className:F(n,`${N}-prompts-input-icon`)})}),w.jsx("input",{id:`${N}-prompts-input`,className:F(n,`${N}-prompts-input`),name:`${N}-prompts-input`,placeholder:u,type:"text",disabled:f,value:l,onChange:p=>d(p.target.value)}),w.jsx(lr,{className:F(n,`${N}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(_f,{}),disabled:f})]})},nB=()=>{const{globalClassName:e,mode:t}=ct(),{placeholder:n}=tc(),r=n||Vw[t];return w.jsxs("div",{className:F(e,`${N}-prompts-header`),children:[w.jsx(ep,{className:F(e,`${N}-prompts-input-icon`),"aria-hidden":"true"}),w.jsx("span",{className:F(e,`${N}-prompts-header-text`),children:r})]})},qw=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:s}=ct(),a=s==null?void 0:s.icon,u=(l=s==null?void 0:s.iconPosition)!=null?l:"left";return w.jsxs("button",{className:F(r,`${N}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&w.jsx(Kb,{icon:a,className:`${N}-suggestion-button-icon`}),w.jsx("span",{children:e})]})},rB="Ask me something else",iB=({label:e,disabled:t=!1})=>w.jsx(qw,{label:e||rB,disabled:t,onClick:()=>$r(!0)}),sB=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=ct(),{staticQuestions:r,askElseButtonLabel:s,disableAskElseButton:a}=tc();if(!(r!=null&&r.length))return null;const u=l=>()=>{const d=l.trim();d&&e(d)};return w.jsxs("div",{className:F(n,`${N}-prompts-button-group`),children:[r.map(l=>w.jsx(qw,{label:l,disabled:t,onClick:u(l)},l)),!a&&w.jsx(iB,{label:s,disabled:t})]})},oB=()=>{const{globalClassName:e,themeVariables:t}=ct(),{isOpen:n,elementId:r,promptsDisplay:s}=tc(),{isConnected:a,sessionExpired:u,sendMessage:l,connectionStatus:d}=bn(),{productId:f}=P8(),m=s!=="buttons",p=s!=="input",[b,y]=R.useState(null),x=d==="error",S=d==="connecting",A=Yg(a,u),_=eB({isReady:A,hasError:x,transmit:l});R.useEffect(()=>{if(!r||b)return;const O=document.getElementById(r);O&&y(O)},[r,b]);const k=R.useCallback(O=>{if($r(!0),f){_(`${O} (Viewing product details for: ${f})`,{displayContent:O});return}_(O)},[_,f]);return!n||!b?null:$s.createPortal(w.jsxs("div",{className:F(e,`${N}-prompts-extension-container`),style:t,children:[m&&w.jsx(tB,{onSubmit:k,disabled:x}),!m&&w.jsx(nB,{}),p&&w.jsx(sB,{onPromptClick:k,disabled:x}),!x&&S&&w.jsx("p",{className:F(e,`${N}-prompts-connecting-message`),children:"Connecting to agent..."}),x&&w.jsx("p",{className:F(e,`${N}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),b)},aB=()=>(ZF(),w.jsx(oB,{})),Yw=e=>w.jsxs(d1,oe(H({},e),{children:[w.jsx(JF,{}),w.jsx(aB,{})]}));var dc={},Ww;function uB(){if(Ww)return dc;Ww=1;var e=g1();return dc.createRoot=e.createRoot,dc.hydrateRoot=e.hydrateRoot,dc}var lB=uB();const Gw=new WeakMap,Xw=(e,t,n,r)=>{var a;(a=Gw.get(e))==null||a.unmount();const s=lB.createRoot(e);Gw.set(e,s),s.render(w.jsx(Yw,oe(H({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},cB=a=>{var u=a,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,s=vn(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let l;const d=(m,p)=>{for(const b of m)if(b.type==="childList"&&b.addedNodes.length)for(const y of b.addedNodes)y.nodeType===Node.ELEMENT_NODE&&y.id===e&&(_t(!0,"log","Target element found, rendering Messaging Widget"),p.disconnect(),clearTimeout(l),Xw(y,s,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),l=setTimeout(()=>{f.disconnect(),_t(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},dB=a=>{var u=a,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,s=vn(u,["timeout","elementId","overridesUrl","overrides"]);if(!s.messagingConfig){_t(!0,"error","Messaging Widget requires messagingConfig");return}if(!s.messagingConfig.scrt2Url||!s.messagingConfig.orgId||!s.messagingConfig.esDeveloperName){_t(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const l=document.getElementById(t);if(!l){_t(!0,"warn","Container element not found for id:",t),_t(!0,"warn","Beginning observation for element"),cB(H({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},s));return}Xw(l,s,n,r)};class fB extends HTMLElement{constructor(){super(...arguments);Je(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}const hB={components:{setEntryType:q0,toggleWidgetOpen:$r,toggleWidgetMinimized:Ls,toggleModalFullscreen:Hd,setWidgetType:Fu,setWidgetDialogPosition:jd,loadPromptsComponent:I8,togglePromptsExtensionOpen:Gb}};function pB(){return Fe(this,null,function*(){return zC().getAuthLinkKey()})}Ue.AgentForceWidget=Yw,Ue.AgentforceWidgetProvider=d1,Ue.CIMULATE_WIDGET_READY_EVENT=$0,Ue.MessagingDialog=jw,Ue.MessagingEmbed=Uw,Ue.MessagingModal=zw,Ue.MessagingProvider=Xg,Ue.OverrideElement=fB,Ue.eventHandlers=hB,Ue.getAuthLinkKey=pB,Ue.injectMessagingWidget=dB,Ue.useMessaging=bn,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"})}));