@cimulate/copilot-widget 1.18.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/messaging.css +1 -1
- package/dist/messaging.es.js +5127 -5058
- package/dist/messaging.umd.js +29 -29
- package/package.json +1 -1
package/dist/messaging.umd.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
(function(Pe,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Pe=typeof globalThis!="undefined"?globalThis:Pe||self,Fe(Pe.CimulateMessaging={}))})(this,(function(Pe){"use strict";var RB=Object.defineProperty,LB=Object.defineProperties;var DB=Object.getOwnPropertyDescriptors;var ad=Object.getOwnPropertySymbols;var n2=Object.prototype.hasOwnProperty,r2=Object.prototype.propertyIsEnumerable;var Rs=(Pe,Fe)=>(Fe=Symbol[Pe])?Fe:Symbol.for("Symbol."+Pe),MB=Pe=>{throw TypeError(Pe)},Eu=Math.pow,i0=(Pe,Fe,Ge)=>Fe in Pe?RB(Pe,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Pe[Fe]=Ge,B=(Pe,Fe)=>{for(var Ge in Fe||(Fe={}))n2.call(Fe,Ge)&&i0(Pe,Ge,Fe[Ge]);if(ad)for(var Ge of ad(Fe))r2.call(Fe,Ge)&&i0(Pe,Ge,Fe[Ge]);return Pe},ie=(Pe,Fe)=>LB(Pe,DB(Fe));var an=(Pe,Fe)=>{var Ge={};for(var rt in Pe)n2.call(Pe,rt)&&Fe.indexOf(rt)<0&&(Ge[rt]=Pe[rt]);if(Pe!=null&&ad)for(var rt of ad(Pe))Fe.indexOf(rt)<0&&r2.call(Pe,rt)&&(Ge[rt]=Pe[rt]);return Ge};var Ve=(Pe,Fe,Ge)=>i0(Pe,typeof Fe!="symbol"?Fe+"":Fe,Ge);var ze=(Pe,Fe,Ge)=>new Promise((rt,bt)=>{var pt=xt=>{try{Dt(Ge.next(xt))}catch(un){bt(un)}},Re=xt=>{try{Dt(Ge.throw(xt))}catch(un){bt(un)}},Dt=xt=>xt.done?rt(xt.value):Promise.resolve(xt.value).then(pt,Re);Dt((Ge=Ge.apply(Pe,Fe)).next())}),Eo=function(Pe,Fe){this[0]=Pe,this[1]=Fe},o0=(Pe,Fe,Ge)=>{var rt=(Re,Dt,xt,un)=>{try{var yo=Ge[Re](Dt),Ls=(Dt=yo.value)instanceof Eo,ud=yo.done;Promise.resolve(Ls?Dt[0]:Dt).then(Gn=>Ls?rt(Re==="return"?Re:"next",Dt[1]?{done:Gn.done,value:Gn.value}:Gn,xt,un):xt({value:Gn,done:ud})).catch(Gn=>rt("throw",Gn,xt,un))}catch(Gn){un(Gn)}},bt=Re=>pt[Re]=Dt=>new Promise((xt,un)=>rt(Re,Dt,xt,un)),pt={};return Ge=Ge.apply(Pe,Fe),pt[Rs("asyncIterator")]=()=>pt,bt("next"),bt("throw"),bt("return"),pt},s0=Pe=>{var Fe=Pe[Rs("asyncIterator")],Ge=!1,rt,bt={};return Fe==null?(Fe=Pe[Rs("iterator")](),rt=pt=>bt[pt]=Re=>Fe[pt](Re)):(Fe=Fe.call(Pe),rt=pt=>bt[pt]=Re=>{if(Ge){if(Ge=!1,pt==="throw")throw Re;return Re}return Ge=!0,{done:!1,value:new Eo(new Promise(Dt=>{var xt=Fe[pt](Re);xt instanceof Object||MB("Object expected"),Dt(xt)}),1)}}),bt[Rs("iterator")]=()=>bt,rt("next"),"throw"in Fe?rt("throw"):bt.throw=pt=>{throw pt},"return"in Fe&&rt("return"),bt},i2=(Pe,Fe,Ge)=>(Fe=Pe[Rs("asyncIterator")])?Fe.call(Pe):(Pe=Pe[Rs("iterator")](),Fe={},Ge=(rt,bt)=>(bt=Pe[rt])&&(Fe[rt]=pt=>new Promise((Re,Dt,xt)=>(pt=bt.call(Pe,pt),xt=pt.done,Promise.resolve(pt.value).then(un=>Re({value:un,done:xt}),Dt)))),Ge("next"),Ge("return"),Fe);var Fe=document.createElement("style");Fe.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;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease;&.card-full-width{width:100%;min-width:100%}}.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}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:40%}.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__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:.8125rem;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)}.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:.875rem;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:.75rem;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;align-items:baseline;gap:8px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:.875rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:.875rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-cart-item-qty{font-size:.75rem;font-weight:500;opacity:.85}.cim-widget-cart-item-remove{padding:0;border:none;background:none;font-family:inherit;font-size:.75rem;font-weight:500;color:var(--cim-widget-font-color, #3f3f46);text-decoration:underline;cursor:pointer}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.8125rem;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:1rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-font-color, #141415);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-font-color, #141415);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-font-color, #141415) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-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}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-product-comparison__footer{display:contents}.cim-widget-product-comparison__footer-cell{padding:12px 8px;border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__add-to-cart{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;white-space:nowrap;background-color:transparent;color:var(--cim-widget-primary-color, #3182ce)}.cim-widget-product-comparison__add-to-cart:hover{background-color:transparent}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Fe);function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},bt={},pt={exports:{}},Re={};var Dt;function xt(){if(Dt)return Re;Dt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function b(N){return N===null||typeof N!="object"?null:(N=g&&N[g]||N["@@iterator"],typeof N=="function"?N:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function A(N,q,O){this.props=N,this.context=q,this.refs=v,this.updater=O||y}A.prototype.isReactComponent={},A.prototype.setState=function(N,q){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,q,"setState")},A.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function C(){}C.prototype=A.prototype;function k(N,q,O){this.props=N,this.context=q,this.refs=v,this.updater=O||y}var I=k.prototype=new C;I.constructor=k,x(I,A.prototype),I.isPureReactComponent=!0;var $=Array.isArray,W=Object.prototype.hasOwnProperty,F={current:null},ee={key:!0,ref:!0,__self:!0,__source:!0};function ce(N,q,O){var ye,ke={},Ie=null,He=null;if(q!=null)for(ye in q.ref!==void 0&&(He=q.ref),q.key!==void 0&&(Ie=""+q.key),q)W.call(q,ye)&&!ee.hasOwnProperty(ye)&&(ke[ye]=q[ye]);var Se=arguments.length-2;if(Se===1)ke.children=O;else if(1<Se){for(var Ye=Array(Se),dt=0;dt<Se;dt++)Ye[dt]=arguments[dt+2];ke.children=Ye}if(N&&N.defaultProps)for(ye in Se=N.defaultProps,Se)ke[ye]===void 0&&(ke[ye]=Se[ye]);return{$$typeof:e,type:N,key:Ie,ref:He,props:ke,_owner:F.current}}function pe(N,q){return{$$typeof:e,type:N.type,key:q,ref:N.ref,props:N.props,_owner:N._owner}}function U(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function ne(N){var q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(O){return q[O]})}var ae=/\/+/g;function de(N,q){return typeof N=="object"&&N!==null&&N.key!=null?ne(""+N.key):q.toString(36)}function oe(N,q,O,ye,ke){var Ie=typeof N;(Ie==="undefined"||Ie==="boolean")&&(N=null);var He=!1;if(N===null)He=!0;else switch(Ie){case"string":case"number":He=!0;break;case"object":switch(N.$$typeof){case e:case t:He=!0}}if(He)return He=N,ke=ke(He),N=ye===""?"."+de(He,0):ye,$(ke)?(O="",N!=null&&(O=N.replace(ae,"$&/")+"/"),oe(ke,q,O,"",function(dt){return dt})):ke!=null&&(U(ke)&&(ke=pe(ke,O+(!ke.key||He&&He.key===ke.key?"":(""+ke.key).replace(ae,"$&/")+"/")+N)),q.push(ke)),1;if(He=0,ye=ye===""?".":ye+":",$(N))for(var Se=0;Se<N.length;Se++){Ie=N[Se];var Ye=ye+de(Ie,Se);He+=oe(Ie,q,O,Ye,ke)}else if(Ye=b(N),typeof Ye=="function")for(N=Ye.call(N),Se=0;!(Ie=N.next()).done;)Ie=Ie.value,Ye=ye+de(Ie,Se++),He+=oe(Ie,q,O,Ye,ke);else if(Ie==="object")throw q=String(N),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return He}function be(N,q,O){if(N==null)return N;var ye=[],ke=0;return oe(N,ye,"","",function(Ie){return q.call(O,Ie,ke++)}),ye}function Ce(N){if(N._status===-1){var q=N._result;q=q(),q.then(function(O){(N._status===0||N._status===-1)&&(N._status=1,N._result=O)},function(O){(N._status===0||N._status===-1)&&(N._status=2,N._result=O)}),N._status===-1&&(N._status=0,N._result=q)}if(N._status===1)return N._result.default;throw N._result}var se={current:null},j={transition:null},J={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:j,ReactCurrentOwner:F};function w(){throw Error("act(...) is not supported in production builds of React.")}return Re.Children={map:be,forEach:function(N,q,O){be(N,function(){q.apply(this,arguments)},O)},count:function(N){var q=0;return be(N,function(){q++}),q},toArray:function(N){return be(N,function(q){return q})||[]},only:function(N){if(!U(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},Re.Component=A,Re.Fragment=n,Re.Profiler=o,Re.PureComponent=k,Re.StrictMode=r,Re.Suspense=d,Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,Re.act=w,Re.cloneElement=function(N,q,O){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var ye=x({},N.props),ke=N.key,Ie=N.ref,He=N._owner;if(q!=null){if(q.ref!==void 0&&(Ie=q.ref,He=F.current),q.key!==void 0&&(ke=""+q.key),N.type&&N.type.defaultProps)var Se=N.type.defaultProps;for(Ye in q)W.call(q,Ye)&&!ee.hasOwnProperty(Ye)&&(ye[Ye]=q[Ye]===void 0&&Se!==void 0?Se[Ye]:q[Ye])}var Ye=arguments.length-2;if(Ye===1)ye.children=O;else if(1<Ye){Se=Array(Ye);for(var dt=0;dt<Ye;dt++)Se[dt]=arguments[dt+2];ye.children=Se}return{$$typeof:e,type:N.type,key:ke,ref:Ie,props:ye,_owner:He}},Re.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:a,_context:N},N.Consumer=N},Re.createElement=ce,Re.createFactory=function(N){var q=ce.bind(null,N);return q.type=N,q},Re.createRef=function(){return{current:null}},Re.forwardRef=function(N){return{$$typeof:c,render:N}},Re.isValidElement=U,Re.lazy=function(N){return{$$typeof:p,_payload:{_status:-1,_result:N},_init:Ce}},Re.memo=function(N,q){return{$$typeof:h,type:N,compare:q===void 0?null:q}},Re.startTransition=function(N){var q=j.transition;j.transition={};try{N()}finally{j.transition=q}},Re.unstable_act=w,Re.useCallback=function(N,q){return se.current.useCallback(N,q)},Re.useContext=function(N){return se.current.useContext(N)},Re.useDebugValue=function(){},Re.useDeferredValue=function(N){return se.current.useDeferredValue(N)},Re.useEffect=function(N,q){return se.current.useEffect(N,q)},Re.useId=function(){return se.current.useId()},Re.useImperativeHandle=function(N,q,O){return se.current.useImperativeHandle(N,q,O)},Re.useInsertionEffect=function(N,q){return se.current.useInsertionEffect(N,q)},Re.useLayoutEffect=function(N,q){return se.current.useLayoutEffect(N,q)},Re.useMemo=function(N,q){return se.current.useMemo(N,q)},Re.useReducer=function(N,q,O){return se.current.useReducer(N,q,O)},Re.useRef=function(N){return se.current.useRef(N)},Re.useState=function(N){return se.current.useState(N)},Re.useSyncExternalStore=function(N,q,O){return se.current.useSyncExternalStore(N,q,O)},Re.useTransition=function(){return se.current.useTransition()},Re.version="18.3.1",Re}var un;function yo(){return un||(un=1,pt.exports=xt()),pt.exports}var Ls;function ud(){if(Ls)return bt;Ls=1;var e=yo(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,h){var p,g={},b=null,y=null;h!==void 0&&(b=""+h),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(g[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)g[p]===void 0&&(g[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:y,props:g,_owner:o.current}}return bt.Fragment=n,bt.jsx=u,bt.jsxs=u,bt}var Gn;function u2(){return Gn||(Gn=1,rt.exports=ud()),rt.exports}var _=u2();const fr=Object.create(null);fr.open="0",fr.close="1",fr.ping="2",fr.pong="3",fr.message="4",fr.upgrade="5",fr.noop="6";const yu=Object.create(null);Object.keys(fr).forEach(e=>{yu[fr[e]]=e});const ld={type:"error",data:"parser error"},a0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",u0=typeof ArrayBuffer=="function",l0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cd=({type:e,data:t},n,r)=>a0&&t instanceof Blob?n?r(t):c0(t,r):u0&&(t instanceof ArrayBuffer||l0(t))?n?r(t):c0(new Blob([t]),r):r(fr[e]+(t||"")),c0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function d0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let dd;function l2(e,t){if(a0&&e.data instanceof Blob)return e.data.arrayBuffer().then(d0).then(t);if(u0&&(e.data instanceof ArrayBuffer||l0(e.data)))return t(d0(e.data));cd(e,!1,n=>{dd||(dd=new TextEncoder),t(dd.encode(n))})}const f0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ds=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<f0.length;e++)Ds[f0.charCodeAt(e)]=e;const c2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),p=new Uint8Array(h);for(r=0;r<n;r+=4)a=Ds[e.charCodeAt(r)],u=Ds[e.charCodeAt(r+1)],c=Ds[e.charCodeAt(r+2)],d=Ds[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return h},d2=typeof ArrayBuffer=="function",fd=(e,t)=>{if(typeof e!="string")return{type:"message",data:h0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:f2(e.substring(1),t)}:yu[n]?e.length>1?{type:yu[n],data:e.substring(1)}:{type:yu[n]}:ld},f2=(e,t)=>{if(d2){const n=c2(e);return h0(n,t)}else return{base64:!0,data:e}},h0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,p0="",h2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{cd(a,!1,c=>{r[u]=c,++o===n&&t(r.join(p0))})})},p2=(e,t)=>{const n=e.split(p0),r=[];for(let o=0;o<n.length;o++){const a=fd(n[o],t);if(r.push(a),a.type==="error")break}return r};function m2(){return new TransformStream({transform(e,t){l2(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let hd;function Tu(e){return e.reduce((t,n)=>t+n.length,0)}function bu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=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 g2(e,t){hd||(hd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(Tu(n)<1)break;const d=bu(n,1);a=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(Tu(n)<2)break;const d=bu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Tu(n)<8)break;const d=bu(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),p=h.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(ld);break}o=p*Math.pow(2,32)+h.getUint32(4),r=3}else{if(Tu(n)<o)break;const d=bu(n,o);c.enqueue(fd(a?d:hd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(ld);break}}}})}const m0=4;function Ct(e){if(e)return E2(e)}function E2(e){for(var t in Ct.prototype)e[t]=Ct.prototype[t];return e}Ct.prototype.on=Ct.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ct.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ct.prototype.off=Ct.prototype.removeListener=Ct.prototype.removeAllListeners=Ct.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Ct.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Ct.prototype.emitReserved=Ct.prototype.emit,Ct.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ct.prototype.hasListeners=function(e){return!!this.listeners(e).length};const _u=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Ln=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),y2="arraybuffer";function FB(){}function g0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const T2=Ln.setTimeout,b2=Ln.clearTimeout;function xu(e,t){t.useNativeTimers?(e.setTimeoutFn=T2.bind(Ln),e.clearTimeoutFn=b2.bind(Ln)):(e.setTimeoutFn=Ln.setTimeout.bind(Ln),e.clearTimeoutFn=Ln.clearTimeout.bind(Ln))}const _2=1.33;function x2(e){return typeof e=="string"?w2(e):Math.ceil((e.byteLength||e.size)*_2)}function w2(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function E0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function S2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function v2(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class A2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class pd extends Ct{constructor(t){super(),this.writable=!1,xu(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 A2(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=S2(t);return n.length?"?"+n:""}}class C2 extends pd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};p2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,h2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=E0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let y0=!1;try{y0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const k2=y0;function N2(){}class O2 extends C2{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",(o,a)=>{this.onError("xhr post error",o,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 hr extends Ct{constructor(t,n,r){super(),this.createRequest=t,xu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=g0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(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 o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.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(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=hr.requestsCount++,hr.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=N2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete hr.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(hr.requestsCount=0,hr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",T0);else if(typeof addEventListener=="function"){const e="onpagehide"in Ln?"pagehide":"unload";addEventListener(e,T0,!1)}}function T0(){for(let e in hr.requests)hr.requests.hasOwnProperty(e)&&hr.requests[e].abort()}const P2=(function(){const e=b0({xdomain:!1});return e&&e.responseType!==null})();class I2 extends O2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=P2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new hr(b0,this.uri(),t)}}function b0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||k2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Ln[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const _0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class R2 extends pd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=_0?{}:g0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}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],o=n===t.length-1;cd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&_u(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=E0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const md=Ln.WebSocket||Ln.MozWebSocket;class L2 extends R2{createSocket(t,n,r){return _0?new md(t,n,r):n?new md(t,n):new md(t)}doWrite(t,n){this.ws.send(n)}}class D2 extends pd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=g2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=m2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&_u(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const M2={websocket:L2,webtransport:D2,polling:I2},F2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,B2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=F2.exec(e||""),a={},u=14;for(;u--;)a[B2[u]]=o[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=U2(a,a.path),a.queryKey=H2(a,a.query),a}function U2(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 H2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Ed=typeof addEventListener=="function"&&typeof removeEventListener=="function",wu=[];Ed&&addEventListener("offline",()=>{wu.forEach(e=>e())},!1);class Xr extends Ct{constructor(t,n){if(super(),this.binaryType=y2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=gd(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=gd(n.host).host);xu(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 o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=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=v2(this.opts.query)),Ed&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},wu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=m0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Xr.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",Xr.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 o=this.writeBuffer[r].data;if(o&&(n+=x2(o)),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,_u(()=>{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,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=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),o&&this.once("flush",o),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(Xr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ed&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=wu.indexOf(this._offlineEventListener);r!==-1&&wu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Xr.protocol=m0;class z2 extends Xr{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;Xr.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Xr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=g=>{const b=new Error("probe error: "+g);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function h(g){n&&g.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",o),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",h),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let j2=class extends z2{constructor(t,n={}){const r=typeof t=="object",o=r?B({},t):B({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>M2[a]).filter(a=>!!a)),super(r?o:t,o)}};function $2(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=gd(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const V2=typeof ArrayBuffer=="function",q2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,x0=Object.prototype.toString,Y2=typeof Blob=="function"||typeof Blob!="undefined"&&x0.call(Blob)==="[object BlobConstructor]",W2=typeof File=="function"||typeof File!="undefined"&&x0.call(File)==="[object FileConstructor]";function yd(e){return V2&&(e instanceof ArrayBuffer||q2(e))||Y2&&e instanceof Blob||W2&&e instanceof File}function Su(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Su(e[n]))return!0;return!1}if(yd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Su(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Su(e[n]))return!0;return!1}function G2(e){const t=[],n=e.data,r=e;return r.data=Td(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Td(e,t){if(!e)return e;if(yd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Td(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Td(e[r],t));return n}return e}function X2(e,t){return e.data=bd(e.data,t),delete e.attachments,e}function bd(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]=bd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=bd(e[n],t));return e}const K2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ke;(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"})(Ke||(Ke={}));class Q2{constructor(t){this.replacer=t}encode(t){return(t.type===Ke.EVENT||t.type===Ke.ACK)&&Su(t)?this.encodeAsBinary({type:t.type===Ke.EVENT?Ke.BINARY_EVENT:Ke.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ke.BINARY_EVENT||t.type===Ke.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=G2(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class _d extends Ct{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Ke.BINARY_EVENT;r||n.type===Ke.BINARY_ACK?(n.type=r?Ke.EVENT:Ke.ACK,this.reconstructor=new J2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(yd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ke[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ke.BINARY_EVENT||r.type===Ke.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Z2(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){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(_d.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 Ke.CONNECT:return w0(n);case Ke.DISCONNECT:return n===void 0;case Ke.CONNECT_ERROR:return typeof n=="string"||w0(n);case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&K2.indexOf(n[0])===-1);case Ke.ACK:case Ke.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class J2{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=X2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Z2=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function w0(e){return Object.prototype.toString.call(e)==="[object Object]"}const eS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:_d,Encoder:Q2,get PacketType(){return Ke}},Symbol.toStringTag,{value:"Module"}));function Xn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const tS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class S0 extends Ct{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Xn(t,"open",this.onopen.bind(this)),Xn(t,"packet",this.onpacket.bind(this)),Xn(t,"error",this.onerror.bind(this)),Xn(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,o,a;if(tS.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:Ke.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,g=n.pop();this._registerAckCallback(p,g),u.id=p}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(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:Ke.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 Ke.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 Ke.EVENT:case Ke.BINARY_EVENT:this.onevent(t);break;case Ke.ACK:case Ke.BINARY_ACK:this.onack(t);break;case Ke.DISCONNECT:this.ondisconnect();break;case Ke.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(...o){r||(r=!0,n.packet({type:Ke.ACK,id:t,data:o}))}}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:Ke.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 To(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}To.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},To.prototype.reset=function(){this.attempts=0},To.prototype.setMin=function(e){this.ms=e},To.prototype.setMax=function(e){this.max=e},To.prototype.setJitter=function(e){this.jitter=e};class xd extends Ct{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,xu(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 To({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||eS;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new j2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Xn(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Xn(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),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(Xn(t,"ping",this.onping.bind(this)),Xn(t,"data",this.ondata.bind(this)),Xn(t,"error",this.onerror.bind(this)),Xn(t,"close",this.onclose.bind(this)),Xn(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){_u(()=>{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 S0(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(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):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 Ms={};function wd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=$2(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Ms[o]&&a in Ms[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new xd(r,t):(Ms[o]||(Ms[o]=new xd(r,t)),d=Ms[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(wd,{Manager:xd,Socket:S0,io:wd,connect:wd});const v0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&v0.call(Blob),typeof File=="function"||typeof File!="undefined"&&v0.call(File);var A0;(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"})(A0||(A0={}));var Y=yo();const Ni=Ge(Y);let nS=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,o;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((o=this.onceListeners.get(t))==null?void 0:o.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 o=this.onceListeners.get(t);if(o){for(const a of o)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}};class rS{constructor(t,n,r,o,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=o,this.logger=a,this.controller=null,this.reading=!1}connect(){return ze(this,null,function*(){if(this.reading)return void this.logger.warn("SSE already connected, ignoring duplicate connect()");this.controller=new AbortController,this.reading=!0;const t=yield fetch(this.url,{method:"GET",headers:ie(B({},this.headers),{Accept:"text/event-stream","Cache-Control":"no-cache"}),signal:this.controller.signal});if(!t.ok){this.reading=!1;const n=yield t.text().catch(()=>t.statusText);throw new Error(`SSE connection failed (${t.status}): ${n}`)}if(!t.body)throw this.reading=!1,new Error("SSE response has no body stream");this.readStream(t.body)})}disconnect(){this.reading=!1,this.controller&&(this.controller.abort(),this.controller=null)}get isConnected(){return this.reading}readStream(t){return ze(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let o="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let c;for(o+=r.decode(a,{stream:!0}),o=o.replace(/\r\n/g,`
|
|
1
|
+
(function(Pe,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Pe=typeof globalThis!="undefined"?globalThis:Pe||self,Fe(Pe.CimulateMessaging={}))})(this,(function(Pe){"use strict";var BB=Object.defineProperty,UB=Object.defineProperties;var HB=Object.getOwnPropertyDescriptors;var ad=Object.getOwnPropertySymbols;var r2=Object.prototype.hasOwnProperty,i2=Object.prototype.propertyIsEnumerable;var Rs=(Pe,Fe)=>(Fe=Symbol[Pe])?Fe:Symbol.for("Symbol."+Pe),zB=Pe=>{throw TypeError(Pe)},Eu=Math.pow,o0=(Pe,Fe,Ge)=>Fe in Pe?BB(Pe,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Pe[Fe]=Ge,B=(Pe,Fe)=>{for(var Ge in Fe||(Fe={}))r2.call(Fe,Ge)&&o0(Pe,Ge,Fe[Ge]);if(ad)for(var Ge of ad(Fe))i2.call(Fe,Ge)&&o0(Pe,Ge,Fe[Ge]);return Pe},oe=(Pe,Fe)=>UB(Pe,HB(Fe));var an=(Pe,Fe)=>{var Ge={};for(var rt in Pe)r2.call(Pe,rt)&&Fe.indexOf(rt)<0&&(Ge[rt]=Pe[rt]);if(Pe!=null&&ad)for(var rt of ad(Pe))Fe.indexOf(rt)<0&&i2.call(Pe,rt)&&(Ge[rt]=Pe[rt]);return Ge};var Ve=(Pe,Fe,Ge)=>o0(Pe,typeof Fe!="symbol"?Fe+"":Fe,Ge);var ze=(Pe,Fe,Ge)=>new Promise((rt,bt)=>{var pt=_t=>{try{Dt(Ge.next(_t))}catch(un){bt(un)}},Re=_t=>{try{Dt(Ge.throw(_t))}catch(un){bt(un)}},Dt=_t=>_t.done?rt(_t.value):Promise.resolve(_t.value).then(pt,Re);Dt((Ge=Ge.apply(Pe,Fe)).next())}),Eo=function(Pe,Fe){this[0]=Pe,this[1]=Fe},s0=(Pe,Fe,Ge)=>{var rt=(Re,Dt,_t,un)=>{try{var yo=Ge[Re](Dt),Ls=(Dt=yo.value)instanceof Eo,ud=yo.done;Promise.resolve(Ls?Dt[0]:Dt).then(Gn=>Ls?rt(Re==="return"?Re:"next",Dt[1]?{done:Gn.done,value:Gn.value}:Gn,_t,un):_t({value:Gn,done:ud})).catch(Gn=>rt("throw",Gn,_t,un))}catch(Gn){un(Gn)}},bt=Re=>pt[Re]=Dt=>new Promise((_t,un)=>rt(Re,Dt,_t,un)),pt={};return Ge=Ge.apply(Pe,Fe),pt[Rs("asyncIterator")]=()=>pt,bt("next"),bt("throw"),bt("return"),pt},a0=Pe=>{var Fe=Pe[Rs("asyncIterator")],Ge=!1,rt,bt={};return Fe==null?(Fe=Pe[Rs("iterator")](),rt=pt=>bt[pt]=Re=>Fe[pt](Re)):(Fe=Fe.call(Pe),rt=pt=>bt[pt]=Re=>{if(Ge){if(Ge=!1,pt==="throw")throw Re;return Re}return Ge=!0,{done:!1,value:new Eo(new Promise(Dt=>{var _t=Fe[pt](Re);_t instanceof Object||zB("Object expected"),Dt(_t)}),1)}}),bt[Rs("iterator")]=()=>bt,rt("next"),"throw"in Fe?rt("throw"):bt.throw=pt=>{throw pt},"return"in Fe&&rt("return"),bt},o2=(Pe,Fe,Ge)=>(Fe=Pe[Rs("asyncIterator")])?Fe.call(Pe):(Pe=Pe[Rs("iterator")](),Fe={},Ge=(rt,bt)=>(bt=Pe[rt])&&(Fe[rt]=pt=>new Promise((Re,Dt,_t)=>(pt=bt.call(Pe,pt),_t=pt.done,Promise.resolve(pt.value).then(un=>Re({value:un,done:_t}),Dt)))),Ge("next"),Ge("return"),Fe);var Fe=document.createElement("style");Fe.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;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease;&.card-full-width{width:100%;min-width:100%}}.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}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:40%}.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__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:4px;background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel-title{font-weight:800}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-ready{margin-bottom:8px}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:.8125rem;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)}.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:.875rem;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:.75rem;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;align-items:baseline;gap:8px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:.875rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:.875rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-cart-item-qty{font-size:.75rem;font-weight:500;opacity:.85}.cim-widget-cart-item-remove{padding:0;border:none;background:none;font-family:inherit;font-size:.75rem;font-weight:500;color:var(--cim-widget-font-color, #3f3f46);text-decoration:underline;cursor:pointer}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:4px;background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.8125rem;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:1rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-font-color, #141415);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-font-color, #141415);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-font-color, #141415) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-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}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #00000026;transition:background-color .15s ease,box-shadow .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{box-shadow:0 2px 6px #0003}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #3182ce);border-color:var(--cim-widget-primary-color, #3182ce);color:#fff}label.cim-widget-msg-pdp__chip.selected:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);border-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce),black 15%);color:#fff}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:var(--cim-widget-font-color, #141415)}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:.5rem;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{min-height:34px;background-color:transparent;border:1px solid var(--cim-widget-primary-color, #3182ce);color:var(--cim-widget-primary-color, #3182ce);font-weight:700;&:hover:disabled{background-color:transparent}}button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){background-color:#0000000a}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-product-comparison__footer{display:contents}.cim-widget-product-comparison__footer-cell{padding:12px 8px;border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__add-to-cart{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;white-space:nowrap;background-color:transparent;color:var(--cim-widget-primary-color, #3182ce)}.cim-widget-product-comparison__add-to-cart:hover{background-color:transparent}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-text-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(Fe);function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rt={exports:{}},bt={},pt={exports:{}},Re={};var Dt;function _t(){if(Dt)return Re;Dt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function b(N){return N===null||typeof N!="object"?null:(N=g&&N[g]||N["@@iterator"],typeof N=="function"?N:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function A(N,Y,O){this.props=N,this.context=Y,this.refs=v,this.updater=O||y}A.prototype.isReactComponent={},A.prototype.setState=function(N,Y){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,Y,"setState")},A.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function k(){}k.prototype=A.prototype;function C(N,Y,O){this.props=N,this.context=Y,this.refs=v,this.updater=O||y}var I=C.prototype=new k;I.constructor=C,_(I,A.prototype),I.isPureReactComponent=!0;var j=Array.isArray,W=Object.prototype.hasOwnProperty,F={current:null},ee={key:!0,ref:!0,__self:!0,__source:!0};function ue(N,Y,O){var ye,Ce={},Ie=null,He=null;if(Y!=null)for(ye in Y.ref!==void 0&&(He=Y.ref),Y.key!==void 0&&(Ie=""+Y.key),Y)W.call(Y,ye)&&!ee.hasOwnProperty(ye)&&(Ce[ye]=Y[ye]);var Se=arguments.length-2;if(Se===1)Ce.children=O;else if(1<Se){for(var Ye=Array(Se),dt=0;dt<Se;dt++)Ye[dt]=arguments[dt+2];Ce.children=Ye}if(N&&N.defaultProps)for(ye in Se=N.defaultProps,Se)Ce[ye]===void 0&&(Ce[ye]=Se[ye]);return{$$typeof:e,type:N,key:Ie,ref:He,props:Ce,_owner:F.current}}function me(N,Y){return{$$typeof:e,type:N.type,key:Y,ref:N.ref,props:N.props,_owner:N._owner}}function $(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function ne(N){var Y={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(O){return Y[O]})}var re=/\/+/g;function de(N,Y){return typeof N=="object"&&N!==null&&N.key!=null?ne(""+N.key):Y.toString(36)}function se(N,Y,O,ye,Ce){var Ie=typeof N;(Ie==="undefined"||Ie==="boolean")&&(N=null);var He=!1;if(N===null)He=!0;else switch(Ie){case"string":case"number":He=!0;break;case"object":switch(N.$$typeof){case e:case t:He=!0}}if(He)return He=N,Ce=Ce(He),N=ye===""?"."+de(He,0):ye,j(Ce)?(O="",N!=null&&(O=N.replace(re,"$&/")+"/"),se(Ce,Y,O,"",function(dt){return dt})):Ce!=null&&($(Ce)&&(Ce=me(Ce,O+(!Ce.key||He&&He.key===Ce.key?"":(""+Ce.key).replace(re,"$&/")+"/")+N)),Y.push(Ce)),1;if(He=0,ye=ye===""?".":ye+":",j(N))for(var Se=0;Se<N.length;Se++){Ie=N[Se];var Ye=ye+de(Ie,Se);He+=se(Ie,Y,O,Ye,Ce)}else if(Ye=b(N),typeof Ye=="function")for(N=Ye.call(N),Se=0;!(Ie=N.next()).done;)Ie=Ie.value,Ye=ye+de(Ie,Se++),He+=se(Ie,Y,O,Ye,Ce);else if(Ie==="object")throw Y=String(N),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return He}function be(N,Y,O){if(N==null)return N;var ye=[],Ce=0;return se(N,ye,"","",function(Ie){return Y.call(O,Ie,Ce++)}),ye}function ke(N){if(N._status===-1){var Y=N._result;Y=Y(),Y.then(function(O){(N._status===0||N._status===-1)&&(N._status=1,N._result=O)},function(O){(N._status===0||N._status===-1)&&(N._status=2,N._result=O)}),N._status===-1&&(N._status=0,N._result=Y)}if(N._status===1)return N._result.default;throw N._result}var ae={current:null},z={transition:null},J={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:z,ReactCurrentOwner:F};function w(){throw Error("act(...) is not supported in production builds of React.")}return Re.Children={map:be,forEach:function(N,Y,O){be(N,function(){Y.apply(this,arguments)},O)},count:function(N){var Y=0;return be(N,function(){Y++}),Y},toArray:function(N){return be(N,function(Y){return Y})||[]},only:function(N){if(!$(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},Re.Component=A,Re.Fragment=n,Re.Profiler=o,Re.PureComponent=C,Re.StrictMode=r,Re.Suspense=d,Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,Re.act=w,Re.cloneElement=function(N,Y,O){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var ye=_({},N.props),Ce=N.key,Ie=N.ref,He=N._owner;if(Y!=null){if(Y.ref!==void 0&&(Ie=Y.ref,He=F.current),Y.key!==void 0&&(Ce=""+Y.key),N.type&&N.type.defaultProps)var Se=N.type.defaultProps;for(Ye in Y)W.call(Y,Ye)&&!ee.hasOwnProperty(Ye)&&(ye[Ye]=Y[Ye]===void 0&&Se!==void 0?Se[Ye]:Y[Ye])}var Ye=arguments.length-2;if(Ye===1)ye.children=O;else if(1<Ye){Se=Array(Ye);for(var dt=0;dt<Ye;dt++)Se[dt]=arguments[dt+2];ye.children=Se}return{$$typeof:e,type:N.type,key:Ce,ref:Ie,props:ye,_owner:He}},Re.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:a,_context:N},N.Consumer=N},Re.createElement=ue,Re.createFactory=function(N){var Y=ue.bind(null,N);return Y.type=N,Y},Re.createRef=function(){return{current:null}},Re.forwardRef=function(N){return{$$typeof:c,render:N}},Re.isValidElement=$,Re.lazy=function(N){return{$$typeof:p,_payload:{_status:-1,_result:N},_init:ke}},Re.memo=function(N,Y){return{$$typeof:h,type:N,compare:Y===void 0?null:Y}},Re.startTransition=function(N){var Y=z.transition;z.transition={};try{N()}finally{z.transition=Y}},Re.unstable_act=w,Re.useCallback=function(N,Y){return ae.current.useCallback(N,Y)},Re.useContext=function(N){return ae.current.useContext(N)},Re.useDebugValue=function(){},Re.useDeferredValue=function(N){return ae.current.useDeferredValue(N)},Re.useEffect=function(N,Y){return ae.current.useEffect(N,Y)},Re.useId=function(){return ae.current.useId()},Re.useImperativeHandle=function(N,Y,O){return ae.current.useImperativeHandle(N,Y,O)},Re.useInsertionEffect=function(N,Y){return ae.current.useInsertionEffect(N,Y)},Re.useLayoutEffect=function(N,Y){return ae.current.useLayoutEffect(N,Y)},Re.useMemo=function(N,Y){return ae.current.useMemo(N,Y)},Re.useReducer=function(N,Y,O){return ae.current.useReducer(N,Y,O)},Re.useRef=function(N){return ae.current.useRef(N)},Re.useState=function(N){return ae.current.useState(N)},Re.useSyncExternalStore=function(N,Y,O){return ae.current.useSyncExternalStore(N,Y,O)},Re.useTransition=function(){return ae.current.useTransition()},Re.version="18.3.1",Re}var un;function yo(){return un||(un=1,pt.exports=_t()),pt.exports}var Ls;function ud(){if(Ls)return bt;Ls=1;var e=yo(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,h){var p,g={},b=null,y=null;h!==void 0&&(b=""+h),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(g[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)g[p]===void 0&&(g[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:y,props:g,_owner:o.current}}return bt.Fragment=n,bt.jsx=u,bt.jsxs=u,bt}var Gn;function l2(){return Gn||(Gn=1,rt.exports=ud()),rt.exports}var x=l2();const fr=Object.create(null);fr.open="0",fr.close="1",fr.ping="2",fr.pong="3",fr.message="4",fr.upgrade="5",fr.noop="6";const yu=Object.create(null);Object.keys(fr).forEach(e=>{yu[fr[e]]=e});const ld={type:"error",data:"parser error"},u0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",l0=typeof ArrayBuffer=="function",c0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cd=({type:e,data:t},n,r)=>u0&&t instanceof Blob?n?r(t):d0(t,r):l0&&(t instanceof ArrayBuffer||c0(t))?n?r(t):d0(new Blob([t]),r):r(fr[e]+(t||"")),d0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function f0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let dd;function c2(e,t){if(u0&&e.data instanceof Blob)return e.data.arrayBuffer().then(f0).then(t);if(l0&&(e.data instanceof ArrayBuffer||c0(e.data)))return t(f0(e.data));cd(e,!1,n=>{dd||(dd=new TextEncoder),t(dd.encode(n))})}const h0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ds=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<h0.length;e++)Ds[h0.charCodeAt(e)]=e;const d2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),p=new Uint8Array(h);for(r=0;r<n;r+=4)a=Ds[e.charCodeAt(r)],u=Ds[e.charCodeAt(r+1)],c=Ds[e.charCodeAt(r+2)],d=Ds[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return h},f2=typeof ArrayBuffer=="function",fd=(e,t)=>{if(typeof e!="string")return{type:"message",data:p0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:h2(e.substring(1),t)}:yu[n]?e.length>1?{type:yu[n],data:e.substring(1)}:{type:yu[n]}:ld},h2=(e,t)=>{if(f2){const n=d2(e);return p0(n,t)}else return{base64:!0,data:e}},p0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,m0="",p2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{cd(a,!1,c=>{r[u]=c,++o===n&&t(r.join(m0))})})},m2=(e,t)=>{const n=e.split(m0),r=[];for(let o=0;o<n.length;o++){const a=fd(n[o],t);if(r.push(a),a.type==="error")break}return r};function g2(){return new TransformStream({transform(e,t){c2(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let hd;function Tu(e){return e.reduce((t,n)=>t+n.length,0)}function bu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=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 E2(e,t){hd||(hd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(Tu(n)<1)break;const d=bu(n,1);a=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(Tu(n)<2)break;const d=bu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Tu(n)<8)break;const d=bu(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),p=h.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(ld);break}o=p*Math.pow(2,32)+h.getUint32(4),r=3}else{if(Tu(n)<o)break;const d=bu(n,o);c.enqueue(fd(a?d:hd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(ld);break}}}})}const g0=4;function kt(e){if(e)return y2(e)}function y2(e){for(var t in kt.prototype)e[t]=kt.prototype[t];return e}kt.prototype.on=kt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},kt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},kt.prototype.off=kt.prototype.removeListener=kt.prototype.removeAllListeners=kt.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,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},kt.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,o=n.length;r<o;++r)n[r].apply(this,t)}return this},kt.prototype.emitReserved=kt.prototype.emit,kt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},kt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const xu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Ln=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),T2="arraybuffer";function jB(){}function E0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const b2=Ln.setTimeout,x2=Ln.clearTimeout;function _u(e,t){t.useNativeTimers?(e.setTimeoutFn=b2.bind(Ln),e.clearTimeoutFn=x2.bind(Ln)):(e.setTimeoutFn=Ln.setTimeout.bind(Ln),e.clearTimeoutFn=Ln.clearTimeout.bind(Ln))}const _2=1.33;function w2(e){return typeof e=="string"?S2(e):Math.ceil((e.byteLength||e.size)*_2)}function S2(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function y0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function v2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function A2(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class k2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class pd extends kt{constructor(t){super(),this.writable=!1,_u(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 k2(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=v2(t);return n.length?"?"+n:""}}class C2 extends pd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};m2(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,p2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=y0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let T0=!1;try{T0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const N2=T0;function O2(){}class P2 extends C2{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",(o,a)=>{this.onError("xhr post error",o,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 hr extends kt{constructor(t,n,r){super(),this.createRequest=t,_u(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=E0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(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 o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.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(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=hr.requestsCount++,hr.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=O2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete hr.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(hr.requestsCount=0,hr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",b0);else if(typeof addEventListener=="function"){const e="onpagehide"in Ln?"pagehide":"unload";addEventListener(e,b0,!1)}}function b0(){for(let e in hr.requests)hr.requests.hasOwnProperty(e)&&hr.requests[e].abort()}const I2=(function(){const e=x0({xdomain:!1});return e&&e.responseType!==null})();class R2 extends P2{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=I2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new hr(x0,this.uri(),t)}}function x0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||N2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Ln[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const _0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class L2 extends pd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=_0?{}:E0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}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],o=n===t.length-1;cd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&xu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=y0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const md=Ln.WebSocket||Ln.MozWebSocket;class D2 extends L2{createSocket(t,n,r){return _0?new md(t,n,r):n?new md(t,n):new md(t)}doWrite(t,n){this.ws.send(n)}}class M2 extends pd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=E2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=g2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&xu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const F2={websocket:D2,webtransport:M2,polling:R2},B2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,U2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=B2.exec(e||""),a={},u=14;for(;u--;)a[U2[u]]=o[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=H2(a,a.path),a.queryKey=z2(a,a.query),a}function H2(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 z2(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Ed=typeof addEventListener=="function"&&typeof removeEventListener=="function",wu=[];Ed&&addEventListener("offline",()=>{wu.forEach(e=>e())},!1);class Xr extends kt{constructor(t,n){if(super(),this.binaryType=T2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=gd(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=gd(n.host).host);_u(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 o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=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=A2(this.opts.query)),Ed&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},wu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=g0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Xr.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",Xr.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 o=this.writeBuffer[r].data;if(o&&(n+=w2(o)),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,xu(()=>{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,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=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),o&&this.once("flush",o),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(Xr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ed&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=wu.indexOf(this._offlineEventListener);r!==-1&&wu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Xr.protocol=g0;class j2 extends Xr{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;Xr.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Xr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=g=>{const b=new Error("probe error: "+g);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function h(g){n&&g.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",o),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",h),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 $2=class extends j2{constructor(t,n={}){const r=typeof t=="object",o=r?B({},t):B({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>F2[a]).filter(a=>!!a)),super(r?o:t,o)}};function V2(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=gd(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const q2=typeof ArrayBuffer=="function",Y2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,w0=Object.prototype.toString,W2=typeof Blob=="function"||typeof Blob!="undefined"&&w0.call(Blob)==="[object BlobConstructor]",G2=typeof File=="function"||typeof File!="undefined"&&w0.call(File)==="[object FileConstructor]";function yd(e){return q2&&(e instanceof ArrayBuffer||Y2(e))||W2&&e instanceof Blob||G2&&e instanceof File}function Su(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Su(e[n]))return!0;return!1}if(yd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Su(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Su(e[n]))return!0;return!1}function X2(e){const t=[],n=e.data,r=e;return r.data=Td(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Td(e,t){if(!e)return e;if(yd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Td(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Td(e[r],t));return n}return e}function K2(e,t){return e.data=bd(e.data,t),delete e.attachments,e}function bd(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]=bd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=bd(e[n],t));return e}const Q2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ke;(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"})(Ke||(Ke={}));class J2{constructor(t){this.replacer=t}encode(t){return(t.type===Ke.EVENT||t.type===Ke.ACK)&&Su(t)?this.encodeAsBinary({type:t.type===Ke.EVENT?Ke.BINARY_EVENT:Ke.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ke.BINARY_EVENT||t.type===Ke.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=X2(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class xd extends kt{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===Ke.BINARY_EVENT;r||n.type===Ke.BINARY_ACK?(n.type=r?Ke.EVENT:Ke.ACK,this.reconstructor=new Z2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(yd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ke[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ke.BINARY_EVENT||r.type===Ke.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!eS(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){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(xd.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 Ke.CONNECT:return S0(n);case Ke.DISCONNECT:return n===void 0;case Ke.CONNECT_ERROR:return typeof n=="string"||S0(n);case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Q2.indexOf(n[0])===-1);case Ke.ACK:case Ke.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Z2{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=K2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const eS=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function S0(e){return Object.prototype.toString.call(e)==="[object Object]"}const tS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:xd,Encoder:J2,get PacketType(){return Ke}},Symbol.toStringTag,{value:"Module"}));function Xn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const nS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class v0 extends kt{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=[Xn(t,"open",this.onopen.bind(this)),Xn(t,"packet",this.onpacket.bind(this)),Xn(t,"error",this.onerror.bind(this)),Xn(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,o,a;if(nS.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:Ke.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,g=n.pop();this._registerAckCallback(p,g),u.id=p}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(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:Ke.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 Ke.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 Ke.EVENT:case Ke.BINARY_EVENT:this.onevent(t);break;case Ke.ACK:case Ke.BINARY_ACK:this.onack(t);break;case Ke.DISCONNECT:this.ondisconnect();break;case Ke.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(...o){r||(r=!0,n.packet({type:Ke.ACK,id:t,data:o}))}}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:Ke.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 To(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}To.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},To.prototype.reset=function(){this.attempts=0},To.prototype.setMin=function(e){this.ms=e},To.prototype.setMax=function(e){this.max=e},To.prototype.setJitter=function(e){this.jitter=e};class _d extends kt{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,_u(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 To({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||tS;this.encoder=new o.Encoder,this.decoder=new o.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 $2(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Xn(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Xn(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),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(Xn(t,"ping",this.onping.bind(this)),Xn(t,"data",this.ondata.bind(this)),Xn(t,"error",this.onerror.bind(this)),Xn(t,"close",this.onclose.bind(this)),Xn(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){xu(()=>{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 v0(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(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):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 Ms={};function wd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=V2(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Ms[o]&&a in Ms[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new _d(r,t):(Ms[o]||(Ms[o]=new _d(r,t)),d=Ms[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(wd,{Manager:_d,Socket:v0,io:wd,connect:wd});const A0=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&A0.call(Blob),typeof File=="function"||typeof File!="undefined"&&A0.call(File);var k0;(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"})(k0||(k0={}));var q=yo();const Ni=Ge(q);let rS=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,o;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((o=this.onceListeners.get(t))==null?void 0:o.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 o=this.onceListeners.get(t);if(o){for(const a of o)try{a(...n)}catch(u){}this.onceListeners.delete(t)}}};class iS{constructor(t,n,r,o,a){this.url=t,this.headers=n,this.onEvent=r,this.onClose=o,this.logger=a,this.controller=null,this.reading=!1}connect(){return ze(this,null,function*(){if(this.reading)return void this.logger.warn("SSE already connected, ignoring duplicate connect()");this.controller=new AbortController,this.reading=!0;const t=yield fetch(this.url,{method:"GET",headers:oe(B({},this.headers),{Accept:"text/event-stream","Cache-Control":"no-cache"}),signal:this.controller.signal});if(!t.ok){this.reading=!1;const n=yield t.text().catch(()=>t.statusText);throw new Error(`SSE connection failed (${t.status}): ${n}`)}if(!t.body)throw this.reading=!1,new Error("SSE response has no body stream");this.readStream(t.body)})}disconnect(){this.reading=!1,this.controller&&(this.controller.abort(),this.controller=null)}get isConnected(){return this.reading}readStream(t){return ze(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let o="";try{for(;this.reading;){const{value:a,done:u}=yield n.read();if(u)break;let c;for(o+=r.decode(a,{stream:!0}),o=o.replace(/\r\n/g,`
|
|
3
3
|
`).replace(/\r/g,`
|
|
4
4
|
`);(c=o.indexOf(`
|
|
5
5
|
|
|
6
6
|
`))>=0;){const d=o.slice(0,c);o=o.slice(c+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 o=r.join(`
|
|
8
|
-
`);this.logger.debug(`SSE event: ${n}`,o.slice(0,200)),this.onEvent(n,o)}}class Ir extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let iS=class extends Ir{constructor(t,n,r,o){super(t,"api",o),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class C0 extends Ir{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let Sd=class extends Ir{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class oS{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}class sS extends nS{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:o={}}){var u,c,d,h,p,g,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=o.maxRetries)!=null?u:3,timeout:(c=o.timeout)!=null?c:15e3,maxReconnectAttempts:(d=o.maxReconnectAttempts)!=null?d:5,reconnectDelay:(h=o.reconnectDelay)!=null?h:2e3,enableLogging:(p=o.enableLogging)!=null?p:!1,platform:(g=o.platform)!=null?g:"Web",capabilitiesVersion:(b=o.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 oS(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return ze(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return ze(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return ze(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Ir("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return ze(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return ze(this,null,function*(){var u,c,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(),o="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",o);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(c=a.openConversationsFound)!=null?c:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return ze(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const o=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${o?`?${o}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}retrieveConversationTranscript(t){return ze(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new Ir("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 Ir("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return ze(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}openSSE(t){return ze(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new rS(n,r,(o,a)=>this.handleSSEEvent(o,a),o=>this.handleSSEClose(o),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>ze(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const o=r instanceof Error?r.message:String(r);if(o.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: ${o}`),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(o){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||"",o=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:o,failureType:o?void 0:r,raw:n}),o||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var c;const n=t.conversationEntry;if(!n)return;const r=((c=n.sender)==null?void 0:c.role)||"";if(r==="EndUser"||r==="Customer")return;const o=this.parseEntryPayload(n),a=this.getNestedValue(o,"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:o})}handleStreamingToken(t){let n,r,o,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),c=this.getNestedValue(u,"streamingToken");a=this.getNestedString(c,"token","text")||this.getNestedString(c,"token","content")||"";const d=this.getNestedValue(c,"sequenceNumber");typeof d=="number"&&(n=d);const h=this.getNestedString(c,"targetMessageIdentifier");h&&(r=h);const p=this.getNestedString(c,"tokenType");p&&(o=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",B(B(B({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),o?{tokenType:o}:{})):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),o=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(o,"progressMessage","text")||this.getNestedString(o,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(o,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var o,a,u,c,d,h,p;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries;if(r&&r.length>0)for(const g of r){const b=g.participant,y=g.displayName||(b==null?void 0:b.displayName)||((o=t.conversationEntry)==null?void 0:o.senderDisplayName)||"Agent",x=(b==null?void 0:b.role)||((u=(a=t.conversationEntry)==null?void 0:a.sender)==null?void 0:u.role)||"",v=g.operation||g.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:x,name:y},action:this.normalizeParticipantAction(v)})}else{const g=((c=t.conversationEntry)==null?void 0:c.senderDisplayName)||n.participantName||((d=n.participant)==null?void 0:d.displayName)||"Agent",b=n.operation||n.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:((p=(h=t.conversationEntry)==null?void 0:h.sender)==null?void 0:p.role)||"",name:g},action:this.normalizeParticipantAction(b)})}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return ze(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new Sd("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,o){return ze(this,null,function*(){const a=(o==null?void 0:o.useAuth)!==!1;let u=0;for(;;){let c;try{const d=new AbortController;c=setTimeout(()=>d.abort(),(o==null?void 0:o.timeout)||this.timeout);const h=B({"Content-Type":"application/json"},o==null?void 0:o.headers);a&&this._accessToken&&(h.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:h,signal:(o==null?void 0:o.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const g=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(c),!g.ok){const b=yield g.text().catch(()=>g.statusText);if(g.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new Sd(`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 Sd(`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 iS(`Request ${t} ${n} failed (${g.status}): ${b}`,g.status,b)}return g.status===204||t==="DELETE"?{}:(o==null?void 0:o.responseType)==="blob"?yield g.blob():g.text().then(b=>b?JSON.parse(b):null)}catch(d){if(clearTimeout(c),d instanceof Ir)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new C0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const h=100*Math.random(),p=300*Math.pow(2,u-1)+h;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(g=>setTimeout(g,p));continue}throw new C0(`Network error: ${d.message}`,u,{cause:d})}throw new Ir(`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 Ir("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const o of n){if(r==null||typeof r!="object")return;r=r[o]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}}const L="cim-widget",_n=`--${L}`,Kr={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},aS=(e=Kr)=>({[`${_n}-primary-color`]:e.primaryColor||Kr.primaryColor,[`${_n}-secondary-color`]:e.secondaryColor||Kr.secondaryColor,[`${_n}-font-color`]:e.fontColor||Kr.fontColor,[`${_n}-font-family`]:e.fontFamily||Kr.fontFamily,[`${_n}-background-color`]:e.backgroundColor||Kr.backgroundColor,[`${_n}-border-color`]:e.borderColor||Kr.borderColor,[`${_n}-border-radius`]:e.borderRadius||Kr.borderRadius});function k0(e,t){return function(){return e.apply(t,arguments)}}const{toString:uS}=Object.prototype,{getPrototypeOf:vu}=Object,{iterator:Au,toStringTag:N0}=Symbol,Cu=(e=>t=>{const n=uS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Kn=e=>(e=e.toLowerCase(),t=>Cu(t)===e),ku=e=>t=>typeof t===e,{isArray:bo}=Array,_o=ku("undefined");function Fs(e){return e!==null&&!_o(e)&&e.constructor!==null&&!_o(e.constructor)&&ln(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const O0=Kn("ArrayBuffer");function lS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&O0(e.buffer),t}const cS=ku("string"),ln=ku("function"),P0=ku("number"),Bs=e=>e!==null&&typeof e=="object",dS=e=>e===!0||e===!1,Nu=e=>{if(Cu(e)!=="object")return!1;const t=vu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(N0 in e)&&!(Au in e)},fS=e=>{if(!Bs(e)||Fs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},hS=Kn("Date"),pS=Kn("File"),mS=e=>!!(e&&typeof e.uri!="undefined"),gS=e=>e&&typeof e.getParts!="undefined",ES=Kn("Blob"),yS=Kn("FileList"),TS=e=>Bs(e)&&ln(e.pipe);function bS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const I0=bS(),R0=typeof I0.FormData!="undefined"?I0.FormData:void 0,_S=e=>{if(!e)return!1;if(R0&&e instanceof R0)return!0;const t=vu(e);if(!t||t===Object.prototype||!ln(e.append))return!1;const n=Cu(e);return n==="formdata"||n==="object"&&ln(e.toString)&&e.toString()==="[object FormData]"},xS=Kn("URLSearchParams"),[wS,SS,vS,AS]=["ReadableStream","Request","Response","Headers"].map(Kn),CS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Us(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),bo(e))for(r=0,o=e.length;r<o;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 c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function L0(e,t){if(Fs(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Oi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,D0=e=>!_o(e)&&e!==Oi;function vd(...e){const{caseless:t,skipUndefined:n}=D0(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&L0(r,u)||u,d=Ad(r,c)?r[c]:void 0;Nu(d)&&Nu(a)?r[c]=vd(d,a):Nu(a)?r[c]=vd({},a):bo(a)?r[c]=a.slice():(!n||!_o(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&Us(e[a],o);return r}const kS=(e,t,n,{allOwnKeys:r}={})=>(Us(t,(o,a)=>{n&&ln(o)?Object.defineProperty(e,a,{__proto__:null,value:k0(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),NS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),OS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},PS=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&vu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},IS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},RS=e=>{if(!e)return null;if(bo(e))return e;let t=e.length;if(!P0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},LS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&vu(Uint8Array)),DS=(e,t)=>{const r=(e&&e[Au]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},MS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},FS=Kn("HTMLFormElement"),BS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ad=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),US=Kn("RegExp"),M0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Us(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},HS=e=>{M0(e,(t,n)=>{if(ln(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(ln(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},zS=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return bo(e)?r(e):r(String(e).split(t)),n},jS=()=>{},$S=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function VS(e){return!!(e&&ln(e.append)&&e[N0]==="FormData"&&e[Au])}const qS=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 o=bo(r)?[]:{};return Us(r,(a,u)=>{const c=n(a);!_o(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},YS=Kn("AsyncFunction"),WS=e=>e&&(Bs(e)||ln(e))&&ln(e.then)&&ln(e.catch),F0=((e,t)=>e?setImmediate:t?((n,r)=>(Oi.addEventListener("message",({source:o,data:a})=>{o===Oi&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Oi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ln(Oi.postMessage)),GS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Oi):typeof process!="undefined"&&process.nextTick||F0,G={isArray:bo,isArrayBuffer:O0,isBuffer:Fs,isFormData:_S,isArrayBufferView:lS,isString:cS,isNumber:P0,isBoolean:dS,isObject:Bs,isPlainObject:Nu,isEmptyObject:fS,isReadableStream:wS,isRequest:SS,isResponse:vS,isHeaders:AS,isUndefined:_o,isDate:hS,isFile:pS,isReactNativeBlob:mS,isReactNative:gS,isBlob:ES,isRegExp:US,isFunction:ln,isStream:TS,isURLSearchParams:xS,isTypedArray:LS,isFileList:yS,forEach:Us,merge:vd,extend:kS,trim:CS,stripBOM:NS,inherits:OS,toFlatObject:PS,kindOf:Cu,kindOfTest:Kn,endsWith:IS,toArray:RS,forEachEntry:DS,matchAll:MS,isHTMLForm:FS,hasOwnProperty:Ad,hasOwnProp:Ad,reduceDescriptors:M0,freezeMethods:HS,toObjectSet:zS,toCamelCase:BS,noop:jS,toFiniteNumber:$S,findKey:L0,global:Oi,isContextDefined:D0,isSpecCompliantForm:VS,toJSONObject:qS,isAsyncFn:YS,isThenable:WS,setImmediate:F0,asap:GS,isIterable:e=>e!=null&&ln(e[Au])},XS=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),KS=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
9
|
-
`).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&
|
|
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(o=>r.set(o)),r}static accessor(t){const r=(this[U0]=this[U0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=Hs(u);r[c]||(ov(o,u),r[c]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}};nn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(nn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),G.freezeMethods(nn);const sv="[REDACTED ****]";function av(e){if(G.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(G.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function uv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||G.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof nn&&(a=a.toJSON()),r.push(a);let u;if(G.isArray(a))u=[],a.forEach((c,d)=>{const h=o(c);G.isUndefined(h)||(u[d]=h)});else{if(!G.isPlainObject(a)&&av(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const h=n.has(c.toLowerCase())?sv:o(d);G.isUndefined(h)||(u[c]=h)}}return r.pop(),u};return o(e)}let Ae=class o2 extends Error{static from(t,n,r,o,a,u){const c=new o2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,o,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),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&G.hasOwnProp(t,"redact")?t.redact:void 0,r=G.isArray(n)&&n.length>0?uv(t,n):G.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}}};Ae.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ae.ERR_BAD_OPTION="ERR_BAD_OPTION",Ae.ECONNABORTED="ECONNABORTED",Ae.ETIMEDOUT="ETIMEDOUT",Ae.ECONNREFUSED="ECONNREFUSED",Ae.ERR_NETWORK="ERR_NETWORK",Ae.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ae.ERR_DEPRECATED="ERR_DEPRECATED",Ae.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ae.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ae.ERR_CANCELED="ERR_CANCELED",Ae.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ae.ERR_INVALID_URL="ERR_INVALID_URL",Ae.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const lv=null;function Nd(e){return G.isPlainObject(e)||G.isArray(e)}function H0(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function Od(e,t,n){return e?e.concat(t).map(function(o,a){return o=H0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function cv(e){return G.isArray(e)&&!e.some(Nd)}const dv=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function Pu(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,C){return!G.isUndefined(C[A])});const r=n.metaTokens,o=n.visitor||g,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,h=c&&G.isSpecCompliantForm(t);if(!G.isFunction(o))throw new TypeError("visitor must be a function");function p(v){if(v===null)return"";if(G.isDate(v))return v.toISOString();if(G.isBoolean(v))return v.toString();if(!h&&G.isBlob(v))throw new Ae("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(v)||G.isTypedArray(v)?h&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function g(v,A,C){let k=v;if(G.isReactNative(t)&&G.isReactNativeBlob(v))return t.append(Od(C,A,a),p(v)),!1;if(v&&!C&&typeof v=="object"){if(G.endsWith(A,"{}"))A=r?A:A.slice(0,-2),v=JSON.stringify(v);else if(G.isArray(v)&&cv(v)||(G.isFileList(v)||G.endsWith(A,"[]"))&&(k=G.toArray(v)))return A=H0(A),k.forEach(function($,W){!(G.isUndefined($)||$===null)&&t.append(u===!0?Od([A],W,a):u===null?A:A+"[]",p($))}),!1}return Nd(v)?!0:(t.append(Od(C,A,a),p(v)),!1)}const b=[],y=Object.assign(dv,{defaultVisitor:g,convertValue:p,isVisitable:Nd});function x(v,A,C=0){if(!G.isUndefined(v)){if(C>d)throw new Ae("Object is too deeply nested ("+C+" levels). Max depth: "+d,Ae.ERR_FORM_DATA_DEPTH_EXCEEDED);if(b.indexOf(v)!==-1)throw Error("Circular reference detected in "+A.join("."));b.push(v),G.forEach(v,function(I,$){(!(G.isUndefined(I)||I===null)&&o.call(t,I,G.isString($)?$.trim():$,A,y))===!0&&x(I,A?A.concat($):[$],C+1)}),b.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return x(e),t}function z0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Pd(e,t){this._pairs=[],e&&Pu(e,this,t)}const j0=Pd.prototype;j0.append=function(t,n){this._pairs.push([t,n])},j0.toString=function(t){const n=t?function(r){return t.call(this,r,z0)}:z0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function fv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function $0(e,t,n){if(!t)return e;const r=n&&n.encode||fv,o=G.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=G.isURLSearchParams(t)?t.toString():new Pd(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class V0{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){G.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Id={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},hv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Pd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Rd=typeof window!="undefined"&&typeof document!="undefined",Ld=typeof navigator=="object"&&navigator||void 0,pv=Rd&&(!Ld||["ReactNative","NativeScript","NS"].indexOf(Ld.product)<0),mv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",gv=Rd&&window.location.href||"http://localhost",Wt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rd,hasStandardBrowserEnv:pv,hasStandardBrowserWebWorkerEnv:mv,navigator:Ld,origin:gv},Symbol.toStringTag,{value:"Module"}))),hv);function Ev(e,t){return Pu(e,new Wt.classes.URLSearchParams,B({visitor:function(n,r,o,a){return Wt.isNode&&G.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function yv(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Tv(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function q0(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&G.isArray(o)?o.length:u,d?(G.hasOwnProp(o,u)?o[u]=G.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!G.hasOwnProp(o,u)||!G.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&G.isArray(o[u])&&(o[u]=Tv(o[u])),!c)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(r,o)=>{t(yv(r),o,n,0)}),n}return null}const xo=(e,t)=>e!=null&&G.hasOwnProp(e,t)?e[t]:void 0;function bv(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const zs={transitional:Id,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=G.isObject(t);if(a&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return o?JSON.stringify(q0(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t)||G.isReadableStream(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=xo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ev(t,d).toString();if((c=G.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=xo(this,"env"),p=h&&h.FormData;return Pu(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),bv(t)):t}],transformResponse:[function(t){const n=xo(this,"transitional")||zs.transitional,r=n&&n.forcedJSONParsing,o=xo(this,"responseType"),a=o==="json";if(G.isResponse(t)||G.isReadableStream(t))return t;if(t&&G.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,xo(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ae.from(d,Ae.ERR_BAD_RESPONSE,this,null,xo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wt.classes.FormData,Blob:Wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch","query"],e=>{zs.headers[e]={}});function Dd(e,t){const n=this||zs,r=t||n,o=nn.from(r.headers);let a=r.data;return G.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Y0(e){return!!(e&&e.__CANCEL__)}let js=class extends Ae{constructor(t,n,r){super(t==null?"canceled":t,Ae.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function W0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ae("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ae.ERR_BAD_REQUEST:Ae.ERR_BAD_RESPONSE,n.config,n.request,n))}function _v(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function xv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),p=r[a];u||(u=h),n[o]=d,r[o]=h;let g=a,b=0;for(;g!==o;)b+=n[g++],g=g%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),h-u<t)return;const y=p&&h-p;return y?Math.round(b*1e3/y):void 0}}function wv(e,t){let n=0,r=1e3/t,o,a;const u=(h,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e(...h)};return[(...h)=>{const p=Date.now(),g=p-n;g>=r?u(h,p):(o=h,a||(a=setTimeout(()=>{a=null,u(o)},r-g)))},()=>o&&u(o)]}const Iu=(e,t,n=3)=>{let r=0;const o=xv(50,250);return wv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,h=Math.max(0,d-r),p=o(h);r=Math.max(r,d);const g={loaded:d,total:c,progress:c?d/c:void 0,bytes:h,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(g)},n)},G0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},X0=e=>(...t)=>G.asap(()=>e(...t)),Sv=Wt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Wt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Wt.origin),Wt.navigator&&/(msie|trident)/i.test(Wt.navigator.userAgent)):()=>!0,vv=Wt.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];G.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),G.isString(r)&&c.push(`path=${r}`),G.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),G.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Av(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Cv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function K0(e,t,n){let r=!Av(t);return e&&(r||n===!1)?Cv(e,t):t}const Q0=e=>e instanceof nn?B({},e):e;function Pi(e,t){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(h,p,g,b){return G.isPlainObject(h)&&G.isPlainObject(p)?G.merge.call({caseless:b},h,p):G.isPlainObject(p)?G.merge({},p):G.isArray(p)?p.slice():p}function o(h,p,g,b){if(G.isUndefined(p)){if(!G.isUndefined(h))return r(void 0,h,g,b)}else return r(h,p,g,b)}function a(h,p){if(!G.isUndefined(p))return r(void 0,p)}function u(h,p){if(G.isUndefined(p)){if(!G.isUndefined(h))return r(void 0,h)}else return r(void 0,p)}function c(h,p,g){if(G.hasOwnProp(t,g))return r(h,p);if(G.hasOwnProp(e,g))return r(void 0,h)}const d={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:c,headers:(h,p,g)=>o(Q0(h),Q0(p),g,!0)};return G.forEach(Object.keys(B(B({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=G.hasOwnProp(d,p)?d[p]:o,b=G.hasOwnProp(e,p)?e[p]:void 0,y=G.hasOwnProp(t,p)?t[p]:void 0,x=g(b,y,p);G.isUndefined(x)&&g!==c||(n[p]=x)}),n}const kv=["content-type","content-length"];function Nv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{kv.includes(r.toLowerCase())&&e.set(r,o)})}const Ov=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),J0=e=>{const t=Pi({},e),n=b=>G.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),h=n("baseURL"),p=n("allowAbsoluteUrls"),g=n("url");if(t.headers=c=nn.from(c),t.url=$0(K0(h,g,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?Ov(d.password):""))),G.isFormData(r)&&(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):G.isFunction(r.getHeaders)&&Nv(c,r.getHeaders(),n("formDataHeaderPolicy"))),Wt.hasStandardBrowserEnv&&(G.isFunction(o)&&(o=o(t)),o===!0||o==null&&Sv(t.url))){const y=a&&u&&vv.read(u);y&&c.set(a,y)}return t},Pv=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=J0(e);let a=o.data;const u=nn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:h}=o,p,g,b,y,x;function v(){y&&y(),x&&x(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(o.method.toUpperCase(),o.url,!0),A.timeout=o.timeout;function C(){if(!A)return;const I=nn.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),W={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:I,config:e,request:A};W0(function(ee){n(ee),v()},function(ee){r(ee),v()},W),A=null}"onloadend"in A?A.onloadend=C:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(C)},A.onabort=function(){A&&(r(new Ae("Request aborted",Ae.ECONNABORTED,e,A)),v(),A=null)},A.onerror=function($){const W=$&&$.message?$.message:"Network Error",F=new Ae(W,Ae.ERR_NETWORK,e,A);F.event=$||null,r(F),v(),A=null},A.ontimeout=function(){let $=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const W=o.transitional||Id;o.timeoutErrorMessage&&($=o.timeoutErrorMessage),r(new Ae($,W.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,e,A)),v(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&G.forEach(B0(u),function($,W){A.setRequestHeader(W,$)}),G.isUndefined(o.withCredentials)||(A.withCredentials=!!o.withCredentials),c&&c!=="json"&&(A.responseType=o.responseType),h&&([b,x]=Iu(h,!0),A.addEventListener("progress",b)),d&&A.upload&&([g,y]=Iu(d),A.upload.addEventListener("progress",g),A.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=I=>{A&&(r(!I||I.type?new js(null,e,A):I),A.abort(),v(),A=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const k=_v(o.url);if(k&&!Wt.protocols.includes(k)){r(new Ae("Unsupported protocol "+k+":",Ae.ERR_BAD_REQUEST,e));return}A.send(a||null)})},Iv=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const h=d instanceof Error?d:this.reason;n.abort(h instanceof Ae?h:new js(h instanceof Error?h.message:h))}};let a=t&&setTimeout(()=>{a=null,o(new Ae(`timeout of ${t}ms exceeded`,Ae.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>G.asap(u),c},Rv=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Lv=function(e,t){return o0(this,null,function*(){try{for(var n=i2(Dv(e)),r,o,a;r=!(o=yield new Eo(n.next())).done;r=!1){const u=o.value;yield*s0(Rv(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Eo(o.call(n)))}finally{if(a)throw a[0]}}})},Dv=function(e){return o0(this,null,function*(){if(e[Symbol.asyncIterator]){yield*s0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Eo(t.read());if(n)break;yield r}}finally{yield new Eo(t.cancel())}})},Z0=(e,t,n,r)=>{const o=Lv(e,t);let a=0,u,c=h=>{u||(u=!0,r&&r(h))};return new ReadableStream({pull(h){return ze(this,null,function*(){try{const{done:p,value:g}=yield o.next();if(p){c(),h.close();return}let b=g.byteLength;if(n){let y=a+=b;n(y)}h.enqueue(new Uint8Array(g))}catch(p){throw c(p),p}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})};function Mv(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const x=r.charCodeAt(y+1),v=r.charCodeAt(y+2);(x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(u-=2,y+=2)}let d=0,h=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);h>=0&&(r.charCodeAt(h)===61?(d++,h--):p(h)&&(d++,h-=3)),d===1&&h>=0&&(r.charCodeAt(h)===61||p(h))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const h=r.charCodeAt(u+1);h>=56320&&h<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Md="1.16.1",eg=64*1024,{isFunction:Ru}=G,tg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Fv=e=>{const t=G.global!==void 0&&G.global!==null?G.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=G.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,c=o?Ru(o):typeof fetch=="function",d=Ru(a),h=Ru(u);if(!c)return!1;const p=c&&Ru(n),g=c&&(typeof r=="function"?(C=>k=>C.encode(k))(new r):C=>ze(null,null,function*(){return new Uint8Array(yield new a(C).arrayBuffer())})),b=d&&p&&tg(()=>{let C=!1;const k=new a(Wt.origin,{body:new n,method:"POST",get duplex(){return C=!0,"half"}}),I=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),C&&!I}),y=h&&p&&tg(()=>G.isReadableStream(new u("").body)),x={stream:y&&(C=>C.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!x[C]&&(x[C]=(k,I)=>{let $=k&&k[C];if($)return $.call(k);throw new Ae(`Response type '${C}' is not supported`,Ae.ERR_NOT_SUPPORT,I)})});const v=C=>ze(null,null,function*(){if(C==null)return 0;if(G.isBlob(C))return C.size;if(G.isSpecCompliantForm(C))return(yield new a(Wt.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(G.isArrayBufferView(C)||G.isArrayBuffer(C))return C.byteLength;if(G.isURLSearchParams(C)&&(C=C+""),G.isString(C))return(yield g(C)).byteLength}),A=(C,k)=>ze(null,null,function*(){const I=G.toFiniteNumber(C.getContentLength());return I==null?v(k):I});return C=>ze(null,null,function*(){let{url:k,method:I,data:$,signal:W,cancelToken:F,timeout:ee,onDownloadProgress:ce,onUploadProgress:pe,responseType:U,headers:ne,withCredentials:ae="same-origin",fetchOptions:de,maxContentLength:oe,maxBodyLength:be}=J0(C);const Ce=G.isNumber(oe)&&oe>-1,se=G.isNumber(be)&&be>-1;let j=o||fetch;U=U?(U+"").toLowerCase():"text";let J=Iv([W,F&&F.toAbortSignal()],ee),w=null;const N=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let q;try{if(Ce&&typeof k=="string"&&k.startsWith("data:")&&Mv(k)>oe)throw new Ae("maxContentLength size of "+oe+" exceeded",Ae.ERR_BAD_RESPONSE,C,w);if(se&&I!=="get"&&I!=="head"){const Se=yield A(ne,$);if(typeof Se=="number"&&isFinite(Se)&&Se>be)throw new Ae("Request body larger than maxBodyLength limit",Ae.ERR_BAD_REQUEST,C,w)}if(pe&&b&&I!=="get"&&I!=="head"&&(q=yield A(ne,$))!==0){let Se=new a(k,{method:"POST",body:$,duplex:"half"}),Ye;if(G.isFormData($)&&(Ye=Se.headers.get("content-type"))&&ne.setContentType(Ye),Se.body){const[dt,mn]=G0(q,Iu(X0(pe)));$=Z0(Se.body,eg,dt,mn)}}G.isString(ae)||(ae=ae?"include":"omit");const O=d&&"credentials"in a.prototype;if(G.isFormData($)){const Se=ne.getContentType();Se&&/^multipart\/form-data/i.test(Se)&&!/boundary=/i.test(Se)&&ne.delete("content-type")}ne.set("User-Agent","axios/"+Md,!1);const ye=ie(B({},de),{signal:J,method:I.toUpperCase(),headers:B0(ne.normalize()),body:$,duplex:"half",credentials:O?ae:void 0});w=d&&new a(k,ye);let ke=yield d?j(w,de):j(k,ye);if(Ce){const Se=G.toFiniteNumber(ke.headers.get("content-length"));if(Se!=null&&Se>oe)throw new Ae("maxContentLength size of "+oe+" exceeded",Ae.ERR_BAD_RESPONSE,C,w)}const Ie=y&&(U==="stream"||U==="response");if(y&&ke.body&&(ce||Ce||Ie&&N)){const Se={};["status","statusText","headers"].forEach(ir=>{Se[ir]=ke[ir]});const Ye=G.toFiniteNumber(ke.headers.get("content-length")),[dt,mn]=ce&&G0(Ye,Iu(X0(ce),!0))||[];let to=0;const si=ir=>{if(Ce&&(to=ir,to>oe))throw new Ae("maxContentLength size of "+oe+" exceeded",Ae.ERR_BAD_RESPONSE,C,w);dt&&dt(ir)};ke=new u(Z0(ke.body,eg,si,()=>{mn&&mn(),N&&N()}),Se)}U=U||"text";let He=yield x[G.findKey(x,U)||"text"](ke,C);if(Ce&&!y&&!Ie){let Se;if(He!=null&&(typeof He.byteLength=="number"?Se=He.byteLength:typeof He.size=="number"?Se=He.size:typeof He=="string"&&(Se=typeof r=="function"?new r().encode(He).byteLength:He.length)),typeof Se=="number"&&Se>oe)throw new Ae("maxContentLength size of "+oe+" exceeded",Ae.ERR_BAD_RESPONSE,C,w)}return!Ie&&N&&N(),yield new Promise((Se,Ye)=>{W0(Se,Ye,{data:He,headers:nn.from(ke.headers),status:ke.status,statusText:ke.statusText,config:C,request:w})})}catch(O){if(N&&N(),J&&J.aborted&&J.reason instanceof Ae){const ye=J.reason;throw ye.config=C,w&&(ye.request=w),O!==ye&&(ye.cause=O),ye}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new Ae("Network Error",Ae.ERR_NETWORK,C,w,O&&O.response),{cause:O.cause||O}):Ae.from(O,O&&O.code,C,w,O&&O.response)}})},Bv=new Map,ng=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,h,p=Bv;for(;c--;)d=a[c],h=p.get(d),h===void 0&&p.set(d,h=c?new Map:Fv(t)),p=h;return h};ng();const Fd={http:lv,xhr:Pv,fetch:{get:ng}};G.forEach(Fd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const rg=e=>`- ${e}`,Uv=e=>G.isFunction(e)||e===null||e===!1;function Hv(e,t){e=G.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!Uv(r)&&(o=Fd[(c=String(r)).toLowerCase()],o===void 0))throw new Ae(`Unknown adapter '${c}'`);if(o&&(G.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
|
|
11
|
-
`+u.map(
|
|
12
|
-
`):" "+
|
|
8
|
+
`);this.logger.debug(`SSE event: ${n}`,o.slice(0,200)),this.onEvent(n,o)}}class Ir extends Error{constructor(t,n="unknown",r){super(t,r),this.name="AgentforceClientError",this.type=n}}let oS=class extends Ir{constructor(t,n,r,o){super(t,"api",o),this.name="AgentforceApiError",this.statusCode=n,this.responseBody=r}};class C0 extends Ir{constructor(t,n=1,r){super(t,"network",r),this.name="AgentforceNetworkError",this.attemptsMade=n}}let Sd=class extends Ir{constructor(t,n){super(t,"auth",n),this.name="AgentforceAuthError"}};class sS{constructor(t){this.prefix="[Agentforce]",this.enabled=t}info(t,...n){this.enabled&&console.log(`${this.prefix} ${t}`,...n)}warn(t,...n){this.enabled&&console.warn(`${this.prefix} ${t}`,...n)}error(t,...n){this.enabled&&console.error(`${this.prefix} ${t}`,...n)}debug(t,...n){this.enabled&&console.debug(`${this.prefix} ${t}`,...n)}}class aS extends rS{constructor({baseURL:t,orgId:n,esDeveloperName:r,options:o={}}){var u,c,d,h,p,g,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=o.maxRetries)!=null?u:3,timeout:(c=o.timeout)!=null?c:15e3,maxReconnectAttempts:(d=o.maxReconnectAttempts)!=null?d:5,reconnectDelay:(h=o.reconnectDelay)!=null?h:2e3,enableLogging:(p=o.enableLogging)!=null?p:!1,platform:(g=o.platform)!=null?g:"Web",capabilitiesVersion:(b=o.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 sS(a.enableLogging),this.logger.info(`Client initialized for ${this.baseURL}`)}get isConnected(){return this._isConnected}get conversationId(){return this._conversationId}get accessToken(){return this._accessToken}connect(t){return ze(this,null,function*(){this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.logger.info("Connecting..."),t!=null&&t.continuationToken?(this._accessToken=t.continuationToken,this._tokenExpiresAt=this.getTokenExpiry(t.continuationToken),this._usingContinuationToken=!0,this.logger.info("Using continuation token")):(this._accessToken=yield this.fetchAccessToken(),this._usingContinuationToken=!1,this.logger.info("Access token acquired")),yield this.openSSE(t==null?void 0:t.lastEventId)})}disconnect(){this.intentionalDisconnect=!0,this.clearReconnectTimer(),this.closeSSE(),this._isConnected=!1,this.logger.info("Disconnected")}reconnect(){this._isConnected||(this.intentionalDisconnect=!1,this.reconnectAttempts=0,this.attemptReconnect())}createConversation(t){return ze(this,null,function*(){this.assertConnected();const n=crypto.randomUUID(),r={conversationId:n,esDeveloperName:this.esDeveloperName,routingAttributes:t!=null?t:{}};return yield this.executeRequest("POST","/iamessage/api/v2/conversation",r),this._conversationId=n,this.logger.info(`Conversation created: ${n}`),n})}sendMessage(t){return ze(this,null,function*(){if(this.assertConnected(),!this._conversationId)throw new Ir("No active conversation. Call createConversation() first.","unknown");const n=crypto.randomUUID(),r={message:{id:n,messageType:"StaticContentMessage",staticContent:{formatType:"Text",text:t}},esDeveloperName:this.esDeveloperName};yield this.executeRequest("POST",`/iamessage/api/v2/conversation/${this._conversationId}/message`,r),this.logger.debug(`Message sent: ${n}`)})}endConversation(){return ze(this,null,function*(){if(!this._conversationId||!this._accessToken)return;const t=this._conversationId;this._conversationId=null;try{yield this.executeRequest("DELETE",`/iamessage/api/v2/conversation/${t}?esDeveloperName=${encodeURIComponent(this.esDeveloperName)}`),this.logger.info(`Conversation ended: ${t}`)}catch(n){this.logger.warn(`Failed to end conversation (best effort): ${n instanceof Error?n.message:String(n)}`)}})}listConversations(t){return ze(this,null,function*(){var u,c,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(),o="/iamessage/api/v2/conversation/list"+(r?`?${r}`:""),a=yield this.executeRequest("GET",o);return{conversations:(u=a.conversations)!=null?u:[],openConversationsFound:(c=a.openConversationsFound)!=null?c:0,closedConversationsFound:(d=a.closedConversationsFound)!=null?d:0}})}listConversationEntries(t,n){return ze(this,null,function*(){var u;this.assertConnected();const r=new URLSearchParams;(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),(n==null?void 0:n.startTimestamp)!=null&&r.set("startTimestamp",String(n.startTimestamp)),(n==null?void 0:n.endTimestamp)!=null&&r.set("endTimestamp",String(n.endTimestamp)),n!=null&&n.direction&&r.set("direction",n.direction),n!=null&&n.entryTypeFilter&&n.entryTypeFilter.length>0&&r.set("entryTypeFilter",n.entryTypeFilter.join(","));const o=r.toString(),a=`/iamessage/api/v2/conversation/${t}/entries${o?`?${o}`:""}`;return{conversationEntries:(u=(yield this.executeRequest("GET",a)).conversationEntries)!=null?u:[]}})}retrieveConversationTranscript(t){return ze(this,null,function*(){this.assertConnected();const n=t!=null?t:this._conversationId;if(!n)throw new Ir("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 Ir("conversationId is required to resume a conversation.","unknown");this._conversationId=t,this.logger.info(`Conversation resumed: ${t}`)}generateContinuationToken(){return ze(this,null,function*(){this.assertConnected();const t=yield this.executeRequest("GET","/iamessage/api/v2/authorization/continuation-access-token");return this.logger.info("Continuation token generated"),t})}openSSE(t){return ze(this,null,function*(){this.closeSSE();const n=`${this.baseURL}/eventrouter/v1/sse`,r={Authorization:`Bearer ${this._accessToken}`,"X-Org-Id":this.orgId};t&&(r["Last-Event-ID"]=t),this.sseReader=new iS(n,r,(o,a)=>this.handleSSEEvent(o,a),o=>this.handleSSEClose(o),this.logger),yield this.sseReader.connect(),this._isConnected=!0,this.emit("connected"),this.logger.info("SSE stream connected")})}closeSSE(){this.sseReader&&(this.sseReader.disconnect(),this.sseReader=null)}handleSSEClose(t){this._isConnected=!1,this.emit("disconnected",{reason:t}),this.intentionalDisconnect||this.attemptReconnect()}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return this.logger.error(`Max reconnect attempts (${this.maxReconnectAttempts}) reached.`),void this.emit("error",{code:"MAX_RECONNECT",message:`Failed to reconnect after ${this.maxReconnectAttempts} attempts`,recoverable:!1});this.reconnectAttempts++;const t=500*Math.random(),n=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1)+t,3e4);this.logger.info(`Reconnecting in ${n.toFixed(0)}ms (attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts})...`),this.emit("reconnecting",{attempt:this.reconnectAttempts,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(()=>ze(this,null,function*(){try{if(this.intentionalDisconnect)return;if(!(this._accessToken&&Date.now()<this._tokenExpiresAt))return this.logger.error("Access token expired — session cannot be resumed"),this.emit("error",{code:"SESSION_EXPIRED",message:"Session expired. Call connect() to start a new session.",recoverable:!1}),void(this._conversationId=null);if(this.logger.info("Reusing existing access token for SSE reconnection"),this.intentionalDisconnect)return;yield this.openSSE(),this.reconnectAttempts=0,this.logger.info("Reconnected successfully")}catch(r){if(this.intentionalDisconnect)return;const o=r instanceof Error?r.message:String(r);if(o.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: ${o}`),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(o){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||"",o=!r||r==="None"||r==="NO_ERROR";this.emit("routing_result",{conversationId:this._conversationId||"",isSuccessful:o,failureType:o?void 0:r,raw:n}),o||this.emit("error",{code:"ROUTING_FAILED",message:`Routing failed: ${r}`,recoverable:!1})}handleConversationMessage(t){var c;const n=t.conversationEntry;if(!n)return;const r=((c=n.sender)==null?void 0:c.role)||"";if(r==="EndUser"||r==="Customer")return;const o=this.parseEntryPayload(n),a=this.getNestedValue(o,"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:o})}handleStreamingToken(t){let n,r,o,a="";if(t.conversationEntry){const u=this.parseEntryPayload(t.conversationEntry),c=this.getNestedValue(u,"streamingToken");a=this.getNestedString(c,"token","text")||this.getNestedString(c,"token","content")||"";const d=this.getNestedValue(c,"sequenceNumber");typeof d=="number"&&(n=d);const h=this.getNestedString(c,"targetMessageIdentifier");h&&(r=h);const p=this.getNestedString(c,"tokenType");p&&(o=p)}a||(a=t.token||t.text||""),a?this.emit("streaming_token",B(B(B({conversationId:this._conversationId||"",token:String(a)},n!==void 0?{sequenceNumber:n}:{}),r?{targetMessageId:r}:{}),o?{tokenType:o}:{})):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),o=this.getNestedValue(r,"progressIndicator"),a=this.getNestedString(o,"progressMessage","text")||this.getNestedString(o,"progressMessage","content")||t.text||"";if(!a)return;const u=this.getNestedString(o,"indicatorType")||void 0;this.emit("progress_indicator",{conversationId:this._conversationId||"",message:String(a),indicatorType:u,raw:r})}handleParticipantChanged(t){var o,a,u,c,d,h,p;let n=t;t.conversationEntry&&(n=this.parseEntryPayload(t.conversationEntry));const r=n.entries;if(r&&r.length>0)for(const g of r){const b=g.participant,y=g.displayName||(b==null?void 0:b.displayName)||((o=t.conversationEntry)==null?void 0:o.senderDisplayName)||"Agent",_=(b==null?void 0:b.role)||((u=(a=t.conversationEntry)==null?void 0:a.sender)==null?void 0:u.role)||"",v=g.operation||g.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:_,name:y},action:this.normalizeParticipantAction(v)})}else{const g=((c=t.conversationEntry)==null?void 0:c.senderDisplayName)||n.participantName||((d=n.participant)==null?void 0:d.displayName)||"Agent",b=n.operation||n.event||"";this.emit("participant_changed",{conversationId:this._conversationId||"",participant:{role:((p=(h=t.conversationEntry)==null?void 0:h.sender)==null?void 0:p.role)||"",name:g},action:this.normalizeParticipantAction(b)})}}normalizeParticipantAction(t){const n=t.toLowerCase();return n&&n!=="add"&&n!=="join"&&n!=="joined"&&n!=="transfer"?n==="remove"||n==="left"||n==="leave"?"remove":t:"add"}handleConversationClosed(t){this.emit("conversation_closed",{conversationId:t.conversationId||this._conversationId||""}),this._conversationId=null}fetchAccessToken(){return ze(this,null,function*(){const t={orgId:this.orgId,esDeveloperName:this.esDeveloperName,capabilitiesVersion:this.capabilitiesVersion,platform:this.platform},n=yield this.executeRequest("POST","/iamessage/api/v2/authorization/unauthenticated/access-token",t,{useAuth:!1});if(!n.accessToken)throw new Sd("Token response missing accessToken field");return this._tokenExpiresAt=this.getTokenExpiry(n.accessToken),n.accessToken})}executeRequest(t,n,r,o){return ze(this,null,function*(){const a=(o==null?void 0:o.useAuth)!==!1;let u=0;for(;;){let c;try{const d=new AbortController;c=setTimeout(()=>d.abort(),(o==null?void 0:o.timeout)||this.timeout);const h=B({"Content-Type":"application/json"},o==null?void 0:o.headers);a&&this._accessToken&&(h.Authorization=`Bearer ${this._accessToken}`);const p={method:t,headers:h,signal:(o==null?void 0:o.signal)||d.signal};r&&t==="POST"&&(p.body=JSON.stringify(r));const g=yield fetch(`${this.baseURL}${n}`,p);if(clearTimeout(c),!g.ok){const b=yield g.text().catch(()=>g.statusText);if(g.status===401&&a&&u===0){if(this._usingContinuationToken)throw this.logger.warn("Got 401 with continuation token — cannot auto-refresh"),new Sd(`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 Sd(`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 oS(`Request ${t} ${n} failed (${g.status}): ${b}`,g.status,b)}return g.status===204||t==="DELETE"?{}:(o==null?void 0:o.responseType)==="blob"?yield g.blob():g.text().then(b=>b?JSON.parse(b):null)}catch(d){if(clearTimeout(c),d instanceof Ir)throw d;if(d instanceof DOMException&&d.name==="AbortError")throw new C0("Request timeout exceeded",u+1,{cause:d});if(d instanceof TypeError){if(u<this.maxRetries){u++;const h=100*Math.random(),p=300*Math.pow(2,u-1)+h;this.logger.info(`Network error, retrying (${u}/${this.maxRetries}) in ${p.toFixed(0)}ms...`),yield new Promise(g=>setTimeout(g,p));continue}throw new C0(`Network error: ${d.message}`,u,{cause:d})}throw new Ir(`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 Ir("Client is not connected. Call connect() first.","unknown")}getTokenExpiry(t){var n;try{const r=t.split(".")[1];return 1e3*((n=JSON.parse(atob(r)).exp)!=null?n:0)}catch(r){return 0}}parseEntryPayload(t){if(!t.entryPayload)return{};if(typeof t.entryPayload=="string")try{return JSON.parse(t.entryPayload)}catch(n){return{}}return t.entryPayload}getNestedValue(t,...n){let r=t;for(const o of n){if(r==null||typeof r!="object")return;r=r[o]}return r}getNestedString(t,...n){const r=this.getNestedValue(t,...n);return typeof r=="string"?r:""}}const L="cim-widget",xn=`--${L}`,Kr={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},uS=(e=Kr)=>({[`${xn}-primary-color`]:e.primaryColor||Kr.primaryColor,[`${xn}-secondary-color`]:e.secondaryColor||Kr.secondaryColor,[`${xn}-font-color`]:e.fontColor||Kr.fontColor,[`${xn}-font-family`]:e.fontFamily||Kr.fontFamily,[`${xn}-background-color`]:e.backgroundColor||Kr.backgroundColor,[`${xn}-border-color`]:e.borderColor||Kr.borderColor,[`${xn}-border-radius`]:e.borderRadius||Kr.borderRadius});function N0(e,t){return function(){return e.apply(t,arguments)}}const{toString:lS}=Object.prototype,{getPrototypeOf:vu}=Object,{iterator:Au,toStringTag:O0}=Symbol,ku=(e=>t=>{const n=lS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Kn=e=>(e=e.toLowerCase(),t=>ku(t)===e),Cu=e=>t=>typeof t===e,{isArray:bo}=Array,xo=Cu("undefined");function Fs(e){return e!==null&&!xo(e)&&e.constructor!==null&&!xo(e.constructor)&&ln(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const P0=Kn("ArrayBuffer");function cS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&P0(e.buffer),t}const dS=Cu("string"),ln=Cu("function"),I0=Cu("number"),Bs=e=>e!==null&&typeof e=="object",fS=e=>e===!0||e===!1,Nu=e=>{if(ku(e)!=="object")return!1;const t=vu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(O0 in e)&&!(Au in e)},hS=e=>{if(!Bs(e)||Fs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},pS=Kn("Date"),mS=Kn("File"),gS=e=>!!(e&&typeof e.uri!="undefined"),ES=e=>e&&typeof e.getParts!="undefined",yS=Kn("Blob"),TS=Kn("FileList"),bS=e=>Bs(e)&&ln(e.pipe);function xS(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const R0=xS(),L0=typeof R0.FormData!="undefined"?R0.FormData:void 0,_S=e=>{if(!e)return!1;if(L0&&e instanceof L0)return!0;const t=vu(e);if(!t||t===Object.prototype||!ln(e.append))return!1;const n=ku(e);return n==="formdata"||n==="object"&&ln(e.toString)&&e.toString()==="[object FormData]"},wS=Kn("URLSearchParams"),[SS,vS,AS,kS]=["ReadableStream","Request","Response","Headers"].map(Kn),CS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Us(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),bo(e))for(r=0,o=e.length;r<o;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 c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function D0(e,t){if(Fs(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Oi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,M0=e=>!xo(e)&&e!==Oi;function vd(...e){const{caseless:t,skipUndefined:n}=M0(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&D0(r,u)||u,d=Ad(r,c)?r[c]:void 0;Nu(d)&&Nu(a)?r[c]=vd(d,a):Nu(a)?r[c]=vd({},a):bo(a)?r[c]=a.slice():(!n||!xo(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++)e[a]&&Us(e[a],o);return r}const NS=(e,t,n,{allOwnKeys:r}={})=>(Us(t,(o,a)=>{n&&ln(o)?Object.defineProperty(e,a,{__proto__:null,value:N0(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),OS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),PS=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},IS=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&vu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},RS=(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},LS=e=>{if(!e)return null;if(bo(e))return e;let t=e.length;if(!I0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},DS=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&vu(Uint8Array)),MS=(e,t)=>{const r=(e&&e[Au]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},FS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},BS=Kn("HTMLFormElement"),US=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ad=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),HS=Kn("RegExp"),F0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Us(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},zS=e=>{F0(e,(t,n)=>{if(ln(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(ln(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+"'")})}})},jS=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return bo(e)?r(e):r(String(e).split(t)),n},$S=()=>{},VS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function qS(e){return!!(e&&ln(e.append)&&e[O0]==="FormData"&&e[Au])}const YS=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 o=bo(r)?[]:{};return Us(r,(a,u)=>{const c=n(a);!xo(c)&&(o[u]=c)}),t.delete(r),o}}return r};return n(e)},WS=Kn("AsyncFunction"),GS=e=>e&&(Bs(e)||ln(e))&&ln(e.then)&&ln(e.catch),B0=((e,t)=>e?setImmediate:t?((n,r)=>(Oi.addEventListener("message",({source:o,data:a})=>{o===Oi&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Oi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ln(Oi.postMessage)),XS=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Oi):typeof process!="undefined"&&process.nextTick||B0,G={isArray:bo,isArrayBuffer:P0,isBuffer:Fs,isFormData:_S,isArrayBufferView:cS,isString:dS,isNumber:I0,isBoolean:fS,isObject:Bs,isPlainObject:Nu,isEmptyObject:hS,isReadableStream:SS,isRequest:vS,isResponse:AS,isHeaders:kS,isUndefined:xo,isDate:pS,isFile:mS,isReactNativeBlob:gS,isReactNative:ES,isBlob:yS,isRegExp:HS,isFunction:ln,isStream:bS,isURLSearchParams:wS,isTypedArray:DS,isFileList:TS,forEach:Us,merge:vd,extend:NS,trim:CS,stripBOM:OS,inherits:PS,toFlatObject:IS,kindOf:ku,kindOfTest:Kn,endsWith:RS,toArray:LS,forEachEntry:MS,matchAll:FS,isHTMLForm:BS,hasOwnProperty:Ad,hasOwnProp:Ad,reduceDescriptors:F0,freezeMethods:zS,toObjectSet:jS,toCamelCase:US,noop:$S,toFiniteNumber:VS,findKey:D0,global:Oi,isContextDefined:M0,isSpecCompliantForm:qS,toJSONObject:YS,isAsyncFn:WS,isThenable:GS,setImmediate:B0,asap:XS,isIterable:e=>e!=null&&ln(e[Au])},KS=G.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"]),QS=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
9
|
+
`).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&KS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function JS(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const ZS=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ev=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function kd(e,t){return G.isArray(e)?e.map(n=>kd(n,t)):JS(String(e).replace(t,""))}const tv=e=>kd(e,ZS),nv=e=>kd(e,ev);function U0(e){const t=Object.create(null);return G.forEach(e.toJSON(),(n,r)=>{t[r]=nv(n)}),t}const H0=Symbol("internals");function Hs(e){return e&&String(e).trim().toLowerCase()}function Ou(e){return e===!1||e==null?e:G.isArray(e)?e.map(Ou):tv(String(e))}function rv(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const iv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Cd(e,t,n,r,o){if(G.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!G.isString(t)){if(G.isString(r))return t.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(t)}}function ov(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function sv(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let nn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,h){const p=Hs(d);if(!p)throw new Error("header name must be a non-empty string");const g=G.findKey(o,p);(!g||o[g]===void 0||h===!0||h===void 0&&o[g]!==!1)&&(o[g||d]=Ou(c))}const u=(c,d)=>G.forEach(c,(h,p)=>a(h,p,d));if(G.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(G.isString(t)&&(t=t.trim())&&!iv(t))u(QS(t),n);else if(G.isObject(t)&&G.isIterable(t)){let c={},d,h;for(const p of t){if(!G.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[h=p[0]]=(d=c[h])?G.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=Hs(t),t){const r=G.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return rv(o);if(G.isFunction(n))return n.call(this,o,r);if(G.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Hs(t),t){const r=G.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Cd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=Hs(u),u){const c=G.findKey(r,u);c&&(!n||Cd(r,r[c],c,n))&&(delete r[c],o=!0)}}return G.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||Cd(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return G.forEach(this,(o,a)=>{const u=G.findKey(r,a);if(u){n[u]=Ou(o),delete n[a];return}const c=t?ov(a):String(a).trim();c!==a&&delete n[a],n[c]=Ou(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return G.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&G.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(o=>r.set(o)),r}static accessor(t){const r=(this[H0]=this[H0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=Hs(u);r[c]||(sv(o,u),r[c]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}};nn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(nn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),G.freezeMethods(nn);const av="[REDACTED ****]";function uv(e){if(G.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(G.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function lv(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||G.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof nn&&(a=a.toJSON()),r.push(a);let u;if(G.isArray(a))u=[],a.forEach((c,d)=>{const h=o(c);G.isUndefined(h)||(u[d]=h)});else{if(!G.isPlainObject(a)&&uv(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const h=n.has(c.toLowerCase())?av:o(d);G.isUndefined(h)||(u[c]=h)}}return r.pop(),u};return o(e)}let Ae=class s2 extends Error{static from(t,n,r,o,a,u){const c=new s2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,o,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),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&G.hasOwnProp(t,"redact")?t.redact:void 0,r=G.isArray(n)&&n.length>0?lv(t,n):G.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}}};Ae.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ae.ERR_BAD_OPTION="ERR_BAD_OPTION",Ae.ECONNABORTED="ECONNABORTED",Ae.ETIMEDOUT="ETIMEDOUT",Ae.ECONNREFUSED="ECONNREFUSED",Ae.ERR_NETWORK="ERR_NETWORK",Ae.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ae.ERR_DEPRECATED="ERR_DEPRECATED",Ae.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ae.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ae.ERR_CANCELED="ERR_CANCELED",Ae.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ae.ERR_INVALID_URL="ERR_INVALID_URL",Ae.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const cv=null;function Nd(e){return G.isPlainObject(e)||G.isArray(e)}function z0(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function Od(e,t,n){return e?e.concat(t).map(function(o,a){return o=z0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function dv(e){return G.isArray(e)&&!e.some(Nd)}const fv=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function Pu(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,k){return!G.isUndefined(k[A])});const r=n.metaTokens,o=n.visitor||g,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,h=c&&G.isSpecCompliantForm(t);if(!G.isFunction(o))throw new TypeError("visitor must be a function");function p(v){if(v===null)return"";if(G.isDate(v))return v.toISOString();if(G.isBoolean(v))return v.toString();if(!h&&G.isBlob(v))throw new Ae("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(v)||G.isTypedArray(v)?h&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function g(v,A,k){let C=v;if(G.isReactNative(t)&&G.isReactNativeBlob(v))return t.append(Od(k,A,a),p(v)),!1;if(v&&!k&&typeof v=="object"){if(G.endsWith(A,"{}"))A=r?A:A.slice(0,-2),v=JSON.stringify(v);else if(G.isArray(v)&&dv(v)||(G.isFileList(v)||G.endsWith(A,"[]"))&&(C=G.toArray(v)))return A=z0(A),C.forEach(function(j,W){!(G.isUndefined(j)||j===null)&&t.append(u===!0?Od([A],W,a):u===null?A:A+"[]",p(j))}),!1}return Nd(v)?!0:(t.append(Od(k,A,a),p(v)),!1)}const b=[],y=Object.assign(fv,{defaultVisitor:g,convertValue:p,isVisitable:Nd});function _(v,A,k=0){if(!G.isUndefined(v)){if(k>d)throw new Ae("Object is too deeply nested ("+k+" levels). Max depth: "+d,Ae.ERR_FORM_DATA_DEPTH_EXCEEDED);if(b.indexOf(v)!==-1)throw Error("Circular reference detected in "+A.join("."));b.push(v),G.forEach(v,function(I,j){(!(G.isUndefined(I)||I===null)&&o.call(t,I,G.isString(j)?j.trim():j,A,y))===!0&&_(I,A?A.concat(j):[j],k+1)}),b.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return _(e),t}function j0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Pd(e,t){this._pairs=[],e&&Pu(e,this,t)}const $0=Pd.prototype;$0.append=function(t,n){this._pairs.push([t,n])},$0.toString=function(t){const n=t?function(r){return t.call(this,r,j0)}:j0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function hv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function V0(e,t,n){if(!t)return e;const r=n&&n.encode||hv,o=G.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=G.isURLSearchParams(t)?t.toString():new Pd(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class q0{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){G.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Id={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},pv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Pd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Rd=typeof window!="undefined"&&typeof document!="undefined",Ld=typeof navigator=="object"&&navigator||void 0,mv=Rd&&(!Ld||["ReactNative","NativeScript","NS"].indexOf(Ld.product)<0),gv=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ev=Rd&&window.location.href||"http://localhost",Wt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rd,hasStandardBrowserEnv:mv,hasStandardBrowserWebWorkerEnv:gv,navigator:Ld,origin:Ev},Symbol.toStringTag,{value:"Module"}))),pv);function yv(e,t){return Pu(e,new Wt.classes.URLSearchParams,B({visitor:function(n,r,o,a){return Wt.isNode&&G.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Tv(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function bv(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Y0(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&G.isArray(o)?o.length:u,d?(G.hasOwnProp(o,u)?o[u]=G.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!c):((!G.hasOwnProp(o,u)||!G.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&G.isArray(o[u])&&(o[u]=bv(o[u])),!c)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(r,o)=>{t(Tv(r),o,n,0)}),n}return null}const _o=(e,t)=>e!=null&&G.hasOwnProp(e,t)?e[t]:void 0;function xv(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const zs={transitional:Id,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=G.isObject(t);if(a&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return o?JSON.stringify(Y0(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t)||G.isReadableStream(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=_o(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return yv(t,d).toString();if((c=G.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=_o(this,"env"),p=h&&h.FormData;return Pu(c?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),xv(t)):t}],transformResponse:[function(t){const n=_o(this,"transitional")||zs.transitional,r=n&&n.forcedJSONParsing,o=_o(this,"responseType"),a=o==="json";if(G.isResponse(t)||G.isReadableStream(t))return t;if(t&&G.isString(t)&&(r&&!o||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,_o(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?Ae.from(d,Ae.ERR_BAD_RESPONSE,this,null,_o(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wt.classes.FormData,Blob:Wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch","query"],e=>{zs.headers[e]={}});function Dd(e,t){const n=this||zs,r=t||n,o=nn.from(r.headers);let a=r.data;return G.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function W0(e){return!!(e&&e.__CANCEL__)}let js=class extends Ae{constructor(t,n,r){super(t==null?"canceled":t,Ae.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function G0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ae("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ae.ERR_BAD_REQUEST:Ae.ERR_BAD_RESPONSE,n.config,n.request,n))}function _v(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function wv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),p=r[a];u||(u=h),n[o]=d,r[o]=h;let g=a,b=0;for(;g!==o;)b+=n[g++],g=g%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),h-u<t)return;const y=p&&h-p;return y?Math.round(b*1e3/y):void 0}}function Sv(e,t){let n=0,r=1e3/t,o,a;const u=(h,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e(...h)};return[(...h)=>{const p=Date.now(),g=p-n;g>=r?u(h,p):(o=h,a||(a=setTimeout(()=>{a=null,u(o)},r-g)))},()=>o&&u(o)]}const Iu=(e,t,n=3)=>{let r=0;const o=wv(50,250);return Sv(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,h=Math.max(0,d-r),p=o(h);r=Math.max(r,d);const g={loaded:d,total:c,progress:c?d/c:void 0,bytes:h,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(g)},n)},X0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},K0=e=>(...t)=>G.asap(()=>e(...t)),vv=Wt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Wt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Wt.origin),Wt.navigator&&/(msie|trident)/i.test(Wt.navigator.userAgent)):()=>!0,Av=Wt.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];G.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),G.isString(r)&&c.push(`path=${r}`),G.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),G.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function kv(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Cv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Q0(e,t,n){let r=!kv(t);return e&&(r||n===!1)?Cv(e,t):t}const J0=e=>e instanceof nn?B({},e):e;function Pi(e,t){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(h,p,g,b){return G.isPlainObject(h)&&G.isPlainObject(p)?G.merge.call({caseless:b},h,p):G.isPlainObject(p)?G.merge({},p):G.isArray(p)?p.slice():p}function o(h,p,g,b){if(G.isUndefined(p)){if(!G.isUndefined(h))return r(void 0,h,g,b)}else return r(h,p,g,b)}function a(h,p){if(!G.isUndefined(p))return r(void 0,p)}function u(h,p){if(G.isUndefined(p)){if(!G.isUndefined(h))return r(void 0,h)}else return r(void 0,p)}function c(h,p,g){if(G.hasOwnProp(t,g))return r(h,p);if(G.hasOwnProp(e,g))return r(void 0,h)}const d={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:c,headers:(h,p,g)=>o(J0(h),J0(p),g,!0)};return G.forEach(Object.keys(B(B({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=G.hasOwnProp(d,p)?d[p]:o,b=G.hasOwnProp(e,p)?e[p]:void 0,y=G.hasOwnProp(t,p)?t[p]:void 0,_=g(b,y,p);G.isUndefined(_)&&g!==c||(n[p]=_)}),n}const Nv=["content-type","content-length"];function Ov(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{Nv.includes(r.toLowerCase())&&e.set(r,o)})}const Pv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Z0=e=>{const t=Pi({},e),n=b=>G.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),h=n("baseURL"),p=n("allowAbsoluteUrls"),g=n("url");if(t.headers=c=nn.from(c),t.url=V0(Q0(h,g,p),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?Pv(d.password):""))),G.isFormData(r)&&(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):G.isFunction(r.getHeaders)&&Ov(c,r.getHeaders(),n("formDataHeaderPolicy"))),Wt.hasStandardBrowserEnv&&(G.isFunction(o)&&(o=o(t)),o===!0||o==null&&vv(t.url))){const y=a&&u&&Av.read(u);y&&c.set(a,y)}return t},Iv=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=Z0(e);let a=o.data;const u=nn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:h}=o,p,g,b,y,_;function v(){y&&y(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(o.method.toUpperCase(),o.url,!0),A.timeout=o.timeout;function k(){if(!A)return;const I=nn.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),W={data:!c||c==="text"||c==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:I,config:e,request:A};G0(function(ee){n(ee),v()},function(ee){r(ee),v()},W),A=null}"onloadend"in A?A.onloadend=k:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.startsWith("file:"))||setTimeout(k)},A.onabort=function(){A&&(r(new Ae("Request aborted",Ae.ECONNABORTED,e,A)),v(),A=null)},A.onerror=function(j){const W=j&&j.message?j.message:"Network Error",F=new Ae(W,Ae.ERR_NETWORK,e,A);F.event=j||null,r(F),v(),A=null},A.ontimeout=function(){let j=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const W=o.transitional||Id;o.timeoutErrorMessage&&(j=o.timeoutErrorMessage),r(new Ae(j,W.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,e,A)),v(),A=null},a===void 0&&u.setContentType(null),"setRequestHeader"in A&&G.forEach(U0(u),function(j,W){A.setRequestHeader(W,j)}),G.isUndefined(o.withCredentials)||(A.withCredentials=!!o.withCredentials),c&&c!=="json"&&(A.responseType=o.responseType),h&&([b,_]=Iu(h,!0),A.addEventListener("progress",b)),d&&A.upload&&([g,y]=Iu(d),A.upload.addEventListener("progress",g),A.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=I=>{A&&(r(!I||I.type?new js(null,e,A):I),A.abort(),v(),A=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const C=_v(o.url);if(C&&!Wt.protocols.includes(C)){r(new Ae("Unsupported protocol "+C+":",Ae.ERR_BAD_REQUEST,e));return}A.send(a||null)})},Rv=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const h=d instanceof Error?d:this.reason;n.abort(h instanceof Ae?h:new js(h instanceof Error?h.message:h))}};let a=t&&setTimeout(()=>{a=null,o(new Ae(`timeout of ${t}ms exceeded`,Ae.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=()=>G.asap(u),c},Lv=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Dv=function(e,t){return s0(this,null,function*(){try{for(var n=o2(Mv(e)),r,o,a;r=!(o=yield new Eo(n.next())).done;r=!1){const u=o.value;yield*a0(Lv(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Eo(o.call(n)))}finally{if(a)throw a[0]}}})},Mv=function(e){return s0(this,null,function*(){if(e[Symbol.asyncIterator]){yield*a0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Eo(t.read());if(n)break;yield r}}finally{yield new Eo(t.cancel())}})},eg=(e,t,n,r)=>{const o=Dv(e,t);let a=0,u,c=h=>{u||(u=!0,r&&r(h))};return new ReadableStream({pull(h){return ze(this,null,function*(){try{const{done:p,value:g}=yield o.next();if(p){c(),h.close();return}let b=g.byteLength;if(n){let y=a+=b;n(y)}h.enqueue(new Uint8Array(g))}catch(p){throw c(p),p}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})};function Fv(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const _=r.charCodeAt(y+1),v=r.charCodeAt(y+2);(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(u-=2,y+=2)}let d=0,h=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);h>=0&&(r.charCodeAt(h)===61?(d++,h--):p(h)&&(d++,h-=3)),d===1&&h>=0&&(r.charCodeAt(h)===61||p(h))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}if(typeof Buffer!="undefined"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const h=r.charCodeAt(u+1);h>=56320&&h<=57343?(a+=4,u++):a+=3}else a+=3}return a}const Md="1.16.1",tg=64*1024,{isFunction:Ru}=G,ng=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Bv=e=>{const t=G.global!==void 0&&G.global!==null?G.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=G.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,c=o?Ru(o):typeof fetch=="function",d=Ru(a),h=Ru(u);if(!c)return!1;const p=c&&Ru(n),g=c&&(typeof r=="function"?(k=>C=>k.encode(C))(new r):k=>ze(null,null,function*(){return new Uint8Array(yield new a(k).arrayBuffer())})),b=d&&p&&ng(()=>{let k=!1;const C=new a(Wt.origin,{body:new n,method:"POST",get duplex(){return k=!0,"half"}}),I=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),k&&!I}),y=h&&p&&ng(()=>G.isReadableStream(new u("").body)),_={stream:y&&(k=>k.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(k=>{!_[k]&&(_[k]=(C,I)=>{let j=C&&C[k];if(j)return j.call(C);throw new Ae(`Response type '${k}' is not supported`,Ae.ERR_NOT_SUPPORT,I)})});const v=k=>ze(null,null,function*(){if(k==null)return 0;if(G.isBlob(k))return k.size;if(G.isSpecCompliantForm(k))return(yield new a(Wt.origin,{method:"POST",body:k}).arrayBuffer()).byteLength;if(G.isArrayBufferView(k)||G.isArrayBuffer(k))return k.byteLength;if(G.isURLSearchParams(k)&&(k=k+""),G.isString(k))return(yield g(k)).byteLength}),A=(k,C)=>ze(null,null,function*(){const I=G.toFiniteNumber(k.getContentLength());return I==null?v(C):I});return k=>ze(null,null,function*(){let{url:C,method:I,data:j,signal:W,cancelToken:F,timeout:ee,onDownloadProgress:ue,onUploadProgress:me,responseType:$,headers:ne,withCredentials:re="same-origin",fetchOptions:de,maxContentLength:se,maxBodyLength:be}=Z0(k);const ke=G.isNumber(se)&&se>-1,ae=G.isNumber(be)&&be>-1;let z=o||fetch;$=$?($+"").toLowerCase():"text";let J=Rv([W,F&&F.toAbortSignal()],ee),w=null;const N=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let Y;try{if(ke&&typeof C=="string"&&C.startsWith("data:")&&Fv(C)>se)throw new Ae("maxContentLength size of "+se+" exceeded",Ae.ERR_BAD_RESPONSE,k,w);if(ae&&I!=="get"&&I!=="head"){const Se=yield A(ne,j);if(typeof Se=="number"&&isFinite(Se)&&Se>be)throw new Ae("Request body larger than maxBodyLength limit",Ae.ERR_BAD_REQUEST,k,w)}if(me&&b&&I!=="get"&&I!=="head"&&(Y=yield A(ne,j))!==0){let Se=new a(C,{method:"POST",body:j,duplex:"half"}),Ye;if(G.isFormData(j)&&(Ye=Se.headers.get("content-type"))&&ne.setContentType(Ye),Se.body){const[dt,mn]=X0(Y,Iu(K0(me)));j=eg(Se.body,tg,dt,mn)}}G.isString(re)||(re=re?"include":"omit");const O=d&&"credentials"in a.prototype;if(G.isFormData(j)){const Se=ne.getContentType();Se&&/^multipart\/form-data/i.test(Se)&&!/boundary=/i.test(Se)&&ne.delete("content-type")}ne.set("User-Agent","axios/"+Md,!1);const ye=oe(B({},de),{signal:J,method:I.toUpperCase(),headers:U0(ne.normalize()),body:j,duplex:"half",credentials:O?re:void 0});w=d&&new a(C,ye);let Ce=yield d?z(w,de):z(C,ye);if(ke){const Se=G.toFiniteNumber(Ce.headers.get("content-length"));if(Se!=null&&Se>se)throw new Ae("maxContentLength size of "+se+" exceeded",Ae.ERR_BAD_RESPONSE,k,w)}const Ie=y&&($==="stream"||$==="response");if(y&&Ce.body&&(ue||ke||Ie&&N)){const Se={};["status","statusText","headers"].forEach(ir=>{Se[ir]=Ce[ir]});const Ye=G.toFiniteNumber(Ce.headers.get("content-length")),[dt,mn]=ue&&X0(Ye,Iu(K0(ue),!0))||[];let to=0;const si=ir=>{if(ke&&(to=ir,to>se))throw new Ae("maxContentLength size of "+se+" exceeded",Ae.ERR_BAD_RESPONSE,k,w);dt&&dt(ir)};Ce=new u(eg(Ce.body,tg,si,()=>{mn&&mn(),N&&N()}),Se)}$=$||"text";let He=yield _[G.findKey(_,$)||"text"](Ce,k);if(ke&&!y&&!Ie){let Se;if(He!=null&&(typeof He.byteLength=="number"?Se=He.byteLength:typeof He.size=="number"?Se=He.size:typeof He=="string"&&(Se=typeof r=="function"?new r().encode(He).byteLength:He.length)),typeof Se=="number"&&Se>se)throw new Ae("maxContentLength size of "+se+" exceeded",Ae.ERR_BAD_RESPONSE,k,w)}return!Ie&&N&&N(),yield new Promise((Se,Ye)=>{G0(Se,Ye,{data:He,headers:nn.from(Ce.headers),status:Ce.status,statusText:Ce.statusText,config:k,request:w})})}catch(O){if(N&&N(),J&&J.aborted&&J.reason instanceof Ae){const ye=J.reason;throw ye.config=k,w&&(ye.request=w),O!==ye&&(ye.cause=O),ye}throw O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new Ae("Network Error",Ae.ERR_NETWORK,k,w,O&&O.response),{cause:O.cause||O}):Ae.from(O,O&&O.code,k,w,O&&O.response)}})},Uv=new Map,rg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,h,p=Uv;for(;c--;)d=a[c],h=p.get(d),h===void 0&&p.set(d,h=c?new Map:Bv(t)),p=h;return h};rg();const Fd={http:cv,xhr:Iv,fetch:{get:rg}};G.forEach(Fd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const ig=e=>`- ${e}`,Hv=e=>G.isFunction(e)||e===null||e===!1;function zv(e,t){e=G.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!Hv(r)&&(o=Fd[(c=String(r)).toLowerCase()],o===void 0))throw new Ae(`Unknown adapter '${c}'`);if(o&&(G.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
|
|
11
|
+
`+u.map(ig).join(`
|
|
12
|
+
`):" "+ig(u[0]):"as no adapter specified";throw new Ae("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const og={getAdapter:zv,adapters:Fd};function Bd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new js(null,e)}function sg(e){return Bd(e),e.headers=nn.from(e.headers),e.data=Dd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),og.getAdapter(e.adapter||zs.adapter,e)(e).then(function(r){Bd(e),e.response=r;try{r.data=Dd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=nn.from(r.headers),r},function(r){if(!W0(r)&&(Bd(e),r&&r.response)){e.response=r.response;try{r.response.data=Dd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=nn.from(r.response.headers)}return Promise.reject(r)})}const Lu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Lu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ag={};Lu.transitional=function(t,n,r){function o(a,u){return"[Axios v"+Md+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Ae(o(u," has been removed"+(n?" in "+n:"")),Ae.ERR_DEPRECATED);return n&&!ag[u]&&(ag[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},Lu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function jv(e,t,n){if(typeof e!="object")throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new Ae("option "+a+" must be "+d,Ae.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ae("Unknown option "+a,Ae.ERR_BAD_OPTION)}}const Du={assertOptions:jv,validators:Lu},Dn=Du.validators;let Ii=class{constructor(t){this.defaults=t||{},this.interceptors={request:new q0,response:new q0}}request(t,n){return ze(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(`
|
|
13
13
|
`);return u===-1?"":o.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
|
|
14
14
|
`),c=u===-1?-1:a.indexOf(`
|
|
15
15
|
`,u+1),d=c===-1?"":a.slice(c+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=Pi(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Du.assertOptions(r,{silentJSONParsing:Dn.transitional(Dn.boolean),forcedJSONParsing:Dn.transitional(Dn.boolean),clarifyTimeoutError:Dn.transitional(Dn.boolean),legacyInterceptorReqResOrdering:Dn.transitional(Dn.boolean)},!1),o!=null&&(G.isFunction(o)?n.paramsSerializer={serialize:o}:Du.assertOptions(o,{encode:Dn.function,serialize:Dn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Du.assertOptions(n,{baseUrl:Dn.spelling("baseURL"),withXsrfToken:Dn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&G.merge(a.common,a[n.method]);a&&G.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete a[x]}),n.headers=nn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;d=d&&v.synchronous;const A=n.transitional||Id;A&&A.legacyInterceptorReqResOrdering?c.unshift(v.fulfilled,v.rejected):c.push(v.fulfilled,v.rejected)});const h=[];this.interceptors.response.forEach(function(v){h.push(v.fulfilled,v.rejected)});let p,g=0,b;if(!d){const x=[og.bind(this),void 0];for(x.unshift(...c),x.push(...h),b=x.length,p=Promise.resolve(n);g<b;)p=p.then(x[g++],x[g++]);return p}b=c.length;let y=n;for(;g<b;){const x=c[g++],v=c[g++];try{y=x(y)}catch(A){v.call(this,A);break}}try{p=og.call(this,y)}catch(x){return Promise.reject(x)}for(g=0,b=h.length;g<b;)p=p.then(h[g++],h[g++]);return p}getUri(t){t=Pi(this.defaults,t);const n=K0(t.baseURL,t.url,t.allowAbsoluteUrls);return $0(n,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){Ii.prototype[t]=function(n,r){return this.request(Pi(r||{},{method:t,url:n,data:(r||{}).data}))}}),G.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(Pi(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Ii.prototype[t]=n(),t!=="query"&&(Ii.prototype[t+"Form"]=n(!0))});let jv=class s2{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(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new js(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new s2(function(o){t=o}),cancel:t}}};function $v(e){return function(n){return e.apply(null,n)}}function Vv(e){return G.isObject(e)&&e.isAxiosError===!0}const Ud={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(Ud).forEach(([e,t])=>{Ud[t]=e});function ag(e){const t=new Ii(e),n=k0(Ii.prototype.request,t);return G.extend(n,Ii.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return ag(Pi(e,o))},n}const wt=ag(zs);wt.Axios=Ii,wt.CanceledError=js,wt.CancelToken=jv,wt.isCancel=Y0,wt.VERSION=Md,wt.toFormData=Pu,wt.AxiosError=Ae,wt.Cancel=wt.CanceledError,wt.all=function(t){return Promise.all(t)},wt.spread=$v,wt.isAxiosError=Vv,wt.mergeConfig=Pi,wt.AxiosHeaders=nn,wt.formToJSON=e=>q0(G.isHTMLForm(e)?new FormData(e):e),wt.getAdapter=ig.getAdapter,wt.HttpStatusCode=Ud,wt.default=wt;const{Axios:VB,AxiosError:qB,CanceledError:YB,isCancel:WB,CancelToken:GB,VERSION:XB,all:KB,Cancel:QB,isAxiosError:JB,spread:ZB,toFormData:e7,AxiosHeaders:t7,HttpStatusCode:n7,formToJSON:r7,getAdapter:i7,mergeConfig:o7,create:s7}=wt;class qv{constructor(t,n,r,o=!1,a,u){Ve(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ve(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ve(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ve(this,"baseApiUrl");Ve(this,"headers",{});Ve(this,"fetchConfig",()=>ze(this,null,function*(){try{const t=yield wt.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}}));Ve(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.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,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class Yv{constructor(t,n,r,o=!1,a,u){Ve(this,"apiService");Ve(this,"config",null);Ve(this,"getConfig",()=>ze(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Ve(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ve(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ve(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ve(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ve(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ve(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ve(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ve(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ve(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ve(this,"getProductField",t=>this.config?this.config[t]:"");Ve(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new qv(t,n,r,o,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 Ri=(e,t,n,...r)=>{if(!e)return;const o=["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]",o,n,...r)};class Wv{constructor(t=!1){Ve(this,"isDevelopment");Ve(this,"_log",(t,n,...r)=>{Ri(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 Gv={copilot:"Your Search Assistant",messaging:"Commerce Client"},ug=Y.createContext(null),Xv=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,searchPlaceholder:g,searchButtonLabel:b,searchConfig:y,suggestionButtonConfig:x,messageAlignment:v="start",autoScroll:A=!0,componentConfig:C,conversationHistory:k,resetConversationMessage:I="",apiKey:$,apiToken:W,baseUrl:F,customerId:ee,tenantId:ce,theme:pe,isDevelopment:U,__features:ne,routingAttributes:ae,enableDownloadTranscript:de=!0,children:oe})=>{const be=e==="messaging",Ce=Y.useMemo(()=>{const O=ae==null?void 0:ae.isCartMgmtSupported;return O===!0||O==="true"},[ae]),se=Y.useMemo(()=>be?{config:null}:new Yv(F,$,W,U,ee,ce),[be,F,$,W,U,ee,ce]),j=Y.useMemo(()=>new Wv(U),[U]);Y.useEffect(()=>{be||!se||se.config||se.getConfig()},[se,be]);const J=Y.useMemo(()=>aS(pe),[pe]),w=Y.useMemo(()=>{const O=(y==null?void 0:y.placeholder)||g,ye=(y==null?void 0:y.buttonLabel)||b;let ke="icon";return y!=null&&y.buttonType?ke=y.buttonType:b&&(ke="text"),ie(B({},y||{}),{placeholder:O,buttonLabel:ye,buttonType:ke})},[y,g,b]),N=Y.useMemo(()=>ie(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||Gv[e!=null?e:"copilot"]}),[r,t,n,e]),q=Y.useMemo(()=>({configModule:se,mode:e!=null?e:"copilot",headerConfig:N,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,themeVariables:J,logger:j,searchConfig:w,suggestionButtonConfig:x,messageAlignment:v,autoScroll:A,enableMinimize:!!(C!=null&&C.enableMinimize),enableDownloadTranscript:de,resetConversationMessage:I,conversationHistory:{sinceHours:typeof(k==null?void 0:k.sinceHours)=="number"?k.sinceHours:1,limit:k==null?void 0:k.limit},features:ne,isCartMgmtSupported:Ce}),[se,e,N,a,o,h,p,c,d,u,w,x,v,A,C,de,I,j,J,k,ne,Ce]);return _.jsx(ug.Provider,{value:q,children:oe})},ot=()=>{const e=Y.useContext(ug);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},Kv=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart"],Mu=-1;function Qv(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.type=="string"&&typeof t.index=="number")return Kv.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:Mu,data:{content:e}}}function Jv(e,t){if(t.index===Mu){const o=e[e.length-1];if(o&&o.type==="markdown"&&o.index===Mu&&t.type==="markdown"){const a={type:"markdown",index:Mu,data:{content:o.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(o=>o.index===t.index);return[...n>=0?e.map((o,a)=>a===n?t:o):[...e,t]].sort((o,a)=>o.index-a.index)}const lg={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function Zv(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return B(ie(B({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ie(B({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return ie(B({},e),{conversationId:t.id});case"ADD_MESSAGE":return ie(B({},e),{messages:[...e.messages,ie(B({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=Qv(t.token);return n?ie(B({},e),{streamingBlocks:Jv(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":return ie(B({},e),{messages:[...e.messages,ie(B({},t.message),{type:"FLUSH_STREAMING"})],streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null});case"SET_AGENT_TYPING":return ie(B({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return B(ie(B({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:ie(B({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return ie(B({},e),{routingResult:t.result});case"SET_ERROR":return ie(B({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return ie(B({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return ie(B({},e),{sendError:null});case"LOAD_HISTORY":return ie(B({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return ie(B({},e),{sessionExpired:t.expired});case"RESET":return ie(B({},lg),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const cg=Y.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,sendMessage:()=>{},addToCart:()=>{},resetConversation:()=>{},retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>ze(null,null,function*(){})});function Hd(e,t){return`cim_af_conv_${e}_${t}`}function zd(e,t){return Date.now()-e>t}function eA(e,t,n){try{const r=Hd(e,t),o=sessionStorage.getItem(r);if(!o)return null;const a=JSON.parse(o);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"||zd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function $s(e,t,n){try{const r=Hd(e,t),o={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(o))}catch(r){}}function Fu(e,t){try{const n=Hd(e,t);sessionStorage.removeItem(n)}catch(n){}}function jd(e,t){return`cim_af_ct_${e}_${t}`}function dg(e,t,n){try{const r=jd(e,t),o=sessionStorage.getItem(r);if(!o)return null;const a=JSON.parse(o);if(!a||typeof a!="object"||!("accessToken"in a)||!("lastEventId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.accessToken!="string"||!u.accessToken||typeof u.lastEventId!="string"||!u.lastEventId?null:typeof u.storedAt!="number"||Date.now()-u.storedAt>n?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function tA(e,t,n,r){try{const o=jd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(o,JSON.stringify(a))}catch(o){}}function nA(e,t){try{const n=jd(e,t);sessionStorage.removeItem(n)}catch(n){}}function rA(e,t){return`cim_af_conv_${e}_${t}`}function iA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=rA(e,t);return new BroadcastChannel(n)}catch(n){return null}}function oA(e,t=500){return e?new Promise(n=>{let r=!1;const o=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var c;r||((c=u.data)==null?void 0:c.type)==="conversation_response"&&(r=!0,clearTimeout(o),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(o),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function sA(e,t,n){if(!e)return()=>{};function r(o){var a;if((a=o.data)!=null&&a.type)switch(o.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(c){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function aA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function uA(e){if(e)try{e.close()}catch(t){}}function lA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function cA(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function fg(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 dA(e){if(e.entryType!=="Message")return null;const n=cA(e.entryPayload).abstractMessage;if(!n)return null;const r=fg(n,"staticContent","text")||fg(n,"content","text")||"";if(!r)return null;const o=lA(e.sender.role);return{id:e.identifier,role:o,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function fA(e){const t=[];for(const n of e){const r=dA(n);r&&t.push(r)}return t}const hg="onCimulateWidgetReady",hA=5e3;function Vs(e={}){const{routingAttributes:t,timeoutMs:n=hA}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=B({},t!=null?t:{});return new Promise(o=>{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;o(p?r:t)},c={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(hg,{detail:c,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function pA(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:o}=e,a=Y.useRef(null),u=Y.useRef(null),c=Y.useRef(null),d=o.sinceHours*60*60*1e3,h=Y.useCallback(()=>(c.current||(c.current=oA(a.current)),c.current),[]);Y.useEffect(()=>{const A=iA(t,n);a.current=A,c.current=null;const C=sA(A,()=>{const k=u.current;if(!k)return null;const I=dg(t,n,d);return{conversationId:k,continuationToken:I==null?void 0:I.accessToken,lastEventId:I==null?void 0:I.lastEventId}},()=>{Fu(t,n),u.current=null});return()=>{C(),uA(A),a.current=null}},[t,n,d]);const p=Y.useCallback(A=>ze(null,null,function*(){let C=eA(t,n,d);if(!C){const k=yield h();k&&!zd(k.storedAt,d)&&(C=k)}if(!C){const k=yield A.createConversation(yield Vs({routingAttributes:r}));return $s(t,n,k),u.current=k,{conversationId:k,restoredMessages:[],resumed:!1}}try{const k=Date.now()-d,$=(yield A.listConversations({conversationId:C.conversationId,startTimestamp:k})).conversations.find(F=>F.conversationId===C.conversationId&&!F.isConversationClosed);if(!$){Fu(t,n);const F=yield A.createConversation(yield Vs({routingAttributes:r}));return $s(t,n,F),u.current=F,{conversationId:F,restoredMessages:[],resumed:!1}}A.resumeConversation($.conversationId),u.current=$.conversationId,$s(t,n,$.conversationId);let W=[];try{const F=yield A.listConversationEntries($.conversationId,{limit:o.limit,startTimestamp:k,direction:"FromStart"});W=fA(F.conversationEntries)}catch(F){}return{conversationId:$.conversationId,restoredMessages:W,resumed:!0}}catch(k){Fu(t,n);const I=yield A.createConversation(yield Vs({routingAttributes:r}));return $s(t,n,I),u.current=I,{conversationId:I,restoredMessages:[],resumed:!1}}}),[t,n,r,o,d,h]),g=Y.useCallback(A=>{$s(t,n,A),u.current=A},[t,n]),b=Y.useCallback(()=>{Fu(t,n),nA(t,n),aA(a.current),u.current=null},[t,n]),y=Y.useCallback(()=>{const A=dg(t,n,d);return A?{continuationToken:A.accessToken,lastEventId:A.lastEventId}:null},[t,n,d]),x=Y.useCallback(()=>ze(null,null,function*(){const A=yield h();return!(A!=null&&A.continuationToken)||zd(A.storedAt,d)?null:{continuationToken:A.continuationToken,lastEventId:A.lastEventId}}),[d,h]),v=Y.useCallback(A=>ze(null,null,function*(){try{const{accessToken:C,lastEventId:k}=yield A.generateContinuationToken();tA(t,n,C,k)}catch(C){}}),[t,n]);return{initializeConversation:p,persistConversationId:g,clearPersistedConversation:b,getStoredConnectOptions:y,getPeerConnectOptions:x,persistContinuationToken:v}}const pr={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 mA(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 wo(e){const{type:t,statusCode:n}=mA(e);if(t==="api"&&typeof n=="number")return n===429?pr.rateLimit:n>=500?pr.server:pr.default;switch(t){case"network":return pr.network;case"sse":return pr.interrupted;case"auth":return pr.connect;default:return pr.default}}function pg(e){switch(e.code){case"MAX_RECONNECT":return pr.lost;case"ROUTING_FAILED":return pr.routing;default:return pr.connect}}const gA="Your session ended due to inactivity. Starting a new session…";function mg(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="auth"?!0:t.type==="api"&&(t.statusCode===401||t.statusCode===403)}function EA(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),o=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=o?` (${o})`:"",c=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",h=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${h}`,g=`Add ${n?`${n} × `:""}${t} to cart${c}`;return{prompt:p,display:g}}const gg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:o,enableLogging:a=!1,onConnect:u,onMessage:c,onError:d,children:h})=>{const{logger:p,conversationHistory:g}=ot(),[b,y]=Y.useReducer(Zv,lg),x=Y.useRef(b);x.current=b;const v=pA({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:g}),A=Y.useRef(null),C=Y.useRef(c),k=Y.useRef(d),I=Y.useRef(u),$=Y.useRef(!1),W=Y.useRef(!1),F=Y.useRef(0),ee=Y.useRef(null);C.current=c,k.current=d,I.current=u,Y.useEffect(()=>{const j=new sS({baseURL:e,orgId:t,esDeveloperName:n,options:B({enableLogging:a},o?{capabilitiesVersion:o}:{})});A.current=j,j.on("connected",()=>{var w;y({type:"SET_CONNECTION_STATUS",status:"connected"}),(w=I.current)==null||w.call(I)}),j.on("disconnected",()=>{y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),j.on("reconnecting",()=>{y({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),j.on("message",w=>{var q;const N={id:w.messageId||crypto.randomUUID(),role:"agent",content:w.content,timestamp:w.timestamp,sender:w.sender,raw:w};p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:N.id,tokensBeforeFlush:F.current,streamedFinalOnly:F.current===0}),F.current=0,y({type:"FLUSH_STREAMING",message:N}),(q=C.current)==null||q.call(C,N)}),j.on("streaming_token",w=>{F.current+=1,y({type:"APPEND_STREAMING_TOKEN",token:w.token})}),j.on("typing_started",()=>{y({type:"SET_AGENT_TYPING",isTyping:!0})}),j.on("typing_stopped",()=>{y({type:"SET_AGENT_TYPING",isTyping:!1})}),j.on("progress_indicator",w=>{y({type:"ADD_PROGRESS_STEP",message:w.message})}),j.on("routing_result",w=>{var N;if(y({type:"SET_ROUTING_RESULT",result:w}),!w.isSuccessful){const q=`Routing failed: ${w.failureType||"unknown"}`;y({type:"SET_ERROR",error:pg({code:"ROUTING_FAILED"})}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(N=k.current)==null||N.call(k,q)}}),j.on("participant_changed",w=>{if(w.participant.name==="Automated Process")return;const N={id:crypto.randomUUID(),role:"system",content:w.action==="add"?`${w.participant.name||"Agent"} joined the conversation`:`${w.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()};p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:w}),y({type:"ADD_MESSAGE",message:N})}),j.on("conversation_closed",()=>{const w={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};y({type:"ADD_MESSAGE",message:w}),y({type:"SET_CONVERSATION_ID",id:null}),v.clearPersistedConversation()}),j.on("error",w=>{var N;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:w}),w.code==="SESSION_EXPIRED"){W.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}),y({type:"SET_LOADING",isLoading:!1});return}y({type:"SET_ERROR",error:pg(w)}),w.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(N=k.current)==null||N.call(k,w.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"});const J=()=>ze(null,null,function*(){let w=v.getStoredConnectOptions(),N=!1;w||(w=yield v.getPeerConnectOptions(),N=!!w);try{yield j.connect(w!=null?w:void 0)}catch(O){if(w)p==null||p.log("Continuation token failed, falling back to fresh connect"),N||v.clearPersistedConversation(),yield j.connect();else throw O}yield v.persistContinuationToken(j);const q=yield v.initializeConversation(j);y({type:"SET_CONVERSATION_ID",id:q.conversationId}),q.resumed&&q.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:q.restoredMessages})});return ee.current=J,J().catch(w=>{var N;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:wo(w)}),(N=k.current)==null||N.call(k,w.message)}),()=>{j.disconnect(),j.off(),A.current=null,ee.current=null}},[e,t,n,o]),Y.useEffect(()=>{const j=()=>{document.visibilityState==="visible"&&A.current&&!W.current&&A.current.reconnect()};return document.addEventListener("visibilitychange",j),()=>{document.removeEventListener("visibilitychange",j)}},[]);const ce=Y.useCallback(j=>ze(null,null,function*(){var w;const J=A.current;if(!(!J||$.current)){$.current=!0,W.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:gA,timestamp:new Date().toISOString()}}),v.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"});try{J.disconnect(),yield J.connect(),yield v.persistContinuationToken(J);const N=yield J.createConversation(yield Vs({routingAttributes:r}));y({type:"SET_CONVERSATION_ID",id:N}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(N),j&&(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),yield J.sendMessage(j))}catch(N){const q=N instanceof Error?N.message:String(N);y({type:"SET_ERROR",error:wo(N)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(w=k.current)==null||w.call(k,q)}finally{$.current=!1}}}),[r,v]),pe=Y.useRef(ce);pe.current=ce;const U=Y.useCallback((j,J)=>{const w=A.current;if(!w)return;const N={id:crypto.randomUUID(),role:"user",content:J!=null?J:j,timestamp:new Date().toISOString()};if(y({type:"CLEAR_SEND_ERROR"}),y({type:"ADD_MESSAGE",message:N}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),W.current){pe.current(j);return}w.sendMessage(j).catch(q=>{var O;if(mg(q)){pe.current(j);return}y({type:"SET_SEND_ERROR",error:{text:j,displayContent:J,message:wo(q)}}),(O=k.current)==null||O.call(k,q.message)})},[]),ne=Y.useCallback(j=>{j.trim()&&U(j)},[U]),ae=Y.useCallback(j=>{if(!A.current)return;const{prompt:J,display:w}=EA(j);U(J,w)},[U]),de=Y.useCallback(()=>{const j=A.current,J=x.current.sendError;if(!(!j||!J)){if(y({type:"CLEAR_SEND_ERROR"}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),W.current){pe.current(J.text);return}j.sendMessage(J.text).catch(w=>{var N;if(mg(w)){pe.current(J.text);return}y({type:"SET_SEND_ERROR",error:ie(B({},J),{message:wo(w)})}),(N=k.current)==null||N.call(k,w.message)})}},[]),oe=Y.useCallback(()=>{const j=A.current,J=ee.current;!j||!J||(W.current=!1,j.disconnect(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),J().catch(w=>{var N;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:wo(w)}),(N=k.current)==null||N.call(k,w.message)}))},[]),be=Y.useCallback(()=>{const j=A.current;j&&(W.current=!1,v.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),j.endConversation().then(()=>(j.disconnect(),j.connect())).then(()=>ze(null,null,function*(){return yield v.persistContinuationToken(j),j.createConversation(yield Vs({routingAttributes:r}))})).then(J=>{y({type:"SET_CONVERSATION_ID",id:J}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(J)}).catch(J=>{var w;y({type:"SET_ERROR",error:wo(J)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(w=k.current)==null||w.call(k,J.message)}))},[r,v]),Ce=Y.useCallback(()=>ze(null,null,function*(){var N;const j=A.current;if(!j)return;const J=yield j.retrieveConversationTranscript(),w=URL.createObjectURL(J);try{const q=document.createElement("a");q.href=w,q.download=`transcript-${(N=j.conversationId)!=null?N:"conversation"}.pdf`,document.body.appendChild(q),q.click(),q.remove()}finally{URL.revokeObjectURL(w)}}),[]),se=Y.useMemo(()=>({connectionStatus:b.connectionStatus,isConnected:b.connectionStatus==="connected"&&b.conversationId!==null,isAgentTyping:b.isAgentTyping,conversationId:b.conversationId,messages:b.messages,streamingBlocks:b.streamingBlocks,progressMessage:b.progressMessage,progressSteps:b.progressSteps,error:b.error,sendError:b.sendError,loading:b.loading,sessionExpired:b.sessionExpired,sendMessage:ne,addToCart:ae,resetConversation:be,retryLastMessage:de,retryConnection:oe,downloadTranscript:Ce}),[b,ne,ae,be,de,oe,Ce]);return _.jsx(cg.Provider,{value:se,children:h})};var Eg=Symbol.for("immer-nothing"),yg=Symbol.for("immer-draftable"),xn=Symbol.for("immer-state");function Qn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var So=Object.getPrototypeOf;function vo(e){return!!e&&!!e[xn]}function Li(e){var t;return e?Tg(e)||Array.isArray(e)||!!e[yg]||!!((t=e.constructor)!=null&&t[yg])||Hu(e)||zu(e):!1}var yA=Object.prototype.constructor.toString();function Tg(e){if(!e||typeof e!="object")return!1;const t=So(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)===yA}function Bu(e,t){Uu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Uu(e){const t=e[xn];return t?t.type_:Array.isArray(e)?1:Hu(e)?2:zu(e)?3:0}function $d(e,t){return Uu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function bg(e,t,n){const r=Uu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function TA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Hu(e){return e instanceof Map}function zu(e){return e instanceof Set}function Di(e){return e.copy_||e.base_}function Vd(e,t){if(Hu(e))return new Map(e);if(zu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Tg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[xn];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(So(e),r)}else{const r=So(e);if(r!==null&&n)return B({},e);const o=Object.create(r);return Object.assign(o,e)}}function qd(e,t=!1){return ju(e)||vo(e)||!Li(e)||(Uu(e)>1&&(e.set=e.add=e.clear=e.delete=bA),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>qd(r,!0))),e}function bA(){Qn(2)}function ju(e){return Object.isFrozen(e)}var _A={};function Mi(e){const t=_A[e];return t||Qn(0,e),t}var qs;function _g(){return qs}function xA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function xg(e,t){t&&(Mi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yd(e){Wd(e),e.drafts_.forEach(wA),e.drafts_=null}function Wd(e){e===qs&&(qs=e.parent_)}function wg(e){return qs=xA(qs,e)}function wA(e){const t=e[xn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Sg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[xn].modified_&&(Yd(t),Qn(4)),Li(e)&&(e=$u(t,e),t.parent_||Vu(t,e)),t.patches_&&Mi("Patches").generateReplacementPatches_(n[xn].base_,e,t.patches_,t.inversePatches_)):e=$u(t,n,[]),Yd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Eg?e:void 0}function $u(e,t,n){if(ju(t))return t;const r=t[xn];if(!r)return Bu(t,(o,a)=>vg(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Vu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),Bu(a,(c,d)=>vg(e,r,o,c,d,n,u)),Vu(e,o,!1),n&&e.patches_&&Mi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function vg(e,t,n,r,o,a,u){if(vo(o)){const c=a&&t&&t.type_!==3&&!$d(t.assigned_,r)?a.concat(r):void 0,d=$u(e,o,c);if(bg(n,r,d),vo(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Li(o)&&!ju(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;$u(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Vu(e,o)}}function Vu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qd(t,n)}function SA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:_g(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Gd;n&&(o=[r],a=Ys);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Gd={get(e,t){if(t===xn)return e;const n=Di(e);if(!$d(n,t))return vA(e,n,t);const r=n[t];return e.finalized_||!Li(r)?r:r===Xd(e.base_,t)?(Qd(e),e.copy_[t]=Jd(r,e)):r},has(e,t){return t in Di(e)},ownKeys(e){return Reflect.ownKeys(Di(e))},set(e,t,n){const r=Ag(Di(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Xd(Di(e),t),a=o==null?void 0:o[xn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(TA(n,o)&&(n!==void 0||$d(e.base_,t)))return!0;Qd(e),Kd(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Xd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Qd(e),Kd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Di(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Qn(11)},getPrototypeOf(e){return So(e.base_)},setPrototypeOf(){Qn(12)}},Ys={};Bu(Gd,(e,t)=>{Ys[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ys.deleteProperty=function(e,t){return Ys.set.call(this,e,t,void 0)},Ys.set=function(e,t,n){return Gd.set.call(this,e[0],t,n,e[0])};function Xd(e,t){const n=e[xn];return(n?Di(n):e)[t]}function vA(e,t,n){var o;const r=Ag(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Ag(e,t){if(!(t in e))return;let n=So(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=So(n)}}function Kd(e){e.modified_||(e.modified_=!0,e.parent_&&Kd(e.parent_))}function Qd(e){e.copy_||(e.copy_=Vd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var AA=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,...h){return u.produce(d,p=>n.call(this,p,...h))}}typeof n!="function"&&Qn(6),r!==void 0&&typeof r!="function"&&Qn(7);let o;if(Li(t)){const a=wg(this),u=Jd(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Yd(a):Wd(a)}return xg(a,r),Sg(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Eg&&(o=void 0),this.autoFreeze_&&qd(o,!0),r){const a=[],u=[];Mi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Qn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),r,o]},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){Li(e)||Qn(8),vo(e)&&(e=CA(e));const t=wg(this),n=Jd(e,void 0);return n[xn].isManual_=!0,Wd(t),n}finishDraft(e,t){const n=e&&e[xn];(!n||!n.isManual_)&&Qn(9);const{scope_:r}=n;return xg(r,t),Sg(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 o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Mi("Patches").applyPatches_;return vo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Jd(e,t){const n=Hu(e)?Mi("MapSet").proxyMap_(e,t):zu(e)?Mi("MapSet").proxySet_(e,t):SA(e,t);return(t?t.scope_:_g()).drafts_.push(n),n}function CA(e){return vo(e)||Qn(10,e),Cg(e)}function Cg(e){if(!Li(e)||ju(e))return e;const t=e[xn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Vd(e,!0);return Bu(n,(r,o)=>{bg(n,r,Cg(o))}),t&&(t.finalized_=!1),n}var wn=new AA,kA=wn.produce;wn.produceWithPatches.bind(wn),wn.setAutoFreeze.bind(wn),wn.setUseStrictShallowCopy.bind(wn),wn.applyPatches.bind(wn),wn.createDraft.bind(wn),wn.finishDraft.bind(wn);function NA(e,t,n){var r=Y.useMemo(function(){return kA(e)},[e]);return Y.useReducer(r,t,n)}const at={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"},kg={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},Ng=Y.createContext(null),Og=Y.createContext(null),OA=({children:e,dispatch:t})=>{const n=Y.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_INITIALIZED,payload:x})},[t]),r=Y.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_OPEN,payload:x})},[t]),o=Y.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_INLINE,payload:x})},[t]),a=Y.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:x})},[t]),u=Y.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:x})},[t]),c=Y.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:x})},[t]),d=Y.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:x})},[t]),h=Y.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_PARAMS,payload:x})},[t]),p=Y.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:x})},[t]),g=Y.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:x})},[t]),b=Y.useCallback(x=>{t({type:at.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:x})},[t]),y=Y.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:h,setPromptsMessage:p,setResponseMessage:g,setIsResponseLoading:b}),[n,r,o,a,u,c,d,h,p,g,b]);return _.jsx(Og.Provider,{value:y,children:e})},PA=(e,t)=>{const{type:n,payload:r}=t;switch(n){case at.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case at.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case at.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case at.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case at.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case at.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case at.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case at.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case at.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case at.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case at.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case at.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case at.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case at.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case at.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},IA=({promptsConfig:e,children:t})=>{const[n,r]=NA(PA,B(B({},kg),e||{}));return _.jsx(Ng.Provider,{value:n,children:_.jsx(OA,{dispatch:r,children:t})})};function RA(){var e=Y.useRef(!0);return e.current?(e.current=!1,!0):e.current}function LA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function DA(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",qu=function(e){Y.useEffect(e,[])},MA=function(e){var t=Y.useRef(e);t.current=e,qu(function(){return function(){return t.current()}})},FA=function(e){var t=Y.useRef(0),n=Y.useState(e),r=n[0],o=n[1],a=Y.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return MA(function(){cancelAnimationFrame(t.current)}),[r,a]},BA=function(e,t){return e===t};function UA(e,t){t===void 0&&(t=BA);var n=Y.useRef(),r=Y.useRef(e),o=RA();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var HA=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,c=FA({width:Zd?window.innerWidth:r,height:Zd?window.innerHeight:a}),d=c[0],h=c[1];return Y.useEffect(function(){if(Zd){var p=function(){var g=window.innerWidth,b=window.innerHeight;h({width:g,height:b}),u&&u(g,b)};return LA(window,"resize",p),function(){DA(window,"resize",p)}}},[]),d};const Pg="cimulate",ef=`${Pg}:ui-state-update`,tf=`${Pg}:prompts-state-update`,zA=e=>{window.addEventListener(ef,e)},jA=e=>{window.removeEventListener(ef,e)},$A=(e,t)=>{const n=new CustomEvent(ef,{detail:{property:e,value:t}});window.dispatchEvent(n)},Ig=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);tt.entryTypeProxy.entryType=e},Rr=e=>{const t=tt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;tt.statusProxy.isOpen=n,n&&(tt.statusProxy.isMinimized=!1)},Yu=e=>{const t=tt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;tt.statusProxy.isMinimized=n,n&&(tt.statusProxy.isOpen=!1)},nf=e=>{tt.modalProxy.isFullscreen=e},Wu=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);tt.statusProxy.type=e,e==="dialog"||e==="chat"?tt.modeProxy.mode="embedded":tt.modeProxy.mode="standalone"},rf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);tt.dialogProxy.position=e},VA=e=>{const t=tt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;tt.dialogProxy.isFullHeight=n};class qA{constructor(){Ve(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}});Ve(this,"connectedProxy");Ve(this,"modeProxy");Ve(this,"entryTypeProxy");Ve(this,"statusProxy");Ve(this,"dialogProxy");Ve(this,"modalProxy",{isFullscreen:!1});Ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return $A(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 tt=new qA,Rg=Y.createContext({mode:tt.modeProxy.mode,entryType:tt.entryType,status:tt.statusProxy,dialogPosition:tt.dialogProxy.position,isDialogFullHeight:tt.dialogProxy.isFullHeight,dialogWidth:tt.dialogProxy.width,isModalFullscreen:tt.modalProxy.isFullscreen,previousComponentType:tt.statusProxy.type}),YA=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=Y.useState(e!=null?e:tt.entryTypeProxy.entryType),[u,c]=Y.useState(tt.modeProxy.mode),[d,h]=Y.useState({type:n||tt.statusProxy.type,isOpen:tt.statusProxy.isOpen,isMinimized:tt.statusProxy.isMinimized}),[p,g]=Y.useState(tt.dialogProxy.position),[b,y]=Y.useState(tt.dialogProxy.isFullHeight),[x,v]=Y.useState(tt.dialogProxy.width),[A,C]=Y.useState(tt.modalProxy.isFullscreen),k=UA(d.type);Y.useEffect(()=>{const $=W=>{const{property:F,value:ee}=W.detail||{};if(!(!F||ee===void 0)){if(F==="mode"){c(ee);return}if(F==="entryType"){a(ee);return}if(F==="isMinimized"){h(ce=>ie(B({},ce),{isMinimized:ee}));return}if(F==="isOpen"){h(ce=>ie(B({},ce),{isOpen:ee}));return}if(F==="type"){h(ce=>ie(B({},ce),{type:ee}));return}if(F==="position"){g(ee);return}if(F==="isFullHeight"){y(ee);return}if(F==="width"){v(ee);return}if(F==="isFullscreen"){C(ee);return}}};return zA($),()=>{jA($)}},[]),qu(()=>{e&&Ig(e)}),qu(()=>{const $=n||(t==null?void 0:t.type);$&&Wu($),t&&"isOpen"in t&&Rr(!!t.isOpen),t&&"isMinimized"in t&&Yu(!!t.isMinimized)}),qu(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:$}=t.options;$&&rf($),"dialogFullHeight"in t.options&&VA(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&nf(!!t.options.isModalFullscreen)});const I=Y.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:k||"dialog",dialogPosition:p,isDialogFullHeight:b,dialogWidth:x,isModalFullscreen:A}),[u,o,d,k,p,b,x,A]);return _.jsx(Rg.Provider,{value:I,children:r})},Lg=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:o,headerText:a,headerConfig:u,theme:c,openLinksInNewTab:d,globalClassName:h,isDevelopment:p=!1,componentType:g,componentConfig:b,entryType:y,entryMessage:x,disclaimerText:v,disclaimerMarkdown:A,clientContext:C,searchPlaceholder:k,searchButtonLabel:I,searchConfig:$,suggestionButtonConfig:W,messageAlignment:F,autoScroll:ee,promptsConfig:ce,resetConversationMessage:pe,conversationHistory:U,messagingConfig:ne,__features:ae,children:de})=>_.jsx(Xv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:o,headerText:a,headerConfig:u,entryMessage:x,theme:c,globalClassName:h,openLinksInNewTab:d,searchPlaceholder:k,searchButtonLabel:I,searchConfig:$,suggestionButtonConfig:W,messageAlignment:F,autoScroll:ee,componentConfig:b,clientContext:C,disclaimerMarkdown:A,disclaimerText:v,resetConversationMessage:pe,conversationHistory:U,isDevelopment:p,__features:ae,routingAttributes:ne==null?void 0:ne.routingAttributes,enableDownloadTranscript:ne==null?void 0:ne.enableDownloadTranscript,children:_.jsx(YA,{entryType:y,componentConfig:b,componentType:g,children:_.jsx(IA,{promptsConfig:ce,children:_.jsx(gg,{scrt2Url:(ne==null?void 0:ne.scrt2Url)||"",orgId:(ne==null?void 0:ne.orgId)||"",esDeveloperName:(ne==null?void 0:ne.esDeveloperName)||"",routingAttributes:(ne==null?void 0:ne.routingAttributes)||{},capabilitiesVersion:ne==null?void 0:ne.capabilitiesVersion,enableLogging:p,children:de})})})}),Fi=()=>{const e=Y.useContext(Rg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var of={exports:{}},cn={},sf={exports:{}},af={};var Dg;function WA(){return Dg||(Dg=1,(function(e){function t(j,J){var w=j.length;j.push(J);e:for(;0<w;){var N=w-1>>>1,q=j[N];if(0<o(q,J))j[N]=J,j[w]=q,w=N;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var J=j[0],w=j.pop();if(w!==J){j[0]=w;e:for(var N=0,q=j.length,O=q>>>1;N<O;){var ye=2*(N+1)-1,ke=j[ye],Ie=ye+1,He=j[Ie];if(0>o(ke,w))Ie<q&&0>o(He,ke)?(j[N]=He,j[Ie]=w,N=Ie):(j[N]=ke,j[ye]=w,N=ye);else if(Ie<q&&0>o(He,w))j[N]=He,j[Ie]=w,N=Ie;else break e}}return J}function o(j,J){var w=j.sortIndex-J.sortIndex;return w!==0?w:j.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],h=[],p=1,g=null,b=3,y=!1,x=!1,v=!1,A=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(j){for(var J=n(h);J!==null;){if(J.callback===null)r(h);else if(J.startTime<=j)r(h),J.sortIndex=J.expirationTime,t(d,J);else break;J=n(h)}}function $(j){if(v=!1,I(j),!x)if(n(d)!==null)x=!0,Ce(W);else{var J=n(h);J!==null&&se($,J.startTime-j)}}function W(j,J){x=!1,v&&(v=!1,C(ce),ce=-1),y=!0;var w=b;try{for(I(J),g=n(d);g!==null&&(!(g.expirationTime>J)||j&&!ne());){var N=g.callback;if(typeof N=="function"){g.callback=null,b=g.priorityLevel;var q=N(g.expirationTime<=J);J=e.unstable_now(),typeof q=="function"?g.callback=q:g===n(d)&&r(d),I(J)}else r(d);g=n(d)}if(g!==null)var O=!0;else{var ye=n(h);ye!==null&&se($,ye.startTime-J),O=!1}return O}finally{g=null,b=w,y=!1}}var F=!1,ee=null,ce=-1,pe=5,U=-1;function ne(){return!(e.unstable_now()-U<pe)}function ae(){if(ee!==null){var j=e.unstable_now();U=j;var J=!0;try{J=ee(!0,j)}finally{J?de():(F=!1,ee=null)}}else F=!1}var de;if(typeof k=="function")de=function(){k(ae)};else if(typeof MessageChannel!="undefined"){var oe=new MessageChannel,be=oe.port2;oe.port1.onmessage=ae,de=function(){be.postMessage(null)}}else de=function(){A(ae,0)};function Ce(j){ee=j,F||(F=!0,de())}function se(j,J){ce=A(function(){j(e.unstable_now())},J)}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,Ce(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"):pe=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 J=3;break;default:J=b}var w=b;b=J;try{return j()}finally{b=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,J){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var w=b;b=j;try{return J()}finally{b=w}},e.unstable_scheduleCallback=function(j,J,w){var N=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?N+w:N):w=N,j){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=w+q,j={id:p++,callback:J,priorityLevel:j,startTime:w,expirationTime:q,sortIndex:-1},w>N?(j.sortIndex=w,t(h,j),n(d)===null&&j===n(h)&&(v?(C(ce),ce=-1):v=!0,se($,w-N))):(j.sortIndex=q,t(d,j),x||y||(x=!0,Ce(W))),j},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(j){var J=b;return function(){var w=b;b=J;try{return j.apply(this,arguments)}finally{b=w}}}})(af)),af}var Mg;function GA(){return Mg||(Mg=1,sf.exports=WA()),sf.exports}var Fg;function XA(){if(Fg)return cn;Fg=1;var e=yo(),t=GA();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function b(i){return d.call(g,i)?!0:d.call(p,i)?!1:h.test(i)?g[i]=!0:(p[i]=!0,!1)}function y(i,s,l,f){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function x(i,s,l,f){if(s===null||typeof s=="undefined"||y(i,s,l,f))return!0;if(f)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(i,s,l,f,E,T,S){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=T,this.removeEmptyString=S}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];A[s]=new v(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new v(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var C=/[\-:]([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 s=i.replace(C,k);A[s]=new v(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(C,k);A[s]=new v(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(C,k);A[s]=new v(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function I(i,s,l,f){var E=A.hasOwnProperty(s)?A[s]:null;(E!==null?E.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(x(s,l,E,f)&&(l=null),f||E===null?b(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(s=E.attributeName,f=E.attributeNamespace,l===null?i.removeAttribute(s):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,f?i.setAttributeNS(f,s,l):i.setAttribute(s,l))))}var $=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),F=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),ce=Symbol.for("react.strict_mode"),pe=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),ne=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),j=Symbol.iterator;function J(i){return i===null||typeof i!="object"?null:(i=j&&i[j]||i["@@iterator"],typeof i=="function"?i:null)}var w=Object.assign,N;function q(i){if(N===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);N=s&&s[1]||""}return`
|
|
16
|
+
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Pi(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Du.assertOptions(r,{silentJSONParsing:Dn.transitional(Dn.boolean),forcedJSONParsing:Dn.transitional(Dn.boolean),clarifyTimeoutError:Dn.transitional(Dn.boolean),legacyInterceptorReqResOrdering:Dn.transitional(Dn.boolean)},!1),o!=null&&(G.isFunction(o)?n.paramsSerializer={serialize:o}:Du.assertOptions(o,{encode:Dn.function,serialize:Dn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Du.assertOptions(n,{baseUrl:Dn.spelling("baseURL"),withXsrfToken:Dn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&G.merge(a.common,a[n.method]);a&&G.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=nn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;d=d&&v.synchronous;const A=n.transitional||Id;A&&A.legacyInterceptorReqResOrdering?c.unshift(v.fulfilled,v.rejected):c.push(v.fulfilled,v.rejected)});const h=[];this.interceptors.response.forEach(function(v){h.push(v.fulfilled,v.rejected)});let p,g=0,b;if(!d){const _=[sg.bind(this),void 0];for(_.unshift(...c),_.push(...h),b=_.length,p=Promise.resolve(n);g<b;)p=p.then(_[g++],_[g++]);return p}b=c.length;let y=n;for(;g<b;){const _=c[g++],v=c[g++];try{y=_(y)}catch(A){v.call(this,A);break}}try{p=sg.call(this,y)}catch(_){return Promise.reject(_)}for(g=0,b=h.length;g<b;)p=p.then(h[g++],h[g++]);return p}getUri(t){t=Pi(this.defaults,t);const n=Q0(t.baseURL,t.url,t.allowAbsoluteUrls);return V0(n,t.params,t.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(t){Ii.prototype[t]=function(n,r){return this.request(Pi(r||{},{method:t,url:n,data:(r||{}).data}))}}),G.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(Pi(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Ii.prototype[t]=n(),t!=="query"&&(Ii.prototype[t+"Form"]=n(!0))});let $v=class a2{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(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new js(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new a2(function(o){t=o}),cancel:t}}};function Vv(e){return function(n){return e.apply(null,n)}}function qv(e){return G.isObject(e)&&e.isAxiosError===!0}const Ud={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(Ud).forEach(([e,t])=>{Ud[t]=e});function ug(e){const t=new Ii(e),n=N0(Ii.prototype.request,t);return G.extend(n,Ii.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return ug(Pi(e,o))},n}const wt=ug(zs);wt.Axios=Ii,wt.CanceledError=js,wt.CancelToken=$v,wt.isCancel=W0,wt.VERSION=Md,wt.toFormData=Pu,wt.AxiosError=Ae,wt.Cancel=wt.CanceledError,wt.all=function(t){return Promise.all(t)},wt.spread=Vv,wt.isAxiosError=qv,wt.mergeConfig=Pi,wt.AxiosHeaders=nn,wt.formToJSON=e=>Y0(G.isHTMLForm(e)?new FormData(e):e),wt.getAdapter=og.getAdapter,wt.HttpStatusCode=Ud,wt.default=wt;const{Axios:XB,AxiosError:KB,CanceledError:QB,isCancel:JB,CancelToken:ZB,VERSION:e7,all:t7,Cancel:n7,isAxiosError:r7,spread:i7,toFormData:o7,AxiosHeaders:s7,HttpStatusCode:a7,formToJSON:u7,getAdapter:l7,mergeConfig:c7,create:d7}=wt;class Yv{constructor(t,n,r,o=!1,a,u){Ve(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Ve(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Ve(this,"CIMULATE_SEARCH_API_PATH","api/v1");Ve(this,"baseApiUrl");Ve(this,"headers",{});Ve(this,"fetchConfig",()=>ze(this,null,function*(){try{const t=yield wt.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}}));Ve(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.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,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class Wv{constructor(t,n,r,o=!1,a,u){Ve(this,"apiService");Ve(this,"config",null);Ve(this,"getConfig",()=>ze(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Ve(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Ve(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Ve(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Ve(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Ve(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Ve(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Ve(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Ve(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Ve(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Ve(this,"getProductField",t=>this.config?this.config[t]:"");Ve(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new Yv(t,n,r,o,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 Ri=(e,t,n,...r)=>{if(!e)return;const o=["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]",o,n,...r)};class Gv{constructor(t=!1){Ve(this,"isDevelopment");Ve(this,"_log",(t,n,...r)=>{Ri(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 Xv={copilot:"Your Search Assistant",messaging:"Commerce Client"},lg=q.createContext(null),Kv=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,searchPlaceholder:g,searchButtonLabel:b,searchConfig:y,suggestionButtonConfig:_,messageAlignment:v="start",autoScroll:A=!0,componentConfig:k,conversationHistory:C,resetConversationMessage:I="",apiKey:j,apiToken:W,baseUrl:F,customerId:ee,tenantId:ue,theme:me,isDevelopment:$,__features:ne,routingAttributes:re,enableDownloadTranscript:de=!0,children:se})=>{const be=e==="messaging",ke=q.useMemo(()=>{const O=re==null?void 0:re.isCartMgmtSupported;return O===!0||O==="true"},[re]),ae=q.useMemo(()=>be?{config:null}:new Wv(F,j,W,$,ee,ue),[be,F,j,W,$,ee,ue]),z=q.useMemo(()=>new Gv($),[$]);q.useEffect(()=>{be||!ae||ae.config||ae.getConfig()},[ae,be]);const J=q.useMemo(()=>uS(me),[me]),w=q.useMemo(()=>{const O=(y==null?void 0:y.placeholder)||g,ye=(y==null?void 0:y.buttonLabel)||b;let Ce="icon";return y!=null&&y.buttonType?Ce=y.buttonType:b&&(Ce="text"),oe(B({},y||{}),{placeholder:O,buttonLabel:ye,buttonType:Ce})},[y,g,b]),N=q.useMemo(()=>oe(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||Xv[e!=null?e:"copilot"]}),[r,t,n,e]),Y=q.useMemo(()=>({configModule:ae,mode:e!=null?e:"copilot",headerConfig:N,entryMessage:a,globalClassName:o,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:h,baseCatalogParams:p,themeVariables:J,logger:z,searchConfig:w,suggestionButtonConfig:_,messageAlignment:v,autoScroll:A,enableMinimize:!!(k!=null&&k.enableMinimize),enableDownloadTranscript:de,resetConversationMessage:I,conversationHistory:{sinceHours:typeof(C==null?void 0:C.sinceHours)=="number"?C.sinceHours:1,limit:C==null?void 0:C.limit},features:ne,isCartMgmtSupported:ke}),[ae,e,N,a,o,h,p,c,d,u,w,_,v,A,k,de,I,z,J,C,ne,ke]);return x.jsx(lg.Provider,{value:Y,children:se})},ot=()=>{const e=q.useContext(lg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},Qv=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart"],Mu=-1;function Jv(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.type=="string"&&typeof t.index=="number")return Qv.includes(t.type)?t:null}catch(t){}return{type:"markdown",index:Mu,data:{content:e}}}function Zv(e,t){if(t.index===Mu){const o=e[e.length-1];if(o&&o.type==="markdown"&&o.index===Mu&&t.type==="markdown"){const a={type:"markdown",index:Mu,data:{content:o.data.content+t.data.content}};return[...e.slice(0,-1),a]}return[...e,t]}const n=e.findIndex(o=>o.index===t.index);return[...n>=0?e.map((o,a)=>a===n?t:o):[...e,t]].sort((o,a)=>o.index-a.index)}const cg={connectionStatus:"disconnected",loading:!0,conversationId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function eA(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return B(oe(B({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return oe(B({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return oe(B({},e),{conversationId:t.id});case"ADD_MESSAGE":return oe(B({},e),{messages:[...e.messages,oe(B({},t.message),{type:"ADD_MESSAGE"})]});case"APPEND_STREAMING_TOKEN":{const n=Jv(t.token);return n?oe(B({},e),{streamingBlocks:Zv(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":return oe(B({},e),{messages:[...e.messages,oe(B({},t.message),{type:"FLUSH_STREAMING"})],streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null});case"SET_AGENT_TYPING":return oe(B({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return B(oe(B({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:oe(B({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return oe(B({},e),{routingResult:t.result});case"SET_ERROR":return oe(B({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return oe(B({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return oe(B({},e),{sendError:null});case"LOAD_HISTORY":return oe(B({},e),{messages:t.messages,loading:!1});case"SET_SESSION_EXPIRED":return oe(B({},e),{sessionExpired:t.expired});case"RESET":return oe(B({},cg),{connectionStatus:e.connectionStatus,loading:!0});default:return e}}const dg=q.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,sendMessage:()=>{},addToCart:()=>{},resetConversation:()=>{},retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>ze(null,null,function*(){})});function Hd(e,t){return`cim_af_conv_${e}_${t}`}function zd(e,t){return Date.now()-e>t}function tA(e,t,n){try{const r=Hd(e,t),o=sessionStorage.getItem(r);if(!o)return null;const a=JSON.parse(o);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"||zd(u.storedAt,n)?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function $s(e,t,n){try{const r=Hd(e,t),o={conversationId:n,storedAt:Date.now()};sessionStorage.setItem(r,JSON.stringify(o))}catch(r){}}function Fu(e,t){try{const n=Hd(e,t);sessionStorage.removeItem(n)}catch(n){}}function jd(e,t){return`cim_af_ct_${e}_${t}`}function fg(e,t,n){try{const r=jd(e,t),o=sessionStorage.getItem(r);if(!o)return null;const a=JSON.parse(o);if(!a||typeof a!="object"||!("accessToken"in a)||!("lastEventId"in a)||!("storedAt"in a))return null;const u=a;return typeof u.accessToken!="string"||!u.accessToken||typeof u.lastEventId!="string"||!u.lastEventId?null:typeof u.storedAt!="number"||Date.now()-u.storedAt>n?(sessionStorage.removeItem(r),null):u}catch(r){return null}}function nA(e,t,n,r){try{const o=jd(e,t),a={accessToken:n,lastEventId:r,storedAt:Date.now()};sessionStorage.setItem(o,JSON.stringify(a))}catch(o){}}function rA(e,t){try{const n=jd(e,t);sessionStorage.removeItem(n)}catch(n){}}function iA(e,t){return`cim_af_conv_${e}_${t}`}function oA(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=iA(e,t);return new BroadcastChannel(n)}catch(n){return null}}function sA(e,t=500){return e?new Promise(n=>{let r=!1;const o=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",a),n(null))},t);function a(u){var c;r||((c=u.data)==null?void 0:c.type)==="conversation_response"&&(r=!0,clearTimeout(o),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(o),e.removeEventListener("message",a),n(null))}}):Promise.resolve(null)}function aA(e,t,n){if(!e)return()=>{};function r(o){var a;if((a=o.data)!=null&&a.type)switch(o.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(c){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function uA(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function lA(e){if(e)try{e.close()}catch(t){}}function cA(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function dA(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function hg(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 fA(e){if(e.entryType!=="Message")return null;const n=dA(e.entryPayload).abstractMessage;if(!n)return null;const r=hg(n,"staticContent","text")||hg(n,"content","text")||"";if(!r)return null;const o=cA(e.sender.role);return{id:e.identifier,role:o,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function hA(e){const t=[];for(const n of e){const r=fA(n);r&&t.push(r)}return t}const pg="onCimulateWidgetReady",pA=5e3;function Vs(e={}){const{routingAttributes:t,timeoutMs:n=pA}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=B({},t!=null?t:{});return new Promise(o=>{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;o(p?r:t)},c={routingAttributes:t,setHiddenPrechatFields:p=>{a.settled||!p||Object.assign(r,p)},done:u},d=new CustomEvent(pg,{detail:c,cancelable:!0});if(!!window.dispatchEvent(d)){u();return}a.timer=setTimeout(u,n)})}function mA(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:o}=e,a=q.useRef(null),u=q.useRef(null),c=q.useRef(null),d=o.sinceHours*60*60*1e3,h=q.useCallback(()=>(c.current||(c.current=sA(a.current)),c.current),[]);q.useEffect(()=>{const A=oA(t,n);a.current=A,c.current=null;const k=aA(A,()=>{const C=u.current;if(!C)return null;const I=fg(t,n,d);return{conversationId:C,continuationToken:I==null?void 0:I.accessToken,lastEventId:I==null?void 0:I.lastEventId}},()=>{Fu(t,n),u.current=null});return()=>{k(),lA(A),a.current=null}},[t,n,d]);const p=q.useCallback(A=>ze(null,null,function*(){let k=tA(t,n,d);if(!k){const C=yield h();C&&!zd(C.storedAt,d)&&(k=C)}if(!k){const C=yield A.createConversation(yield Vs({routingAttributes:r}));return $s(t,n,C),u.current=C,{conversationId:C,restoredMessages:[],resumed:!1}}try{const C=Date.now()-d,j=(yield A.listConversations({conversationId:k.conversationId,startTimestamp:C})).conversations.find(F=>F.conversationId===k.conversationId&&!F.isConversationClosed);if(!j){Fu(t,n);const F=yield A.createConversation(yield Vs({routingAttributes:r}));return $s(t,n,F),u.current=F,{conversationId:F,restoredMessages:[],resumed:!1}}A.resumeConversation(j.conversationId),u.current=j.conversationId,$s(t,n,j.conversationId);let W=[];try{const F=yield A.listConversationEntries(j.conversationId,{limit:o.limit,startTimestamp:C,direction:"FromStart"});W=hA(F.conversationEntries)}catch(F){}return{conversationId:j.conversationId,restoredMessages:W,resumed:!0}}catch(C){Fu(t,n);const I=yield A.createConversation(yield Vs({routingAttributes:r}));return $s(t,n,I),u.current=I,{conversationId:I,restoredMessages:[],resumed:!1}}}),[t,n,r,o,d,h]),g=q.useCallback(A=>{$s(t,n,A),u.current=A},[t,n]),b=q.useCallback(()=>{Fu(t,n),rA(t,n),uA(a.current),u.current=null},[t,n]),y=q.useCallback(()=>{const A=fg(t,n,d);return A?{continuationToken:A.accessToken,lastEventId:A.lastEventId}:null},[t,n,d]),_=q.useCallback(()=>ze(null,null,function*(){const A=yield h();return!(A!=null&&A.continuationToken)||zd(A.storedAt,d)?null:{continuationToken:A.continuationToken,lastEventId:A.lastEventId}}),[d,h]),v=q.useCallback(A=>ze(null,null,function*(){try{const{accessToken:k,lastEventId:C}=yield A.generateContinuationToken();nA(t,n,k,C)}catch(k){}}),[t,n]);return{initializeConversation:p,persistConversationId:g,clearPersistedConversation:b,getStoredConnectOptions:y,getPeerConnectOptions:_,persistContinuationToken:v}}const pr={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 gA(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 wo(e){const{type:t,statusCode:n}=gA(e);if(t==="api"&&typeof n=="number")return n===429?pr.rateLimit:n>=500?pr.server:pr.default;switch(t){case"network":return pr.network;case"sse":return pr.interrupted;case"auth":return pr.connect;default:return pr.default}}function mg(e){switch(e.code){case"MAX_RECONNECT":return pr.lost;case"ROUTING_FAILED":return pr.routing;default:return pr.connect}}const EA="Your session ended due to inactivity. Starting a new session…";function gg(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="auth"?!0:t.type==="api"&&(t.statusCode===401||t.statusCode===403)}function yA(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),o=r.map(y=>`${y.label}: ${y.value}`).join(", "),a=r.map(y=>y.value).join(", "),u=o?` (${o})`:"",c=a?` (${a})`:"",d=n?`Add ${n} of`:"Add",h=e.sku?` [SKU: ${e.sku}]`:"",p=`${d} ${t} to my cart${u}${h}`,g=`Add ${n?`${n} × `:""}${t} to cart${c}`;return{prompt:p,display:g}}const Eg=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,capabilitiesVersion:o,enableLogging:a=!1,onConnect:u,onMessage:c,onError:d,children:h})=>{const{logger:p,conversationHistory:g}=ot(),[b,y]=q.useReducer(eA,cg),_=q.useRef(b);_.current=b;const v=mA({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:g}),A=q.useRef(null),k=q.useRef(c),C=q.useRef(d),I=q.useRef(u),j=q.useRef(!1),W=q.useRef(!1),F=q.useRef(0),ee=q.useRef(null);k.current=c,C.current=d,I.current=u,q.useEffect(()=>{const z=new aS({baseURL:e,orgId:t,esDeveloperName:n,options:B({enableLogging:a},o?{capabilitiesVersion:o}:{})});A.current=z,z.on("connected",()=>{var w;y({type:"SET_CONNECTION_STATUS",status:"connected"}),(w=I.current)==null||w.call(I)}),z.on("disconnected",()=>{y({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),z.on("reconnecting",()=>{y({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),z.on("message",w=>{var Y;const N={id:w.messageId||crypto.randomUUID(),role:"agent",content:w.content,timestamp:w.timestamp,sender:w.sender,raw:w};p==null||p.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:N.id,tokensBeforeFlush:F.current,streamedFinalOnly:F.current===0}),F.current=0,y({type:"FLUSH_STREAMING",message:N}),(Y=k.current)==null||Y.call(k,N)}),z.on("streaming_token",w=>{F.current+=1,y({type:"APPEND_STREAMING_TOKEN",token:w.token})}),z.on("typing_started",()=>{y({type:"SET_AGENT_TYPING",isTyping:!0})}),z.on("typing_stopped",()=>{y({type:"SET_AGENT_TYPING",isTyping:!1})}),z.on("progress_indicator",w=>{y({type:"ADD_PROGRESS_STEP",message:w.message})}),z.on("routing_result",w=>{var N;if(y({type:"SET_ROUTING_RESULT",result:w}),!w.isSuccessful){const Y=`Routing failed: ${w.failureType||"unknown"}`;y({type:"SET_ERROR",error:mg({code:"ROUTING_FAILED"})}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(N=C.current)==null||N.call(C,Y)}}),z.on("participant_changed",w=>{if(w.participant.name==="Automated Process")return;const N={id:crypto.randomUUID(),role:"system",content:w.action==="add"?`${w.participant.name||"Agent"} joined the conversation`:`${w.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()};p==null||p.log("🦜 MessagingProvider participant_changed event received",{event:w}),y({type:"ADD_MESSAGE",message:N})}),z.on("conversation_closed",()=>{const w={id:crypto.randomUUID(),role:"system",content:"Conversation reset",timestamp:new Date().toISOString()};y({type:"ADD_MESSAGE",message:w}),y({type:"SET_CONVERSATION_ID",id:null}),v.clearPersistedConversation()}),z.on("error",w=>{var N;if(p==null||p.log("🦜 MessagingProvider ERROR event received",{event:w}),w.code==="SESSION_EXPIRED"){W.current=!0,y({type:"SET_SESSION_EXPIRED",expired:!0}),y({type:"SET_CONNECTION_STATUS",status:"disconnected"}),y({type:"SET_LOADING",isLoading:!1});return}y({type:"SET_ERROR",error:mg(w)}),w.recoverable||y({type:"SET_CONNECTION_STATUS",status:"error"}),(N=C.current)==null||N.call(C,w.message)}),y({type:"SET_CONNECTION_STATUS",status:"connecting"});const J=()=>ze(null,null,function*(){let w=v.getStoredConnectOptions(),N=!1;w||(w=yield v.getPeerConnectOptions(),N=!!w);try{yield z.connect(w!=null?w:void 0)}catch(O){if(w)p==null||p.log("Continuation token failed, falling back to fresh connect"),N||v.clearPersistedConversation(),yield z.connect();else throw O}yield v.persistContinuationToken(z);const Y=yield v.initializeConversation(z);y({type:"SET_CONVERSATION_ID",id:Y.conversationId}),Y.resumed&&Y.restoredMessages.length>0&&y({type:"LOAD_HISTORY",messages:Y.restoredMessages})});return ee.current=J,J().catch(w=>{var N;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:wo(w)}),(N=C.current)==null||N.call(C,w.message)}),()=>{z.disconnect(),z.off(),A.current=null,ee.current=null}},[e,t,n,o]),q.useEffect(()=>{const z=()=>{document.visibilityState==="visible"&&A.current&&!W.current&&A.current.reconnect()};return document.addEventListener("visibilitychange",z),()=>{document.removeEventListener("visibilitychange",z)}},[]);const ue=q.useCallback(z=>ze(null,null,function*(){var w;const J=A.current;if(!(!J||j.current)){j.current=!0,W.current=!1,y({type:"SET_SESSION_EXPIRED",expired:!1}),y({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:EA,timestamp:new Date().toISOString()}}),v.clearPersistedConversation(),y({type:"SET_CONNECTION_STATUS",status:"connecting"});try{J.disconnect(),yield J.connect(),yield v.persistContinuationToken(J);const N=yield J.createConversation(yield Vs({routingAttributes:r}));y({type:"SET_CONVERSATION_ID",id:N}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(N),z&&(y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),yield J.sendMessage(z))}catch(N){const Y=N instanceof Error?N.message:String(N);y({type:"SET_ERROR",error:wo(N)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(w=C.current)==null||w.call(C,Y)}finally{j.current=!1}}}),[r,v]),me=q.useRef(ue);me.current=ue;const $=q.useCallback((z,J)=>{const w=A.current;if(!w)return;const N={id:crypto.randomUUID(),role:"user",content:J!=null?J:z,timestamp:new Date().toISOString()};if(y({type:"CLEAR_SEND_ERROR"}),y({type:"ADD_MESSAGE",message:N}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),W.current){me.current(z);return}w.sendMessage(z).catch(Y=>{var O;if(gg(Y)){me.current(z);return}y({type:"SET_SEND_ERROR",error:{text:z,displayContent:J,message:wo(Y)}}),(O=C.current)==null||O.call(C,Y.message)})},[]),ne=q.useCallback(z=>{z.trim()&&$(z)},[$]),re=q.useCallback(z=>{if(!A.current)return;const{prompt:J,display:w}=yA(z);$(J,w)},[$]),de=q.useCallback(()=>{const z=A.current,J=_.current.sendError;if(!(!z||!J)){if(y({type:"CLEAR_SEND_ERROR"}),y({type:"SET_LOADING",isLoading:!0}),y({type:"SET_PROGRESS_MESSAGE",message:""}),W.current){me.current(J.text);return}z.sendMessage(J.text).catch(w=>{var N;if(gg(w)){me.current(J.text);return}y({type:"SET_SEND_ERROR",error:oe(B({},J),{message:wo(w)})}),(N=C.current)==null||N.call(C,w.message)})}},[]),se=q.useCallback(()=>{const z=A.current,J=ee.current;!z||!J||(W.current=!1,z.disconnect(),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),J().catch(w=>{var N;y({type:"SET_CONNECTION_STATUS",status:"error"}),y({type:"SET_ERROR",error:wo(w)}),(N=C.current)==null||N.call(C,w.message)}))},[]),be=q.useCallback(()=>{const z=A.current;z&&(W.current=!1,v.clearPersistedConversation(),y({type:"RESET"}),y({type:"SET_CONNECTION_STATUS",status:"connecting"}),z.endConversation().then(()=>(z.disconnect(),z.connect())).then(()=>ze(null,null,function*(){return yield v.persistContinuationToken(z),z.createConversation(yield Vs({routingAttributes:r}))})).then(J=>{y({type:"SET_CONVERSATION_ID",id:J}),y({type:"SET_CONNECTION_STATUS",status:"connected"}),v.persistConversationId(J)}).catch(J=>{var w;y({type:"SET_ERROR",error:wo(J)}),y({type:"SET_CONNECTION_STATUS",status:"error"}),(w=C.current)==null||w.call(C,J.message)}))},[r,v]),ke=q.useCallback(()=>ze(null,null,function*(){var N;const z=A.current;if(!z)return;const J=yield z.retrieveConversationTranscript(),w=URL.createObjectURL(J);try{const Y=document.createElement("a");Y.href=w,Y.download=`transcript-${(N=z.conversationId)!=null?N:"conversation"}.pdf`,document.body.appendChild(Y),Y.click(),Y.remove()}finally{URL.revokeObjectURL(w)}}),[]),ae=q.useMemo(()=>({connectionStatus:b.connectionStatus,isConnected:b.connectionStatus==="connected"&&b.conversationId!==null,isAgentTyping:b.isAgentTyping,conversationId:b.conversationId,messages:b.messages,streamingBlocks:b.streamingBlocks,progressMessage:b.progressMessage,progressSteps:b.progressSteps,error:b.error,sendError:b.sendError,loading:b.loading,sessionExpired:b.sessionExpired,sendMessage:ne,addToCart:re,resetConversation:be,retryLastMessage:de,retryConnection:se,downloadTranscript:ke}),[b,ne,re,be,de,se,ke]);return x.jsx(dg.Provider,{value:ae,children:h})};var yg=Symbol.for("immer-nothing"),Tg=Symbol.for("immer-draftable"),_n=Symbol.for("immer-state");function Qn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var So=Object.getPrototypeOf;function vo(e){return!!e&&!!e[_n]}function Li(e){var t;return e?bg(e)||Array.isArray(e)||!!e[Tg]||!!((t=e.constructor)!=null&&t[Tg])||Hu(e)||zu(e):!1}var TA=Object.prototype.constructor.toString();function bg(e){if(!e||typeof e!="object")return!1;const t=So(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)===TA}function Bu(e,t){Uu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Uu(e){const t=e[_n];return t?t.type_:Array.isArray(e)?1:Hu(e)?2:zu(e)?3:0}function $d(e,t){return Uu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function xg(e,t,n){const r=Uu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function bA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Hu(e){return e instanceof Map}function zu(e){return e instanceof Set}function Di(e){return e.copy_||e.base_}function Vd(e,t){if(Hu(e))return new Map(e);if(zu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=bg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[_n];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(So(e),r)}else{const r=So(e);if(r!==null&&n)return B({},e);const o=Object.create(r);return Object.assign(o,e)}}function qd(e,t=!1){return ju(e)||vo(e)||!Li(e)||(Uu(e)>1&&(e.set=e.add=e.clear=e.delete=xA),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>qd(r,!0))),e}function xA(){Qn(2)}function ju(e){return Object.isFrozen(e)}var _A={};function Mi(e){const t=_A[e];return t||Qn(0,e),t}var qs;function _g(){return qs}function wA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function wg(e,t){t&&(Mi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yd(e){Wd(e),e.drafts_.forEach(SA),e.drafts_=null}function Wd(e){e===qs&&(qs=e.parent_)}function Sg(e){return qs=wA(qs,e)}function SA(e){const t=e[_n];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function vg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[_n].modified_&&(Yd(t),Qn(4)),Li(e)&&(e=$u(t,e),t.parent_||Vu(t,e)),t.patches_&&Mi("Patches").generateReplacementPatches_(n[_n].base_,e,t.patches_,t.inversePatches_)):e=$u(t,n,[]),Yd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==yg?e:void 0}function $u(e,t,n){if(ju(t))return t;const r=t[_n];if(!r)return Bu(t,(o,a)=>Ag(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Vu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),Bu(a,(c,d)=>Ag(e,r,o,c,d,n,u)),Vu(e,o,!1),n&&e.patches_&&Mi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Ag(e,t,n,r,o,a,u){if(vo(o)){const c=a&&t&&t.type_!==3&&!$d(t.assigned_,r)?a.concat(r):void 0,d=$u(e,o,c);if(xg(n,r,d),vo(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Li(o)&&!ju(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;$u(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Vu(e,o)}}function Vu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qd(t,n)}function vA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:_g(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Gd;n&&(o=[r],a=Ys);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Gd={get(e,t){if(t===_n)return e;const n=Di(e);if(!$d(n,t))return AA(e,n,t);const r=n[t];return e.finalized_||!Li(r)?r:r===Xd(e.base_,t)?(Qd(e),e.copy_[t]=Jd(r,e)):r},has(e,t){return t in Di(e)},ownKeys(e){return Reflect.ownKeys(Di(e))},set(e,t,n){const r=kg(Di(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Xd(Di(e),t),a=o==null?void 0:o[_n];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(bA(n,o)&&(n!==void 0||$d(e.base_,t)))return!0;Qd(e),Kd(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Xd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Qd(e),Kd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Di(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Qn(11)},getPrototypeOf(e){return So(e.base_)},setPrototypeOf(){Qn(12)}},Ys={};Bu(Gd,(e,t)=>{Ys[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ys.deleteProperty=function(e,t){return Ys.set.call(this,e,t,void 0)},Ys.set=function(e,t,n){return Gd.set.call(this,e[0],t,n,e[0])};function Xd(e,t){const n=e[_n];return(n?Di(n):e)[t]}function AA(e,t,n){var o;const r=kg(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function kg(e,t){if(!(t in e))return;let n=So(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=So(n)}}function Kd(e){e.modified_||(e.modified_=!0,e.parent_&&Kd(e.parent_))}function Qd(e){e.copy_||(e.copy_=Vd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var kA=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,...h){return u.produce(d,p=>n.call(this,p,...h))}}typeof n!="function"&&Qn(6),r!==void 0&&typeof r!="function"&&Qn(7);let o;if(Li(t)){const a=Sg(this),u=Jd(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Yd(a):Wd(a)}return wg(a,r),vg(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===yg&&(o=void 0),this.autoFreeze_&&qd(o,!0),r){const a=[],u=[];Mi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Qn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),r,o]},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){Li(e)||Qn(8),vo(e)&&(e=CA(e));const t=Sg(this),n=Jd(e,void 0);return n[_n].isManual_=!0,Wd(t),n}finishDraft(e,t){const n=e&&e[_n];(!n||!n.isManual_)&&Qn(9);const{scope_:r}=n;return wg(r,t),vg(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 o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Mi("Patches").applyPatches_;return vo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Jd(e,t){const n=Hu(e)?Mi("MapSet").proxyMap_(e,t):zu(e)?Mi("MapSet").proxySet_(e,t):vA(e,t);return(t?t.scope_:_g()).drafts_.push(n),n}function CA(e){return vo(e)||Qn(10,e),Cg(e)}function Cg(e){if(!Li(e)||ju(e))return e;const t=e[_n];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Vd(e,!0);return Bu(n,(r,o)=>{xg(n,r,Cg(o))}),t&&(t.finalized_=!1),n}var wn=new kA,NA=wn.produce;wn.produceWithPatches.bind(wn),wn.setAutoFreeze.bind(wn),wn.setUseStrictShallowCopy.bind(wn),wn.applyPatches.bind(wn),wn.createDraft.bind(wn),wn.finishDraft.bind(wn);function OA(e,t,n){var r=q.useMemo(function(){return NA(e)},[e]);return q.useReducer(r,t,n)}const at={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"},Ng={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},Og=q.createContext(null),Pg=q.createContext(null),PA=({children:e,dispatch:t})=>{const n=q.useCallback(_=>{t({type:at.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=q.useCallback(_=>{t({type:at.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),o=q.useCallback(_=>{t({type:at.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=q.useCallback(_=>{t({type:at.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=q.useCallback(_=>{t({type:at.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=q.useCallback(_=>{t({type:at.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=q.useCallback(_=>{t({type:at.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),h=q.useCallback(_=>{t({type:at.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=q.useCallback(_=>{t({type:at.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),g=q.useCallback(_=>{t({type:at.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),b=q.useCallback(_=>{t({type:at.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=q.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:h,setPromptsMessage:p,setResponseMessage:g,setIsResponseLoading:b}),[n,r,o,a,u,c,d,h,p,g,b]);return x.jsx(Pg.Provider,{value:y,children:e})},IA=(e,t)=>{const{type:n,payload:r}=t;switch(n){case at.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case at.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case at.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case at.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case at.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case at.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case at.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case at.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case at.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case at.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case at.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case at.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case at.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case at.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case at.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},RA=({promptsConfig:e,children:t})=>{const[n,r]=OA(IA,B(B({},Ng),e||{}));return x.jsx(Og.Provider,{value:n,children:x.jsx(PA,{dispatch:r,children:t})})};function LA(){var e=q.useRef(!0);return e.current?(e.current=!1,!0):e.current}function DA(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function MA(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",qu=function(e){q.useEffect(e,[])},FA=function(e){var t=q.useRef(e);t.current=e,qu(function(){return function(){return t.current()}})},BA=function(e){var t=q.useRef(0),n=q.useState(e),r=n[0],o=n[1],a=q.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return FA(function(){cancelAnimationFrame(t.current)}),[r,a]},UA=function(e,t){return e===t};function HA(e,t){t===void 0&&(t=UA);var n=q.useRef(),r=q.useRef(e),o=LA();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var zA=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,c=BA({width:Zd?window.innerWidth:r,height:Zd?window.innerHeight:a}),d=c[0],h=c[1];return q.useEffect(function(){if(Zd){var p=function(){var g=window.innerWidth,b=window.innerHeight;h({width:g,height:b}),u&&u(g,b)};return DA(window,"resize",p),function(){MA(window,"resize",p)}}},[]),d};const Ig="cimulate",ef=`${Ig}:ui-state-update`,tf=`${Ig}:prompts-state-update`,jA=e=>{window.addEventListener(ef,e)},$A=e=>{window.removeEventListener(ef,e)},VA=(e,t)=>{const n=new CustomEvent(ef,{detail:{property:e,value:t}});window.dispatchEvent(n)},Rg=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);tt.entryTypeProxy.entryType=e},Rr=e=>{const t=tt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;tt.statusProxy.isOpen=n,n&&(tt.statusProxy.isMinimized=!1)},Yu=e=>{const t=tt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;tt.statusProxy.isMinimized=n,n&&(tt.statusProxy.isOpen=!1)},nf=e=>{tt.modalProxy.isFullscreen=e},Wu=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);tt.statusProxy.type=e,e==="dialog"||e==="chat"?tt.modeProxy.mode="embedded":tt.modeProxy.mode="standalone"},rf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);tt.dialogProxy.position=e},qA=e=>{const t=tt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;tt.dialogProxy.isFullHeight=n};class YA{constructor(){Ve(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}});Ve(this,"connectedProxy");Ve(this,"modeProxy");Ve(this,"entryTypeProxy");Ve(this,"statusProxy");Ve(this,"dialogProxy");Ve(this,"modalProxy",{isFullscreen:!1});Ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return VA(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 tt=new YA,Lg=q.createContext({mode:tt.modeProxy.mode,entryType:tt.entryType,status:tt.statusProxy,dialogPosition:tt.dialogProxy.position,isDialogFullHeight:tt.dialogProxy.isFullHeight,dialogWidth:tt.dialogProxy.width,isModalFullscreen:tt.modalProxy.isFullscreen,previousComponentType:tt.statusProxy.type}),WA=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=q.useState(e!=null?e:tt.entryTypeProxy.entryType),[u,c]=q.useState(tt.modeProxy.mode),[d,h]=q.useState({type:n||tt.statusProxy.type,isOpen:tt.statusProxy.isOpen,isMinimized:tt.statusProxy.isMinimized}),[p,g]=q.useState(tt.dialogProxy.position),[b,y]=q.useState(tt.dialogProxy.isFullHeight),[_,v]=q.useState(tt.dialogProxy.width),[A,k]=q.useState(tt.modalProxy.isFullscreen),C=HA(d.type);q.useEffect(()=>{const j=W=>{const{property:F,value:ee}=W.detail||{};if(!(!F||ee===void 0)){if(F==="mode"){c(ee);return}if(F==="entryType"){a(ee);return}if(F==="isMinimized"){h(ue=>oe(B({},ue),{isMinimized:ee}));return}if(F==="isOpen"){h(ue=>oe(B({},ue),{isOpen:ee}));return}if(F==="type"){h(ue=>oe(B({},ue),{type:ee}));return}if(F==="position"){g(ee);return}if(F==="isFullHeight"){y(ee);return}if(F==="width"){v(ee);return}if(F==="isFullscreen"){k(ee);return}}};return jA(j),()=>{$A(j)}},[]),qu(()=>{e&&Rg(e)}),qu(()=>{const j=n||(t==null?void 0:t.type);j&&Wu(j),t&&"isOpen"in t&&Rr(!!t.isOpen),t&&"isMinimized"in t&&Yu(!!t.isMinimized)}),qu(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:j}=t.options;j&&rf(j),"dialogFullHeight"in t.options&&qA(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&nf(!!t.options.isModalFullscreen)});const I=q.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:C||"dialog",dialogPosition:p,isDialogFullHeight:b,dialogWidth:_,isModalFullscreen:A}),[u,o,d,C,p,b,_,A]);return x.jsx(Lg.Provider,{value:I,children:r})},Dg=({mode:e,apiKey:t,apiToken:n,baseUrl:r,logoUrl:o,headerText:a,headerConfig:u,theme:c,openLinksInNewTab:d,globalClassName:h,isDevelopment:p=!1,componentType:g,componentConfig:b,entryType:y,entryMessage:_,disclaimerText:v,disclaimerMarkdown:A,clientContext:k,searchPlaceholder:C,searchButtonLabel:I,searchConfig:j,suggestionButtonConfig:W,messageAlignment:F,autoScroll:ee,promptsConfig:ue,resetConversationMessage:me,conversationHistory:$,messagingConfig:ne,__features:re,children:de})=>x.jsx(Kv,{mode:e,baseUrl:r,apiKey:t,apiToken:n,logoUrl:o,headerText:a,headerConfig:u,entryMessage:_,theme:c,globalClassName:h,openLinksInNewTab:d,searchPlaceholder:C,searchButtonLabel:I,searchConfig:j,suggestionButtonConfig:W,messageAlignment:F,autoScroll:ee,componentConfig:b,clientContext:k,disclaimerMarkdown:A,disclaimerText:v,resetConversationMessage:me,conversationHistory:$,isDevelopment:p,__features:re,routingAttributes:ne==null?void 0:ne.routingAttributes,enableDownloadTranscript:ne==null?void 0:ne.enableDownloadTranscript,children:x.jsx(WA,{entryType:y,componentConfig:b,componentType:g,children:x.jsx(RA,{promptsConfig:ue,children:x.jsx(Eg,{scrt2Url:(ne==null?void 0:ne.scrt2Url)||"",orgId:(ne==null?void 0:ne.orgId)||"",esDeveloperName:(ne==null?void 0:ne.esDeveloperName)||"",routingAttributes:(ne==null?void 0:ne.routingAttributes)||{},capabilitiesVersion:ne==null?void 0:ne.capabilitiesVersion,enableLogging:p,children:de})})})}),Fi=()=>{const e=q.useContext(Lg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e};var of={exports:{}},cn={},sf={exports:{}},af={};var Mg;function GA(){return Mg||(Mg=1,(function(e){function t(z,J){var w=z.length;z.push(J);e:for(;0<w;){var N=w-1>>>1,Y=z[N];if(0<o(Y,J))z[N]=J,z[w]=Y,w=N;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var J=z[0],w=z.pop();if(w!==J){z[0]=w;e:for(var N=0,Y=z.length,O=Y>>>1;N<O;){var ye=2*(N+1)-1,Ce=z[ye],Ie=ye+1,He=z[Ie];if(0>o(Ce,w))Ie<Y&&0>o(He,Ce)?(z[N]=He,z[Ie]=w,N=Ie):(z[N]=Ce,z[ye]=w,N=ye);else if(Ie<Y&&0>o(He,w))z[N]=He,z[Ie]=w,N=Ie;else break e}}return J}function o(z,J){var w=z.sortIndex-J.sortIndex;return w!==0?w:z.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],h=[],p=1,g=null,b=3,y=!1,_=!1,v=!1,A=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(z){for(var J=n(h);J!==null;){if(J.callback===null)r(h);else if(J.startTime<=z)r(h),J.sortIndex=J.expirationTime,t(d,J);else break;J=n(h)}}function j(z){if(v=!1,I(z),!_)if(n(d)!==null)_=!0,ke(W);else{var J=n(h);J!==null&&ae(j,J.startTime-z)}}function W(z,J){_=!1,v&&(v=!1,k(ue),ue=-1),y=!0;var w=b;try{for(I(J),g=n(d);g!==null&&(!(g.expirationTime>J)||z&&!ne());){var N=g.callback;if(typeof N=="function"){g.callback=null,b=g.priorityLevel;var Y=N(g.expirationTime<=J);J=e.unstable_now(),typeof Y=="function"?g.callback=Y:g===n(d)&&r(d),I(J)}else r(d);g=n(d)}if(g!==null)var O=!0;else{var ye=n(h);ye!==null&&ae(j,ye.startTime-J),O=!1}return O}finally{g=null,b=w,y=!1}}var F=!1,ee=null,ue=-1,me=5,$=-1;function ne(){return!(e.unstable_now()-$<me)}function re(){if(ee!==null){var z=e.unstable_now();$=z;var J=!0;try{J=ee(!0,z)}finally{J?de():(F=!1,ee=null)}}else F=!1}var de;if(typeof C=="function")de=function(){C(re)};else if(typeof MessageChannel!="undefined"){var se=new MessageChannel,be=se.port2;se.port1.onmessage=re,de=function(){be.postMessage(null)}}else de=function(){A(re,0)};function ke(z){ee=z,F||(F=!0,de())}function ae(z,J){ue=A(function(){z(e.unstable_now())},J)}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(z){z.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,ke(W))},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):me=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(z){switch(b){case 1:case 2:case 3:var J=3;break;default:J=b}var w=b;b=J;try{return z()}finally{b=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(z,J){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var w=b;b=z;try{return J()}finally{b=w}},e.unstable_scheduleCallback=function(z,J,w){var N=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?N+w:N):w=N,z){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=w+Y,z={id:p++,callback:J,priorityLevel:z,startTime:w,expirationTime:Y,sortIndex:-1},w>N?(z.sortIndex=w,t(h,z),n(d)===null&&z===n(h)&&(v?(k(ue),ue=-1):v=!0,ae(j,w-N))):(z.sortIndex=Y,t(d,z),_||y||(_=!0,ke(W))),z},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(z){var J=b;return function(){var w=b;b=J;try{return z.apply(this,arguments)}finally{b=w}}}})(af)),af}var Fg;function XA(){return Fg||(Fg=1,sf.exports=GA()),sf.exports}var Bg;function KA(){if(Bg)return cn;Bg=1;var e=yo(),t=XA();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function b(i){return d.call(g,i)?!0:d.call(p,i)?!1:h.test(i)?g[i]=!0:(p[i]=!0,!1)}function y(i,s,l,f){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,s,l,f){if(s===null||typeof s=="undefined"||y(i,s,l,f))return!0;if(f)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(i,s,l,f,E,T,S){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=T,this.removeEmptyString=S}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){A[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];A[s]=new v(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){A[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){A[i]=new v(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){A[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){A[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){A[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){A[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){A[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var k=/[\-:]([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 s=i.replace(k,C);A[s]=new v(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(k,C);A[s]=new v(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(k,C);A[s]=new v(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),A.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){A[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function I(i,s,l,f){var E=A.hasOwnProperty(s)?A[s]:null;(E!==null?E.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,E,f)&&(l=null),f||E===null?b(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(s=E.attributeName,f=E.attributeNamespace,l===null?i.removeAttribute(s):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,f?i.setAttributeNS(f,s,l):i.setAttribute(s,l))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),F=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),ue=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),ne=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),ke=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),z=Symbol.iterator;function J(i){return i===null||typeof i!="object"?null:(i=z&&i[z]||i["@@iterator"],typeof i=="function"?i:null)}var w=Object.assign,N;function Y(i){if(N===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);N=s&&s[1]||""}return`
|
|
17
17
|
`+N+i}var O=!1;function ye(i,s){if(!i||O)return"";O=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(Z){var f=Z}Reflect.construct(i,[],s)}else{try{s.call()}catch(Z){f=Z}i.call(s.prototype)}else{try{throw Error()}catch(Z){f=Z}i()}}catch(Z){if(Z&&f&&typeof Z.stack=="string"){for(var E=Z.stack.split(`
|
|
18
18
|
`),T=f.stack.split(`
|
|
19
19
|
`),S=E.length-1,D=T.length-1;1<=S&&0<=D&&E[S]!==T[D];)D--;for(;1<=S&&0<=D;S--,D--)if(E[S]!==T[D]){if(S!==1||D!==1)do if(S--,D--,0>D||E[S]!==T[D]){var H=`
|
|
20
|
-
`+E[S].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=S&&0<=D);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?q(i):""}function ke(i){switch(i.tag){case 5:return q(i.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return i=ye(i.type,!1),i;case 11:return i=ye(i.type.render,!1),i;case 1:return i=ye(i.type,!0),i;default:return""}}function Ie(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 ee:return"Fragment";case F:return"Portal";case pe:return"Profiler";case ce:return"StrictMode";case de:return"Suspense";case oe:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ne:return(i.displayName||"Context")+".Consumer";case U:return(i._context.displayName||"Context")+".Provider";case ae:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case be:return s=i.displayName||null,s!==null?s:Ie(i.type)||"Memo";case Ce:s=i._payload,i=i._init;try{return Ie(i(s))}catch(l){}}return null}function He(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ie(s);case 8:return s===ce?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Se(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ye(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function dt(i){var s=Ye(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),f=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,T=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(S){f=""+S,T.call(this,S)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return f},setValue:function(S){f=""+S},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function mn(i){i._valueTracker||(i._valueTracker=dt(i))}function to(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),f="";return i&&(f=Ye(i)?i.checked?"true":"false":i.value),i=f,i!==l?(s.setValue(i),!0):!1}function si(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function ir(i,s){var l=s.checked;return w({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Ia(i,s){var l=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;l=Se(s.value!=null?s.value:l),i._wrapperState={initialChecked:f,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Ra(i,s){s=s.checked,s!=null&&I(i,"checked",s,!1)}function as(i,s){Ra(i,s);var l=Se(s.value),f=s.type;if(l!=null)f==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?us(i,s.type,l):s.hasOwnProperty("defaultValue")&&us(i,s.type,Se(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Kl(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function us(i,s,l){(s!=="number"||si(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var ai=Array.isArray;function ui(i,s,l,f){if(i=i.options,s){s={};for(var E=0;E<l.length;E++)s["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=s.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&f&&(i[l].defaultSelected=!0)}else{for(l=""+Se(l),s=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,f&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function La(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return w({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Ql(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(ai(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Se(l)}}function Jl(i,s){var l=Se(s.value),f=Se(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),f!=null&&(i.defaultValue=""+f)}function Zl(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function re(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 _e(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?re(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Be,We=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,f,E){MSApp.execUnsafeLocalFunction(function(){return i(s,l,f,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Be.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Je(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var $t={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},Hr=["Webkit","ms","Moz","O"];Object.keys($t).forEach(function(i){Hr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),$t[s]=$t[i]})});function zn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||$t.hasOwnProperty(i)&&$t[i]?(""+s).trim():s+"px"}function li(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var f=l.indexOf("--")===0,E=zn(l,s[l],f);l==="float"&&(l="cssFloat"),f?i.setProperty(l,E):i[l]=E}}var no=w({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 Vt(i,s){if(s){if(no[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Ar(i,s){if(i.indexOf("-")===-1)return typeof s.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 Nn=null;function Tp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var bp=null,ls=null,cs=null;function T_(i){if(i=nu(i)){if(typeof bp!="function")throw Error(n(280));var s=i.stateNode;s&&(s=xc(s),bp(i.stateNode,i.type,s))}}function b_(i){ls?cs?cs.push(i):cs=[i]:ls=i}function __(){if(ls){var i=ls,s=cs;if(cs=ls=null,T_(i),s)for(i=0;i<s.length;i++)T_(s[i])}}function x_(i,s){return i(s)}function w_(){}var _p=!1;function S_(i,s,l){if(_p)return i(s,l);_p=!0;try{return x_(i,s,l)}finally{_p=!1,(ls!==null||cs!==null)&&(w_(),__())}}function Da(i,s){var l=i.stateNode;if(l===null)return null;var f=xc(l);if(f===null)return null;l=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var xp=!1;if(c)try{var Ma={};Object.defineProperty(Ma,"passive",{get:function(){xp=!0}}),window.addEventListener("test",Ma,Ma),window.removeEventListener("test",Ma,Ma)}catch(i){xp=!1}function U9(i,s,l,f,E,T,S,D,H){var Z=Array.prototype.slice.call(arguments,3);try{s.apply(l,Z)}catch(fe){this.onError(fe)}}var Fa=!1,ec=null,tc=!1,wp=null,H9={onError:function(i){Fa=!0,ec=i}};function z9(i,s,l,f,E,T,S,D,H){Fa=!1,ec=null,U9.apply(H9,arguments)}function j9(i,s,l,f,E,T,S,D,H){if(z9.apply(this,arguments),Fa){if(Fa){var Z=ec;Fa=!1,ec=null}else throw Error(n(198));tc||(tc=!0,wp=Z)}}function ro(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function v_(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function A_(i){if(ro(i)!==i)throw Error(n(188))}function $9(i){var s=i.alternate;if(!s){if(s=ro(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,f=s;;){var E=l.return;if(E===null)break;var T=E.alternate;if(T===null){if(f=E.return,f!==null){l=f;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===l)return A_(E),i;if(T===f)return A_(E),s;T=T.sibling}throw Error(n(188))}if(l.return!==f.return)l=E,f=T;else{for(var S=!1,D=E.child;D;){if(D===l){S=!0,l=E,f=T;break}if(D===f){S=!0,f=E,l=T;break}D=D.sibling}if(!S){for(D=T.child;D;){if(D===l){S=!0,l=T,f=E;break}if(D===f){S=!0,f=T,l=E;break}D=D.sibling}if(!S)throw Error(n(189))}}if(l.alternate!==f)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function C_(i){return i=$9(i),i!==null?k_(i):null}function k_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=k_(i);if(s!==null)return s;i=i.sibling}return null}var N_=t.unstable_scheduleCallback,O_=t.unstable_cancelCallback,V9=t.unstable_shouldYield,q9=t.unstable_requestPaint,vt=t.unstable_now,Y9=t.unstable_getCurrentPriorityLevel,Sp=t.unstable_ImmediatePriority,P_=t.unstable_UserBlockingPriority,nc=t.unstable_NormalPriority,W9=t.unstable_LowPriority,I_=t.unstable_IdlePriority,rc=null,Cr=null;function G9(i){if(Cr&&typeof Cr.onCommitFiberRoot=="function")try{Cr.onCommitFiberRoot(rc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var or=Math.clz32?Math.clz32:Q9,X9=Math.log,K9=Math.LN2;function Q9(i){return i>>>=0,i===0?32:31-(X9(i)/K9|0)|0}var ic=64,oc=4194304;function Ba(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function sc(i,s){var l=i.pendingLanes;if(l===0)return 0;var f=0,E=i.suspendedLanes,T=i.pingedLanes,S=l&268435455;if(S!==0){var D=S&~E;D!==0?f=Ba(D):(T&=S,T!==0&&(f=Ba(T)))}else S=l&~E,S!==0?f=Ba(S):T!==0&&(f=Ba(T));if(f===0)return 0;if(s!==0&&s!==f&&(s&E)===0&&(E=f&-f,T=s&-s,E>=T||E===16&&(T&4194240)!==0))return s;if((f&4)!==0&&(f|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=f;0<s;)l=31-or(s),E=1<<l,f|=i[l],s&=~E;return f}function J9(i,s){switch(i){case 1:case 2:case 4:return s+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 s+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 Z9(i,s){for(var l=i.suspendedLanes,f=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var S=31-or(T),D=1<<S,H=E[S];H===-1?((D&l)===0||(D&f)!==0)&&(E[S]=J9(D,s)):H<=s&&(i.expiredLanes|=D),T&=~D}}function vp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function R_(){var i=ic;return ic<<=1,(ic&4194240)===0&&(ic=64),i}function Ap(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Ua(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-or(s),i[s]=l}function eF(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-or(l),T=1<<E;s[E]=0,f[E]=-1,i[E]=-1,l&=~T}}function Cp(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var f=31-or(l),E=1<<f;E&s|i[f]&s&&(i[f]|=s),l&=~E}}var nt=0;function L_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var D_,kp,M_,F_,B_,Np=!1,ac=[],ci=null,di=null,fi=null,Ha=new Map,za=new Map,hi=[],tF="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function U_(i,s){switch(i){case"focusin":case"focusout":ci=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":fi=null;break;case"pointerover":case"pointerout":Ha.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":za.delete(s.pointerId)}}function ja(i,s,l,f,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:s,domEventName:l,eventSystemFlags:f,nativeEvent:T,targetContainers:[E]},s!==null&&(s=nu(s),s!==null&&kp(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function nF(i,s,l,f,E){switch(s){case"focusin":return ci=ja(ci,i,s,l,f,E),!0;case"dragenter":return di=ja(di,i,s,l,f,E),!0;case"mouseover":return fi=ja(fi,i,s,l,f,E),!0;case"pointerover":var T=E.pointerId;return Ha.set(T,ja(Ha.get(T)||null,i,s,l,f,E)),!0;case"gotpointercapture":return T=E.pointerId,za.set(T,ja(za.get(T)||null,i,s,l,f,E)),!0}return!1}function H_(i){var s=io(i.target);if(s!==null){var l=ro(s);if(l!==null){if(s=l.tag,s===13){if(s=v_(l),s!==null){i.blockedOn=s,B_(i.priority,function(){M_(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function uc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=Pp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var f=new l.constructor(l.type,l);Nn=f,l.target.dispatchEvent(f),Nn=null}else return s=nu(l),s!==null&&kp(s),i.blockedOn=l,!1;s.shift()}return!0}function z_(i,s,l){uc(i)&&l.delete(s)}function rF(){Np=!1,ci!==null&&uc(ci)&&(ci=null),di!==null&&uc(di)&&(di=null),fi!==null&&uc(fi)&&(fi=null),Ha.forEach(z_),za.forEach(z_)}function $a(i,s){i.blockedOn===s&&(i.blockedOn=null,Np||(Np=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,rF)))}function Va(i){function s(E){return $a(E,i)}if(0<ac.length){$a(ac[0],i);for(var l=1;l<ac.length;l++){var f=ac[l];f.blockedOn===i&&(f.blockedOn=null)}}for(ci!==null&&$a(ci,i),di!==null&&$a(di,i),fi!==null&&$a(fi,i),Ha.forEach(s),za.forEach(s),l=0;l<hi.length;l++)f=hi[l],f.blockedOn===i&&(f.blockedOn=null);for(;0<hi.length&&(l=hi[0],l.blockedOn===null);)H_(l),l.blockedOn===null&&hi.shift()}var ds=$.ReactCurrentBatchConfig,lc=!0;function iF(i,s,l,f){var E=nt,T=ds.transition;ds.transition=null;try{nt=1,Op(i,s,l,f)}finally{nt=E,ds.transition=T}}function oF(i,s,l,f){var E=nt,T=ds.transition;ds.transition=null;try{nt=4,Op(i,s,l,f)}finally{nt=E,ds.transition=T}}function Op(i,s,l,f){if(lc){var E=Pp(i,s,l,f);if(E===null)Gp(i,s,f,cc,l),U_(i,f);else if(nF(E,i,s,l,f))f.stopPropagation();else if(U_(i,f),s&4&&-1<tF.indexOf(i)){for(;E!==null;){var T=nu(E);if(T!==null&&D_(T),T=Pp(i,s,l,f),T===null&&Gp(i,s,f,cc,l),T===E)break;E=T}E!==null&&f.stopPropagation()}else Gp(i,s,f,null,l)}}var cc=null;function Pp(i,s,l,f){if(cc=null,i=Tp(f),i=io(i),i!==null)if(s=ro(i),s===null)i=null;else if(l=s.tag,l===13){if(i=v_(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return cc=i,null}function j_(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(Y9()){case Sp:return 1;case P_:return 4;case nc:case W9:return 16;case I_:return 536870912;default:return 16}default:return 16}}var pi=null,Ip=null,dc=null;function $_(){if(dc)return dc;var i,s=Ip,l=s.length,f,E="value"in pi?pi.value:pi.textContent,T=E.length;for(i=0;i<l&&s[i]===E[i];i++);var S=l-i;for(f=1;f<=S&&s[l-f]===E[T-f];f++);return dc=E.slice(i,1<f?1-f:void 0)}function fc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function hc(){return!0}function V_(){return!1}function On(i){function s(l,f,E,T,S){this._reactName=l,this._targetInst=E,this.type=f,this.nativeEvent=T,this.target=S,this.currentTarget=null;for(var D in i)i.hasOwnProperty(D)&&(l=i[D],this[D]=l?l(T):T[D]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?hc:V_,this.isPropagationStopped=V_,this}return w(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=hc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=hc)},persist:function(){},isPersistent:hc}),s}var fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rp=On(fs),qa=w({},fs,{view:0,detail:0}),sF=On(qa),Lp,Dp,Ya,pc=w({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fp,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!==Ya&&(Ya&&i.type==="mousemove"?(Lp=i.screenX-Ya.screenX,Dp=i.screenY-Ya.screenY):Dp=Lp=0,Ya=i),Lp)},movementY:function(i){return"movementY"in i?i.movementY:Dp}}),q_=On(pc),aF=w({},pc,{dataTransfer:0}),uF=On(aF),lF=w({},qa,{relatedTarget:0}),Mp=On(lF),cF=w({},fs,{animationName:0,elapsedTime:0,pseudoElement:0}),dF=On(cF),fF=w({},fs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),hF=On(fF),pF=w({},fs,{data:0}),Y_=On(pF),mF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gF={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"},EF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yF(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=EF[i])?!!s[i]:!1}function Fp(){return yF}var TF=w({},qa,{key:function(i){if(i.key){var s=mF[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=fc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?gF[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fp,charCode:function(i){return i.type==="keypress"?fc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?fc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),bF=On(TF),_F=w({},pc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),W_=On(_F),xF=w({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fp}),wF=On(xF),SF=w({},fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),vF=On(SF),AF=w({},pc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),CF=On(AF),kF=[9,13,27,32],Bp=c&&"CompositionEvent"in window,Wa=null;c&&"documentMode"in document&&(Wa=document.documentMode);var NF=c&&"TextEvent"in window&&!Wa,G_=c&&(!Bp||Wa&&8<Wa&&11>=Wa),X_=" ",K_=!1;function Q_(i,s){switch(i){case"keyup":return kF.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function J_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var hs=!1;function OF(i,s){switch(i){case"compositionend":return J_(s);case"keypress":return s.which!==32?null:(K_=!0,X_);case"textInput":return i=s.data,i===X_&&K_?null:i;default:return null}}function PF(i,s){if(hs)return i==="compositionend"||!Bp&&Q_(i,s)?(i=$_(),dc=Ip=pi=null,hs=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return G_&&s.locale!=="ko"?null:s.data;default:return null}}var IF={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Z_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!IF[i.type]:s==="textarea"}function ex(i,s,l,f){b_(f),s=Tc(s,"onChange"),0<s.length&&(l=new Rp("onChange","change",null,l,f),i.push({event:l,listeners:s}))}var Ga=null,Xa=null;function RF(i){yx(i,0)}function mc(i){var s=ys(i);if(to(s))return i}function LF(i,s){if(i==="change")return s}var tx=!1;if(c){var Up;if(c){var Hp="oninput"in document;if(!Hp){var nx=document.createElement("div");nx.setAttribute("oninput","return;"),Hp=typeof nx.oninput=="function"}Up=Hp}else Up=!1;tx=Up&&(!document.documentMode||9<document.documentMode)}function rx(){Ga&&(Ga.detachEvent("onpropertychange",ix),Xa=Ga=null)}function ix(i){if(i.propertyName==="value"&&mc(Xa)){var s=[];ex(s,Xa,i,Tp(i)),S_(RF,s)}}function DF(i,s,l){i==="focusin"?(rx(),Ga=s,Xa=l,Ga.attachEvent("onpropertychange",ix)):i==="focusout"&&rx()}function MF(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return mc(Xa)}function FF(i,s){if(i==="click")return mc(s)}function BF(i,s){if(i==="input"||i==="change")return mc(s)}function UF(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var sr=typeof Object.is=="function"?Object.is:UF;function Ka(i,s){if(sr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),f=Object.keys(s);if(l.length!==f.length)return!1;for(f=0;f<l.length;f++){var E=l[f];if(!d.call(s,E)||!sr(i[E],s[E]))return!1}return!0}function ox(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function sx(i,s){var l=ox(i);i=0;for(var f;l;){if(l.nodeType===3){if(f=i+l.textContent.length,i<=s&&f>=s)return{node:l,offset:s-i};i=f}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=ox(l)}}function ax(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?ax(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function ux(){for(var i=window,s=si();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(f){l=!1}if(l)i=s.contentWindow;else break;s=si(i.document)}return s}function zp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function HF(i){var s=ux(),l=i.focusedElem,f=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&ax(l.ownerDocument.documentElement,l)){if(f!==null&&zp(l)){if(s=f.start,i=f.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,T=Math.min(f.start,E);f=f.end===void 0?T:Math.min(f.end,E),!i.extend&&T>f&&(E=f,f=T,T=E),E=sx(l,T);var S=sx(l,f);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),T>f?(i.addRange(s),i.extend(S.node,S.offset)):(s.setEnd(S.node,S.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var zF=c&&"documentMode"in document&&11>=document.documentMode,ps=null,jp=null,Qa=null,$p=!1;function lx(i,s,l){var f=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;$p||ps==null||ps!==si(f)||(f=ps,"selectionStart"in f&&zp(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Qa&&Ka(Qa,f)||(Qa=f,f=Tc(jp,"onSelect"),0<f.length&&(s=new Rp("onSelect","select",null,s,l),i.push({event:s,listeners:f}),s.target=ps)))}function gc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var ms={animationend:gc("Animation","AnimationEnd"),animationiteration:gc("Animation","AnimationIteration"),animationstart:gc("Animation","AnimationStart"),transitionend:gc("Transition","TransitionEnd")},Vp={},cx={};c&&(cx=document.createElement("div").style,"AnimationEvent"in window||(delete ms.animationend.animation,delete ms.animationiteration.animation,delete ms.animationstart.animation),"TransitionEvent"in window||delete ms.transitionend.transition);function Ec(i){if(Vp[i])return Vp[i];if(!ms[i])return i;var s=ms[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in cx)return Vp[i]=s[l];return i}var dx=Ec("animationend"),fx=Ec("animationiteration"),hx=Ec("animationstart"),px=Ec("transitionend"),mx=new Map,gx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function mi(i,s){mx.set(i,s),a(s,[i])}for(var qp=0;qp<gx.length;qp++){var Yp=gx[qp],jF=Yp.toLowerCase(),$F=Yp[0].toUpperCase()+Yp.slice(1);mi(jF,"on"+$F)}mi(dx,"onAnimationEnd"),mi(fx,"onAnimationIteration"),mi(hx,"onAnimationStart"),mi("dblclick","onDoubleClick"),mi("focusin","onFocus"),mi("focusout","onBlur"),mi(px,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ja="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(" "),VF=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ja));function Ex(i,s,l){var f=i.type||"unknown-event";i.currentTarget=l,j9(f,s,void 0,i),i.currentTarget=null}function yx(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var f=i[l],E=f.event;f=f.listeners;e:{var T=void 0;if(s)for(var S=f.length-1;0<=S;S--){var D=f[S],H=D.instance,Z=D.currentTarget;if(D=D.listener,H!==T&&E.isPropagationStopped())break e;Ex(E,D,Z),T=H}else for(S=0;S<f.length;S++){if(D=f[S],H=D.instance,Z=D.currentTarget,D=D.listener,H!==T&&E.isPropagationStopped())break e;Ex(E,D,Z),T=H}}}if(tc)throw i=wp,tc=!1,wp=null,i}function ft(i,s){var l=s[em];l===void 0&&(l=s[em]=new Set);var f=i+"__bubble";l.has(f)||(Tx(s,i,2,!1),l.add(f))}function Wp(i,s,l){var f=0;s&&(f|=4),Tx(l,i,f,s)}var yc="_reactListening"+Math.random().toString(36).slice(2);function Za(i){if(!i[yc]){i[yc]=!0,r.forEach(function(l){l!=="selectionchange"&&(VF.has(l)||Wp(l,!1,i),Wp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[yc]||(s[yc]=!0,Wp("selectionchange",!1,s))}}function Tx(i,s,l,f){switch(j_(s)){case 1:var E=iF;break;case 4:E=oF;break;default:E=Op}l=E.bind(null,s,l,i),E=void 0,!xp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),f?E!==void 0?i.addEventListener(s,l,{capture:!0,passive:E}):i.addEventListener(s,l,!0):E!==void 0?i.addEventListener(s,l,{passive:E}):i.addEventListener(s,l,!1)}function Gp(i,s,l,f,E){var T=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var S=f.tag;if(S===3||S===4){var D=f.stateNode.containerInfo;if(D===E||D.nodeType===8&&D.parentNode===E)break;if(S===4)for(S=f.return;S!==null;){var H=S.tag;if((H===3||H===4)&&(H=S.stateNode.containerInfo,H===E||H.nodeType===8&&H.parentNode===E))return;S=S.return}for(;D!==null;){if(S=io(D),S===null)return;if(H=S.tag,H===5||H===6){f=T=S;continue e}D=D.parentNode}}f=f.return}S_(function(){var Z=T,fe=Tp(l),me=[];e:{var ue=mx.get(i);if(ue!==void 0){var xe=Rp,ve=i;switch(i){case"keypress":if(fc(l)===0)break e;case"keydown":case"keyup":xe=bF;break;case"focusin":ve="focus",xe=Mp;break;case"focusout":ve="blur",xe=Mp;break;case"beforeblur":case"afterblur":xe=Mp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":xe=q_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=uF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=wF;break;case dx:case fx:case hx:xe=dF;break;case px:xe=vF;break;case"scroll":xe=sF;break;case"wheel":xe=CF;break;case"copy":case"cut":case"paste":xe=hF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=W_}var Ne=(s&4)!==0,At=!Ne&&i==="scroll",X=Ne?ue!==null?ue+"Capture":null:ue;Ne=[];for(var V=Z,Q;V!==null;){Q=V;var Te=Q.stateNode;if(Q.tag===5&&Te!==null&&(Q=Te,X!==null&&(Te=Da(V,X),Te!=null&&Ne.push(eu(V,Te,Q)))),At)break;V=V.return}0<Ne.length&&(ue=new xe(ue,ve,null,l,fe),me.push({event:ue,listeners:Ne}))}}if((s&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",ue&&l!==Nn&&(ve=l.relatedTarget||l.fromElement)&&(io(ve)||ve[zr]))break e;if((xe||ue)&&(ue=fe.window===fe?fe:(ue=fe.ownerDocument)?ue.defaultView||ue.parentWindow:window,xe?(ve=l.relatedTarget||l.toElement,xe=Z,ve=ve?io(ve):null,ve!==null&&(At=ro(ve),ve!==At||ve.tag!==5&&ve.tag!==6)&&(ve=null)):(xe=null,ve=Z),xe!==ve)){if(Ne=q_,Te="onMouseLeave",X="onMouseEnter",V="mouse",(i==="pointerout"||i==="pointerover")&&(Ne=W_,Te="onPointerLeave",X="onPointerEnter",V="pointer"),At=xe==null?ue:ys(xe),Q=ve==null?ue:ys(ve),ue=new Ne(Te,V+"leave",xe,l,fe),ue.target=At,ue.relatedTarget=Q,Te=null,io(fe)===Z&&(Ne=new Ne(X,V+"enter",ve,l,fe),Ne.target=Q,Ne.relatedTarget=At,Te=Ne),At=Te,xe&&ve)t:{for(Ne=xe,X=ve,V=0,Q=Ne;Q;Q=gs(Q))V++;for(Q=0,Te=X;Te;Te=gs(Te))Q++;for(;0<V-Q;)Ne=gs(Ne),V--;for(;0<Q-V;)X=gs(X),Q--;for(;V--;){if(Ne===X||X!==null&&Ne===X.alternate)break t;Ne=gs(Ne),X=gs(X)}Ne=null}else Ne=null;xe!==null&&bx(me,ue,xe,Ne,!1),ve!==null&&At!==null&&bx(me,At,ve,Ne,!0)}}e:{if(ue=Z?ys(Z):window,xe=ue.nodeName&&ue.nodeName.toLowerCase(),xe==="select"||xe==="input"&&ue.type==="file")var Oe=LF;else if(Z_(ue))if(tx)Oe=BF;else{Oe=MF;var De=DF}else(xe=ue.nodeName)&&xe.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Oe=FF);if(Oe&&(Oe=Oe(i,Z))){ex(me,Oe,l,fe);break e}De&&De(i,ue,Z),i==="focusout"&&(De=ue._wrapperState)&&De.controlled&&ue.type==="number"&&us(ue,"number",ue.value)}switch(De=Z?ys(Z):window,i){case"focusin":(Z_(De)||De.contentEditable==="true")&&(ps=De,jp=Z,Qa=null);break;case"focusout":Qa=jp=ps=null;break;case"mousedown":$p=!0;break;case"contextmenu":case"mouseup":case"dragend":$p=!1,lx(me,l,fe);break;case"selectionchange":if(zF)break;case"keydown":case"keyup":lx(me,l,fe)}var Me;if(Bp)e:{switch(i){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else hs?Q_(i,l)&&(Ue="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ue="onCompositionStart");Ue&&(G_&&l.locale!=="ko"&&(hs||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&hs&&(Me=$_()):(pi=fe,Ip="value"in pi?pi.value:pi.textContent,hs=!0)),De=Tc(Z,Ue),0<De.length&&(Ue=new Y_(Ue,i,null,l,fe),me.push({event:Ue,listeners:De}),Me?Ue.data=Me:(Me=J_(l),Me!==null&&(Ue.data=Me)))),(Me=NF?OF(i,l):PF(i,l))&&(Z=Tc(Z,"onBeforeInput"),0<Z.length&&(fe=new Y_("onBeforeInput","beforeinput",null,l,fe),me.push({event:fe,listeners:Z}),fe.data=Me))}yx(me,s)})}function eu(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Tc(i,s){for(var l=s+"Capture",f=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=Da(i,l),T!=null&&f.unshift(eu(i,T,E)),T=Da(i,s),T!=null&&f.push(eu(i,T,E))),i=i.return}return f}function gs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function bx(i,s,l,f,E){for(var T=s._reactName,S=[];l!==null&&l!==f;){var D=l,H=D.alternate,Z=D.stateNode;if(H!==null&&H===f)break;D.tag===5&&Z!==null&&(D=Z,E?(H=Da(l,T),H!=null&&S.unshift(eu(l,H,D))):E||(H=Da(l,T),H!=null&&S.push(eu(l,H,D)))),l=l.return}S.length!==0&&i.push({event:s,listeners:S})}var qF=/\r\n?/g,YF=/\u0000|\uFFFD/g;function _x(i){return(typeof i=="string"?i:""+i).replace(qF,`
|
|
21
|
-
`).replace(YF,"")}function bc(i,s,l){if(s=_x(s),_x(i)!==s&&l)throw Error(n(425))}function _c(){}var Xp=null,Kp=null;function Qp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Jp=typeof setTimeout=="function"?setTimeout:void 0,WF=typeof clearTimeout=="function"?clearTimeout:void 0,xx=typeof Promise=="function"?Promise:void 0,GF=typeof queueMicrotask=="function"?queueMicrotask:typeof xx!="undefined"?function(i){return xx.resolve(null).then(i).catch(XF)}:Jp;function XF(i){setTimeout(function(){throw i})}function Zp(i,s){var l=s,f=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(f===0){i.removeChild(E),Va(s);return}f--}else l!=="$"&&l!=="$?"&&l!=="$!"||f++;l=E}while(l);Va(s)}function gi(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function wx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var Es=Math.random().toString(36).slice(2),kr="__reactFiber$"+Es,tu="__reactProps$"+Es,zr="__reactContainer$"+Es,em="__reactEvents$"+Es,KF="__reactListeners$"+Es,QF="__reactHandles$"+Es;function io(i){var s=i[kr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[zr]||l[kr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=wx(i);i!==null;){if(l=i[kr])return l;i=wx(i)}return s}i=l,l=i.parentNode}return null}function nu(i){return i=i[kr]||i[zr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ys(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function xc(i){return i[tu]||null}var tm=[],Ts=-1;function Ei(i){return{current:i}}function ht(i){0>Ts||(i.current=tm[Ts],tm[Ts]=null,Ts--)}function ct(i,s){Ts++,tm[Ts]=i.current,i.current=s}var yi={},Jt=Ei(yi),gn=Ei(!1),oo=yi;function bs(i,s){var l=i.type.contextTypes;if(!l)return yi;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in l)E[T]=s[T];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function En(i){return i=i.childContextTypes,i!=null}function wc(){ht(gn),ht(Jt)}function Sx(i,s,l){if(Jt.current!==yi)throw Error(n(168));ct(Jt,s),ct(gn,l)}function vx(i,s,l){var f=i.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return l;f=f.getChildContext();for(var E in f)if(!(E in s))throw Error(n(108,He(i)||"Unknown",E));return w({},l,f)}function Sc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||yi,oo=Jt.current,ct(Jt,i),ct(gn,gn.current),!0}function Ax(i,s,l){var f=i.stateNode;if(!f)throw Error(n(169));l?(i=vx(i,s,oo),f.__reactInternalMemoizedMergedChildContext=i,ht(gn),ht(Jt),ct(Jt,i)):ht(gn),ct(gn,l)}var jr=null,vc=!1,nm=!1;function Cx(i){jr===null?jr=[i]:jr.push(i)}function JF(i){vc=!0,Cx(i)}function Ti(){if(!nm&&jr!==null){nm=!0;var i=0,s=nt;try{var l=jr;for(nt=1;i<l.length;i++){var f=l[i];do f=f(!0);while(f!==null)}jr=null,vc=!1}catch(E){throw jr!==null&&(jr=jr.slice(i+1)),N_(Sp,Ti),E}finally{nt=s,nm=!1}}return null}var _s=[],xs=0,Ac=null,Cc=0,jn=[],$n=0,so=null,$r=1,Vr="";function ao(i,s){_s[xs++]=Cc,_s[xs++]=Ac,Ac=i,Cc=s}function kx(i,s,l){jn[$n++]=$r,jn[$n++]=Vr,jn[$n++]=so,so=i;var f=$r;i=Vr;var E=32-or(f)-1;f&=~(1<<E),l+=1;var T=32-or(s)+E;if(30<T){var S=E-E%5;T=(f&(1<<S)-1).toString(32),f>>=S,E-=S,$r=1<<32-or(s)+E|l<<E|f,Vr=T+i}else $r=1<<T|l<<E|f,Vr=i}function rm(i){i.return!==null&&(ao(i,1),kx(i,1,0))}function im(i){for(;i===Ac;)Ac=_s[--xs],_s[xs]=null,Cc=_s[--xs],_s[xs]=null;for(;i===so;)so=jn[--$n],jn[$n]=null,Vr=jn[--$n],jn[$n]=null,$r=jn[--$n],jn[$n]=null}var Pn=null,In=null,Et=!1,ar=null;function Nx(i,s){var l=Wn(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function Ox(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Pn=i,In=gi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Pn=i,In=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=so!==null?{id:$r,overflow:Vr}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=Wn(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Pn=i,In=null,!0):!1;default:return!1}}function om(i){return(i.mode&1)!==0&&(i.flags&128)===0}function sm(i){if(Et){var s=In;if(s){var l=s;if(!Ox(i,s)){if(om(i))throw Error(n(418));s=gi(l.nextSibling);var f=Pn;s&&Ox(i,s)?Nx(f,l):(i.flags=i.flags&-4097|2,Et=!1,Pn=i)}}else{if(om(i))throw Error(n(418));i.flags=i.flags&-4097|2,Et=!1,Pn=i}}}function Px(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Pn=i}function kc(i){if(i!==Pn)return!1;if(!Et)return Px(i),Et=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Qp(i.type,i.memoizedProps)),s&&(s=In)){if(om(i))throw Ix(),Error(n(418));for(;s;)Nx(i,s),s=gi(s.nextSibling)}if(Px(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){In=gi(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}In=null}}else In=Pn?gi(i.stateNode.nextSibling):null;return!0}function Ix(){for(var i=In;i;)i=gi(i.nextSibling)}function ws(){In=Pn=null,Et=!1}function am(i){ar===null?ar=[i]:ar.push(i)}var ZF=$.ReactCurrentBatchConfig;function ru(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var f=l.stateNode}if(!f)throw Error(n(147,i));var E=f,T=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===T?s.ref:(s=function(S){var D=E.refs;S===null?delete D[T]:D[T]=S},s._stringRef=T,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Nc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Rx(i){var s=i._init;return s(i._payload)}function Lx(i){function s(X,V){if(i){var Q=X.deletions;Q===null?(X.deletions=[V],X.flags|=16):Q.push(V)}}function l(X,V){if(!i)return null;for(;V!==null;)s(X,V),V=V.sibling;return null}function f(X,V){for(X=new Map;V!==null;)V.key!==null?X.set(V.key,V):X.set(V.index,V),V=V.sibling;return X}function E(X,V){return X=Ci(X,V),X.index=0,X.sibling=null,X}function T(X,V,Q){return X.index=Q,i?(Q=X.alternate,Q!==null?(Q=Q.index,Q<V?(X.flags|=2,V):Q):(X.flags|=2,V)):(X.flags|=1048576,V)}function S(X){return i&&X.alternate===null&&(X.flags|=2),X}function D(X,V,Q,Te){return V===null||V.tag!==6?(V=Jm(Q,X.mode,Te),V.return=X,V):(V=E(V,Q),V.return=X,V)}function H(X,V,Q,Te){var Oe=Q.type;return Oe===ee?fe(X,V,Q.props.children,Te,Q.key):V!==null&&(V.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===Ce&&Rx(Oe)===V.type)?(Te=E(V,Q.props),Te.ref=ru(X,V,Q),Te.return=X,Te):(Te=Zc(Q.type,Q.key,Q.props,null,X.mode,Te),Te.ref=ru(X,V,Q),Te.return=X,Te)}function Z(X,V,Q,Te){return V===null||V.tag!==4||V.stateNode.containerInfo!==Q.containerInfo||V.stateNode.implementation!==Q.implementation?(V=Zm(Q,X.mode,Te),V.return=X,V):(V=E(V,Q.children||[]),V.return=X,V)}function fe(X,V,Q,Te,Oe){return V===null||V.tag!==7?(V=go(Q,X.mode,Te,Oe),V.return=X,V):(V=E(V,Q),V.return=X,V)}function me(X,V,Q){if(typeof V=="string"&&V!==""||typeof V=="number")return V=Jm(""+V,X.mode,Q),V.return=X,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case W:return Q=Zc(V.type,V.key,V.props,null,X.mode,Q),Q.ref=ru(X,null,V),Q.return=X,Q;case F:return V=Zm(V,X.mode,Q),V.return=X,V;case Ce:var Te=V._init;return me(X,Te(V._payload),Q)}if(ai(V)||J(V))return V=go(V,X.mode,Q,null),V.return=X,V;Nc(X,V)}return null}function ue(X,V,Q,Te){var Oe=V!==null?V.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Oe!==null?null:D(X,V,""+Q,Te);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case W:return Q.key===Oe?H(X,V,Q,Te):null;case F:return Q.key===Oe?Z(X,V,Q,Te):null;case Ce:return Oe=Q._init,ue(X,V,Oe(Q._payload),Te)}if(ai(Q)||J(Q))return Oe!==null?null:fe(X,V,Q,Te,null);Nc(X,Q)}return null}function xe(X,V,Q,Te,Oe){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return X=X.get(Q)||null,D(V,X,""+Te,Oe);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case W:return X=X.get(Te.key===null?Q:Te.key)||null,H(V,X,Te,Oe);case F:return X=X.get(Te.key===null?Q:Te.key)||null,Z(V,X,Te,Oe);case Ce:var De=Te._init;return xe(X,V,Q,De(Te._payload),Oe)}if(ai(Te)||J(Te))return X=X.get(Q)||null,fe(V,X,Te,Oe,null);Nc(V,Te)}return null}function ve(X,V,Q,Te){for(var Oe=null,De=null,Me=V,Ue=V=0,jt=null;Me!==null&&Ue<Q.length;Ue++){Me.index>Ue?(jt=Me,Me=null):jt=Me.sibling;var et=ue(X,Me,Q[Ue],Te);if(et===null){Me===null&&(Me=jt);break}i&&Me&&et.alternate===null&&s(X,Me),V=T(et,V,Ue),De===null?Oe=et:De.sibling=et,De=et,Me=jt}if(Ue===Q.length)return l(X,Me),Et&&ao(X,Ue),Oe;if(Me===null){for(;Ue<Q.length;Ue++)Me=me(X,Q[Ue],Te),Me!==null&&(V=T(Me,V,Ue),De===null?Oe=Me:De.sibling=Me,De=Me);return Et&&ao(X,Ue),Oe}for(Me=f(X,Me);Ue<Q.length;Ue++)jt=xe(Me,X,Ue,Q[Ue],Te),jt!==null&&(i&&jt.alternate!==null&&Me.delete(jt.key===null?Ue:jt.key),V=T(jt,V,Ue),De===null?Oe=jt:De.sibling=jt,De=jt);return i&&Me.forEach(function(ki){return s(X,ki)}),Et&&ao(X,Ue),Oe}function Ne(X,V,Q,Te){var Oe=J(Q);if(typeof Oe!="function")throw Error(n(150));if(Q=Oe.call(Q),Q==null)throw Error(n(151));for(var De=Oe=null,Me=V,Ue=V=0,jt=null,et=Q.next();Me!==null&&!et.done;Ue++,et=Q.next()){Me.index>Ue?(jt=Me,Me=null):jt=Me.sibling;var ki=ue(X,Me,et.value,Te);if(ki===null){Me===null&&(Me=jt);break}i&&Me&&ki.alternate===null&&s(X,Me),V=T(ki,V,Ue),De===null?Oe=ki:De.sibling=ki,De=ki,Me=jt}if(et.done)return l(X,Me),Et&&ao(X,Ue),Oe;if(Me===null){for(;!et.done;Ue++,et=Q.next())et=me(X,et.value,Te),et!==null&&(V=T(et,V,Ue),De===null?Oe=et:De.sibling=et,De=et);return Et&&ao(X,Ue),Oe}for(Me=f(X,Me);!et.done;Ue++,et=Q.next())et=xe(Me,X,Ue,et.value,Te),et!==null&&(i&&et.alternate!==null&&Me.delete(et.key===null?Ue:et.key),V=T(et,V,Ue),De===null?Oe=et:De.sibling=et,De=et);return i&&Me.forEach(function(IB){return s(X,IB)}),Et&&ao(X,Ue),Oe}function At(X,V,Q,Te){if(typeof Q=="object"&&Q!==null&&Q.type===ee&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case W:e:{for(var Oe=Q.key,De=V;De!==null;){if(De.key===Oe){if(Oe=Q.type,Oe===ee){if(De.tag===7){l(X,De.sibling),V=E(De,Q.props.children),V.return=X,X=V;break e}}else if(De.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===Ce&&Rx(Oe)===De.type){l(X,De.sibling),V=E(De,Q.props),V.ref=ru(X,De,Q),V.return=X,X=V;break e}l(X,De);break}else s(X,De);De=De.sibling}Q.type===ee?(V=go(Q.props.children,X.mode,Te,Q.key),V.return=X,X=V):(Te=Zc(Q.type,Q.key,Q.props,null,X.mode,Te),Te.ref=ru(X,V,Q),Te.return=X,X=Te)}return S(X);case F:e:{for(De=Q.key;V!==null;){if(V.key===De)if(V.tag===4&&V.stateNode.containerInfo===Q.containerInfo&&V.stateNode.implementation===Q.implementation){l(X,V.sibling),V=E(V,Q.children||[]),V.return=X,X=V;break e}else{l(X,V);break}else s(X,V);V=V.sibling}V=Zm(Q,X.mode,Te),V.return=X,X=V}return S(X);case Ce:return De=Q._init,At(X,V,De(Q._payload),Te)}if(ai(Q))return ve(X,V,Q,Te);if(J(Q))return Ne(X,V,Q,Te);Nc(X,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,V!==null&&V.tag===6?(l(X,V.sibling),V=E(V,Q),V.return=X,X=V):(l(X,V),V=Jm(Q,X.mode,Te),V.return=X,X=V),S(X)):l(X,V)}return At}var Ss=Lx(!0),Dx=Lx(!1),Oc=Ei(null),Pc=null,vs=null,um=null;function lm(){um=vs=Pc=null}function cm(i){var s=Oc.current;ht(Oc),i._currentValue=s}function dm(i,s,l){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===l)break;i=i.return}}function As(i,s){Pc=i,um=vs=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(yn=!0),i.firstContext=null)}function Vn(i){var s=i._currentValue;if(um!==i)if(i={context:i,memoizedValue:s,next:null},vs===null){if(Pc===null)throw Error(n(308));vs=i,Pc.dependencies={lanes:0,firstContext:i}}else vs=vs.next=i;return s}var uo=null;function fm(i){uo===null?uo=[i]:uo.push(i)}function Mx(i,s,l,f){var E=s.interleaved;return E===null?(l.next=l,fm(s)):(l.next=E.next,E.next=l),s.interleaved=l,qr(i,f)}function qr(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var bi=!1;function hm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fx(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Yr(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function _i(i,s,l){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(Ze&2)!==0){var E=f.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),f.pending=s,qr(i,l)}return E=f.interleaved,E===null?(s.next=s,fm(f)):(s.next=E.next,E.next=s),f.interleaved=s,qr(i,l)}function Ic(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,Cp(i,l)}}function Bx(i,s){var l=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,l===f)){var E=null,T=null;if(l=l.firstBaseUpdate,l!==null){do{var S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};T===null?E=T=S:T=T.next=S,l=l.next}while(l!==null);T===null?E=T=s:T=T.next=s}else E=T=s;l={baseState:f.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:f.shared,effects:f.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function Rc(i,s,l,f){var E=i.updateQueue;bi=!1;var T=E.firstBaseUpdate,S=E.lastBaseUpdate,D=E.shared.pending;if(D!==null){E.shared.pending=null;var H=D,Z=H.next;H.next=null,S===null?T=Z:S.next=Z,S=H;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,D=fe.lastBaseUpdate,D!==S&&(D===null?fe.firstBaseUpdate=Z:D.next=Z,fe.lastBaseUpdate=H))}if(T!==null){var me=E.baseState;S=0,fe=Z=H=null,D=T;do{var ue=D.lane,xe=D.eventTime;if((f&ue)===ue){fe!==null&&(fe=fe.next={eventTime:xe,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var ve=i,Ne=D;switch(ue=s,xe=l,Ne.tag){case 1:if(ve=Ne.payload,typeof ve=="function"){me=ve.call(xe,me,ue);break e}me=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ne.payload,ue=typeof ve=="function"?ve.call(xe,me,ue):ve,ue==null)break e;me=w({},me,ue);break e;case 2:bi=!0}}D.callback!==null&&D.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[D]:ue.push(D))}else xe={eventTime:xe,lane:ue,tag:D.tag,payload:D.payload,callback:D.callback,next:null},fe===null?(Z=fe=xe,H=me):fe=fe.next=xe,S|=ue;if(D=D.next,D===null){if(D=E.shared.pending,D===null)break;ue=D,D=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(fe===null&&(H=me),E.baseState=H,E.firstBaseUpdate=Z,E.lastBaseUpdate=fe,s=E.shared.interleaved,s!==null){E=s;do S|=E.lane,E=E.next;while(E!==s)}else T===null&&(E.shared.lanes=0);fo|=S,i.lanes=S,i.memoizedState=me}}function Ux(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var f=i[s],E=f.callback;if(E!==null){if(f.callback=null,f=l,typeof E!="function")throw Error(n(191,E));E.call(f)}}}var iu={},Nr=Ei(iu),ou=Ei(iu),su=Ei(iu);function lo(i){if(i===iu)throw Error(n(174));return i}function pm(i,s){switch(ct(su,s),ct(ou,i),ct(Nr,iu),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:_e(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=_e(s,i)}ht(Nr),ct(Nr,s)}function Cs(){ht(Nr),ht(ou),ht(su)}function Hx(i){lo(su.current);var s=lo(Nr.current),l=_e(s,i.type);s!==l&&(ct(ou,i),ct(Nr,l))}function mm(i){ou.current===i&&(ht(Nr),ht(ou))}var yt=Ei(0);function Lc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var gm=[];function Em(){for(var i=0;i<gm.length;i++)gm[i]._workInProgressVersionPrimary=null;gm.length=0}var Dc=$.ReactCurrentDispatcher,ym=$.ReactCurrentBatchConfig,co=0,Tt=null,Rt=null,Ht=null,Mc=!1,au=!1,uu=0,eB=0;function Zt(){throw Error(n(321))}function Tm(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!sr(i[l],s[l]))return!1;return!0}function bm(i,s,l,f,E,T){if(co=T,Tt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Dc.current=i===null||i.memoizedState===null?iB:oB,i=l(f,E),au){T=0;do{if(au=!1,uu=0,25<=T)throw Error(n(301));T+=1,Ht=Rt=null,s.updateQueue=null,Dc.current=sB,i=l(f,E)}while(au)}if(Dc.current=Uc,s=Rt!==null&&Rt.next!==null,co=0,Ht=Rt=Tt=null,Mc=!1,s)throw Error(n(300));return i}function _m(){var i=uu!==0;return uu=0,i}function Or(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?Tt.memoizedState=Ht=i:Ht=Ht.next=i,Ht}function qn(){if(Rt===null){var i=Tt.alternate;i=i!==null?i.memoizedState:null}else i=Rt.next;var s=Ht===null?Tt.memoizedState:Ht.next;if(s!==null)Ht=s,Rt=i;else{if(i===null)throw Error(n(310));Rt=i,i={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},Ht===null?Tt.memoizedState=Ht=i:Ht=Ht.next=i}return Ht}function lu(i,s){return typeof s=="function"?s(i):s}function xm(i){var s=qn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=Rt,E=f.baseQueue,T=l.pending;if(T!==null){if(E!==null){var S=E.next;E.next=T.next,T.next=S}f.baseQueue=E=T,l.pending=null}if(E!==null){T=E.next,f=f.baseState;var D=S=null,H=null,Z=T;do{var fe=Z.lane;if((co&fe)===fe)H!==null&&(H=H.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),f=Z.hasEagerState?Z.eagerState:i(f,Z.action);else{var me={lane:fe,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};H===null?(D=H=me,S=f):H=H.next=me,Tt.lanes|=fe,fo|=fe}Z=Z.next}while(Z!==null&&Z!==T);H===null?S=f:H.next=D,sr(f,s.memoizedState)||(yn=!0),s.memoizedState=f,s.baseState=S,s.baseQueue=H,l.lastRenderedState=f}if(i=l.interleaved,i!==null){E=i;do T=E.lane,Tt.lanes|=T,fo|=T,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function wm(i){var s=qn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=l.dispatch,E=l.pending,T=s.memoizedState;if(E!==null){l.pending=null;var S=E=E.next;do T=i(T,S.action),S=S.next;while(S!==E);sr(T,s.memoizedState)||(yn=!0),s.memoizedState=T,s.baseQueue===null&&(s.baseState=T),l.lastRenderedState=T}return[T,f]}function zx(){}function jx(i,s){var l=Tt,f=qn(),E=s(),T=!sr(f.memoizedState,E);if(T&&(f.memoizedState=E,yn=!0),f=f.queue,Sm(qx.bind(null,l,f,i),[i]),f.getSnapshot!==s||T||Ht!==null&&Ht.memoizedState.tag&1){if(l.flags|=2048,cu(9,Vx.bind(null,l,f,E,s),void 0,null),zt===null)throw Error(n(349));(co&30)!==0||$x(l,s,E)}return E}function $x(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Tt.updateQueue,s===null?(s={lastEffect:null,stores:null},Tt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function Vx(i,s,l,f){s.value=l,s.getSnapshot=f,Yx(s)&&Wx(i)}function qx(i,s,l){return l(function(){Yx(s)&&Wx(i)})}function Yx(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!sr(i,l)}catch(f){return!0}}function Wx(i){var s=qr(i,1);s!==null&&dr(s,i,1,-1)}function Gx(i){var s=Or();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:lu,lastRenderedState:i},s.queue=i,i=i.dispatch=rB.bind(null,Tt,i),[s.memoizedState,i]}function cu(i,s,l,f){return i={tag:i,create:s,destroy:l,deps:f,next:null},s=Tt.updateQueue,s===null?(s={lastEffect:null,stores:null},Tt.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(f=l.next,l.next=i,i.next=f,s.lastEffect=i)),i}function Xx(){return qn().memoizedState}function Fc(i,s,l,f){var E=Or();Tt.flags|=i,E.memoizedState=cu(1|s,l,void 0,f===void 0?null:f)}function Bc(i,s,l,f){var E=qn();f=f===void 0?null:f;var T=void 0;if(Rt!==null){var S=Rt.memoizedState;if(T=S.destroy,f!==null&&Tm(f,S.deps)){E.memoizedState=cu(s,l,T,f);return}}Tt.flags|=i,E.memoizedState=cu(1|s,l,T,f)}function Kx(i,s){return Fc(8390656,8,i,s)}function Sm(i,s){return Bc(2048,8,i,s)}function Qx(i,s){return Bc(4,2,i,s)}function Jx(i,s){return Bc(4,4,i,s)}function Zx(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function ew(i,s,l){return l=l!=null?l.concat([i]):null,Bc(4,4,Zx.bind(null,s,i),l)}function vm(){}function tw(i,s){var l=qn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Tm(s,f[1])?f[0]:(l.memoizedState=[i,s],i)}function nw(i,s){var l=qn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Tm(s,f[1])?f[0]:(i=i(),l.memoizedState=[i,s],i)}function rw(i,s,l){return(co&21)===0?(i.baseState&&(i.baseState=!1,yn=!0),i.memoizedState=l):(sr(l,s)||(l=R_(),Tt.lanes|=l,fo|=l,i.baseState=!0),s)}function tB(i,s){var l=nt;nt=l!==0&&4>l?l:4,i(!0);var f=ym.transition;ym.transition={};try{i(!1),s()}finally{nt=l,ym.transition=f}}function iw(){return qn().memoizedState}function nB(i,s,l){var f=vi(i);if(l={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null},ow(i))sw(s,l);else if(l=Mx(i,s,l,f),l!==null){var E=sn();dr(l,i,f,E),aw(l,s,f)}}function rB(i,s,l){var f=vi(i),E={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null};if(ow(i))sw(s,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=s.lastRenderedReducer,T!==null))try{var S=s.lastRenderedState,D=T(S,l);if(E.hasEagerState=!0,E.eagerState=D,sr(D,S)){var H=s.interleaved;H===null?(E.next=E,fm(s)):(E.next=H.next,H.next=E),s.interleaved=E;return}}catch(Z){}l=Mx(i,s,E,f),l!==null&&(E=sn(),dr(l,i,f,E),aw(l,s,f))}}function ow(i){var s=i.alternate;return i===Tt||s!==null&&s===Tt}function sw(i,s){au=Mc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function aw(i,s,l){if((l&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,Cp(i,l)}}var Uc={readContext:Vn,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useInsertionEffect:Zt,useLayoutEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useMutableSource:Zt,useSyncExternalStore:Zt,useId:Zt,unstable_isNewReconciler:!1},iB={readContext:Vn,useCallback:function(i,s){return Or().memoizedState=[i,s===void 0?null:s],i},useContext:Vn,useEffect:Kx,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Fc(4194308,4,Zx.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Fc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Fc(4,2,i,s)},useMemo:function(i,s){var l=Or();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var f=Or();return s=l!==void 0?l(s):s,f.memoizedState=f.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},f.queue=i,i=i.dispatch=nB.bind(null,Tt,i),[f.memoizedState,i]},useRef:function(i){var s=Or();return i={current:i},s.memoizedState=i},useState:Gx,useDebugValue:vm,useDeferredValue:function(i){return Or().memoizedState=i},useTransition:function(){var i=Gx(!1),s=i[0];return i=tB.bind(null,i[1]),Or().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var f=Tt,E=Or();if(Et){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),zt===null)throw Error(n(349));(co&30)!==0||$x(f,s,l)}E.memoizedState=l;var T={value:l,getSnapshot:s};return E.queue=T,Kx(qx.bind(null,f,T,i),[i]),f.flags|=2048,cu(9,Vx.bind(null,f,T,l,s),void 0,null),l},useId:function(){var i=Or(),s=zt.identifierPrefix;if(Et){var l=Vr,f=$r;l=(f&~(1<<32-or(f)-1)).toString(32)+l,s=":"+s+"R"+l,l=uu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=eB++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},oB={readContext:Vn,useCallback:tw,useContext:Vn,useEffect:Sm,useImperativeHandle:ew,useInsertionEffect:Qx,useLayoutEffect:Jx,useMemo:nw,useReducer:xm,useRef:Xx,useState:function(){return xm(lu)},useDebugValue:vm,useDeferredValue:function(i){var s=qn();return rw(s,Rt.memoizedState,i)},useTransition:function(){var i=xm(lu)[0],s=qn().memoizedState;return[i,s]},useMutableSource:zx,useSyncExternalStore:jx,useId:iw,unstable_isNewReconciler:!1},sB={readContext:Vn,useCallback:tw,useContext:Vn,useEffect:Sm,useImperativeHandle:ew,useInsertionEffect:Qx,useLayoutEffect:Jx,useMemo:nw,useReducer:wm,useRef:Xx,useState:function(){return wm(lu)},useDebugValue:vm,useDeferredValue:function(i){var s=qn();return Rt===null?s.memoizedState=i:rw(s,Rt.memoizedState,i)},useTransition:function(){var i=wm(lu)[0],s=qn().memoizedState;return[i,s]},useMutableSource:zx,useSyncExternalStore:jx,useId:iw,unstable_isNewReconciler:!1};function ur(i,s){if(i&&i.defaultProps){s=w({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function Am(i,s,l,f){s=i.memoizedState,l=l(f,s),l=l==null?s:w({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Hc={isMounted:function(i){return(i=i._reactInternals)?ro(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var f=sn(),E=vi(i),T=Yr(f,E);T.payload=s,l!=null&&(T.callback=l),s=_i(i,T,E),s!==null&&(dr(s,i,E,f),Ic(s,i,E))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var f=sn(),E=vi(i),T=Yr(f,E);T.tag=1,T.payload=s,l!=null&&(T.callback=l),s=_i(i,T,E),s!==null&&(dr(s,i,E,f),Ic(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=sn(),f=vi(i),E=Yr(l,f);E.tag=2,s!=null&&(E.callback=s),s=_i(i,E,f),s!==null&&(dr(s,i,f,l),Ic(s,i,f))}};function uw(i,s,l,f,E,T,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,T,S):s.prototype&&s.prototype.isPureReactComponent?!Ka(l,f)||!Ka(E,T):!0}function lw(i,s,l){var f=!1,E=yi,T=s.contextType;return typeof T=="object"&&T!==null?T=Vn(T):(E=En(s)?oo:Jt.current,f=s.contextTypes,T=(f=f!=null)?bs(i,E):yi),s=new s(l,T),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Hc,i.stateNode=s,s._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),s}function cw(i,s,l,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,f),s.state!==i&&Hc.enqueueReplaceState(s,s.state,null)}function Cm(i,s,l,f){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},hm(i);var T=s.contextType;typeof T=="object"&&T!==null?E.context=Vn(T):(T=En(s)?oo:Jt.current,E.context=bs(i,T)),E.state=i.memoizedState,T=s.getDerivedStateFromProps,typeof T=="function"&&(Am(i,s,T,l),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&Hc.enqueueReplaceState(E,E.state,null),Rc(i,l,E,f),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function ks(i,s){try{var l="",f=s;do l+=ke(f),f=f.return;while(f);var E=l}catch(T){E=`
|
|
20
|
+
`+E[S].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=S&&0<=D);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?Y(i):""}function Ce(i){switch(i.tag){case 5:return Y(i.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return i=ye(i.type,!1),i;case 11:return i=ye(i.type.render,!1),i;case 1:return i=ye(i.type,!0),i;default:return""}}function Ie(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 ee:return"Fragment";case F:return"Portal";case me:return"Profiler";case ue:return"StrictMode";case de:return"Suspense";case se:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ne:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case re:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case be:return s=i.displayName||null,s!==null?s:Ie(i.type)||"Memo";case ke:s=i._payload,i=i._init;try{return Ie(i(s))}catch(l){}}return null}function He(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ie(s);case 8:return s===ue?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Se(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ye(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function dt(i){var s=Ye(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),f=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,T=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(S){f=""+S,T.call(this,S)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return f},setValue:function(S){f=""+S},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function mn(i){i._valueTracker||(i._valueTracker=dt(i))}function to(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),f="";return i&&(f=Ye(i)?i.checked?"true":"false":i.value),i=f,i!==l?(s.setValue(i),!0):!1}function si(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function ir(i,s){var l=s.checked;return w({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Ia(i,s){var l=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;l=Se(s.value!=null?s.value:l),i._wrapperState={initialChecked:f,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Ra(i,s){s=s.checked,s!=null&&I(i,"checked",s,!1)}function as(i,s){Ra(i,s);var l=Se(s.value),f=s.type;if(l!=null)f==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?us(i,s.type,l):s.hasOwnProperty("defaultValue")&&us(i,s.type,Se(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Kl(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function us(i,s,l){(s!=="number"||si(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var ai=Array.isArray;function ui(i,s,l,f){if(i=i.options,s){s={};for(var E=0;E<l.length;E++)s["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=s.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&f&&(i[l].defaultSelected=!0)}else{for(l=""+Se(l),s=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,f&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function La(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return w({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Ql(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(ai(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Se(l)}}function Jl(i,s){var l=Se(s.value),f=Se(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),f!=null&&(i.defaultValue=""+f)}function Zl(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ie(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,s){return i==null||i==="http://www.w3.org/1999/xhtml"?ie(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Be,We=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,f,E){MSApp.execUnsafeLocalFunction(function(){return i(s,l,f,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Be.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Je(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var $t={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},Hr=["Webkit","ms","Moz","O"];Object.keys($t).forEach(function(i){Hr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),$t[s]=$t[i]})});function zn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||$t.hasOwnProperty(i)&&$t[i]?(""+s).trim():s+"px"}function li(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var f=l.indexOf("--")===0,E=zn(l,s[l],f);l==="float"&&(l="cssFloat"),f?i.setProperty(l,E):i[l]=E}}var no=w({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 Vt(i,s){if(s){if(no[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Ar(i,s){if(i.indexOf("-")===-1)return typeof s.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 Nn=null;function bp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var xp=null,ls=null,cs=null;function bx(i){if(i=nu(i)){if(typeof xp!="function")throw Error(n(280));var s=i.stateNode;s&&(s=_c(s),xp(i.stateNode,i.type,s))}}function xx(i){ls?cs?cs.push(i):cs=[i]:ls=i}function _x(){if(ls){var i=ls,s=cs;if(cs=ls=null,bx(i),s)for(i=0;i<s.length;i++)bx(s[i])}}function wx(i,s){return i(s)}function Sx(){}var _p=!1;function vx(i,s,l){if(_p)return i(s,l);_p=!0;try{return wx(i,s,l)}finally{_p=!1,(ls!==null||cs!==null)&&(Sx(),_x())}}function Da(i,s){var l=i.stateNode;if(l===null)return null;var f=_c(l);if(f===null)return null;l=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var wp=!1;if(c)try{var Ma={};Object.defineProperty(Ma,"passive",{get:function(){wp=!0}}),window.addEventListener("test",Ma,Ma),window.removeEventListener("test",Ma,Ma)}catch(i){wp=!1}function V9(i,s,l,f,E,T,S,D,H){var Z=Array.prototype.slice.call(arguments,3);try{s.apply(l,Z)}catch(fe){this.onError(fe)}}var Fa=!1,ec=null,tc=!1,Sp=null,q9={onError:function(i){Fa=!0,ec=i}};function Y9(i,s,l,f,E,T,S,D,H){Fa=!1,ec=null,V9.apply(q9,arguments)}function W9(i,s,l,f,E,T,S,D,H){if(Y9.apply(this,arguments),Fa){if(Fa){var Z=ec;Fa=!1,ec=null}else throw Error(n(198));tc||(tc=!0,Sp=Z)}}function ro(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function Ax(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function kx(i){if(ro(i)!==i)throw Error(n(188))}function G9(i){var s=i.alternate;if(!s){if(s=ro(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,f=s;;){var E=l.return;if(E===null)break;var T=E.alternate;if(T===null){if(f=E.return,f!==null){l=f;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===l)return kx(E),i;if(T===f)return kx(E),s;T=T.sibling}throw Error(n(188))}if(l.return!==f.return)l=E,f=T;else{for(var S=!1,D=E.child;D;){if(D===l){S=!0,l=E,f=T;break}if(D===f){S=!0,f=E,l=T;break}D=D.sibling}if(!S){for(D=T.child;D;){if(D===l){S=!0,l=T,f=E;break}if(D===f){S=!0,f=T,l=E;break}D=D.sibling}if(!S)throw Error(n(189))}}if(l.alternate!==f)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function Cx(i){return i=G9(i),i!==null?Nx(i):null}function Nx(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Nx(i);if(s!==null)return s;i=i.sibling}return null}var Ox=t.unstable_scheduleCallback,Px=t.unstable_cancelCallback,X9=t.unstable_shouldYield,K9=t.unstable_requestPaint,vt=t.unstable_now,Q9=t.unstable_getCurrentPriorityLevel,vp=t.unstable_ImmediatePriority,Ix=t.unstable_UserBlockingPriority,nc=t.unstable_NormalPriority,J9=t.unstable_LowPriority,Rx=t.unstable_IdlePriority,rc=null,kr=null;function Z9(i){if(kr&&typeof kr.onCommitFiberRoot=="function")try{kr.onCommitFiberRoot(rc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var or=Math.clz32?Math.clz32:nF,eF=Math.log,tF=Math.LN2;function nF(i){return i>>>=0,i===0?32:31-(eF(i)/tF|0)|0}var ic=64,oc=4194304;function Ba(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function sc(i,s){var l=i.pendingLanes;if(l===0)return 0;var f=0,E=i.suspendedLanes,T=i.pingedLanes,S=l&268435455;if(S!==0){var D=S&~E;D!==0?f=Ba(D):(T&=S,T!==0&&(f=Ba(T)))}else S=l&~E,S!==0?f=Ba(S):T!==0&&(f=Ba(T));if(f===0)return 0;if(s!==0&&s!==f&&(s&E)===0&&(E=f&-f,T=s&-s,E>=T||E===16&&(T&4194240)!==0))return s;if((f&4)!==0&&(f|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=f;0<s;)l=31-or(s),E=1<<l,f|=i[l],s&=~E;return f}function rF(i,s){switch(i){case 1:case 2:case 4:return s+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 s+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 iF(i,s){for(var l=i.suspendedLanes,f=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var S=31-or(T),D=1<<S,H=E[S];H===-1?((D&l)===0||(D&f)!==0)&&(E[S]=rF(D,s)):H<=s&&(i.expiredLanes|=D),T&=~D}}function Ap(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Lx(){var i=ic;return ic<<=1,(ic&4194240)===0&&(ic=64),i}function kp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Ua(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-or(s),i[s]=l}function oF(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-or(l),T=1<<E;s[E]=0,f[E]=-1,i[E]=-1,l&=~T}}function Cp(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var f=31-or(l),E=1<<f;E&s|i[f]&s&&(i[f]|=s),l&=~E}}var nt=0;function Dx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Mx,Np,Fx,Bx,Ux,Op=!1,ac=[],ci=null,di=null,fi=null,Ha=new Map,za=new Map,hi=[],sF="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Hx(i,s){switch(i){case"focusin":case"focusout":ci=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":fi=null;break;case"pointerover":case"pointerout":Ha.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":za.delete(s.pointerId)}}function ja(i,s,l,f,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:s,domEventName:l,eventSystemFlags:f,nativeEvent:T,targetContainers:[E]},s!==null&&(s=nu(s),s!==null&&Np(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function aF(i,s,l,f,E){switch(s){case"focusin":return ci=ja(ci,i,s,l,f,E),!0;case"dragenter":return di=ja(di,i,s,l,f,E),!0;case"mouseover":return fi=ja(fi,i,s,l,f,E),!0;case"pointerover":var T=E.pointerId;return Ha.set(T,ja(Ha.get(T)||null,i,s,l,f,E)),!0;case"gotpointercapture":return T=E.pointerId,za.set(T,ja(za.get(T)||null,i,s,l,f,E)),!0}return!1}function zx(i){var s=io(i.target);if(s!==null){var l=ro(s);if(l!==null){if(s=l.tag,s===13){if(s=Ax(l),s!==null){i.blockedOn=s,Ux(i.priority,function(){Fx(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function uc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=Ip(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var f=new l.constructor(l.type,l);Nn=f,l.target.dispatchEvent(f),Nn=null}else return s=nu(l),s!==null&&Np(s),i.blockedOn=l,!1;s.shift()}return!0}function jx(i,s,l){uc(i)&&l.delete(s)}function uF(){Op=!1,ci!==null&&uc(ci)&&(ci=null),di!==null&&uc(di)&&(di=null),fi!==null&&uc(fi)&&(fi=null),Ha.forEach(jx),za.forEach(jx)}function $a(i,s){i.blockedOn===s&&(i.blockedOn=null,Op||(Op=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,uF)))}function Va(i){function s(E){return $a(E,i)}if(0<ac.length){$a(ac[0],i);for(var l=1;l<ac.length;l++){var f=ac[l];f.blockedOn===i&&(f.blockedOn=null)}}for(ci!==null&&$a(ci,i),di!==null&&$a(di,i),fi!==null&&$a(fi,i),Ha.forEach(s),za.forEach(s),l=0;l<hi.length;l++)f=hi[l],f.blockedOn===i&&(f.blockedOn=null);for(;0<hi.length&&(l=hi[0],l.blockedOn===null);)zx(l),l.blockedOn===null&&hi.shift()}var ds=j.ReactCurrentBatchConfig,lc=!0;function lF(i,s,l,f){var E=nt,T=ds.transition;ds.transition=null;try{nt=1,Pp(i,s,l,f)}finally{nt=E,ds.transition=T}}function cF(i,s,l,f){var E=nt,T=ds.transition;ds.transition=null;try{nt=4,Pp(i,s,l,f)}finally{nt=E,ds.transition=T}}function Pp(i,s,l,f){if(lc){var E=Ip(i,s,l,f);if(E===null)Xp(i,s,f,cc,l),Hx(i,f);else if(aF(E,i,s,l,f))f.stopPropagation();else if(Hx(i,f),s&4&&-1<sF.indexOf(i)){for(;E!==null;){var T=nu(E);if(T!==null&&Mx(T),T=Ip(i,s,l,f),T===null&&Xp(i,s,f,cc,l),T===E)break;E=T}E!==null&&f.stopPropagation()}else Xp(i,s,f,null,l)}}var cc=null;function Ip(i,s,l,f){if(cc=null,i=bp(f),i=io(i),i!==null)if(s=ro(i),s===null)i=null;else if(l=s.tag,l===13){if(i=Ax(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return cc=i,null}function $x(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(Q9()){case vp:return 1;case Ix:return 4;case nc:case J9:return 16;case Rx:return 536870912;default:return 16}default:return 16}}var pi=null,Rp=null,dc=null;function Vx(){if(dc)return dc;var i,s=Rp,l=s.length,f,E="value"in pi?pi.value:pi.textContent,T=E.length;for(i=0;i<l&&s[i]===E[i];i++);var S=l-i;for(f=1;f<=S&&s[l-f]===E[T-f];f++);return dc=E.slice(i,1<f?1-f:void 0)}function fc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function hc(){return!0}function qx(){return!1}function On(i){function s(l,f,E,T,S){this._reactName=l,this._targetInst=E,this.type=f,this.nativeEvent=T,this.target=S,this.currentTarget=null;for(var D in i)i.hasOwnProperty(D)&&(l=i[D],this[D]=l?l(T):T[D]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?hc:qx,this.isPropagationStopped=qx,this}return w(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=hc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=hc)},persist:function(){},isPersistent:hc}),s}var fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lp=On(fs),qa=w({},fs,{view:0,detail:0}),dF=On(qa),Dp,Mp,Ya,pc=w({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Ya&&(Ya&&i.type==="mousemove"?(Dp=i.screenX-Ya.screenX,Mp=i.screenY-Ya.screenY):Mp=Dp=0,Ya=i),Dp)},movementY:function(i){return"movementY"in i?i.movementY:Mp}}),Yx=On(pc),fF=w({},pc,{dataTransfer:0}),hF=On(fF),pF=w({},qa,{relatedTarget:0}),Fp=On(pF),mF=w({},fs,{animationName:0,elapsedTime:0,pseudoElement:0}),gF=On(mF),EF=w({},fs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),yF=On(EF),TF=w({},fs,{data:0}),Wx=On(TF),bF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xF={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"},_F={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wF(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=_F[i])?!!s[i]:!1}function Bp(){return wF}var SF=w({},qa,{key:function(i){if(i.key){var s=bF[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=fc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?xF[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bp,charCode:function(i){return i.type==="keypress"?fc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?fc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),vF=On(SF),AF=w({},pc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gx=On(AF),kF=w({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bp}),CF=On(kF),NF=w({},fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),OF=On(NF),PF=w({},pc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),IF=On(PF),RF=[9,13,27,32],Up=c&&"CompositionEvent"in window,Wa=null;c&&"documentMode"in document&&(Wa=document.documentMode);var LF=c&&"TextEvent"in window&&!Wa,Xx=c&&(!Up||Wa&&8<Wa&&11>=Wa),Kx=" ",Qx=!1;function Jx(i,s){switch(i){case"keyup":return RF.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var hs=!1;function DF(i,s){switch(i){case"compositionend":return Zx(s);case"keypress":return s.which!==32?null:(Qx=!0,Kx);case"textInput":return i=s.data,i===Kx&&Qx?null:i;default:return null}}function MF(i,s){if(hs)return i==="compositionend"||!Up&&Jx(i,s)?(i=Vx(),dc=Rp=pi=null,hs=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Xx&&s.locale!=="ko"?null:s.data;default:return null}}var FF={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 e_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!FF[i.type]:s==="textarea"}function t_(i,s,l,f){xx(f),s=Tc(s,"onChange"),0<s.length&&(l=new Lp("onChange","change",null,l,f),i.push({event:l,listeners:s}))}var Ga=null,Xa=null;function BF(i){T_(i,0)}function mc(i){var s=ys(i);if(to(s))return i}function UF(i,s){if(i==="change")return s}var n_=!1;if(c){var Hp;if(c){var zp="oninput"in document;if(!zp){var r_=document.createElement("div");r_.setAttribute("oninput","return;"),zp=typeof r_.oninput=="function"}Hp=zp}else Hp=!1;n_=Hp&&(!document.documentMode||9<document.documentMode)}function i_(){Ga&&(Ga.detachEvent("onpropertychange",o_),Xa=Ga=null)}function o_(i){if(i.propertyName==="value"&&mc(Xa)){var s=[];t_(s,Xa,i,bp(i)),vx(BF,s)}}function HF(i,s,l){i==="focusin"?(i_(),Ga=s,Xa=l,Ga.attachEvent("onpropertychange",o_)):i==="focusout"&&i_()}function zF(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return mc(Xa)}function jF(i,s){if(i==="click")return mc(s)}function $F(i,s){if(i==="input"||i==="change")return mc(s)}function VF(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var sr=typeof Object.is=="function"?Object.is:VF;function Ka(i,s){if(sr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),f=Object.keys(s);if(l.length!==f.length)return!1;for(f=0;f<l.length;f++){var E=l[f];if(!d.call(s,E)||!sr(i[E],s[E]))return!1}return!0}function s_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function a_(i,s){var l=s_(i);i=0;for(var f;l;){if(l.nodeType===3){if(f=i+l.textContent.length,i<=s&&f>=s)return{node:l,offset:s-i};i=f}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=s_(l)}}function u_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?u_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function l_(){for(var i=window,s=si();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(f){l=!1}if(l)i=s.contentWindow;else break;s=si(i.document)}return s}function jp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function qF(i){var s=l_(),l=i.focusedElem,f=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&u_(l.ownerDocument.documentElement,l)){if(f!==null&&jp(l)){if(s=f.start,i=f.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,T=Math.min(f.start,E);f=f.end===void 0?T:Math.min(f.end,E),!i.extend&&T>f&&(E=f,f=T,T=E),E=a_(l,T);var S=a_(l,f);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),T>f?(i.addRange(s),i.extend(S.node,S.offset)):(s.setEnd(S.node,S.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var YF=c&&"documentMode"in document&&11>=document.documentMode,ps=null,$p=null,Qa=null,Vp=!1;function c_(i,s,l){var f=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Vp||ps==null||ps!==si(f)||(f=ps,"selectionStart"in f&&jp(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Qa&&Ka(Qa,f)||(Qa=f,f=Tc($p,"onSelect"),0<f.length&&(s=new Lp("onSelect","select",null,s,l),i.push({event:s,listeners:f}),s.target=ps)))}function gc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var ms={animationend:gc("Animation","AnimationEnd"),animationiteration:gc("Animation","AnimationIteration"),animationstart:gc("Animation","AnimationStart"),transitionend:gc("Transition","TransitionEnd")},qp={},d_={};c&&(d_=document.createElement("div").style,"AnimationEvent"in window||(delete ms.animationend.animation,delete ms.animationiteration.animation,delete ms.animationstart.animation),"TransitionEvent"in window||delete ms.transitionend.transition);function Ec(i){if(qp[i])return qp[i];if(!ms[i])return i;var s=ms[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in d_)return qp[i]=s[l];return i}var f_=Ec("animationend"),h_=Ec("animationiteration"),p_=Ec("animationstart"),m_=Ec("transitionend"),g_=new Map,E_="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function mi(i,s){g_.set(i,s),a(s,[i])}for(var Yp=0;Yp<E_.length;Yp++){var Wp=E_[Yp],WF=Wp.toLowerCase(),GF=Wp[0].toUpperCase()+Wp.slice(1);mi(WF,"on"+GF)}mi(f_,"onAnimationEnd"),mi(h_,"onAnimationIteration"),mi(p_,"onAnimationStart"),mi("dblclick","onDoubleClick"),mi("focusin","onFocus"),mi("focusout","onBlur"),mi(m_,"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 Ja="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(" "),XF=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ja));function y_(i,s,l){var f=i.type||"unknown-event";i.currentTarget=l,W9(f,s,void 0,i),i.currentTarget=null}function T_(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var f=i[l],E=f.event;f=f.listeners;e:{var T=void 0;if(s)for(var S=f.length-1;0<=S;S--){var D=f[S],H=D.instance,Z=D.currentTarget;if(D=D.listener,H!==T&&E.isPropagationStopped())break e;y_(E,D,Z),T=H}else for(S=0;S<f.length;S++){if(D=f[S],H=D.instance,Z=D.currentTarget,D=D.listener,H!==T&&E.isPropagationStopped())break e;y_(E,D,Z),T=H}}}if(tc)throw i=Sp,tc=!1,Sp=null,i}function ft(i,s){var l=s[tm];l===void 0&&(l=s[tm]=new Set);var f=i+"__bubble";l.has(f)||(b_(s,i,2,!1),l.add(f))}function Gp(i,s,l){var f=0;s&&(f|=4),b_(l,i,f,s)}var yc="_reactListening"+Math.random().toString(36).slice(2);function Za(i){if(!i[yc]){i[yc]=!0,r.forEach(function(l){l!=="selectionchange"&&(XF.has(l)||Gp(l,!1,i),Gp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[yc]||(s[yc]=!0,Gp("selectionchange",!1,s))}}function b_(i,s,l,f){switch($x(s)){case 1:var E=lF;break;case 4:E=cF;break;default:E=Pp}l=E.bind(null,s,l,i),E=void 0,!wp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),f?E!==void 0?i.addEventListener(s,l,{capture:!0,passive:E}):i.addEventListener(s,l,!0):E!==void 0?i.addEventListener(s,l,{passive:E}):i.addEventListener(s,l,!1)}function Xp(i,s,l,f,E){var T=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var S=f.tag;if(S===3||S===4){var D=f.stateNode.containerInfo;if(D===E||D.nodeType===8&&D.parentNode===E)break;if(S===4)for(S=f.return;S!==null;){var H=S.tag;if((H===3||H===4)&&(H=S.stateNode.containerInfo,H===E||H.nodeType===8&&H.parentNode===E))return;S=S.return}for(;D!==null;){if(S=io(D),S===null)return;if(H=S.tag,H===5||H===6){f=T=S;continue e}D=D.parentNode}}f=f.return}vx(function(){var Z=T,fe=bp(l),pe=[];e:{var le=g_.get(i);if(le!==void 0){var _e=Lp,ve=i;switch(i){case"keypress":if(fc(l)===0)break e;case"keydown":case"keyup":_e=vF;break;case"focusin":ve="focus",_e=Fp;break;case"focusout":ve="blur",_e=Fp;break;case"beforeblur":case"afterblur":_e=Fp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_e=Yx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_e=hF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_e=CF;break;case f_:case h_:case p_:_e=gF;break;case m_:_e=OF;break;case"scroll":_e=dF;break;case"wheel":_e=IF;break;case"copy":case"cut":case"paste":_e=yF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_e=Gx}var Ne=(s&4)!==0,At=!Ne&&i==="scroll",X=Ne?le!==null?le+"Capture":null:le;Ne=[];for(var V=Z,Q;V!==null;){Q=V;var Te=Q.stateNode;if(Q.tag===5&&Te!==null&&(Q=Te,X!==null&&(Te=Da(V,X),Te!=null&&Ne.push(eu(V,Te,Q)))),At)break;V=V.return}0<Ne.length&&(le=new _e(le,ve,null,l,fe),pe.push({event:le,listeners:Ne}))}}if((s&7)===0){e:{if(le=i==="mouseover"||i==="pointerover",_e=i==="mouseout"||i==="pointerout",le&&l!==Nn&&(ve=l.relatedTarget||l.fromElement)&&(io(ve)||ve[zr]))break e;if((_e||le)&&(le=fe.window===fe?fe:(le=fe.ownerDocument)?le.defaultView||le.parentWindow:window,_e?(ve=l.relatedTarget||l.toElement,_e=Z,ve=ve?io(ve):null,ve!==null&&(At=ro(ve),ve!==At||ve.tag!==5&&ve.tag!==6)&&(ve=null)):(_e=null,ve=Z),_e!==ve)){if(Ne=Yx,Te="onMouseLeave",X="onMouseEnter",V="mouse",(i==="pointerout"||i==="pointerover")&&(Ne=Gx,Te="onPointerLeave",X="onPointerEnter",V="pointer"),At=_e==null?le:ys(_e),Q=ve==null?le:ys(ve),le=new Ne(Te,V+"leave",_e,l,fe),le.target=At,le.relatedTarget=Q,Te=null,io(fe)===Z&&(Ne=new Ne(X,V+"enter",ve,l,fe),Ne.target=Q,Ne.relatedTarget=At,Te=Ne),At=Te,_e&&ve)t:{for(Ne=_e,X=ve,V=0,Q=Ne;Q;Q=gs(Q))V++;for(Q=0,Te=X;Te;Te=gs(Te))Q++;for(;0<V-Q;)Ne=gs(Ne),V--;for(;0<Q-V;)X=gs(X),Q--;for(;V--;){if(Ne===X||X!==null&&Ne===X.alternate)break t;Ne=gs(Ne),X=gs(X)}Ne=null}else Ne=null;_e!==null&&x_(pe,le,_e,Ne,!1),ve!==null&&At!==null&&x_(pe,At,ve,Ne,!0)}}e:{if(le=Z?ys(Z):window,_e=le.nodeName&&le.nodeName.toLowerCase(),_e==="select"||_e==="input"&&le.type==="file")var Oe=UF;else if(e_(le))if(n_)Oe=$F;else{Oe=zF;var De=HF}else(_e=le.nodeName)&&_e.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(Oe=jF);if(Oe&&(Oe=Oe(i,Z))){t_(pe,Oe,l,fe);break e}De&&De(i,le,Z),i==="focusout"&&(De=le._wrapperState)&&De.controlled&&le.type==="number"&&us(le,"number",le.value)}switch(De=Z?ys(Z):window,i){case"focusin":(e_(De)||De.contentEditable==="true")&&(ps=De,$p=Z,Qa=null);break;case"focusout":Qa=$p=ps=null;break;case"mousedown":Vp=!0;break;case"contextmenu":case"mouseup":case"dragend":Vp=!1,c_(pe,l,fe);break;case"selectionchange":if(YF)break;case"keydown":case"keyup":c_(pe,l,fe)}var Me;if(Up)e:{switch(i){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else hs?Jx(i,l)&&(Ue="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ue="onCompositionStart");Ue&&(Xx&&l.locale!=="ko"&&(hs||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&hs&&(Me=Vx()):(pi=fe,Rp="value"in pi?pi.value:pi.textContent,hs=!0)),De=Tc(Z,Ue),0<De.length&&(Ue=new Wx(Ue,i,null,l,fe),pe.push({event:Ue,listeners:De}),Me?Ue.data=Me:(Me=Zx(l),Me!==null&&(Ue.data=Me)))),(Me=LF?DF(i,l):MF(i,l))&&(Z=Tc(Z,"onBeforeInput"),0<Z.length&&(fe=new Wx("onBeforeInput","beforeinput",null,l,fe),pe.push({event:fe,listeners:Z}),fe.data=Me))}T_(pe,s)})}function eu(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Tc(i,s){for(var l=s+"Capture",f=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=Da(i,l),T!=null&&f.unshift(eu(i,T,E)),T=Da(i,s),T!=null&&f.push(eu(i,T,E))),i=i.return}return f}function gs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function x_(i,s,l,f,E){for(var T=s._reactName,S=[];l!==null&&l!==f;){var D=l,H=D.alternate,Z=D.stateNode;if(H!==null&&H===f)break;D.tag===5&&Z!==null&&(D=Z,E?(H=Da(l,T),H!=null&&S.unshift(eu(l,H,D))):E||(H=Da(l,T),H!=null&&S.push(eu(l,H,D)))),l=l.return}S.length!==0&&i.push({event:s,listeners:S})}var KF=/\r\n?/g,QF=/\u0000|\uFFFD/g;function __(i){return(typeof i=="string"?i:""+i).replace(KF,`
|
|
21
|
+
`).replace(QF,"")}function bc(i,s,l){if(s=__(s),__(i)!==s&&l)throw Error(n(425))}function xc(){}var Kp=null,Qp=null;function Jp(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Zp=typeof setTimeout=="function"?setTimeout:void 0,JF=typeof clearTimeout=="function"?clearTimeout:void 0,w_=typeof Promise=="function"?Promise:void 0,ZF=typeof queueMicrotask=="function"?queueMicrotask:typeof w_!="undefined"?function(i){return w_.resolve(null).then(i).catch(eB)}:Zp;function eB(i){setTimeout(function(){throw i})}function em(i,s){var l=s,f=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(f===0){i.removeChild(E),Va(s);return}f--}else l!=="$"&&l!=="$?"&&l!=="$!"||f++;l=E}while(l);Va(s)}function gi(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function S_(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var Es=Math.random().toString(36).slice(2),Cr="__reactFiber$"+Es,tu="__reactProps$"+Es,zr="__reactContainer$"+Es,tm="__reactEvents$"+Es,tB="__reactListeners$"+Es,nB="__reactHandles$"+Es;function io(i){var s=i[Cr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[zr]||l[Cr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=S_(i);i!==null;){if(l=i[Cr])return l;i=S_(i)}return s}i=l,l=i.parentNode}return null}function nu(i){return i=i[Cr]||i[zr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ys(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function _c(i){return i[tu]||null}var nm=[],Ts=-1;function Ei(i){return{current:i}}function ht(i){0>Ts||(i.current=nm[Ts],nm[Ts]=null,Ts--)}function ct(i,s){Ts++,nm[Ts]=i.current,i.current=s}var yi={},Jt=Ei(yi),gn=Ei(!1),oo=yi;function bs(i,s){var l=i.type.contextTypes;if(!l)return yi;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in l)E[T]=s[T];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function En(i){return i=i.childContextTypes,i!=null}function wc(){ht(gn),ht(Jt)}function v_(i,s,l){if(Jt.current!==yi)throw Error(n(168));ct(Jt,s),ct(gn,l)}function A_(i,s,l){var f=i.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return l;f=f.getChildContext();for(var E in f)if(!(E in s))throw Error(n(108,He(i)||"Unknown",E));return w({},l,f)}function Sc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||yi,oo=Jt.current,ct(Jt,i),ct(gn,gn.current),!0}function k_(i,s,l){var f=i.stateNode;if(!f)throw Error(n(169));l?(i=A_(i,s,oo),f.__reactInternalMemoizedMergedChildContext=i,ht(gn),ht(Jt),ct(Jt,i)):ht(gn),ct(gn,l)}var jr=null,vc=!1,rm=!1;function C_(i){jr===null?jr=[i]:jr.push(i)}function rB(i){vc=!0,C_(i)}function Ti(){if(!rm&&jr!==null){rm=!0;var i=0,s=nt;try{var l=jr;for(nt=1;i<l.length;i++){var f=l[i];do f=f(!0);while(f!==null)}jr=null,vc=!1}catch(E){throw jr!==null&&(jr=jr.slice(i+1)),Ox(vp,Ti),E}finally{nt=s,rm=!1}}return null}var xs=[],_s=0,Ac=null,kc=0,jn=[],$n=0,so=null,$r=1,Vr="";function ao(i,s){xs[_s++]=kc,xs[_s++]=Ac,Ac=i,kc=s}function N_(i,s,l){jn[$n++]=$r,jn[$n++]=Vr,jn[$n++]=so,so=i;var f=$r;i=Vr;var E=32-or(f)-1;f&=~(1<<E),l+=1;var T=32-or(s)+E;if(30<T){var S=E-E%5;T=(f&(1<<S)-1).toString(32),f>>=S,E-=S,$r=1<<32-or(s)+E|l<<E|f,Vr=T+i}else $r=1<<T|l<<E|f,Vr=i}function im(i){i.return!==null&&(ao(i,1),N_(i,1,0))}function om(i){for(;i===Ac;)Ac=xs[--_s],xs[_s]=null,kc=xs[--_s],xs[_s]=null;for(;i===so;)so=jn[--$n],jn[$n]=null,Vr=jn[--$n],jn[$n]=null,$r=jn[--$n],jn[$n]=null}var Pn=null,In=null,Et=!1,ar=null;function O_(i,s){var l=Wn(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function P_(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Pn=i,In=gi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Pn=i,In=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=so!==null?{id:$r,overflow:Vr}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=Wn(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Pn=i,In=null,!0):!1;default:return!1}}function sm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function am(i){if(Et){var s=In;if(s){var l=s;if(!P_(i,s)){if(sm(i))throw Error(n(418));s=gi(l.nextSibling);var f=Pn;s&&P_(i,s)?O_(f,l):(i.flags=i.flags&-4097|2,Et=!1,Pn=i)}}else{if(sm(i))throw Error(n(418));i.flags=i.flags&-4097|2,Et=!1,Pn=i}}}function I_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Pn=i}function Cc(i){if(i!==Pn)return!1;if(!Et)return I_(i),Et=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Jp(i.type,i.memoizedProps)),s&&(s=In)){if(sm(i))throw R_(),Error(n(418));for(;s;)O_(i,s),s=gi(s.nextSibling)}if(I_(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){In=gi(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}In=null}}else In=Pn?gi(i.stateNode.nextSibling):null;return!0}function R_(){for(var i=In;i;)i=gi(i.nextSibling)}function ws(){In=Pn=null,Et=!1}function um(i){ar===null?ar=[i]:ar.push(i)}var iB=j.ReactCurrentBatchConfig;function ru(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var f=l.stateNode}if(!f)throw Error(n(147,i));var E=f,T=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===T?s.ref:(s=function(S){var D=E.refs;S===null?delete D[T]:D[T]=S},s._stringRef=T,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function Nc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function L_(i){var s=i._init;return s(i._payload)}function D_(i){function s(X,V){if(i){var Q=X.deletions;Q===null?(X.deletions=[V],X.flags|=16):Q.push(V)}}function l(X,V){if(!i)return null;for(;V!==null;)s(X,V),V=V.sibling;return null}function f(X,V){for(X=new Map;V!==null;)V.key!==null?X.set(V.key,V):X.set(V.index,V),V=V.sibling;return X}function E(X,V){return X=ki(X,V),X.index=0,X.sibling=null,X}function T(X,V,Q){return X.index=Q,i?(Q=X.alternate,Q!==null?(Q=Q.index,Q<V?(X.flags|=2,V):Q):(X.flags|=2,V)):(X.flags|=1048576,V)}function S(X){return i&&X.alternate===null&&(X.flags|=2),X}function D(X,V,Q,Te){return V===null||V.tag!==6?(V=Zm(Q,X.mode,Te),V.return=X,V):(V=E(V,Q),V.return=X,V)}function H(X,V,Q,Te){var Oe=Q.type;return Oe===ee?fe(X,V,Q.props.children,Te,Q.key):V!==null&&(V.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===ke&&L_(Oe)===V.type)?(Te=E(V,Q.props),Te.ref=ru(X,V,Q),Te.return=X,Te):(Te=Zc(Q.type,Q.key,Q.props,null,X.mode,Te),Te.ref=ru(X,V,Q),Te.return=X,Te)}function Z(X,V,Q,Te){return V===null||V.tag!==4||V.stateNode.containerInfo!==Q.containerInfo||V.stateNode.implementation!==Q.implementation?(V=e0(Q,X.mode,Te),V.return=X,V):(V=E(V,Q.children||[]),V.return=X,V)}function fe(X,V,Q,Te,Oe){return V===null||V.tag!==7?(V=go(Q,X.mode,Te,Oe),V.return=X,V):(V=E(V,Q),V.return=X,V)}function pe(X,V,Q){if(typeof V=="string"&&V!==""||typeof V=="number")return V=Zm(""+V,X.mode,Q),V.return=X,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case W:return Q=Zc(V.type,V.key,V.props,null,X.mode,Q),Q.ref=ru(X,null,V),Q.return=X,Q;case F:return V=e0(V,X.mode,Q),V.return=X,V;case ke:var Te=V._init;return pe(X,Te(V._payload),Q)}if(ai(V)||J(V))return V=go(V,X.mode,Q,null),V.return=X,V;Nc(X,V)}return null}function le(X,V,Q,Te){var Oe=V!==null?V.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Oe!==null?null:D(X,V,""+Q,Te);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case W:return Q.key===Oe?H(X,V,Q,Te):null;case F:return Q.key===Oe?Z(X,V,Q,Te):null;case ke:return Oe=Q._init,le(X,V,Oe(Q._payload),Te)}if(ai(Q)||J(Q))return Oe!==null?null:fe(X,V,Q,Te,null);Nc(X,Q)}return null}function _e(X,V,Q,Te,Oe){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return X=X.get(Q)||null,D(V,X,""+Te,Oe);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case W:return X=X.get(Te.key===null?Q:Te.key)||null,H(V,X,Te,Oe);case F:return X=X.get(Te.key===null?Q:Te.key)||null,Z(V,X,Te,Oe);case ke:var De=Te._init;return _e(X,V,Q,De(Te._payload),Oe)}if(ai(Te)||J(Te))return X=X.get(Q)||null,fe(V,X,Te,Oe,null);Nc(V,Te)}return null}function ve(X,V,Q,Te){for(var Oe=null,De=null,Me=V,Ue=V=0,jt=null;Me!==null&&Ue<Q.length;Ue++){Me.index>Ue?(jt=Me,Me=null):jt=Me.sibling;var et=le(X,Me,Q[Ue],Te);if(et===null){Me===null&&(Me=jt);break}i&&Me&&et.alternate===null&&s(X,Me),V=T(et,V,Ue),De===null?Oe=et:De.sibling=et,De=et,Me=jt}if(Ue===Q.length)return l(X,Me),Et&&ao(X,Ue),Oe;if(Me===null){for(;Ue<Q.length;Ue++)Me=pe(X,Q[Ue],Te),Me!==null&&(V=T(Me,V,Ue),De===null?Oe=Me:De.sibling=Me,De=Me);return Et&&ao(X,Ue),Oe}for(Me=f(X,Me);Ue<Q.length;Ue++)jt=_e(Me,X,Ue,Q[Ue],Te),jt!==null&&(i&&jt.alternate!==null&&Me.delete(jt.key===null?Ue:jt.key),V=T(jt,V,Ue),De===null?Oe=jt:De.sibling=jt,De=jt);return i&&Me.forEach(function(Ci){return s(X,Ci)}),Et&&ao(X,Ue),Oe}function Ne(X,V,Q,Te){var Oe=J(Q);if(typeof Oe!="function")throw Error(n(150));if(Q=Oe.call(Q),Q==null)throw Error(n(151));for(var De=Oe=null,Me=V,Ue=V=0,jt=null,et=Q.next();Me!==null&&!et.done;Ue++,et=Q.next()){Me.index>Ue?(jt=Me,Me=null):jt=Me.sibling;var Ci=le(X,Me,et.value,Te);if(Ci===null){Me===null&&(Me=jt);break}i&&Me&&Ci.alternate===null&&s(X,Me),V=T(Ci,V,Ue),De===null?Oe=Ci:De.sibling=Ci,De=Ci,Me=jt}if(et.done)return l(X,Me),Et&&ao(X,Ue),Oe;if(Me===null){for(;!et.done;Ue++,et=Q.next())et=pe(X,et.value,Te),et!==null&&(V=T(et,V,Ue),De===null?Oe=et:De.sibling=et,De=et);return Et&&ao(X,Ue),Oe}for(Me=f(X,Me);!et.done;Ue++,et=Q.next())et=_e(Me,X,Ue,et.value,Te),et!==null&&(i&&et.alternate!==null&&Me.delete(et.key===null?Ue:et.key),V=T(et,V,Ue),De===null?Oe=et:De.sibling=et,De=et);return i&&Me.forEach(function(FB){return s(X,FB)}),Et&&ao(X,Ue),Oe}function At(X,V,Q,Te){if(typeof Q=="object"&&Q!==null&&Q.type===ee&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case W:e:{for(var Oe=Q.key,De=V;De!==null;){if(De.key===Oe){if(Oe=Q.type,Oe===ee){if(De.tag===7){l(X,De.sibling),V=E(De,Q.props.children),V.return=X,X=V;break e}}else if(De.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===ke&&L_(Oe)===De.type){l(X,De.sibling),V=E(De,Q.props),V.ref=ru(X,De,Q),V.return=X,X=V;break e}l(X,De);break}else s(X,De);De=De.sibling}Q.type===ee?(V=go(Q.props.children,X.mode,Te,Q.key),V.return=X,X=V):(Te=Zc(Q.type,Q.key,Q.props,null,X.mode,Te),Te.ref=ru(X,V,Q),Te.return=X,X=Te)}return S(X);case F:e:{for(De=Q.key;V!==null;){if(V.key===De)if(V.tag===4&&V.stateNode.containerInfo===Q.containerInfo&&V.stateNode.implementation===Q.implementation){l(X,V.sibling),V=E(V,Q.children||[]),V.return=X,X=V;break e}else{l(X,V);break}else s(X,V);V=V.sibling}V=e0(Q,X.mode,Te),V.return=X,X=V}return S(X);case ke:return De=Q._init,At(X,V,De(Q._payload),Te)}if(ai(Q))return ve(X,V,Q,Te);if(J(Q))return Ne(X,V,Q,Te);Nc(X,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,V!==null&&V.tag===6?(l(X,V.sibling),V=E(V,Q),V.return=X,X=V):(l(X,V),V=Zm(Q,X.mode,Te),V.return=X,X=V),S(X)):l(X,V)}return At}var Ss=D_(!0),M_=D_(!1),Oc=Ei(null),Pc=null,vs=null,lm=null;function cm(){lm=vs=Pc=null}function dm(i){var s=Oc.current;ht(Oc),i._currentValue=s}function fm(i,s,l){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===l)break;i=i.return}}function As(i,s){Pc=i,lm=vs=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(yn=!0),i.firstContext=null)}function Vn(i){var s=i._currentValue;if(lm!==i)if(i={context:i,memoizedValue:s,next:null},vs===null){if(Pc===null)throw Error(n(308));vs=i,Pc.dependencies={lanes:0,firstContext:i}}else vs=vs.next=i;return s}var uo=null;function hm(i){uo===null?uo=[i]:uo.push(i)}function F_(i,s,l,f){var E=s.interleaved;return E===null?(l.next=l,hm(s)):(l.next=E.next,E.next=l),s.interleaved=l,qr(i,f)}function qr(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var bi=!1;function pm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function B_(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Yr(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function xi(i,s,l){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(Ze&2)!==0){var E=f.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),f.pending=s,qr(i,l)}return E=f.interleaved,E===null?(s.next=s,hm(f)):(s.next=E.next,E.next=s),f.interleaved=s,qr(i,l)}function Ic(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,Cp(i,l)}}function U_(i,s){var l=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,l===f)){var E=null,T=null;if(l=l.firstBaseUpdate,l!==null){do{var S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};T===null?E=T=S:T=T.next=S,l=l.next}while(l!==null);T===null?E=T=s:T=T.next=s}else E=T=s;l={baseState:f.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:f.shared,effects:f.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function Rc(i,s,l,f){var E=i.updateQueue;bi=!1;var T=E.firstBaseUpdate,S=E.lastBaseUpdate,D=E.shared.pending;if(D!==null){E.shared.pending=null;var H=D,Z=H.next;H.next=null,S===null?T=Z:S.next=Z,S=H;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,D=fe.lastBaseUpdate,D!==S&&(D===null?fe.firstBaseUpdate=Z:D.next=Z,fe.lastBaseUpdate=H))}if(T!==null){var pe=E.baseState;S=0,fe=Z=H=null,D=T;do{var le=D.lane,_e=D.eventTime;if((f&le)===le){fe!==null&&(fe=fe.next={eventTime:_e,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var ve=i,Ne=D;switch(le=s,_e=l,Ne.tag){case 1:if(ve=Ne.payload,typeof ve=="function"){pe=ve.call(_e,pe,le);break e}pe=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ne.payload,le=typeof ve=="function"?ve.call(_e,pe,le):ve,le==null)break e;pe=w({},pe,le);break e;case 2:bi=!0}}D.callback!==null&&D.lane!==0&&(i.flags|=64,le=E.effects,le===null?E.effects=[D]:le.push(D))}else _e={eventTime:_e,lane:le,tag:D.tag,payload:D.payload,callback:D.callback,next:null},fe===null?(Z=fe=_e,H=pe):fe=fe.next=_e,S|=le;if(D=D.next,D===null){if(D=E.shared.pending,D===null)break;le=D,D=le.next,le.next=null,E.lastBaseUpdate=le,E.shared.pending=null}}while(!0);if(fe===null&&(H=pe),E.baseState=H,E.firstBaseUpdate=Z,E.lastBaseUpdate=fe,s=E.shared.interleaved,s!==null){E=s;do S|=E.lane,E=E.next;while(E!==s)}else T===null&&(E.shared.lanes=0);fo|=S,i.lanes=S,i.memoizedState=pe}}function H_(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var f=i[s],E=f.callback;if(E!==null){if(f.callback=null,f=l,typeof E!="function")throw Error(n(191,E));E.call(f)}}}var iu={},Nr=Ei(iu),ou=Ei(iu),su=Ei(iu);function lo(i){if(i===iu)throw Error(n(174));return i}function mm(i,s){switch(ct(su,s),ct(ou,i),ct(Nr,iu),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:xe(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=xe(s,i)}ht(Nr),ct(Nr,s)}function ks(){ht(Nr),ht(ou),ht(su)}function z_(i){lo(su.current);var s=lo(Nr.current),l=xe(s,i.type);s!==l&&(ct(ou,i),ct(Nr,l))}function gm(i){ou.current===i&&(ht(Nr),ht(ou))}var yt=Ei(0);function Lc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Em=[];function ym(){for(var i=0;i<Em.length;i++)Em[i]._workInProgressVersionPrimary=null;Em.length=0}var Dc=j.ReactCurrentDispatcher,Tm=j.ReactCurrentBatchConfig,co=0,Tt=null,Rt=null,Ht=null,Mc=!1,au=!1,uu=0,oB=0;function Zt(){throw Error(n(321))}function bm(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!sr(i[l],s[l]))return!1;return!0}function xm(i,s,l,f,E,T){if(co=T,Tt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Dc.current=i===null||i.memoizedState===null?lB:cB,i=l(f,E),au){T=0;do{if(au=!1,uu=0,25<=T)throw Error(n(301));T+=1,Ht=Rt=null,s.updateQueue=null,Dc.current=dB,i=l(f,E)}while(au)}if(Dc.current=Uc,s=Rt!==null&&Rt.next!==null,co=0,Ht=Rt=Tt=null,Mc=!1,s)throw Error(n(300));return i}function _m(){var i=uu!==0;return uu=0,i}function Or(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?Tt.memoizedState=Ht=i:Ht=Ht.next=i,Ht}function qn(){if(Rt===null){var i=Tt.alternate;i=i!==null?i.memoizedState:null}else i=Rt.next;var s=Ht===null?Tt.memoizedState:Ht.next;if(s!==null)Ht=s,Rt=i;else{if(i===null)throw Error(n(310));Rt=i,i={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},Ht===null?Tt.memoizedState=Ht=i:Ht=Ht.next=i}return Ht}function lu(i,s){return typeof s=="function"?s(i):s}function wm(i){var s=qn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=Rt,E=f.baseQueue,T=l.pending;if(T!==null){if(E!==null){var S=E.next;E.next=T.next,T.next=S}f.baseQueue=E=T,l.pending=null}if(E!==null){T=E.next,f=f.baseState;var D=S=null,H=null,Z=T;do{var fe=Z.lane;if((co&fe)===fe)H!==null&&(H=H.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),f=Z.hasEagerState?Z.eagerState:i(f,Z.action);else{var pe={lane:fe,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};H===null?(D=H=pe,S=f):H=H.next=pe,Tt.lanes|=fe,fo|=fe}Z=Z.next}while(Z!==null&&Z!==T);H===null?S=f:H.next=D,sr(f,s.memoizedState)||(yn=!0),s.memoizedState=f,s.baseState=S,s.baseQueue=H,l.lastRenderedState=f}if(i=l.interleaved,i!==null){E=i;do T=E.lane,Tt.lanes|=T,fo|=T,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function Sm(i){var s=qn(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=l.dispatch,E=l.pending,T=s.memoizedState;if(E!==null){l.pending=null;var S=E=E.next;do T=i(T,S.action),S=S.next;while(S!==E);sr(T,s.memoizedState)||(yn=!0),s.memoizedState=T,s.baseQueue===null&&(s.baseState=T),l.lastRenderedState=T}return[T,f]}function j_(){}function $_(i,s){var l=Tt,f=qn(),E=s(),T=!sr(f.memoizedState,E);if(T&&(f.memoizedState=E,yn=!0),f=f.queue,vm(Y_.bind(null,l,f,i),[i]),f.getSnapshot!==s||T||Ht!==null&&Ht.memoizedState.tag&1){if(l.flags|=2048,cu(9,q_.bind(null,l,f,E,s),void 0,null),zt===null)throw Error(n(349));(co&30)!==0||V_(l,s,E)}return E}function V_(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Tt.updateQueue,s===null?(s={lastEffect:null,stores:null},Tt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function q_(i,s,l,f){s.value=l,s.getSnapshot=f,W_(s)&&G_(i)}function Y_(i,s,l){return l(function(){W_(s)&&G_(i)})}function W_(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!sr(i,l)}catch(f){return!0}}function G_(i){var s=qr(i,1);s!==null&&dr(s,i,1,-1)}function X_(i){var s=Or();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:lu,lastRenderedState:i},s.queue=i,i=i.dispatch=uB.bind(null,Tt,i),[s.memoizedState,i]}function cu(i,s,l,f){return i={tag:i,create:s,destroy:l,deps:f,next:null},s=Tt.updateQueue,s===null?(s={lastEffect:null,stores:null},Tt.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(f=l.next,l.next=i,i.next=f,s.lastEffect=i)),i}function K_(){return qn().memoizedState}function Fc(i,s,l,f){var E=Or();Tt.flags|=i,E.memoizedState=cu(1|s,l,void 0,f===void 0?null:f)}function Bc(i,s,l,f){var E=qn();f=f===void 0?null:f;var T=void 0;if(Rt!==null){var S=Rt.memoizedState;if(T=S.destroy,f!==null&&bm(f,S.deps)){E.memoizedState=cu(s,l,T,f);return}}Tt.flags|=i,E.memoizedState=cu(1|s,l,T,f)}function Q_(i,s){return Fc(8390656,8,i,s)}function vm(i,s){return Bc(2048,8,i,s)}function J_(i,s){return Bc(4,2,i,s)}function Z_(i,s){return Bc(4,4,i,s)}function ew(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function tw(i,s,l){return l=l!=null?l.concat([i]):null,Bc(4,4,ew.bind(null,s,i),l)}function Am(){}function nw(i,s){var l=qn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&bm(s,f[1])?f[0]:(l.memoizedState=[i,s],i)}function rw(i,s){var l=qn();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&bm(s,f[1])?f[0]:(i=i(),l.memoizedState=[i,s],i)}function iw(i,s,l){return(co&21)===0?(i.baseState&&(i.baseState=!1,yn=!0),i.memoizedState=l):(sr(l,s)||(l=Lx(),Tt.lanes|=l,fo|=l,i.baseState=!0),s)}function sB(i,s){var l=nt;nt=l!==0&&4>l?l:4,i(!0);var f=Tm.transition;Tm.transition={};try{i(!1),s()}finally{nt=l,Tm.transition=f}}function ow(){return qn().memoizedState}function aB(i,s,l){var f=vi(i);if(l={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null},sw(i))aw(s,l);else if(l=F_(i,s,l,f),l!==null){var E=sn();dr(l,i,f,E),uw(l,s,f)}}function uB(i,s,l){var f=vi(i),E={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null};if(sw(i))aw(s,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=s.lastRenderedReducer,T!==null))try{var S=s.lastRenderedState,D=T(S,l);if(E.hasEagerState=!0,E.eagerState=D,sr(D,S)){var H=s.interleaved;H===null?(E.next=E,hm(s)):(E.next=H.next,H.next=E),s.interleaved=E;return}}catch(Z){}l=F_(i,s,E,f),l!==null&&(E=sn(),dr(l,i,f,E),uw(l,s,f))}}function sw(i){var s=i.alternate;return i===Tt||s!==null&&s===Tt}function aw(i,s){au=Mc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function uw(i,s,l){if((l&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,Cp(i,l)}}var Uc={readContext:Vn,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useInsertionEffect:Zt,useLayoutEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useMutableSource:Zt,useSyncExternalStore:Zt,useId:Zt,unstable_isNewReconciler:!1},lB={readContext:Vn,useCallback:function(i,s){return Or().memoizedState=[i,s===void 0?null:s],i},useContext:Vn,useEffect:Q_,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Fc(4194308,4,ew.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Fc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Fc(4,2,i,s)},useMemo:function(i,s){var l=Or();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var f=Or();return s=l!==void 0?l(s):s,f.memoizedState=f.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},f.queue=i,i=i.dispatch=aB.bind(null,Tt,i),[f.memoizedState,i]},useRef:function(i){var s=Or();return i={current:i},s.memoizedState=i},useState:X_,useDebugValue:Am,useDeferredValue:function(i){return Or().memoizedState=i},useTransition:function(){var i=X_(!1),s=i[0];return i=sB.bind(null,i[1]),Or().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var f=Tt,E=Or();if(Et){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),zt===null)throw Error(n(349));(co&30)!==0||V_(f,s,l)}E.memoizedState=l;var T={value:l,getSnapshot:s};return E.queue=T,Q_(Y_.bind(null,f,T,i),[i]),f.flags|=2048,cu(9,q_.bind(null,f,T,l,s),void 0,null),l},useId:function(){var i=Or(),s=zt.identifierPrefix;if(Et){var l=Vr,f=$r;l=(f&~(1<<32-or(f)-1)).toString(32)+l,s=":"+s+"R"+l,l=uu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=oB++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},cB={readContext:Vn,useCallback:nw,useContext:Vn,useEffect:vm,useImperativeHandle:tw,useInsertionEffect:J_,useLayoutEffect:Z_,useMemo:rw,useReducer:wm,useRef:K_,useState:function(){return wm(lu)},useDebugValue:Am,useDeferredValue:function(i){var s=qn();return iw(s,Rt.memoizedState,i)},useTransition:function(){var i=wm(lu)[0],s=qn().memoizedState;return[i,s]},useMutableSource:j_,useSyncExternalStore:$_,useId:ow,unstable_isNewReconciler:!1},dB={readContext:Vn,useCallback:nw,useContext:Vn,useEffect:vm,useImperativeHandle:tw,useInsertionEffect:J_,useLayoutEffect:Z_,useMemo:rw,useReducer:Sm,useRef:K_,useState:function(){return Sm(lu)},useDebugValue:Am,useDeferredValue:function(i){var s=qn();return Rt===null?s.memoizedState=i:iw(s,Rt.memoizedState,i)},useTransition:function(){var i=Sm(lu)[0],s=qn().memoizedState;return[i,s]},useMutableSource:j_,useSyncExternalStore:$_,useId:ow,unstable_isNewReconciler:!1};function ur(i,s){if(i&&i.defaultProps){s=w({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function km(i,s,l,f){s=i.memoizedState,l=l(f,s),l=l==null?s:w({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Hc={isMounted:function(i){return(i=i._reactInternals)?ro(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var f=sn(),E=vi(i),T=Yr(f,E);T.payload=s,l!=null&&(T.callback=l),s=xi(i,T,E),s!==null&&(dr(s,i,E,f),Ic(s,i,E))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var f=sn(),E=vi(i),T=Yr(f,E);T.tag=1,T.payload=s,l!=null&&(T.callback=l),s=xi(i,T,E),s!==null&&(dr(s,i,E,f),Ic(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=sn(),f=vi(i),E=Yr(l,f);E.tag=2,s!=null&&(E.callback=s),s=xi(i,E,f),s!==null&&(dr(s,i,f,l),Ic(s,i,f))}};function lw(i,s,l,f,E,T,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,T,S):s.prototype&&s.prototype.isPureReactComponent?!Ka(l,f)||!Ka(E,T):!0}function cw(i,s,l){var f=!1,E=yi,T=s.contextType;return typeof T=="object"&&T!==null?T=Vn(T):(E=En(s)?oo:Jt.current,f=s.contextTypes,T=(f=f!=null)?bs(i,E):yi),s=new s(l,T),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Hc,i.stateNode=s,s._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),s}function dw(i,s,l,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,f),s.state!==i&&Hc.enqueueReplaceState(s,s.state,null)}function Cm(i,s,l,f){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},pm(i);var T=s.contextType;typeof T=="object"&&T!==null?E.context=Vn(T):(T=En(s)?oo:Jt.current,E.context=bs(i,T)),E.state=i.memoizedState,T=s.getDerivedStateFromProps,typeof T=="function"&&(km(i,s,T,l),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&Hc.enqueueReplaceState(E,E.state,null),Rc(i,l,E,f),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Cs(i,s){try{var l="",f=s;do l+=Ce(f),f=f.return;while(f);var E=l}catch(T){E=`
|
|
22
22
|
Error generating stack: `+T.message+`
|
|
23
|
-
`+T.stack}return{value:i,source:s,stack:E,digest:null}}function km(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function Nm(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var aB=typeof WeakMap=="function"?WeakMap:Map;function dw(i,s,l){l=Yr(-1,l),l.tag=3,l.payload={element:null};var f=s.value;return l.callback=function(){Wc||(Wc=!0,Vm=f),Nm(i,s)},l}function fw(i,s,l){l=Yr(-1,l),l.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var E=s.value;l.payload=function(){return f(E)},l.callback=function(){Nm(i,s)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(l.callback=function(){Nm(i,s),typeof f!="function"&&(wi===null?wi=new Set([this]):wi.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})}),l}function hw(i,s,l){var f=i.pingCache;if(f===null){f=i.pingCache=new aB;var E=new Set;f.set(s,E)}else E=f.get(s),E===void 0&&(E=new Set,f.set(s,E));E.has(l)||(E.add(l),i=_B.bind(null,i,s,l),s.then(i,i))}function pw(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function mw(i,s,l,f,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=Yr(-1,1),s.tag=2,_i(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var uB=$.ReactCurrentOwner,yn=!1;function on(i,s,l,f){s.child=i===null?Dx(s,null,l,f):Ss(s,i.child,l,f)}function gw(i,s,l,f,E){l=l.render;var T=s.ref;return As(s,E),f=bm(i,s,l,f,T,E),l=_m(),i!==null&&!yn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Wr(i,s,E)):(Et&&l&&rm(s),s.flags|=1,on(i,s,f,E),s.child)}function Ew(i,s,l,f,E){if(i===null){var T=l.type;return typeof T=="function"&&!Qm(T)&&T.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=T,yw(i,s,T,f,E)):(i=Zc(l.type,null,f,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(T=i.child,(i.lanes&E)===0){var S=T.memoizedProps;if(l=l.compare,l=l!==null?l:Ka,l(S,f)&&i.ref===s.ref)return Wr(i,s,E)}return s.flags|=1,i=Ci(T,f),i.ref=s.ref,i.return=s,s.child=i}function yw(i,s,l,f,E){if(i!==null){var T=i.memoizedProps;if(Ka(T,f)&&i.ref===s.ref)if(yn=!1,s.pendingProps=f=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(yn=!0);else return s.lanes=i.lanes,Wr(i,s,E)}return Om(i,s,l,f,E)}function Tw(i,s,l){var f=s.pendingProps,E=f.children,T=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ct(Os,Rn),Rn|=l;else{if((l&1073741824)===0)return i=T!==null?T.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ct(Os,Rn),Rn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=T!==null?T.baseLanes:l,ct(Os,Rn),Rn|=f}else T!==null?(f=T.baseLanes|l,s.memoizedState=null):f=l,ct(Os,Rn),Rn|=f;return on(i,s,E,l),s.child}function bw(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function Om(i,s,l,f,E){var T=En(l)?oo:Jt.current;return T=bs(s,T),As(s,E),l=bm(i,s,l,f,T,E),f=_m(),i!==null&&!yn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Wr(i,s,E)):(Et&&f&&rm(s),s.flags|=1,on(i,s,l,E),s.child)}function _w(i,s,l,f,E){if(En(l)){var T=!0;Sc(s)}else T=!1;if(As(s,E),s.stateNode===null)jc(i,s),lw(s,l,f),Cm(s,l,f,E),f=!0;else if(i===null){var S=s.stateNode,D=s.memoizedProps;S.props=D;var H=S.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=Vn(Z):(Z=En(l)?oo:Jt.current,Z=bs(s,Z));var fe=l.getDerivedStateFromProps,me=typeof fe=="function"||typeof S.getSnapshotBeforeUpdate=="function";me||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(D!==f||H!==Z)&&cw(s,S,f,Z),bi=!1;var ue=s.memoizedState;S.state=ue,Rc(s,f,S,E),H=s.memoizedState,D!==f||ue!==H||gn.current||bi?(typeof fe=="function"&&(Am(s,l,fe,f),H=s.memoizedState),(D=bi||uw(s,l,D,f,ue,H,Z))?(me||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(s.flags|=4194308)):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=H),S.props=f,S.state=H,S.context=Z,f=D):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{S=s.stateNode,Fx(i,s),D=s.memoizedProps,Z=s.type===s.elementType?D:ur(s.type,D),S.props=Z,me=s.pendingProps,ue=S.context,H=l.contextType,typeof H=="object"&&H!==null?H=Vn(H):(H=En(l)?oo:Jt.current,H=bs(s,H));var xe=l.getDerivedStateFromProps;(fe=typeof xe=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(D!==me||ue!==H)&&cw(s,S,f,H),bi=!1,ue=s.memoizedState,S.state=ue,Rc(s,f,S,E);var ve=s.memoizedState;D!==me||ue!==ve||gn.current||bi?(typeof xe=="function"&&(Am(s,l,xe,f),ve=s.memoizedState),(Z=bi||uw(s,l,Z,f,ue,ve,H)||!1)?(fe||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(f,ve,H),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(f,ve,H)),typeof S.componentDidUpdate=="function"&&(s.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof S.componentDidUpdate!="function"||D===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=ve),S.props=f,S.state=ve,S.context=H,f=Z):(typeof S.componentDidUpdate!="function"||D===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),f=!1)}return Pm(i,s,l,f,T,E)}function Pm(i,s,l,f,E,T){bw(i,s);var S=(s.flags&128)!==0;if(!f&&!S)return E&&Ax(s,l,!1),Wr(i,s,T);f=s.stateNode,uB.current=s;var D=S&&typeof l.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&S?(s.child=Ss(s,i.child,null,T),s.child=Ss(s,null,D,T)):on(i,s,D,T),s.memoizedState=f.state,E&&Ax(s,l,!0),s.child}function xw(i){var s=i.stateNode;s.pendingContext?Sx(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Sx(i,s.context,!1),pm(i,s.containerInfo)}function ww(i,s,l,f,E){return ws(),am(E),s.flags|=256,on(i,s,l,f),s.child}var Im={dehydrated:null,treeContext:null,retryLane:0};function Rm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Sw(i,s,l){var f=s.pendingProps,E=yt.current,T=!1,S=(s.flags&128)!==0,D;if((D=S)||(D=i!==null&&i.memoizedState===null?!1:(E&2)!==0),D?(T=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),ct(yt,E&1),i===null)return sm(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(S=f.children,i=f.fallback,T?(f=s.mode,T=s.child,S={mode:"hidden",children:S},(f&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=S):T=ed(S,f,0,null),i=go(i,f,l,null),T.return=s,i.return=s,T.sibling=i,s.child=T,s.child.memoizedState=Rm(l),s.memoizedState=Im,i):Lm(s,S));if(E=i.memoizedState,E!==null&&(D=E.dehydrated,D!==null))return lB(i,s,S,f,D,E,l);if(T){T=f.fallback,S=s.mode,E=i.child,D=E.sibling;var H={mode:"hidden",children:f.children};return(S&1)===0&&s.child!==E?(f=s.child,f.childLanes=0,f.pendingProps=H,s.deletions=null):(f=Ci(E,H),f.subtreeFlags=E.subtreeFlags&14680064),D!==null?T=Ci(D,T):(T=go(T,S,l,null),T.flags|=2),T.return=s,f.return=s,f.sibling=T,s.child=f,f=T,T=s.child,S=i.child.memoizedState,S=S===null?Rm(l):{baseLanes:S.baseLanes|l,cachePool:null,transitions:S.transitions},T.memoizedState=S,T.childLanes=i.childLanes&~l,s.memoizedState=Im,f}return T=i.child,i=T.sibling,f=Ci(T,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=l),f.return=s,f.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=f,s.memoizedState=null,f}function Lm(i,s){return s=ed({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function zc(i,s,l,f){return f!==null&&am(f),Ss(s,i.child,null,l),i=Lm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function lB(i,s,l,f,E,T,S){if(l)return s.flags&256?(s.flags&=-257,f=km(Error(n(422))),zc(i,s,S,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(T=f.fallback,E=s.mode,f=ed({mode:"visible",children:f.children},E,0,null),T=go(T,E,S,null),T.flags|=2,f.return=s,T.return=s,f.sibling=T,s.child=f,(s.mode&1)!==0&&Ss(s,i.child,null,S),s.child.memoizedState=Rm(S),s.memoizedState=Im,T);if((s.mode&1)===0)return zc(i,s,S,null);if(E.data==="$!"){if(f=E.nextSibling&&E.nextSibling.dataset,f)var D=f.dgst;return f=D,T=Error(n(419)),f=km(T,f,void 0),zc(i,s,S,f)}if(D=(S&i.childLanes)!==0,yn||D){if(f=zt,f!==null){switch(S&-S){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(f.suspendedLanes|S))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,qr(i,E),dr(f,i,E,-1))}return Km(),f=km(Error(n(421))),zc(i,s,S,f)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=xB.bind(null,i),E._reactRetry=s,null):(i=T.treeContext,In=gi(E.nextSibling),Pn=s,Et=!0,ar=null,i!==null&&(jn[$n++]=$r,jn[$n++]=Vr,jn[$n++]=so,$r=i.id,Vr=i.overflow,so=s),s=Lm(s,f.children),s.flags|=4096,s)}function vw(i,s,l){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),dm(i.return,s,l)}function Dm(i,s,l,f,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:l,tailMode:E}:(T.isBackwards=s,T.rendering=null,T.renderingStartTime=0,T.last=f,T.tail=l,T.tailMode=E)}function Aw(i,s,l){var f=s.pendingProps,E=f.revealOrder,T=f.tail;if(on(i,s,f.children,l),f=yt.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&vw(i,l,s);else if(i.tag===19)vw(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(ct(yt,f),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(l=s.child,E=null;l!==null;)i=l.alternate,i!==null&&Lc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=s.child,s.child=null):(E=l.sibling,l.sibling=null),Dm(s,!1,E,l,T);break;case"backwards":for(l=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&Lc(i)===null){s.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Dm(s,!0,l,null,T);break;case"together":Dm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function jc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Wr(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),fo|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Ci(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Ci(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function cB(i,s,l){switch(s.tag){case 3:xw(s),ws();break;case 5:Hx(s);break;case 1:En(s.type)&&Sc(s);break;case 4:pm(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,E=s.memoizedProps.value;ct(Oc,f._currentValue),f._currentValue=E;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ct(yt,yt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?Sw(i,s,l):(ct(yt,yt.current&1),i=Wr(i,s,l),i!==null?i.sibling:null);ct(yt,yt.current&1);break;case 19:if(f=(l&s.childLanes)!==0,(i.flags&128)!==0){if(f)return Aw(i,s,l);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ct(yt,yt.current),f)break;return null;case 22:case 23:return s.lanes=0,Tw(i,s,l)}return Wr(i,s,l)}var Cw,Mm,kw,Nw;Cw=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Mm=function(){},kw=function(i,s,l,f){var E=i.memoizedProps;if(E!==f){i=s.stateNode,lo(Nr.current);var T=null;switch(l){case"input":E=ir(i,E),f=ir(i,f),T=[];break;case"select":E=w({},E,{value:void 0}),f=w({},f,{value:void 0}),T=[];break;case"textarea":E=La(i,E),f=La(i,f),T=[];break;default:typeof E.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=_c)}Vt(l,f);var S;l=null;for(Z in E)if(!f.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var D=E[Z];for(S in D)D.hasOwnProperty(S)&&(l||(l={}),l[S]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(o.hasOwnProperty(Z)?T||(T=[]):(T=T||[]).push(Z,null));for(Z in f){var H=f[Z];if(D=E!=null?E[Z]:void 0,f.hasOwnProperty(Z)&&H!==D&&(H!=null||D!=null))if(Z==="style")if(D){for(S in D)!D.hasOwnProperty(S)||H&&H.hasOwnProperty(S)||(l||(l={}),l[S]="");for(S in H)H.hasOwnProperty(S)&&D[S]!==H[S]&&(l||(l={}),l[S]=H[S])}else l||(T||(T=[]),T.push(Z,l)),l=H;else Z==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,D=D?D.__html:void 0,H!=null&&D!==H&&(T=T||[]).push(Z,H)):Z==="children"?typeof H!="string"&&typeof H!="number"||(T=T||[]).push(Z,""+H):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(o.hasOwnProperty(Z)?(H!=null&&Z==="onScroll"&&ft("scroll",i),T||D===H||(T=[])):(T=T||[]).push(Z,H))}l&&(T=T||[]).push("style",l);var Z=T;(s.updateQueue=Z)&&(s.flags|=4)}},Nw=function(i,s,l,f){l!==f&&(s.flags|=4)};function du(i,s){if(!Et)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function en(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,f=0;if(s)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,f|=E.subtreeFlags&14680064,f|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,f|=E.subtreeFlags,f|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=f,i.childLanes=l,s}function dB(i,s,l){var f=s.pendingProps;switch(im(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return en(s),null;case 1:return En(s.type)&&wc(),en(s),null;case 3:return f=s.stateNode,Cs(),ht(gn),ht(Jt),Em(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(kc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,ar!==null&&(Wm(ar),ar=null))),Mm(i,s),en(s),null;case 5:mm(s);var E=lo(su.current);if(l=s.type,i!==null&&s.stateNode!=null)kw(i,s,l,f,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return en(s),null}if(i=lo(Nr.current),kc(s)){f=s.stateNode,l=s.type;var T=s.memoizedProps;switch(f[kr]=s,f[tu]=T,i=(s.mode&1)!==0,l){case"dialog":ft("cancel",f),ft("close",f);break;case"iframe":case"object":case"embed":ft("load",f);break;case"video":case"audio":for(E=0;E<Ja.length;E++)ft(Ja[E],f);break;case"source":ft("error",f);break;case"img":case"image":case"link":ft("error",f),ft("load",f);break;case"details":ft("toggle",f);break;case"input":Ia(f,T),ft("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!T.multiple},ft("invalid",f);break;case"textarea":Ql(f,T),ft("invalid",f)}Vt(l,T),E=null;for(var S in T)if(T.hasOwnProperty(S)){var D=T[S];S==="children"?typeof D=="string"?f.textContent!==D&&(T.suppressHydrationWarning!==!0&&bc(f.textContent,D,i),E=["children",D]):typeof D=="number"&&f.textContent!==""+D&&(T.suppressHydrationWarning!==!0&&bc(f.textContent,D,i),E=["children",""+D]):o.hasOwnProperty(S)&&D!=null&&S==="onScroll"&&ft("scroll",f)}switch(l){case"input":mn(f),Kl(f,T,!0);break;case"textarea":mn(f),Zl(f);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(f.onclick=_c)}f=E,s.updateQueue=f,f!==null&&(s.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=re(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=S.createElement(l,{is:f.is}):(i=S.createElement(l),l==="select"&&(S=i,f.multiple?S.multiple=!0:f.size&&(S.size=f.size))):i=S.createElementNS(i,l),i[kr]=s,i[tu]=f,Cw(i,s,!1,!1),s.stateNode=i;e:{switch(S=Ar(l,f),l){case"dialog":ft("cancel",i),ft("close",i),E=f;break;case"iframe":case"object":case"embed":ft("load",i),E=f;break;case"video":case"audio":for(E=0;E<Ja.length;E++)ft(Ja[E],i);E=f;break;case"source":ft("error",i),E=f;break;case"img":case"image":case"link":ft("error",i),ft("load",i),E=f;break;case"details":ft("toggle",i),E=f;break;case"input":Ia(i,f),E=ir(i,f),ft("invalid",i);break;case"option":E=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},E=w({},f,{value:void 0}),ft("invalid",i);break;case"textarea":Ql(i,f),E=La(i,f),ft("invalid",i);break;default:E=f}Vt(l,E),D=E;for(T in D)if(D.hasOwnProperty(T)){var H=D[T];T==="style"?li(i,H):T==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&We(i,H)):T==="children"?typeof H=="string"?(l!=="textarea"||H!=="")&&Je(i,H):typeof H=="number"&&Je(i,""+H):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(o.hasOwnProperty(T)?H!=null&&T==="onScroll"&&ft("scroll",i):H!=null&&I(i,T,H,S))}switch(l){case"input":mn(i),Kl(i,f,!1);break;case"textarea":mn(i),Zl(i);break;case"option":f.value!=null&&i.setAttribute("value",""+Se(f.value));break;case"select":i.multiple=!!f.multiple,T=f.value,T!=null?ui(i,!!f.multiple,T,!1):f.defaultValue!=null&&ui(i,!!f.multiple,f.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=_c)}switch(l){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return en(s),null;case 6:if(i&&s.stateNode!=null)Nw(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(l=lo(su.current),lo(Nr.current),kc(s)){if(f=s.stateNode,l=s.memoizedProps,f[kr]=s,(T=f.nodeValue!==l)&&(i=Pn,i!==null))switch(i.tag){case 3:bc(f.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&bc(f.nodeValue,l,(i.mode&1)!==0)}T&&(s.flags|=4)}else f=(l.nodeType===9?l:l.ownerDocument).createTextNode(f),f[kr]=s,s.stateNode=f}return en(s),null;case 13:if(ht(yt),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Et&&In!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Ix(),ws(),s.flags|=98560,T=!1;else if(T=kc(s),f!==null&&f.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=s.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[kr]=s}else ws(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;en(s),T=!1}else ar!==null&&(Wm(ar),ar=null),T=!0;if(!T)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(yt.current&1)!==0?Lt===0&&(Lt=3):Km())),s.updateQueue!==null&&(s.flags|=4),en(s),null);case 4:return Cs(),Mm(i,s),i===null&&Za(s.stateNode.containerInfo),en(s),null;case 10:return cm(s.type._context),en(s),null;case 17:return En(s.type)&&wc(),en(s),null;case 19:if(ht(yt),T=s.memoizedState,T===null)return en(s),null;if(f=(s.flags&128)!==0,S=T.rendering,S===null)if(f)du(T,!1);else{if(Lt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(S=Lc(i),S!==null){for(s.flags|=128,du(T,!1),f=S.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=l,l=s.child;l!==null;)T=l,i=f,T.flags&=14680066,S=T.alternate,S===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=S.childLanes,T.lanes=S.lanes,T.child=S.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=S.memoizedProps,T.memoizedState=S.memoizedState,T.updateQueue=S.updateQueue,T.type=S.type,i=S.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return ct(yt,yt.current&1|2),s.child}i=i.sibling}T.tail!==null&&vt()>Ps&&(s.flags|=128,f=!0,du(T,!1),s.lanes=4194304)}else{if(!f)if(i=Lc(S),i!==null){if(s.flags|=128,f=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),du(T,!0),T.tail===null&&T.tailMode==="hidden"&&!S.alternate&&!Et)return en(s),null}else 2*vt()-T.renderingStartTime>Ps&&l!==1073741824&&(s.flags|=128,f=!0,du(T,!1),s.lanes=4194304);T.isBackwards?(S.sibling=s.child,s.child=S):(l=T.last,l!==null?l.sibling=S:s.child=S,T.last=S)}return T.tail!==null?(s=T.tail,T.rendering=s,T.tail=s.sibling,T.renderingStartTime=vt(),s.sibling=null,l=yt.current,ct(yt,f?l&1|2:l&1),s):(en(s),null);case 22:case 23:return Xm(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Rn&1073741824)!==0&&(en(s),s.subtreeFlags&6&&(s.flags|=8192)):en(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function fB(i,s){switch(im(s),s.tag){case 1:return En(s.type)&&wc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Cs(),ht(gn),ht(Jt),Em(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return mm(s),null;case 13:if(ht(yt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ws()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return ht(yt),null;case 4:return Cs(),null;case 10:return cm(s.type._context),null;case 22:case 23:return Xm(),null;case 24:return null;default:return null}}var $c=!1,tn=!1,hB=typeof WeakSet=="function"?WeakSet:Set,we=null;function Ns(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(f){_t(i,s,f)}else l.current=null}function Fm(i,s,l){try{l()}catch(f){_t(i,s,f)}}var Ow=!1;function pB(i,s){if(Xp=lc,i=ux(),zp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var E=f.anchorOffset,T=f.focusNode;f=f.focusOffset;try{l.nodeType,T.nodeType}catch(Te){l=null;break e}var S=0,D=-1,H=-1,Z=0,fe=0,me=i,ue=null;t:for(;;){for(var xe;me!==l||E!==0&&me.nodeType!==3||(D=S+E),me!==T||f!==0&&me.nodeType!==3||(H=S+f),me.nodeType===3&&(S+=me.nodeValue.length),(xe=me.firstChild)!==null;)ue=me,me=xe;for(;;){if(me===i)break t;if(ue===l&&++Z===E&&(D=S),ue===T&&++fe===f&&(H=S),(xe=me.nextSibling)!==null)break;me=ue,ue=me.parentNode}me=xe}l=D===-1||H===-1?null:{start:D,end:H}}else l=null}l=l||{start:0,end:0}}else l=null;for(Kp={focusedElem:i,selectionRange:l},lc=!1,we=s;we!==null;)if(s=we,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,we=i;else for(;we!==null;){s=we;try{var ve=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ve!==null){var Ne=ve.memoizedProps,At=ve.memoizedState,X=s.stateNode,V=X.getSnapshotBeforeUpdate(s.elementType===s.type?Ne:ur(s.type,Ne),At);X.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var Q=s.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(Te){_t(s,s.return,Te)}if(i=s.sibling,i!==null){i.return=s.return,we=i;break}we=s.return}return ve=Ow,Ow=!1,ve}function fu(i,s,l){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var E=f=f.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Fm(s,l,T)}E=E.next}while(E!==f)}}function Vc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var f=l.create;l.destroy=f()}l=l.next}while(l!==s)}}function Bm(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function Pw(i){var s=i.alternate;s!==null&&(i.alternate=null,Pw(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[kr],delete s[tu],delete s[em],delete s[KF],delete s[QF])),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 Iw(i){return i.tag===5||i.tag===3||i.tag===4}function Rw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Iw(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 Um(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=_c));else if(f!==4&&(i=i.child,i!==null))for(Um(i,s,l),i=i.sibling;i!==null;)Um(i,s,l),i=i.sibling}function Hm(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(Hm(i,s,l),i=i.sibling;i!==null;)Hm(i,s,l),i=i.sibling}var qt=null,lr=!1;function xi(i,s,l){for(l=l.child;l!==null;)Lw(i,s,l),l=l.sibling}function Lw(i,s,l){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(rc,l)}catch(D){}switch(l.tag){case 5:tn||Ns(l,s);case 6:var f=qt,E=lr;qt=null,xi(i,s,l),qt=f,lr=E,qt!==null&&(lr?(i=qt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):qt.removeChild(l.stateNode));break;case 18:qt!==null&&(lr?(i=qt,l=l.stateNode,i.nodeType===8?Zp(i.parentNode,l):i.nodeType===1&&Zp(i,l),Va(i)):Zp(qt,l.stateNode));break;case 4:f=qt,E=lr,qt=l.stateNode.containerInfo,lr=!0,xi(i,s,l),qt=f,lr=E;break;case 0:case 11:case 14:case 15:if(!tn&&(f=l.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){E=f=f.next;do{var T=E,S=T.destroy;T=T.tag,S!==void 0&&((T&2)!==0||(T&4)!==0)&&Fm(l,s,S),E=E.next}while(E!==f)}xi(i,s,l);break;case 1:if(!tn&&(Ns(l,s),f=l.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=l.memoizedProps,f.state=l.memoizedState,f.componentWillUnmount()}catch(D){_t(l,s,D)}xi(i,s,l);break;case 21:xi(i,s,l);break;case 22:l.mode&1?(tn=(f=tn)||l.memoizedState!==null,xi(i,s,l),tn=f):xi(i,s,l);break;default:xi(i,s,l)}}function Dw(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new hB),s.forEach(function(f){var E=wB.bind(null,i,f);l.has(f)||(l.add(f),f.then(E,E))})}}function cr(i,s){var l=s.deletions;if(l!==null)for(var f=0;f<l.length;f++){var E=l[f];try{var T=i,S=s,D=S;e:for(;D!==null;){switch(D.tag){case 5:qt=D.stateNode,lr=!1;break e;case 3:qt=D.stateNode.containerInfo,lr=!0;break e;case 4:qt=D.stateNode.containerInfo,lr=!0;break e}D=D.return}if(qt===null)throw Error(n(160));Lw(T,S,E),qt=null,lr=!1;var H=E.alternate;H!==null&&(H.return=null),E.return=null}catch(Z){_t(E,s,Z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Mw(s,i),s=s.sibling}function Mw(i,s){var l=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(cr(s,i),Pr(i),f&4){try{fu(3,i,i.return),Vc(3,i)}catch(Ne){_t(i,i.return,Ne)}try{fu(5,i,i.return)}catch(Ne){_t(i,i.return,Ne)}}break;case 1:cr(s,i),Pr(i),f&512&&l!==null&&Ns(l,l.return);break;case 5:if(cr(s,i),Pr(i),f&512&&l!==null&&Ns(l,l.return),i.flags&32){var E=i.stateNode;try{Je(E,"")}catch(Ne){_t(i,i.return,Ne)}}if(f&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,S=l!==null?l.memoizedProps:T,D=i.type,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{D==="input"&&T.type==="radio"&&T.name!=null&&Ra(E,T),Ar(D,S);var Z=Ar(D,T);for(S=0;S<H.length;S+=2){var fe=H[S],me=H[S+1];fe==="style"?li(E,me):fe==="dangerouslySetInnerHTML"?We(E,me):fe==="children"?Je(E,me):I(E,fe,me,Z)}switch(D){case"input":as(E,T);break;case"textarea":Jl(E,T);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var xe=T.value;xe!=null?ui(E,!!T.multiple,xe,!1):ue!==!!T.multiple&&(T.defaultValue!=null?ui(E,!!T.multiple,T.defaultValue,!0):ui(E,!!T.multiple,T.multiple?[]:"",!1))}E[tu]=T}catch(Ne){_t(i,i.return,Ne)}}break;case 6:if(cr(s,i),Pr(i),f&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Ne){_t(i,i.return,Ne)}}break;case 3:if(cr(s,i),Pr(i),f&4&&l!==null&&l.memoizedState.isDehydrated)try{Va(s.containerInfo)}catch(Ne){_t(i,i.return,Ne)}break;case 4:cr(s,i),Pr(i);break;case 13:cr(s,i),Pr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||($m=vt())),f&4&&Dw(i);break;case 22:if(fe=l!==null&&l.memoizedState!==null,i.mode&1?(tn=(Z=tn)||fe,cr(s,i),tn=Z):cr(s,i),Pr(i),f&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!fe&&(i.mode&1)!==0)for(we=i,fe=i.child;fe!==null;){for(me=we=fe;we!==null;){switch(ue=we,xe=ue.child,ue.tag){case 0:case 11:case 14:case 15:fu(4,ue,ue.return);break;case 1:Ns(ue,ue.return);var ve=ue.stateNode;if(typeof ve.componentWillUnmount=="function"){f=ue,l=ue.return;try{s=f,ve.props=s.memoizedProps,ve.state=s.memoizedState,ve.componentWillUnmount()}catch(Ne){_t(f,l,Ne)}}break;case 5:Ns(ue,ue.return);break;case 22:if(ue.memoizedState!==null){Uw(me);continue}}xe!==null?(xe.return=ue,we=xe):Uw(me)}fe=fe.sibling}e:for(fe=null,me=i;;){if(me.tag===5){if(fe===null){fe=me;try{E=me.stateNode,Z?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(D=me.stateNode,H=me.memoizedProps.style,S=H!=null&&H.hasOwnProperty("display")?H.display:null,D.style.display=zn("display",S))}catch(Ne){_t(i,i.return,Ne)}}}else if(me.tag===6){if(fe===null)try{me.stateNode.nodeValue=Z?"":me.memoizedProps}catch(Ne){_t(i,i.return,Ne)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===i)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===i)break e;for(;me.sibling===null;){if(me.return===null||me.return===i)break e;fe===me&&(fe=null),me=me.return}fe===me&&(fe=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:cr(s,i),Pr(i),f&4&&Dw(i);break;case 21:break;default:cr(s,i),Pr(i)}}function Pr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(Iw(l)){var f=l;break e}l=l.return}throw Error(n(160))}switch(f.tag){case 5:var E=f.stateNode;f.flags&32&&(Je(E,""),f.flags&=-33);var T=Rw(i);Hm(i,T,E);break;case 3:case 4:var S=f.stateNode.containerInfo,D=Rw(i);Um(i,D,S);break;default:throw Error(n(161))}}catch(H){_t(i,i.return,H)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function mB(i,s,l){we=i,Fw(i)}function Fw(i,s,l){for(var f=(i.mode&1)!==0;we!==null;){var E=we,T=E.child;if(E.tag===22&&f){var S=E.memoizedState!==null||$c;if(!S){var D=E.alternate,H=D!==null&&D.memoizedState!==null||tn;D=$c;var Z=tn;if($c=S,(tn=H)&&!Z)for(we=E;we!==null;)S=we,H=S.child,S.tag===22&&S.memoizedState!==null?Hw(E):H!==null?(H.return=S,we=H):Hw(E);for(;T!==null;)we=T,Fw(T),T=T.sibling;we=E,$c=D,tn=Z}Bw(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,we=T):Bw(i)}}function Bw(i){for(;we!==null;){var s=we;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:tn||Vc(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!tn)if(l===null)f.componentDidMount();else{var E=s.elementType===s.type?l.memoizedProps:ur(s.type,l.memoizedProps);f.componentDidUpdate(E,l.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var T=s.updateQueue;T!==null&&Ux(s,T,f);break;case 3:var S=s.updateQueue;if(S!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}Ux(s,S,l)}break;case 5:var D=s.stateNode;if(l===null&&s.flags&4){l=D;var H=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&l.focus();break;case"img":H.src&&(l.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Z=s.alternate;if(Z!==null){var fe=Z.memoizedState;if(fe!==null){var me=fe.dehydrated;me!==null&&Va(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}tn||s.flags&512&&Bm(s)}catch(ue){_t(s,s.return,ue)}}if(s===i){we=null;break}if(l=s.sibling,l!==null){l.return=s.return,we=l;break}we=s.return}}function Uw(i){for(;we!==null;){var s=we;if(s===i){we=null;break}var l=s.sibling;if(l!==null){l.return=s.return,we=l;break}we=s.return}}function Hw(i){for(;we!==null;){var s=we;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{Vc(4,s)}catch(H){_t(s,l,H)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var E=s.return;try{f.componentDidMount()}catch(H){_t(s,E,H)}}var T=s.return;try{Bm(s)}catch(H){_t(s,T,H)}break;case 5:var S=s.return;try{Bm(s)}catch(H){_t(s,S,H)}}}catch(H){_t(s,s.return,H)}if(s===i){we=null;break}var D=s.sibling;if(D!==null){D.return=s.return,we=D;break}we=s.return}}var gB=Math.ceil,qc=$.ReactCurrentDispatcher,zm=$.ReactCurrentOwner,Yn=$.ReactCurrentBatchConfig,Ze=0,zt=null,Ot=null,Yt=0,Rn=0,Os=Ei(0),Lt=0,hu=null,fo=0,Yc=0,jm=0,pu=null,Tn=null,$m=0,Ps=1/0,Gr=null,Wc=!1,Vm=null,wi=null,Gc=!1,Si=null,Xc=0,mu=0,qm=null,Kc=-1,Qc=0;function sn(){return(Ze&6)!==0?vt():Kc!==-1?Kc:Kc=vt()}function vi(i){return(i.mode&1)===0?1:(Ze&2)!==0&&Yt!==0?Yt&-Yt:ZF.transition!==null?(Qc===0&&(Qc=R_()),Qc):(i=nt,i!==0||(i=window.event,i=i===void 0?16:j_(i.type)),i)}function dr(i,s,l,f){if(50<mu)throw mu=0,qm=null,Error(n(185));Ua(i,l,f),((Ze&2)===0||i!==zt)&&(i===zt&&((Ze&2)===0&&(Yc|=l),Lt===4&&Ai(i,Yt)),bn(i,f),l===1&&Ze===0&&(s.mode&1)===0&&(Ps=vt()+500,vc&&Ti()))}function bn(i,s){var l=i.callbackNode;Z9(i,s);var f=sc(i,i===zt?Yt:0);if(f===0)l!==null&&O_(l),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(l!=null&&O_(l),s===1)i.tag===0?JF(jw.bind(null,i)):Cx(jw.bind(null,i)),GF(function(){(Ze&6)===0&&Ti()}),l=null;else{switch(L_(f)){case 1:l=Sp;break;case 4:l=P_;break;case 16:l=nc;break;case 536870912:l=I_;break;default:l=nc}l=Kw(l,zw.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function zw(i,s){if(Kc=-1,Qc=0,(Ze&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Is()&&i.callbackNode!==l)return null;var f=sc(i,i===zt?Yt:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=Jc(i,f);else{s=f;var E=Ze;Ze|=2;var T=Vw();(zt!==i||Yt!==s)&&(Gr=null,Ps=vt()+500,po(i,s));do try{TB();break}catch(D){$w(i,D)}while(!0);lm(),qc.current=T,Ze=E,Ot!==null?s=0:(zt=null,Yt=0,s=Lt)}if(s!==0){if(s===2&&(E=vp(i),E!==0&&(f=E,s=Ym(i,E))),s===1)throw l=hu,po(i,0),Ai(i,f),bn(i,vt()),l;if(s===6)Ai(i,f);else{if(E=i.current.alternate,(f&30)===0&&!EB(E)&&(s=Jc(i,f),s===2&&(T=vp(i),T!==0&&(f=T,s=Ym(i,T))),s===1))throw l=hu,po(i,0),Ai(i,f),bn(i,vt()),l;switch(i.finishedWork=E,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:mo(i,Tn,Gr);break;case 3:if(Ai(i,f),(f&130023424)===f&&(s=$m+500-vt(),10<s)){if(sc(i,0)!==0)break;if(E=i.suspendedLanes,(E&f)!==f){sn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Jp(mo.bind(null,i,Tn,Gr),s);break}mo(i,Tn,Gr);break;case 4:if(Ai(i,f),(f&4194240)===f)break;for(s=i.eventTimes,E=-1;0<f;){var S=31-or(f);T=1<<S,S=s[S],S>E&&(E=S),f&=~T}if(f=E,f=vt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*gB(f/1960))-f,10<f){i.timeoutHandle=Jp(mo.bind(null,i,Tn,Gr),f);break}mo(i,Tn,Gr);break;case 5:mo(i,Tn,Gr);break;default:throw Error(n(329))}}}return bn(i,vt()),i.callbackNode===l?zw.bind(null,i):null}function Ym(i,s){var l=pu;return i.current.memoizedState.isDehydrated&&(po(i,s).flags|=256),i=Jc(i,s),i!==2&&(s=Tn,Tn=l,s!==null&&Wm(s)),i}function Wm(i){Tn===null?Tn=i:Tn.push.apply(Tn,i)}function EB(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var f=0;f<l.length;f++){var E=l[f],T=E.getSnapshot;E=E.value;try{if(!sr(T(),E))return!1}catch(S){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ai(i,s){for(s&=~jm,s&=~Yc,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-or(s),f=1<<l;i[l]=-1,s&=~f}}function jw(i){if((Ze&6)!==0)throw Error(n(327));Is();var s=sc(i,0);if((s&1)===0)return bn(i,vt()),null;var l=Jc(i,s);if(i.tag!==0&&l===2){var f=vp(i);f!==0&&(s=f,l=Ym(i,f))}if(l===1)throw l=hu,po(i,0),Ai(i,s),bn(i,vt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,mo(i,Tn,Gr),bn(i,vt()),null}function Gm(i,s){var l=Ze;Ze|=1;try{return i(s)}finally{Ze=l,Ze===0&&(Ps=vt()+500,vc&&Ti())}}function ho(i){Si!==null&&Si.tag===0&&(Ze&6)===0&&Is();var s=Ze;Ze|=1;var l=Yn.transition,f=nt;try{if(Yn.transition=null,nt=1,i)return i()}finally{nt=f,Yn.transition=l,Ze=s,(Ze&6)===0&&Ti()}}function Xm(){Rn=Os.current,ht(Os)}function po(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,WF(l)),Ot!==null)for(l=Ot.return;l!==null;){var f=l;switch(im(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&wc();break;case 3:Cs(),ht(gn),ht(Jt),Em();break;case 5:mm(f);break;case 4:Cs();break;case 13:ht(yt);break;case 19:ht(yt);break;case 10:cm(f.type._context);break;case 22:case 23:Xm()}l=l.return}if(zt=i,Ot=i=Ci(i.current,null),Yt=Rn=s,Lt=0,hu=null,jm=Yc=fo=0,Tn=pu=null,uo!==null){for(s=0;s<uo.length;s++)if(l=uo[s],f=l.interleaved,f!==null){l.interleaved=null;var E=f.next,T=l.pending;if(T!==null){var S=T.next;T.next=E,f.next=S}l.pending=f}uo=null}return i}function $w(i,s){do{var l=Ot;try{if(lm(),Dc.current=Uc,Mc){for(var f=Tt.memoizedState;f!==null;){var E=f.queue;E!==null&&(E.pending=null),f=f.next}Mc=!1}if(co=0,Ht=Rt=Tt=null,au=!1,uu=0,zm.current=null,l===null||l.return===null){Lt=1,hu=s,Ot=null;break}e:{var T=i,S=l.return,D=l,H=s;if(s=Yt,D.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var Z=H,fe=D,me=fe.tag;if((fe.mode&1)===0&&(me===0||me===11||me===15)){var ue=fe.alternate;ue?(fe.updateQueue=ue.updateQueue,fe.memoizedState=ue.memoizedState,fe.lanes=ue.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var xe=pw(S);if(xe!==null){xe.flags&=-257,mw(xe,S,D,T,s),xe.mode&1&&hw(T,Z,s),s=xe,H=Z;var ve=s.updateQueue;if(ve===null){var Ne=new Set;Ne.add(H),s.updateQueue=Ne}else ve.add(H);break e}else{if((s&1)===0){hw(T,Z,s),Km();break e}H=Error(n(426))}}else if(Et&&D.mode&1){var At=pw(S);if(At!==null){(At.flags&65536)===0&&(At.flags|=256),mw(At,S,D,T,s),am(ks(H,D));break e}}T=H=ks(H,D),Lt!==4&&(Lt=2),pu===null?pu=[T]:pu.push(T),T=S;do{switch(T.tag){case 3:T.flags|=65536,s&=-s,T.lanes|=s;var X=dw(T,H,s);Bx(T,X);break e;case 1:D=H;var V=T.type,Q=T.stateNode;if((T.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(wi===null||!wi.has(Q)))){T.flags|=65536,s&=-s,T.lanes|=s;var Te=fw(T,D,s);Bx(T,Te);break e}}T=T.return}while(T!==null)}Yw(l)}catch(Oe){s=Oe,Ot===l&&l!==null&&(Ot=l=l.return);continue}break}while(!0)}function Vw(){var i=qc.current;return qc.current=Uc,i===null?Uc:i}function Km(){(Lt===0||Lt===3||Lt===2)&&(Lt=4),zt===null||(fo&268435455)===0&&(Yc&268435455)===0||Ai(zt,Yt)}function Jc(i,s){var l=Ze;Ze|=2;var f=Vw();(zt!==i||Yt!==s)&&(Gr=null,po(i,s));do try{yB();break}catch(E){$w(i,E)}while(!0);if(lm(),Ze=l,qc.current=f,Ot!==null)throw Error(n(261));return zt=null,Yt=0,Lt}function yB(){for(;Ot!==null;)qw(Ot)}function TB(){for(;Ot!==null&&!V9();)qw(Ot)}function qw(i){var s=Xw(i.alternate,i,Rn);i.memoizedProps=i.pendingProps,s===null?Yw(i):Ot=s,zm.current=null}function Yw(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=dB(l,s,Rn),l!==null){Ot=l;return}}else{if(l=fB(l,s),l!==null){l.flags&=32767,Ot=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Lt=6,Ot=null;return}}if(s=s.sibling,s!==null){Ot=s;return}Ot=s=i}while(s!==null);Lt===0&&(Lt=5)}function mo(i,s,l){var f=nt,E=Yn.transition;try{Yn.transition=null,nt=1,bB(i,s,l,f)}finally{Yn.transition=E,nt=f}return null}function bB(i,s,l,f){do Is();while(Si!==null);if((Ze&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var T=l.lanes|l.childLanes;if(eF(i,T),i===zt&&(Ot=zt=null,Yt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Gc||(Gc=!0,Kw(nc,function(){return Is(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=Yn.transition,Yn.transition=null;var S=nt;nt=1;var D=Ze;Ze|=4,zm.current=null,pB(i,l),Mw(l,i),HF(Kp),lc=!!Xp,Kp=Xp=null,i.current=l,mB(l),q9(),Ze=D,nt=S,Yn.transition=T}else i.current=l;if(Gc&&(Gc=!1,Si=i,Xc=E),T=i.pendingLanes,T===0&&(wi=null),G9(l.stateNode),bn(i,vt()),s!==null)for(f=i.onRecoverableError,l=0;l<s.length;l++)E=s[l],f(E.value,{componentStack:E.stack,digest:E.digest});if(Wc)throw Wc=!1,i=Vm,Vm=null,i;return(Xc&1)!==0&&i.tag!==0&&Is(),T=i.pendingLanes,(T&1)!==0?i===qm?mu++:(mu=0,qm=i):mu=0,Ti(),null}function Is(){if(Si!==null){var i=L_(Xc),s=Yn.transition,l=nt;try{if(Yn.transition=null,nt=16>i?16:i,Si===null)var f=!1;else{if(i=Si,Si=null,Xc=0,(Ze&6)!==0)throw Error(n(331));var E=Ze;for(Ze|=4,we=i.current;we!==null;){var T=we,S=T.child;if((we.flags&16)!==0){var D=T.deletions;if(D!==null){for(var H=0;H<D.length;H++){var Z=D[H];for(we=Z;we!==null;){var fe=we;switch(fe.tag){case 0:case 11:case 15:fu(8,fe,T)}var me=fe.child;if(me!==null)me.return=fe,we=me;else for(;we!==null;){fe=we;var ue=fe.sibling,xe=fe.return;if(Pw(fe),fe===Z){we=null;break}if(ue!==null){ue.return=xe,we=ue;break}we=xe}}}var ve=T.alternate;if(ve!==null){var Ne=ve.child;if(Ne!==null){ve.child=null;do{var At=Ne.sibling;Ne.sibling=null,Ne=At}while(Ne!==null)}}we=T}}if((T.subtreeFlags&2064)!==0&&S!==null)S.return=T,we=S;else e:for(;we!==null;){if(T=we,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:fu(9,T,T.return)}var X=T.sibling;if(X!==null){X.return=T.return,we=X;break e}we=T.return}}var V=i.current;for(we=V;we!==null;){S=we;var Q=S.child;if((S.subtreeFlags&2064)!==0&&Q!==null)Q.return=S,we=Q;else e:for(S=V;we!==null;){if(D=we,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:Vc(9,D)}}catch(Oe){_t(D,D.return,Oe)}if(D===S){we=null;break e}var Te=D.sibling;if(Te!==null){Te.return=D.return,we=Te;break e}we=D.return}}if(Ze=E,Ti(),Cr&&typeof Cr.onPostCommitFiberRoot=="function")try{Cr.onPostCommitFiberRoot(rc,i)}catch(Oe){}f=!0}return f}finally{nt=l,Yn.transition=s}}return!1}function Ww(i,s,l){s=ks(l,s),s=dw(i,s,1),i=_i(i,s,1),s=sn(),i!==null&&(Ua(i,1,s),bn(i,s))}function _t(i,s,l){if(i.tag===3)Ww(i,i,l);else for(;s!==null;){if(s.tag===3){Ww(s,i,l);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(wi===null||!wi.has(f))){i=ks(l,i),i=fw(s,i,1),s=_i(s,i,1),i=sn(),s!==null&&(Ua(s,1,i),bn(s,i));break}}s=s.return}}function _B(i,s,l){var f=i.pingCache;f!==null&&f.delete(s),s=sn(),i.pingedLanes|=i.suspendedLanes&l,zt===i&&(Yt&l)===l&&(Lt===4||Lt===3&&(Yt&130023424)===Yt&&500>vt()-$m?po(i,0):jm|=l),bn(i,s)}function Gw(i,s){s===0&&((i.mode&1)===0?s=1:(s=oc,oc<<=1,(oc&130023424)===0&&(oc=4194304)));var l=sn();i=qr(i,s),i!==null&&(Ua(i,s,l),bn(i,l))}function xB(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),Gw(i,l)}function wB(i,s){var l=0;switch(i.tag){case 13:var f=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Gw(i,l)}var Xw;Xw=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||gn.current)yn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return yn=!1,cB(i,s,l);yn=(i.flags&131072)!==0}else yn=!1,Et&&(s.flags&1048576)!==0&&kx(s,Cc,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;jc(i,s),i=s.pendingProps;var E=bs(s,Jt.current);As(s,l),E=bm(null,s,f,i,E,l);var T=_m();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,En(f)?(T=!0,Sc(s)):T=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,hm(s),E.updater=Hc,s.stateNode=E,E._reactInternals=s,Cm(s,f,i,l),s=Pm(null,s,f,!0,T,l)):(s.tag=0,Et&&T&&rm(s),on(null,s,E,l),s=s.child),s;case 16:f=s.elementType;e:{switch(jc(i,s),i=s.pendingProps,E=f._init,f=E(f._payload),s.type=f,E=s.tag=vB(f),i=ur(f,i),E){case 0:s=Om(null,s,f,i,l);break e;case 1:s=_w(null,s,f,i,l);break e;case 11:s=gw(null,s,f,i,l);break e;case 14:s=Ew(null,s,f,ur(f.type,i),l);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:ur(f,E),Om(i,s,f,E,l);case 1:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:ur(f,E),_w(i,s,f,E,l);case 3:e:{if(xw(s),i===null)throw Error(n(387));f=s.pendingProps,T=s.memoizedState,E=T.element,Fx(i,s),Rc(s,f,null,l);var S=s.memoizedState;if(f=S.element,T.isDehydrated)if(T={element:f,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},s.updateQueue.baseState=T,s.memoizedState=T,s.flags&256){E=ks(Error(n(423)),s),s=ww(i,s,f,l,E);break e}else if(f!==E){E=ks(Error(n(424)),s),s=ww(i,s,f,l,E);break e}else for(In=gi(s.stateNode.containerInfo.firstChild),Pn=s,Et=!0,ar=null,l=Dx(s,null,f,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ws(),f===E){s=Wr(i,s,l);break e}on(i,s,f,l)}s=s.child}return s;case 5:return Hx(s),i===null&&sm(s),f=s.type,E=s.pendingProps,T=i!==null?i.memoizedProps:null,S=E.children,Qp(f,E)?S=null:T!==null&&Qp(f,T)&&(s.flags|=32),bw(i,s),on(i,s,S,l),s.child;case 6:return i===null&&sm(s),null;case 13:return Sw(i,s,l);case 4:return pm(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=Ss(s,null,f,l):on(i,s,f,l),s.child;case 11:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:ur(f,E),gw(i,s,f,E,l);case 7:return on(i,s,s.pendingProps,l),s.child;case 8:return on(i,s,s.pendingProps.children,l),s.child;case 12:return on(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(f=s.type._context,E=s.pendingProps,T=s.memoizedProps,S=E.value,ct(Oc,f._currentValue),f._currentValue=S,T!==null)if(sr(T.value,S)){if(T.children===E.children&&!gn.current){s=Wr(i,s,l);break e}}else for(T=s.child,T!==null&&(T.return=s);T!==null;){var D=T.dependencies;if(D!==null){S=T.child;for(var H=D.firstContext;H!==null;){if(H.context===f){if(T.tag===1){H=Yr(-1,l&-l),H.tag=2;var Z=T.updateQueue;if(Z!==null){Z=Z.shared;var fe=Z.pending;fe===null?H.next=H:(H.next=fe.next,fe.next=H),Z.pending=H}}T.lanes|=l,H=T.alternate,H!==null&&(H.lanes|=l),dm(T.return,l,s),D.lanes|=l;break}H=H.next}}else if(T.tag===10)S=T.type===s.type?null:T.child;else if(T.tag===18){if(S=T.return,S===null)throw Error(n(341));S.lanes|=l,D=S.alternate,D!==null&&(D.lanes|=l),dm(S,l,s),S=T.sibling}else S=T.child;if(S!==null)S.return=T;else for(S=T;S!==null;){if(S===s){S=null;break}if(T=S.sibling,T!==null){T.return=S.return,S=T;break}S=S.return}T=S}on(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,f=s.pendingProps.children,As(s,l),E=Vn(E),f=f(E),s.flags|=1,on(i,s,f,l),s.child;case 14:return f=s.type,E=ur(f,s.pendingProps),E=ur(f.type,E),Ew(i,s,f,E,l);case 15:return yw(i,s,s.type,s.pendingProps,l);case 17:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:ur(f,E),jc(i,s),s.tag=1,En(f)?(i=!0,Sc(s)):i=!1,As(s,l),lw(s,f,E),Cm(s,f,E,l),Pm(null,s,f,!0,i,l);case 19:return Aw(i,s,l);case 22:return Tw(i,s,l)}throw Error(n(156,s.tag))};function Kw(i,s){return N_(i,s)}function SB(i,s,l,f){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wn(i,s,l,f){return new SB(i,s,l,f)}function Qm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function vB(i){if(typeof i=="function")return Qm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ae)return 11;if(i===be)return 14}return 2}function Ci(i,s){var l=i.alternate;return l===null?(l=Wn(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Zc(i,s,l,f,E,T){var S=2;if(f=i,typeof i=="function")Qm(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case ee:return go(l.children,E,T,s);case ce:S=8,E|=8;break;case pe:return i=Wn(12,l,s,E|2),i.elementType=pe,i.lanes=T,i;case de:return i=Wn(13,l,s,E),i.elementType=de,i.lanes=T,i;case oe:return i=Wn(19,l,s,E),i.elementType=oe,i.lanes=T,i;case se:return ed(l,E,T,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case U:S=10;break e;case ne:S=9;break e;case ae:S=11;break e;case be:S=14;break e;case Ce:S=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=Wn(S,l,s,E),s.elementType=i,s.type=f,s.lanes=T,s}function go(i,s,l,f){return i=Wn(7,i,f,s),i.lanes=l,i}function ed(i,s,l,f){return i=Wn(22,i,f,s),i.elementType=se,i.lanes=l,i.stateNode={isHidden:!1},i}function Jm(i,s,l){return i=Wn(6,i,null,s),i.lanes=l,i}function Zm(i,s,l){return s=Wn(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function AB(i,s,l,f,E){this.tag=s,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=Ap(0),this.expirationTimes=Ap(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ap(0),this.identifierPrefix=f,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function e0(i,s,l,f,E,T,S,D,H){return i=new AB(i,s,l,D,H),s===1?(s=1,T===!0&&(s|=8)):s=0,T=Wn(3,null,null,s),i.current=T,T.stateNode=i,T.memoizedState={element:f,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},hm(T),i}function CB(i,s,l){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,key:f==null?null:""+f,children:i,containerInfo:s,implementation:l}}function Qw(i){if(!i)return yi;i=i._reactInternals;e:{if(ro(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(En(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(En(l))return vx(i,l,s)}return s}function Jw(i,s,l,f,E,T,S,D,H){return i=e0(l,f,!0,i,E,T,S,D,H),i.context=Qw(null),l=i.current,f=sn(),E=vi(l),T=Yr(f,E),T.callback=s!=null?s:null,_i(l,T,E),i.current.lanes=E,Ua(i,E,f),bn(i,f),i}function td(i,s,l,f){var E=s.current,T=sn(),S=vi(E);return l=Qw(l),s.context===null?s.context=l:s.pendingContext=l,s=Yr(T,S),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=_i(E,s,S),i!==null&&(dr(i,E,S,T),Ic(i,E,S)),S}function nd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Zw(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function t0(i,s){Zw(i,s),(i=i.alternate)&&Zw(i,s)}function kB(){return null}var e2=typeof reportError=="function"?reportError:function(i){console.error(i)};function n0(i){this._internalRoot=i}rd.prototype.render=n0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));td(i,s,null,null)},rd.prototype.unmount=n0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;ho(function(){td(null,i,null,null)}),s[zr]=null}};function rd(i){this._internalRoot=i}rd.prototype.unstable_scheduleHydration=function(i){if(i){var s=F_();i={blockedOn:null,target:i,priority:s};for(var l=0;l<hi.length&&s!==0&&s<hi[l].priority;l++);hi.splice(l,0,i),l===0&&H_(i)}};function r0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function id(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function t2(){}function NB(i,s,l,f,E){if(E){if(typeof f=="function"){var T=f;f=function(){var Z=nd(S);T.call(Z)}}var S=Jw(s,f,i,0,null,!1,!1,"",t2);return i._reactRootContainer=S,i[zr]=S.current,Za(i.nodeType===8?i.parentNode:i),ho(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof f=="function"){var D=f;f=function(){var Z=nd(H);D.call(Z)}}var H=e0(i,0,!1,null,null,!1,!1,"",t2);return i._reactRootContainer=H,i[zr]=H.current,Za(i.nodeType===8?i.parentNode:i),ho(function(){td(s,H,l,f)}),H}function od(i,s,l,f,E){var T=l._reactRootContainer;if(T){var S=T;if(typeof E=="function"){var D=E;E=function(){var H=nd(S);D.call(H)}}td(s,S,i,E)}else S=NB(l,s,i,E,f);return nd(S)}D_=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=Ba(s.pendingLanes);l!==0&&(Cp(s,l|1),bn(s,vt()),(Ze&6)===0&&(Ps=vt()+500,Ti()))}break;case 13:ho(function(){var f=qr(i,1);if(f!==null){var E=sn();dr(f,i,1,E)}}),t0(i,1)}},kp=function(i){if(i.tag===13){var s=qr(i,134217728);if(s!==null){var l=sn();dr(s,i,134217728,l)}t0(i,134217728)}},M_=function(i){if(i.tag===13){var s=vi(i),l=qr(i,s);if(l!==null){var f=sn();dr(l,i,s,f)}t0(i,s)}},F_=function(){return nt},B_=function(i,s){var l=nt;try{return nt=i,s()}finally{nt=l}},bp=function(i,s,l){switch(s){case"input":if(as(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var f=l[s];if(f!==i&&f.form===i.form){var E=xc(f);if(!E)throw Error(n(90));to(f),as(f,E)}}}break;case"textarea":Jl(i,l);break;case"select":s=l.value,s!=null&&ui(i,!!l.multiple,s,!1)}},x_=Gm,w_=ho;var OB={usingClientEntryPoint:!1,Events:[nu,ys,xc,b_,__,Gm]},gu={findFiberByHostInstance:io,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},PB={bundleType:gu.bundleType,version:gu.version,rendererPackageName:gu.rendererPackageName,rendererConfig:gu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=C_(i),i===null?null:i.stateNode},findFiberByHostInstance:gu.findFiberByHostInstance||kB,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var sd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sd.isDisabled&&sd.supportsFiber)try{rc=sd.inject(PB),Cr=sd}catch(i){}}return cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OB,cn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!r0(s))throw Error(n(200));return CB(i,s,null,l)},cn.createRoot=function(i,s){if(!r0(i))throw Error(n(299));var l=!1,f="",E=e2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=e0(i,1,!1,null,null,l,!1,f,E),i[zr]=s.current,Za(i.nodeType===8?i.parentNode:i),new n0(s)},cn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=C_(s),i=i===null?null:i.stateNode,i},cn.flushSync=function(i){return ho(i)},cn.hydrate=function(i,s,l){if(!id(s))throw Error(n(200));return od(null,i,s,!0,l)},cn.hydrateRoot=function(i,s,l){if(!r0(i))throw Error(n(405));var f=l!=null&&l.hydratedSources||null,E=!1,T="",S=e2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),s=Jw(s,null,i,1,l!=null?l:null,E,!1,T,S),i[zr]=s.current,Za(i),f)for(i=0;i<f.length;i++)l=f[i],E=l._getVersion,E=E(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,E]:s.mutableSourceEagerHydrationData.push(l,E);return new rd(s)},cn.render=function(i,s,l){if(!id(s))throw Error(n(200));return od(null,i,s,!1,l)},cn.unmountComponentAtNode=function(i){if(!id(i))throw Error(n(40));return i._reactRootContainer?(ho(function(){od(null,null,i,!1,function(){i._reactRootContainer=null,i[zr]=null})}),!0):!1},cn.unstable_batchedUpdates=Gm,cn.unstable_renderSubtreeIntoContainer=function(i,s,l,f){if(!id(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return od(i,s,l,!1,f)},cn.version="18.3.1-next-f1338f8080-20240426",cn}var Bg;function Ug(){if(Bg)return of.exports;Bg=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(),of.exports=XA(),of.exports}var Ao=Ug();function Hg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Hg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function z(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hg(e))&&(r&&(r+=" "),r+=t);return r}var zg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},jg=Ni.createContext&&Ni.createContext(zg),KA=["attr","size","title"];function QA(e,t){if(e==null)return{};var n=JA(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JA(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 Gu(){return Gu=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},Gu.apply(this,arguments)}function $g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$g(Object(n),!0).forEach(function(r){ZA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$g(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZA(e,t,n){return t=eC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eC(e){var t=tC(e,"string");return typeof t=="symbol"?t:t+""}function tC(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 Vg(e){return e&&e.map((t,n)=>Ni.createElement(t.tag,Xu({key:n},t.attr),Vg(t.child)))}function it(e){return t=>Ni.createElement(nC,Gu({attr:Xu({},e.attr)},t),Vg(e.child))}function nC(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=QA(e,KA),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Ni.createElement("svg",Gu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Xu(Xu({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Ni.createElement("title",null,a),e.children)};return jg!==void 0?Ni.createElement(jg.Consumer,null,n=>t(n)):t(zg)}function rC(e){return it({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 iC(e){return it({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 oC(e){return it({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 Jn=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:_.jsx("button",{className:z(e,`${L}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?_.jsx("img",{className:z(`${L}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),sC="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",aC=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ot(),o=r==="messaging",a=o?"Open Commerce Client":"Open Copilot",u=o?_.jsx(oC,{className:z(t,`${L}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||sC,alt:"Copilot",className:z(t,`${L}-minimized-icon-img`)});return _.jsx(Jn,{className:z(t,`${L}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},uC=()=>{const{globalClassName:e,themeVariables:t}=ot(),n=()=>{Yu(!1),Rr(!0)};return Ao.createPortal(_.jsx("div",{className:z(e,`${L}-minimized-container`),style:t,children:_.jsx(aC,{onClick:n})}),document.body)};function lC(e){return it({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 Mn(){const e=Y.useContext(cg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const cC=e=>({[`${_n}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${_n}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${_n}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${_n}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${_n}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${_n}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function dC(e){return it({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm18.31 6-2.76 5z"},child:[]},{tag:"path",attr:{d:"M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"},child:[]}]})(e)}function qg(e){return it({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 fC(e){return it({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function uf(e){return it({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 hC(e){return it({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 pC(e){return it({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 mC(e){return it({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 gC(e){return it({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 EC(e){return it({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 yC(e){return it({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 TC(e){return it({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 Yg(e){return it({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 Ku=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>_.jsx("button",{className:z(`${L}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),bC=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?_.jsx("img",{className:z(`${L}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(uf,{size:"16px"})},_C=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return _.jsx(Jn,{className:z(e,n,`cim-${r}-component`,`${L}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:_.jsx(uf,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(Ku,{className:z(e,n,`cim-${r}-component`,`${L}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&_.jsx(bC,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function a7(){}function u7(){}function Wg(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function Gg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const xC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,SC={};function Xg(e,t){return(SC.jsx?wC:xC).test(e)}const vC=/[ \t\n\f\r]/g;function AC(e){return typeof e=="object"?e.type==="text"?Kg(e.value):!1:Kg(e)}function Kg(e){return e.replace(vC,"")===""}let Ws=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ws.prototype.normal={},Ws.prototype.property={},Ws.prototype.space=void 0;function Qg(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ws(n,r,t)}function Gs(e){return e.toLowerCase()}let dn=class{constructor(t,n){this.attribute=n,this.property=t}};dn.prototype.attribute="",dn.prototype.booleanish=!1,dn.prototype.boolean=!1,dn.prototype.commaOrSpaceSeparated=!1,dn.prototype.commaSeparated=!1,dn.prototype.defined=!1,dn.prototype.mustUseProperty=!1,dn.prototype.number=!1,dn.prototype.overloadedBoolean=!1,dn.prototype.property="",dn.prototype.spaceSeparated=!1,dn.prototype.space=void 0;let CC=0;const $e=Bi(),kt=Bi(),lf=Bi(),ge=Bi(),ut=Bi(),Co=Bi(),Sn=Bi();function Bi(){return Eu(2,++CC)}const cf=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:kt,commaOrSpaceSeparated:Sn,commaSeparated:Co,number:ge,overloadedBoolean:lf,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),df=Object.keys(cf);let ff=class extends dn{constructor(t,n,r,o){let a=-1;if(super(t,n),Jg(this,"space",o),typeof r=="number")for(;++a<df.length;){const u=df[a];Jg(this,df[a],(r&cf[u])===cf[u])}}};ff.prototype.defined=!0;function Jg(e,t,n){n&&(e[t]=n)}function ko(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new ff(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Gs(r)]=r,n[Gs(a.attribute)]=r}return new Ws(t,n,e.space)}const Zg=ko({properties:{ariaActiveDescendant:null,ariaAtomic:kt,ariaAutoComplete:null,ariaBusy:kt,ariaChecked:kt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:kt,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:kt,ariaFlowTo:ut,ariaGrabbed:kt,ariaHasPopup:null,ariaHidden:kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:ge,ariaLive:null,ariaModal:kt,ariaMultiLine:kt,ariaMultiSelectable:kt,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:kt,ariaReadOnly:kt,ariaRelevant:null,ariaRequired:kt,ariaRoleDescription:ut,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:kt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function e1(e,t){return t in e?e[t]:t}function t1(e,t){return e1(e,t.toLowerCase())}const kC=ko({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Co,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:ut,autoFocus:$e,autoPlay:$e,blocking:ut,capture:null,charSet:null,checked:$e,cite:null,className:ut,cols:ge,colSpan:null,content:null,contentEditable:kt,controls:$e,controlsList:ut,coords:ge|Co,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:lf,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:ut,height:ge,hidden:lf,high:ge,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:ut,itemRef:ut,itemScope:$e,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,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:$e,optimum:ge,pattern:null,ping:ut,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:ut,required:$e,reversed:$e,rows:ge,rowSpan:ge,sandbox:ut,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:kt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:kt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:t1}),NC=ko({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Sn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:ut,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:Co,g2:Co,glyphName:Co,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sn,rev:Sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sn,requiredFeatures:Sn,requiredFonts:Sn,requiredFormats:Sn,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:e1}),n1=ko({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()}}),r1=ko({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:t1}),i1=ko({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),OC={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"},PC=/[A-Z]/g,o1=/-[a-z]/g,IC=/^data[-\w.:]+$/i;function hf(e,t){const n=Gs(t);let r=t,o=dn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&IC.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(o1,LC);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!o1.test(a)){let u=a.replace(PC,RC);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=ff}return new o(r,t)}function RC(e){return"-"+e.toLowerCase()}function LC(e){return e.charAt(1).toUpperCase()}const Qu=Qg([Zg,kC,n1,r1,i1],"html"),No=Qg([Zg,NC,n1,r1,i1],"svg");function s1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function a1(e){return e.join(" ").trim()}var Oo={},pf,u1;function DC(){if(u1)return pf;u1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
24
|
-
`,h="/",p="*",g="",b="comment",y="declaration";pf=function(v,A){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];A=A||{};var C=1,k=1;function I(de){var oe=de.match(t);oe&&(C+=oe.length);var be=de.lastIndexOf(d);k=~be?de.length-be:k+de.length}function $(){var de={line:C,column:k};return function(oe){return oe.position=new W(de),ce(),oe}}function W(de){this.start=de,this.end={line:C,column:k},this.source=A.source}W.prototype.content=v;function F(de){var oe=new Error(A.source+":"+C+":"+k+": "+de);if(oe.reason=de,oe.filename=A.source,oe.line=C,oe.column=k,oe.source=v,!A.silent)throw oe}function ee(de){var oe=de.exec(v);if(oe){var be=oe[0];return I(be),v=v.slice(be.length),oe}}function ce(){ee(n)}function pe(de){var oe;for(de=de||[];oe=U();)oe!==!1&&de.push(oe);return de}function U(){var de=$();if(!(h!=v.charAt(0)||p!=v.charAt(1))){for(var oe=2;g!=v.charAt(oe)&&(p!=v.charAt(oe)||h!=v.charAt(oe+1));)++oe;if(oe+=2,g===v.charAt(oe-1))return F("End of comment missing");var be=v.slice(2,oe-2);return k+=2,I(be),v=v.slice(oe),k+=2,de({type:b,comment:be})}}function ne(){var de=$(),oe=ee(r);if(oe){if(U(),!ee(o))return F("property missing ':'");var be=ee(a),Ce=de({type:y,property:x(oe[0].replace(e,g)),value:be?x(be[0].replace(e,g)):g});return ee(u),Ce}}function ae(){var de=[];pe(de);for(var oe;oe=ne();)oe!==!1&&(de.push(oe),pe(de));return de}return ce(),ae()};function x(v){return v?v.replace(c,g):g}return pf}var l1;function MC(){if(l1)return Oo;l1=1;var e=Oo&&Oo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.default=n;var t=e(DC());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,p=d.value;c?o(h,p,d):p&&(a=a||{},a[h]=p)}}),a}return Oo}var Xs={},c1;function FC(){if(c1)return Xs;c1=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},u=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),a(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,u))};return Xs.camelCase=d,Xs}var Ks,d1;function BC(){if(d1)return Ks;d1=1;var e=Ks&&Ks.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(MC()),n=FC();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,Ks=r,Ks}var UC=BC();const HC=Ge(UC),Ju=f1("end"),mr=f1("start");function f1(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 h1(e){const t=mr(e),n=Ju(e);if(t&&n)return{start:t,end:n}}function Qs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?p1(e.position):"start"in e||"end"in e?p1(e):"line"in e||"column"in e?mf(e):""}function mf(e){return m1(e&&e.line)+":"+m1(e&&e.column)}function p1(e){return mf(e&&e.start)+"-"+mf(e&&e.end)}function m1(e){return e&&typeof e=="number"?e:1}class Gt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",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=B({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=Qs(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,this.expected,this.note,this.url}}Gt.prototype.file="",Gt.prototype.name="",Gt.prototype.reason="",Gt.prototype.message="",Gt.prototype.stack="",Gt.prototype.column=void 0,Gt.prototype.line=void 0,Gt.prototype.ancestors=void 0,Gt.prototype.cause=void 0,Gt.prototype.fatal=void 0,Gt.prototype.place=void 0,Gt.prototype.ruleId=void 0,Gt.prototype.source=void 0;const gf={}.hasOwnProperty,zC=new Map,jC=/[A-Z]/g,$C=new Set(["table","tbody","thead","tfoot","tr"]),VC=new Set(["td","th"]),g1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qC(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=ZC(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=JC(n,t.jsx,t.jsxs)}const o={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"?No:Qu,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=E1(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function E1(e,t,n){if(t.type==="element")return YC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return WC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return XC(e,t,n);if(t.type==="mdxjsEsm")return GC(e,t);if(t.type==="root")return KC(e,t,n);if(t.type==="text")return QC(e,t)}function YC(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=No,e.schema=o),e.ancestors.push(t);const a=T1(e,t.tagName,!1),u=ek(e,t);let c=yf(e,t);return $C.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!AC(d):!0})),y1(e,u,a,t),Ef(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function WC(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)}Js(e,t.position)}function GC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Js(e,t.position)}function XC(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=No,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:T1(e,t.name,!0),u=tk(e,t),c=yf(e,t);return y1(e,u,a,t),Ef(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function KC(e,t,n){const r={};return Ef(r,yf(e,t)),e.create(t,e.Fragment,r,n)}function QC(e,t){return t.value}function y1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ef(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function JC(e,t,n){return r;function r(o,a,u,c){const h=Array.isArray(u.children)?n:t;return c?h(a,u,c):h(a,u)}}function ZC(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=mr(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function ek(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&gf.call(t.properties,o)){const a=nk(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&VC.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function tk(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Js(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Js(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function yf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:zC;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 h=o.get(d)||0;u=d+"-"+h,o.set(d,h+1)}}const c=E1(e,a,u);c!==void 0&&n.push(c)}return n}function nk(e,t,n){const r=hf(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Gg(n):a1(n)),r.property==="style"){let o=typeof n=="object"?n:rk(e,String(n));return e.stylePropertyNameCase==="css"&&(o=ik(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?OC[r.property]||r.property:r.attribute,n]}}function rk(e,t){try{return HC(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Gt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=g1+"#cannot-parse-style-attribute",o}}function T1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=Xg(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=Xg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return gf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Js(e)}function Js(e,t){const n=new Gt("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=g1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ik(e){const t={};let n;for(n in e)gf.call(e,n)&&(t[ok(n)]=e[n]);return t}function ok(e){let t=e.replace(jC,sk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function sk(e){return"-"+e.toLowerCase()}const Tf={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"]},ak={};function bf(e,t){const n=ak,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return b1(e,r,o)}function b1(e,t,n){if(uk(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 _1(e.children,t,n)}return Array.isArray(e)?_1(e,t,n):""}function _1(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=b1(e[o],t,n);return r.join("")}function uk(e){return!!(e&&typeof e=="object")}const x1=document.createElement("i");function _f(e){const t="&"+e+";";x1.innerHTML=t;const n=x1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function vn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o: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 Fn(e,t){return e.length>0?(vn(e,e.length,0,t),e):t}const w1={}.hasOwnProperty;function S1(e){const t={};let n=-1;for(;++n<e.length;)lk(t,e[n]);return t}function lk(e,t){let n;for(n in t){const o=(w1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){w1.call(o,u)||(o[u]=[]);const c=a[u];ck(o[u],Array.isArray(c)?c:c?[c]:[])}}}function ck(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);vn(e,0,0,r)}function v1(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 Zn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const rn=Qr(/[A-Za-z]/),Xt=Qr(/[\dA-Za-z]/),dk=Qr(/[#-'*+\--9=?A-Z^-~]/);function Zu(e){return e!==null&&(e<32||e===127)}const xf=Qr(/\d/),fk=Qr(/[\dA-Fa-f]/),hk=Qr(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function Xe(e){return e===-2||e===-1||e===32}const el=Qr(new RegExp("\\p{P}|\\p{S}","u")),Ui=Qr(/\s/);function Qr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Po(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Xt(e.charCodeAt(n+1))&&Xt(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Qe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Xe(d)?(e.enter(n),c(d)):t(d)}function c(d){return Xe(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const pk={tokenize:mk};function mk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Qe(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const gk={tokenize:Ek},A1={tokenize:yk};function Ek(e){const t=this,n=[];let r=0,o,a,u;return c;function c(I){if(r<n.length){const $=n[r];return t.containerState=$[1],e.attempt($[0].continuation,d,h)(I)}return h(I)}function d(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&k();const $=t.events.length;let W=$,F;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){F=t.events[W][1].end;break}C(r);let ee=$;for(;ee<t.events.length;)t.events[ee][1].end=B({},F),ee++;return vn(t.events,W+1,0,t.events.slice($)),t.events.length=ee,h(I)}return c(I)}function h(I){if(r===n.length){if(!o)return b(I);if(o.currentConstruct&&o.currentConstruct.concrete)return x(I);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(A1,p,g)(I)}function p(I){return o&&k(),C(r),b(I)}function g(I){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(I)}function b(I){return t.containerState={},e.attempt(A1,y,x)(I)}function y(I){return r++,n.push([t.currentConstruct,t.containerState]),b(I)}function x(I){if(I===null){o&&k(),C(0),e.consume(I);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),v(I)}function v(I){if(I===null){A(e.exit("chunkFlow"),!0),C(0),e.consume(I);return}return Le(I)?(e.consume(I),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(I),v)}function A(I,$){const W=t.sliceStream(I);if($&&W.push(null),I.previous=a,a&&(a.next=I),a=I,o.defineSkip(I.start),o.write(W),t.parser.lazy[I.start.line]){let F=o.events.length;for(;F--;)if(o.events[F][1].start.offset<u&&(!o.events[F][1].end||o.events[F][1].end.offset>u))return;const ee=t.events.length;let ce=ee,pe,U;for(;ce--;)if(t.events[ce][0]==="exit"&&t.events[ce][1].type==="chunkFlow"){if(pe){U=t.events[ce][1].end;break}pe=!0}for(C(r),F=ee;F<t.events.length;)t.events[F][1].end=B({},U),F++;vn(t.events,ce+1,0,t.events.slice(ee)),t.events.length=F}}function C(I){let $=n.length;for(;$-- >I;){const W=n[$];t.containerState=W[1],W[0].exit.call(t,e)}n.length=I}function k(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function yk(e,t,n){return Qe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Io(e){if(e===null||st(e)||Ui(e))return 1;if(el(e))return 2}function tl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const wf={name:"attention",resolveAll:Tk,tokenize:bk};function Tk(e,t){let n=-1,r,o,a,u,c,d,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g=B({},e[r][1].end),b=B({},e[n][1].start);C1(g,-d),C1(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:g,end:B({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:B({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:B({},e[r][1].end),end:B({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:B({},u.start),end:B({},c.end)},e[r][1].end=B({},u.start),e[n][1].start=B({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Fn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Fn(h,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),h=Fn(h,tl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Fn(h,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=Fn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,vn(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function bk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Io(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const h=e.exit("attentionSequence"),p=Io(d),g=!p||p===2&&o||n.includes(d),b=!o||o===2&&p||n.includes(r);return h._open=!!(a===42?g:g&&(o||!b)),h._close=!!(a===42?b:b&&(p||!g)),t(d)}}function C1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _k={name:"autolink",tokenize:xk};function xk(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return rn(y)?(e.consume(y),u):y===64?n(y):h(y)}function u(y){return y===43||y===45||y===46||Xt(y)?(r=1,c(y)):h(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Xt(y))&&r++<32?(e.consume(y),c):(r=0,h(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||Zu(y)?n(y):(e.consume(y),d)}function h(y){return y===64?(e.consume(y),p):dk(y)?(e.consume(y),h):n(y)}function p(y){return Xt(y)?g(y):n(y)}function g(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||Xt(y))&&r++<63){const x=y===45?b:g;return e.consume(y),x}return n(y)}}const Zs={partial:!0,tokenize:wk};function wk(e,t,n){return r;function r(a){return Xe(a)?Qe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const k1={continuation:{tokenize:vk},exit:Ak,name:"blockQuote",tokenize:Sk};function Sk(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Xe(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function vk(e,t,n){const r=this;return o;function o(u){return Xe(u)?Qe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(k1,t,n)(u)}}function Ak(e){e.exit("blockQuote")}const N1={name:"characterEscape",tokenize:Ck};function Ck(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return hk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const O1={name:"characterReference",tokenize:kk};function kk(e,t,n){const r=this;let o=0,a,u;return c;function c(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,u=Xt,p(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=fk,p):(e.enter("characterReferenceValue"),a=7,u=xf,p(g))}function p(g){if(g===59&&o){const b=e.exit("characterReferenceValue");return u===Xt&&!_f(r.sliceSerialize(b))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(g)&&o++<a?(e.consume(g),p):n(g)}}const P1={partial:!0,tokenize:Ok},I1={concrete:!0,name:"codeFenced",tokenize:Nk};function Nk(e,t,n){const r=this,o={partial:!0,tokenize:W};let a=0,u=0,c;return d;function d(F){return h(F)}function h(F){const ee=r.events[r.events.length-1];return a=ee&&ee[1].type==="linePrefix"?ee[2].sliceSerialize(ee[1],!0).length:0,c=F,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(F)}function p(F){return F===c?(u++,e.consume(F),p):u<3?n(F):(e.exit("codeFencedFenceSequence"),Xe(F)?Qe(e,g,"whitespace")(F):g(F))}function g(F){return F===null||Le(F)?(e.exit("codeFencedFence"),r.interrupt?t(F):e.check(P1,v,$)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(F))}function b(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(F)):Xe(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qe(e,y,"whitespace")(F)):F===96&&F===c?n(F):(e.consume(F),b)}function y(F){return F===null||Le(F)?g(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(F))}function x(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(F)):F===96&&F===c?n(F):(e.consume(F),x)}function v(F){return e.attempt(o,$,A)(F)}function A(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),C}function C(F){return a>0&&Xe(F)?Qe(e,k,"linePrefix",a+1)(F):k(F)}function k(F){return F===null||Le(F)?e.check(P1,v,$)(F):(e.enter("codeFlowValue"),I(F))}function I(F){return F===null||Le(F)?(e.exit("codeFlowValue"),k(F)):(e.consume(F),I)}function $(F){return e.exit("codeFenced"),t(F)}function W(F,ee,ce){let pe=0;return U;function U(be){return F.enter("lineEnding"),F.consume(be),F.exit("lineEnding"),ne}function ne(be){return F.enter("codeFencedFence"),Xe(be)?Qe(F,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(be):ae(be)}function ae(be){return be===c?(F.enter("codeFencedFenceSequence"),de(be)):ce(be)}function de(be){return be===c?(pe++,F.consume(be),de):pe>=u?(F.exit("codeFencedFenceSequence"),Xe(be)?Qe(F,oe,"whitespace")(be):oe(be)):ce(be)}function oe(be){return be===null||Le(be)?(F.exit("codeFencedFence"),ee(be)):ce(be)}}}function Ok(e,t,n){const r=this;return o;function o(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 Sf={name:"codeIndented",tokenize:Ik},Pk={partial:!0,tokenize:Rk};function Ik(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Qe(e,a,"linePrefix",5)(h)}function a(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):Le(h)?e.attempt(Pk,u,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Le(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function Rk(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Qe(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const Lk={name:"codeText",previous:Mk,resolve:Dk,tokenize:Fk};function Dk(e){let t=e.length-4,n=3,r,o;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;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function Mk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Fk(e,t,n){let r=0,o,a;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),c(g)}function c(g){return g===96?(e.consume(g),r++,c):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(a=e.enter("codeTextSequence"),o=0,p(g)):Le(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Le(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function p(g){return g===96?(e.consume(g),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(a.type="codeTextData",h(g))}}class Bk{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 o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ea(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),ea(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ea(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);ea(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ea(this.left,n.reverse())}}}function ea(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 R1(e){const t={};let n=-1,r,o,a,u,c,d,h;const p=new Bk(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Uk(p,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=B({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return vn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function Uk(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],h={};let p,g,b=-1,y=n,x=0,v=0;const A=[v];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),g&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(v=b+1,A.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),b=A.length;b--;){const C=c.slice(A[b],A[b+1]),k=a.pop();d.push([k,k+C.length-1]),e.splice(k,2,C)}for(d.reverse(),b=-1;++b<d.length;)h[x+d[b][0]]=x+d[b][1],x+=d[b][1]-d[b][0]-1;return h}const Hk={resolve:jk,tokenize:$k},zk={partial:!0,tokenize:Vk};function jk(e){return R1(e),e}function $k(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(zk,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Vk(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Qe(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function L1(e,t,n,r,o,a,u,c,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return g;function g(C){return C===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(C),e.exit(a),b):C===null||C===32||C===41||Zu(C)?n(C):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),v(C))}function b(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(C))}function y(C){return C===62?(e.exit("chunkString"),e.exit(c),b(C)):C===null||C===60||Le(C)?n(C):(e.consume(C),C===92?x:y)}function x(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function v(C){return!p&&(C===null||C===41||st(C))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(C)):p<h&&C===40?(e.consume(C),p++,v):C===41?(e.consume(C),p--,v):C===null||C===32||C===40||Zu(C)?n(C):(e.consume(C),C===92?A:v)}function A(C){return C===40||C===41||C===92?(e.consume(C),v):v(C)}}function D1(e,t,n,r,o,a){const u=this;let c=0,d;return h;function h(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):Le(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===null||y===91||y===93||Le(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Xe(y)),y===92?b:g)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,g):g(y)}}function M1(e,t,n,r,o,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(o),e.consume(b),e.exit(o),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):(e.enter(a),h(b))}function h(b){return b===u?(e.exit(a),d(u)):b===null?n(b):Le(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Qe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Le(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?g:p)}function g(b){return b===u||b===92?(e.consume(b),p):p(b)}}function ta(e,t){let n;return r;function r(o){return Le(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Xe(o)?Qe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const qk={name:"definition",tokenize:Wk},Yk={partial:!0,tokenize:Gk};function Wk(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return D1.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=Zn(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 st(y)?ta(e,h)(y):h(y)}function h(y){return L1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(Yk,g,g)(y)}function g(y){return Xe(y)?Qe(e,b,"whitespace")(y):b(y)}function b(y){return y===null||Le(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function Gk(e,t,n){return r;function r(c){return st(c)?ta(e,o)(c):n(c)}function o(c){return M1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Xe(c)?Qe(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const Xk={name:"hardBreakEscape",tokenize:Kk};function Kk(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Qk={name:"headingAtx",resolve:Jk,tokenize:Zk};function Jk(e,t){let n=e.length-2,r=3,o,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&&(o={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"},vn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function Zk(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||st(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Le(p)?(e.exit("atxHeading"),t(p)):Xe(p)?Qe(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||st(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const eN=["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"],F1=["pre","script","style","textarea"],tN={concrete:!0,name:"htmlFlow",resolveTo:iN,tokenize:oN},nN={partial:!0,tokenize:aN},rN={partial:!0,tokenize:sN};function iN(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 oN(e,t,n){const r=this;let o,a,u,c,d;return h;function h(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),g}function g(O){return O===33?(e.consume(O),b):O===47?(e.consume(O),a=!0,v):O===63?(e.consume(O),o=3,r.interrupt?t:w):rn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function b(O){return O===45?(e.consume(O),o=2,y):O===91?(e.consume(O),o=5,c=0,x):rn(O)?(e.consume(O),o=4,r.interrupt?t:w):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:w):n(O)}function x(O){const ye="CDATA[";return O===ye.charCodeAt(c++)?(e.consume(O),c===ye.length?r.interrupt?t:ae:x):n(O)}function v(O){return rn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function A(O){if(O===null||O===47||O===62||st(O)){const ye=O===47,ke=u.toLowerCase();return!ye&&!a&&F1.includes(ke)?(o=1,r.interrupt?t(O):ae(O)):eN.includes(u.toLowerCase())?(o=6,ye?(e.consume(O),C):r.interrupt?t(O):ae(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?k(O):I(O))}return O===45||Xt(O)?(e.consume(O),u+=String.fromCharCode(O),A):n(O)}function C(O){return O===62?(e.consume(O),r.interrupt?t:ae):n(O)}function k(O){return Xe(O)?(e.consume(O),k):U(O)}function I(O){return O===47?(e.consume(O),U):O===58||O===95||rn(O)?(e.consume(O),$):Xe(O)?(e.consume(O),I):U(O)}function $(O){return O===45||O===46||O===58||O===95||Xt(O)?(e.consume(O),$):W(O)}function W(O){return O===61?(e.consume(O),F):Xe(O)?(e.consume(O),W):I(O)}function F(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,ee):Xe(O)?(e.consume(O),F):ce(O)}function ee(O){return O===d?(e.consume(O),d=null,pe):O===null||Le(O)?n(O):(e.consume(O),ee)}function ce(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||st(O)?W(O):(e.consume(O),ce)}function pe(O){return O===47||O===62||Xe(O)?I(O):n(O)}function U(O){return O===62?(e.consume(O),ne):n(O)}function ne(O){return O===null||Le(O)?ae(O):Xe(O)?(e.consume(O),ne):n(O)}function ae(O){return O===45&&o===2?(e.consume(O),Ce):O===60&&o===1?(e.consume(O),se):O===62&&o===4?(e.consume(O),N):O===63&&o===3?(e.consume(O),w):O===93&&o===5?(e.consume(O),J):Le(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(nN,q,de)(O)):O===null||Le(O)?(e.exit("htmlFlowData"),de(O)):(e.consume(O),ae)}function de(O){return e.check(rN,oe,q)(O)}function oe(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),be}function be(O){return O===null||Le(O)?de(O):(e.enter("htmlFlowData"),ae(O))}function Ce(O){return O===45?(e.consume(O),w):ae(O)}function se(O){return O===47?(e.consume(O),u="",j):ae(O)}function j(O){if(O===62){const ye=u.toLowerCase();return F1.includes(ye)?(e.consume(O),N):ae(O)}return rn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),j):ae(O)}function J(O){return O===93?(e.consume(O),w):ae(O)}function w(O){return O===62?(e.consume(O),N):O===45&&o===2?(e.consume(O),w):ae(O)}function N(O){return O===null||Le(O)?(e.exit("htmlFlowData"),q(O)):(e.consume(O),N)}function q(O){return e.exit("htmlFlow"),t(O)}}function sN(e,t,n){const r=this;return o;function o(u){return Le(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 aN(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Zs,t,n)}}const uN={name:"htmlText",tokenize:lN};function lN(e,t,n){const r=this;let o,a,u;return c;function c(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),d}function d(w){return w===33?(e.consume(w),h):w===47?(e.consume(w),W):w===63?(e.consume(w),I):rn(w)?(e.consume(w),ce):n(w)}function h(w){return w===45?(e.consume(w),p):w===91?(e.consume(w),a=0,x):rn(w)?(e.consume(w),k):n(w)}function p(w){return w===45?(e.consume(w),y):n(w)}function g(w){return w===null?n(w):w===45?(e.consume(w),b):Le(w)?(u=g,se(w)):(e.consume(w),g)}function b(w){return w===45?(e.consume(w),y):g(w)}function y(w){return w===62?Ce(w):w===45?b(w):g(w)}function x(w){const N="CDATA[";return w===N.charCodeAt(a++)?(e.consume(w),a===N.length?v:x):n(w)}function v(w){return w===null?n(w):w===93?(e.consume(w),A):Le(w)?(u=v,se(w)):(e.consume(w),v)}function A(w){return w===93?(e.consume(w),C):v(w)}function C(w){return w===62?Ce(w):w===93?(e.consume(w),C):v(w)}function k(w){return w===null||w===62?Ce(w):Le(w)?(u=k,se(w)):(e.consume(w),k)}function I(w){return w===null?n(w):w===63?(e.consume(w),$):Le(w)?(u=I,se(w)):(e.consume(w),I)}function $(w){return w===62?Ce(w):I(w)}function W(w){return rn(w)?(e.consume(w),F):n(w)}function F(w){return w===45||Xt(w)?(e.consume(w),F):ee(w)}function ee(w){return Le(w)?(u=ee,se(w)):Xe(w)?(e.consume(w),ee):Ce(w)}function ce(w){return w===45||Xt(w)?(e.consume(w),ce):w===47||w===62||st(w)?pe(w):n(w)}function pe(w){return w===47?(e.consume(w),Ce):w===58||w===95||rn(w)?(e.consume(w),U):Le(w)?(u=pe,se(w)):Xe(w)?(e.consume(w),pe):Ce(w)}function U(w){return w===45||w===46||w===58||w===95||Xt(w)?(e.consume(w),U):ne(w)}function ne(w){return w===61?(e.consume(w),ae):Le(w)?(u=ne,se(w)):Xe(w)?(e.consume(w),ne):pe(w)}function ae(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,de):Le(w)?(u=ae,se(w)):Xe(w)?(e.consume(w),ae):(e.consume(w),oe)}function de(w){return w===o?(e.consume(w),o=void 0,be):w===null?n(w):Le(w)?(u=de,se(w)):(e.consume(w),de)}function oe(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||st(w)?pe(w):(e.consume(w),oe)}function be(w){return w===47||w===62||st(w)?pe(w):n(w)}function Ce(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function se(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),j}function j(w){return Xe(w)?Qe(e,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):J(w)}function J(w){return e.enter("htmlTextData"),u(w)}}const vf={name:"labelEnd",resolveAll:hN,resolveTo:pN,tokenize:mN},cN={tokenize:gN},dN={tokenize:EN},fN={tokenize:yN};function hN(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 o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&vn(e,0,e.length,n),e}function pN(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},h={type:"label",start:B({},e[a][1].start),end:B({},e[u][1].end)},p={type:"labelText",start:B({},e[a+r+2][1].end),end:B({},e[u-2][1].start)};return c=[["enter",d,t],["enter",h,t]],c=Fn(c,e.slice(a+1,a+r+3)),c=Fn(c,[["enter",p,t]]),c=Fn(c,tl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Fn(c,[["exit",p,t],e[u-2],e[u-1],["exit",h,t]]),c=Fn(c,e.slice(u+1)),c=Fn(c,[["exit",d,t]]),vn(e,a,e.length,c),e}function mN(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(b){return a?a._inactive?g(b):(u=r.parser.defined.includes(Zn(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(cN,p,u?p:g)(b):b===91?e.attempt(dN,p,u?h:g)(b):u?p(b):g(b)}function h(b){return e.attempt(fN,p,g)(b)}function p(b){return t(b)}function g(b){return a._balanced=!0,n(b)}}function gN(e,t,n){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return st(g)?ta(e,a)(g):a(g)}function a(g){return g===41?p(g):L1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return st(g)?ta(e,d)(g):p(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?M1(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function h(g){return st(g)?ta(e,p)(g):p(g)}function p(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function EN(e,t,n){const r=this;return o;function o(c){return D1.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Zn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function yN(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const TN={name:"labelStartImage",resolveAll:vf.resolveAll,tokenize:bN};function bN(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const _N={name:"labelStartLink",resolveAll:vf.resolveAll,tokenize:xN};function xN(e,t,n){const r=this;return o;function o(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 Af={name:"lineEnding",tokenize:wN};function wN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qe(e,t,"linePrefix")}}const nl={name:"thematicBreak",tokenize:SN};function SN(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),u(h)}function u(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Le(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Xe(h)?Qe(e,c,"whitespace")(h):c(h))}}const fn={continuation:{tokenize:kN},exit:ON,name:"list",tokenize:CN},vN={partial:!0,tokenize:PN},AN={partial:!0,tokenize:NN};function CN(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(y){const x=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:xf(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(nl,n,h)(y):h(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return xf(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"),h(y)):n(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Zs,r.interrupt?n:p,e.attempt(vN,b,g))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function g(y){return Xe(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 kN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Zs,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qe(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Xe(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(AN,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qe(e,e.attempt(fn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function NN(e,t,n){const r=this;return Qe(e,o,"listItemIndent",r.containerState.size+1);function o(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 ON(e){e.exit(this.containerState.type)}function PN(e,t,n){const r=this;return Qe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Xe(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const B1={name:"setextUnderline",resolveTo:IN,tokenize:RN};function IN(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:B({},e[r][1].start),end:B({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=B({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function RN(e,t,n){const r=this;let o;return a;function a(h){let p=r.events.length,g;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){g=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),o=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Xe(h)?Qe(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Le(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const LN={tokenize:DN};function DN(e){const t=this,n=e.attempt(Zs,r,e.attempt(this.parser.constructs.flowInitial,o,Qe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Hk,o)),"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 o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const MN={resolveAll:H1()},FN=U1("string"),BN=U1("text");function U1(e){return{resolveAll:H1(e==="text"?UN:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return h(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const g=o[p];let b=-1;if(g)for(;++b<g.length;){const y=g[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function H1(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function UN(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],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const h=o[a];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)d=!0,c++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:B({},r.end)};r.end=B({},h.start),r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const HN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:qk},disable:{null:[]},document:{42:fn,43:fn,45:fn,48:fn,49:fn,50:fn,51:fn,52:fn,53:fn,54:fn,55:fn,56:fn,57:fn,62:k1},flow:{35:Qk,42:nl,45:[B1,nl],60:tN,61:B1,95:nl,96:I1,126:I1},flowInitial:{[-2]:Sf,[-1]:Sf,32:Sf},insideSpan:{null:[wf,MN]},string:{38:O1,92:N1},text:{[-5]:Af,[-4]:Af,[-3]:Af,33:TN,38:O1,42:wf,60:[_k,uN],91:_N,92:[Xk,N1],93:vf,95:wf,96:Lk}},Symbol.toStringTag,{value:"Module"}));function zN(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 o={},a=[];let u=[],c=[];const d={attempt:ee(W),check:ee(F),consume:k,enter:I,exit:$,interrupt:ee(F,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:x,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:g};let p=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function g(ne){return u=Fn(u,ne),A(),u[u.length-1]!==null?[]:(ce(t,0),h.events=tl(a,h.events,h),h.events)}function b(ne,ae){return $N(y(ne),ae)}function y(ne){return jN(u,ne)}function x(){const{_bufferIndex:ne,_index:ae,line:de,column:oe,offset:be}=r;return{_bufferIndex:ne,_index:ae,line:de,column:oe,offset:be}}function v(ne){o[ne.line]=ne.column,U()}function A(){let ne;for(;r._index<u.length;){const ae=u[r._index];if(typeof ae=="string")for(ne=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ne&&r._bufferIndex<ae.length;)C(ae.charCodeAt(r._bufferIndex));else C(ae)}}function C(ne){p=p(ne)}function k(ne){Le(ne)?(r.line++,r.column=1,r.offset+=ne===-3?2:1,U()):ne!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=ne}function I(ne,ae){const de=ae||{};return de.type=ne,de.start=x(),h.events.push(["enter",de,h]),c.push(de),de}function $(ne){const ae=c.pop();return ae.end=x(),h.events.push(["exit",ae,h]),ae}function W(ne,ae){ce(ne,ae.from)}function F(ne,ae){ae.restore()}function ee(ne,ae){return de;function de(oe,be,Ce){let se,j,J,w;return Array.isArray(oe)?q(oe):"tokenize"in oe?q([oe]):N(oe);function N(Ie){return He;function He(Se){const Ye=Se!==null&&Ie[Se],dt=Se!==null&&Ie.null,mn=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(dt)?dt:dt?[dt]:[]];return q(mn)(Se)}}function q(Ie){return se=Ie,j=0,Ie.length===0?Ce:O(Ie[j])}function O(Ie){return He;function He(Se){return w=pe(),J=Ie,Ie.partial||(h.currentConstruct=Ie),Ie.name&&h.parser.constructs.disable.null.includes(Ie.name)?ke():Ie.tokenize.call(ae?Object.assign(Object.create(h),ae):h,d,ye,ke)(Se)}}function ye(Ie){return ne(J,w),be}function ke(Ie){return w.restore(),++j<se.length?O(se[j]):Ce}}}function ce(ne,ae){ne.resolveAll&&!a.includes(ne)&&a.push(ne),ne.resolve&&vn(h.events,ae,h.events.length-ae,ne.resolve(h.events.slice(ae),h)),ne.resolveTo&&(h.events=ne.resolveTo(h.events,h))}function pe(){const ne=x(),ae=h.previous,de=h.currentConstruct,oe=h.events.length,be=Array.from(c);return{from:oe,restore:Ce};function Ce(){r=ne,h.previous=ae,h.currentConstruct=de,h.events.length=oe,c=be,U()}}function U(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function jN(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function $N(e,t){let n=-1;const r=[];let o;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:s,stack:E,digest:null}}function Nm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function Om(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var fB=typeof WeakMap=="function"?WeakMap:Map;function fw(i,s,l){l=Yr(-1,l),l.tag=3,l.payload={element:null};var f=s.value;return l.callback=function(){Wc||(Wc=!0,qm=f),Om(i,s)},l}function hw(i,s,l){l=Yr(-1,l),l.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var E=s.value;l.payload=function(){return f(E)},l.callback=function(){Om(i,s)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(l.callback=function(){Om(i,s),typeof f!="function"&&(wi===null?wi=new Set([this]):wi.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})}),l}function pw(i,s,l){var f=i.pingCache;if(f===null){f=i.pingCache=new fB;var E=new Set;f.set(s,E)}else E=f.get(s),E===void 0&&(E=new Set,f.set(s,E));E.has(l)||(E.add(l),i=AB.bind(null,i,s,l),s.then(i,i))}function mw(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function gw(i,s,l,f,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=Yr(-1,1),s.tag=2,xi(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var hB=j.ReactCurrentOwner,yn=!1;function on(i,s,l,f){s.child=i===null?M_(s,null,l,f):Ss(s,i.child,l,f)}function Ew(i,s,l,f,E){l=l.render;var T=s.ref;return As(s,E),f=xm(i,s,l,f,T,E),l=_m(),i!==null&&!yn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Wr(i,s,E)):(Et&&l&&im(s),s.flags|=1,on(i,s,f,E),s.child)}function yw(i,s,l,f,E){if(i===null){var T=l.type;return typeof T=="function"&&!Jm(T)&&T.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=T,Tw(i,s,T,f,E)):(i=Zc(l.type,null,f,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(T=i.child,(i.lanes&E)===0){var S=T.memoizedProps;if(l=l.compare,l=l!==null?l:Ka,l(S,f)&&i.ref===s.ref)return Wr(i,s,E)}return s.flags|=1,i=ki(T,f),i.ref=s.ref,i.return=s,s.child=i}function Tw(i,s,l,f,E){if(i!==null){var T=i.memoizedProps;if(Ka(T,f)&&i.ref===s.ref)if(yn=!1,s.pendingProps=f=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(yn=!0);else return s.lanes=i.lanes,Wr(i,s,E)}return Pm(i,s,l,f,E)}function bw(i,s,l){var f=s.pendingProps,E=f.children,T=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ct(Os,Rn),Rn|=l;else{if((l&1073741824)===0)return i=T!==null?T.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ct(Os,Rn),Rn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=T!==null?T.baseLanes:l,ct(Os,Rn),Rn|=f}else T!==null?(f=T.baseLanes|l,s.memoizedState=null):f=l,ct(Os,Rn),Rn|=f;return on(i,s,E,l),s.child}function xw(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function Pm(i,s,l,f,E){var T=En(l)?oo:Jt.current;return T=bs(s,T),As(s,E),l=xm(i,s,l,f,T,E),f=_m(),i!==null&&!yn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Wr(i,s,E)):(Et&&f&&im(s),s.flags|=1,on(i,s,l,E),s.child)}function _w(i,s,l,f,E){if(En(l)){var T=!0;Sc(s)}else T=!1;if(As(s,E),s.stateNode===null)jc(i,s),cw(s,l,f),Cm(s,l,f,E),f=!0;else if(i===null){var S=s.stateNode,D=s.memoizedProps;S.props=D;var H=S.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=Vn(Z):(Z=En(l)?oo:Jt.current,Z=bs(s,Z));var fe=l.getDerivedStateFromProps,pe=typeof fe=="function"||typeof S.getSnapshotBeforeUpdate=="function";pe||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(D!==f||H!==Z)&&dw(s,S,f,Z),bi=!1;var le=s.memoizedState;S.state=le,Rc(s,f,S,E),H=s.memoizedState,D!==f||le!==H||gn.current||bi?(typeof fe=="function"&&(km(s,l,fe,f),H=s.memoizedState),(D=bi||lw(s,l,D,f,le,H,Z))?(pe||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(s.flags|=4194308)):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=H),S.props=f,S.state=H,S.context=Z,f=D):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{S=s.stateNode,B_(i,s),D=s.memoizedProps,Z=s.type===s.elementType?D:ur(s.type,D),S.props=Z,pe=s.pendingProps,le=S.context,H=l.contextType,typeof H=="object"&&H!==null?H=Vn(H):(H=En(l)?oo:Jt.current,H=bs(s,H));var _e=l.getDerivedStateFromProps;(fe=typeof _e=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(D!==pe||le!==H)&&dw(s,S,f,H),bi=!1,le=s.memoizedState,S.state=le,Rc(s,f,S,E);var ve=s.memoizedState;D!==pe||le!==ve||gn.current||bi?(typeof _e=="function"&&(km(s,l,_e,f),ve=s.memoizedState),(Z=bi||lw(s,l,Z,f,le,ve,H)||!1)?(fe||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(f,ve,H),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(f,ve,H)),typeof S.componentDidUpdate=="function"&&(s.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof S.componentDidUpdate!="function"||D===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=ve),S.props=f,S.state=ve,S.context=H,f=Z):(typeof S.componentDidUpdate!="function"||D===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),f=!1)}return Im(i,s,l,f,T,E)}function Im(i,s,l,f,E,T){xw(i,s);var S=(s.flags&128)!==0;if(!f&&!S)return E&&k_(s,l,!1),Wr(i,s,T);f=s.stateNode,hB.current=s;var D=S&&typeof l.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&S?(s.child=Ss(s,i.child,null,T),s.child=Ss(s,null,D,T)):on(i,s,D,T),s.memoizedState=f.state,E&&k_(s,l,!0),s.child}function ww(i){var s=i.stateNode;s.pendingContext?v_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&v_(i,s.context,!1),mm(i,s.containerInfo)}function Sw(i,s,l,f,E){return ws(),um(E),s.flags|=256,on(i,s,l,f),s.child}var Rm={dehydrated:null,treeContext:null,retryLane:0};function Lm(i){return{baseLanes:i,cachePool:null,transitions:null}}function vw(i,s,l){var f=s.pendingProps,E=yt.current,T=!1,S=(s.flags&128)!==0,D;if((D=S)||(D=i!==null&&i.memoizedState===null?!1:(E&2)!==0),D?(T=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),ct(yt,E&1),i===null)return am(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(S=f.children,i=f.fallback,T?(f=s.mode,T=s.child,S={mode:"hidden",children:S},(f&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=S):T=ed(S,f,0,null),i=go(i,f,l,null),T.return=s,i.return=s,T.sibling=i,s.child=T,s.child.memoizedState=Lm(l),s.memoizedState=Rm,i):Dm(s,S));if(E=i.memoizedState,E!==null&&(D=E.dehydrated,D!==null))return pB(i,s,S,f,D,E,l);if(T){T=f.fallback,S=s.mode,E=i.child,D=E.sibling;var H={mode:"hidden",children:f.children};return(S&1)===0&&s.child!==E?(f=s.child,f.childLanes=0,f.pendingProps=H,s.deletions=null):(f=ki(E,H),f.subtreeFlags=E.subtreeFlags&14680064),D!==null?T=ki(D,T):(T=go(T,S,l,null),T.flags|=2),T.return=s,f.return=s,f.sibling=T,s.child=f,f=T,T=s.child,S=i.child.memoizedState,S=S===null?Lm(l):{baseLanes:S.baseLanes|l,cachePool:null,transitions:S.transitions},T.memoizedState=S,T.childLanes=i.childLanes&~l,s.memoizedState=Rm,f}return T=i.child,i=T.sibling,f=ki(T,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=l),f.return=s,f.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=f,s.memoizedState=null,f}function Dm(i,s){return s=ed({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function zc(i,s,l,f){return f!==null&&um(f),Ss(s,i.child,null,l),i=Dm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function pB(i,s,l,f,E,T,S){if(l)return s.flags&256?(s.flags&=-257,f=Nm(Error(n(422))),zc(i,s,S,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(T=f.fallback,E=s.mode,f=ed({mode:"visible",children:f.children},E,0,null),T=go(T,E,S,null),T.flags|=2,f.return=s,T.return=s,f.sibling=T,s.child=f,(s.mode&1)!==0&&Ss(s,i.child,null,S),s.child.memoizedState=Lm(S),s.memoizedState=Rm,T);if((s.mode&1)===0)return zc(i,s,S,null);if(E.data==="$!"){if(f=E.nextSibling&&E.nextSibling.dataset,f)var D=f.dgst;return f=D,T=Error(n(419)),f=Nm(T,f,void 0),zc(i,s,S,f)}if(D=(S&i.childLanes)!==0,yn||D){if(f=zt,f!==null){switch(S&-S){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(f.suspendedLanes|S))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,qr(i,E),dr(f,i,E,-1))}return Qm(),f=Nm(Error(n(421))),zc(i,s,S,f)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=kB.bind(null,i),E._reactRetry=s,null):(i=T.treeContext,In=gi(E.nextSibling),Pn=s,Et=!0,ar=null,i!==null&&(jn[$n++]=$r,jn[$n++]=Vr,jn[$n++]=so,$r=i.id,Vr=i.overflow,so=s),s=Dm(s,f.children),s.flags|=4096,s)}function Aw(i,s,l){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),fm(i.return,s,l)}function Mm(i,s,l,f,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:l,tailMode:E}:(T.isBackwards=s,T.rendering=null,T.renderingStartTime=0,T.last=f,T.tail=l,T.tailMode=E)}function kw(i,s,l){var f=s.pendingProps,E=f.revealOrder,T=f.tail;if(on(i,s,f.children,l),f=yt.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Aw(i,l,s);else if(i.tag===19)Aw(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(ct(yt,f),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(l=s.child,E=null;l!==null;)i=l.alternate,i!==null&&Lc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=s.child,s.child=null):(E=l.sibling,l.sibling=null),Mm(s,!1,E,l,T);break;case"backwards":for(l=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&Lc(i)===null){s.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Mm(s,!0,l,null,T);break;case"together":Mm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function jc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Wr(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),fo|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=ki(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=ki(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function mB(i,s,l){switch(s.tag){case 3:ww(s),ws();break;case 5:z_(s);break;case 1:En(s.type)&&Sc(s);break;case 4:mm(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,E=s.memoizedProps.value;ct(Oc,f._currentValue),f._currentValue=E;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ct(yt,yt.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?vw(i,s,l):(ct(yt,yt.current&1),i=Wr(i,s,l),i!==null?i.sibling:null);ct(yt,yt.current&1);break;case 19:if(f=(l&s.childLanes)!==0,(i.flags&128)!==0){if(f)return kw(i,s,l);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ct(yt,yt.current),f)break;return null;case 22:case 23:return s.lanes=0,bw(i,s,l)}return Wr(i,s,l)}var Cw,Fm,Nw,Ow;Cw=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Fm=function(){},Nw=function(i,s,l,f){var E=i.memoizedProps;if(E!==f){i=s.stateNode,lo(Nr.current);var T=null;switch(l){case"input":E=ir(i,E),f=ir(i,f),T=[];break;case"select":E=w({},E,{value:void 0}),f=w({},f,{value:void 0}),T=[];break;case"textarea":E=La(i,E),f=La(i,f),T=[];break;default:typeof E.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=xc)}Vt(l,f);var S;l=null;for(Z in E)if(!f.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var D=E[Z];for(S in D)D.hasOwnProperty(S)&&(l||(l={}),l[S]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(o.hasOwnProperty(Z)?T||(T=[]):(T=T||[]).push(Z,null));for(Z in f){var H=f[Z];if(D=E!=null?E[Z]:void 0,f.hasOwnProperty(Z)&&H!==D&&(H!=null||D!=null))if(Z==="style")if(D){for(S in D)!D.hasOwnProperty(S)||H&&H.hasOwnProperty(S)||(l||(l={}),l[S]="");for(S in H)H.hasOwnProperty(S)&&D[S]!==H[S]&&(l||(l={}),l[S]=H[S])}else l||(T||(T=[]),T.push(Z,l)),l=H;else Z==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,D=D?D.__html:void 0,H!=null&&D!==H&&(T=T||[]).push(Z,H)):Z==="children"?typeof H!="string"&&typeof H!="number"||(T=T||[]).push(Z,""+H):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(o.hasOwnProperty(Z)?(H!=null&&Z==="onScroll"&&ft("scroll",i),T||D===H||(T=[])):(T=T||[]).push(Z,H))}l&&(T=T||[]).push("style",l);var Z=T;(s.updateQueue=Z)&&(s.flags|=4)}},Ow=function(i,s,l,f){l!==f&&(s.flags|=4)};function du(i,s){if(!Et)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function en(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,f=0;if(s)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,f|=E.subtreeFlags&14680064,f|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,f|=E.subtreeFlags,f|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=f,i.childLanes=l,s}function gB(i,s,l){var f=s.pendingProps;switch(om(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return en(s),null;case 1:return En(s.type)&&wc(),en(s),null;case 3:return f=s.stateNode,ks(),ht(gn),ht(Jt),ym(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Cc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,ar!==null&&(Gm(ar),ar=null))),Fm(i,s),en(s),null;case 5:gm(s);var E=lo(su.current);if(l=s.type,i!==null&&s.stateNode!=null)Nw(i,s,l,f,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return en(s),null}if(i=lo(Nr.current),Cc(s)){f=s.stateNode,l=s.type;var T=s.memoizedProps;switch(f[Cr]=s,f[tu]=T,i=(s.mode&1)!==0,l){case"dialog":ft("cancel",f),ft("close",f);break;case"iframe":case"object":case"embed":ft("load",f);break;case"video":case"audio":for(E=0;E<Ja.length;E++)ft(Ja[E],f);break;case"source":ft("error",f);break;case"img":case"image":case"link":ft("error",f),ft("load",f);break;case"details":ft("toggle",f);break;case"input":Ia(f,T),ft("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!T.multiple},ft("invalid",f);break;case"textarea":Ql(f,T),ft("invalid",f)}Vt(l,T),E=null;for(var S in T)if(T.hasOwnProperty(S)){var D=T[S];S==="children"?typeof D=="string"?f.textContent!==D&&(T.suppressHydrationWarning!==!0&&bc(f.textContent,D,i),E=["children",D]):typeof D=="number"&&f.textContent!==""+D&&(T.suppressHydrationWarning!==!0&&bc(f.textContent,D,i),E=["children",""+D]):o.hasOwnProperty(S)&&D!=null&&S==="onScroll"&&ft("scroll",f)}switch(l){case"input":mn(f),Kl(f,T,!0);break;case"textarea":mn(f),Zl(f);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(f.onclick=xc)}f=E,s.updateQueue=f,f!==null&&(s.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ie(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=S.createElement(l,{is:f.is}):(i=S.createElement(l),l==="select"&&(S=i,f.multiple?S.multiple=!0:f.size&&(S.size=f.size))):i=S.createElementNS(i,l),i[Cr]=s,i[tu]=f,Cw(i,s,!1,!1),s.stateNode=i;e:{switch(S=Ar(l,f),l){case"dialog":ft("cancel",i),ft("close",i),E=f;break;case"iframe":case"object":case"embed":ft("load",i),E=f;break;case"video":case"audio":for(E=0;E<Ja.length;E++)ft(Ja[E],i);E=f;break;case"source":ft("error",i),E=f;break;case"img":case"image":case"link":ft("error",i),ft("load",i),E=f;break;case"details":ft("toggle",i),E=f;break;case"input":Ia(i,f),E=ir(i,f),ft("invalid",i);break;case"option":E=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},E=w({},f,{value:void 0}),ft("invalid",i);break;case"textarea":Ql(i,f),E=La(i,f),ft("invalid",i);break;default:E=f}Vt(l,E),D=E;for(T in D)if(D.hasOwnProperty(T)){var H=D[T];T==="style"?li(i,H):T==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&We(i,H)):T==="children"?typeof H=="string"?(l!=="textarea"||H!=="")&&Je(i,H):typeof H=="number"&&Je(i,""+H):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(o.hasOwnProperty(T)?H!=null&&T==="onScroll"&&ft("scroll",i):H!=null&&I(i,T,H,S))}switch(l){case"input":mn(i),Kl(i,f,!1);break;case"textarea":mn(i),Zl(i);break;case"option":f.value!=null&&i.setAttribute("value",""+Se(f.value));break;case"select":i.multiple=!!f.multiple,T=f.value,T!=null?ui(i,!!f.multiple,T,!1):f.defaultValue!=null&&ui(i,!!f.multiple,f.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=xc)}switch(l){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return en(s),null;case 6:if(i&&s.stateNode!=null)Ow(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(l=lo(su.current),lo(Nr.current),Cc(s)){if(f=s.stateNode,l=s.memoizedProps,f[Cr]=s,(T=f.nodeValue!==l)&&(i=Pn,i!==null))switch(i.tag){case 3:bc(f.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&bc(f.nodeValue,l,(i.mode&1)!==0)}T&&(s.flags|=4)}else f=(l.nodeType===9?l:l.ownerDocument).createTextNode(f),f[Cr]=s,s.stateNode=f}return en(s),null;case 13:if(ht(yt),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Et&&In!==null&&(s.mode&1)!==0&&(s.flags&128)===0)R_(),ws(),s.flags|=98560,T=!1;else if(T=Cc(s),f!==null&&f.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=s.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Cr]=s}else ws(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;en(s),T=!1}else ar!==null&&(Gm(ar),ar=null),T=!0;if(!T)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(yt.current&1)!==0?Lt===0&&(Lt=3):Qm())),s.updateQueue!==null&&(s.flags|=4),en(s),null);case 4:return ks(),Fm(i,s),i===null&&Za(s.stateNode.containerInfo),en(s),null;case 10:return dm(s.type._context),en(s),null;case 17:return En(s.type)&&wc(),en(s),null;case 19:if(ht(yt),T=s.memoizedState,T===null)return en(s),null;if(f=(s.flags&128)!==0,S=T.rendering,S===null)if(f)du(T,!1);else{if(Lt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(S=Lc(i),S!==null){for(s.flags|=128,du(T,!1),f=S.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=l,l=s.child;l!==null;)T=l,i=f,T.flags&=14680066,S=T.alternate,S===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=S.childLanes,T.lanes=S.lanes,T.child=S.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=S.memoizedProps,T.memoizedState=S.memoizedState,T.updateQueue=S.updateQueue,T.type=S.type,i=S.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return ct(yt,yt.current&1|2),s.child}i=i.sibling}T.tail!==null&&vt()>Ps&&(s.flags|=128,f=!0,du(T,!1),s.lanes=4194304)}else{if(!f)if(i=Lc(S),i!==null){if(s.flags|=128,f=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),du(T,!0),T.tail===null&&T.tailMode==="hidden"&&!S.alternate&&!Et)return en(s),null}else 2*vt()-T.renderingStartTime>Ps&&l!==1073741824&&(s.flags|=128,f=!0,du(T,!1),s.lanes=4194304);T.isBackwards?(S.sibling=s.child,s.child=S):(l=T.last,l!==null?l.sibling=S:s.child=S,T.last=S)}return T.tail!==null?(s=T.tail,T.rendering=s,T.tail=s.sibling,T.renderingStartTime=vt(),s.sibling=null,l=yt.current,ct(yt,f?l&1|2:l&1),s):(en(s),null);case 22:case 23:return Km(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Rn&1073741824)!==0&&(en(s),s.subtreeFlags&6&&(s.flags|=8192)):en(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function EB(i,s){switch(om(s),s.tag){case 1:return En(s.type)&&wc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return ks(),ht(gn),ht(Jt),ym(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return gm(s),null;case 13:if(ht(yt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ws()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return ht(yt),null;case 4:return ks(),null;case 10:return dm(s.type._context),null;case 22:case 23:return Km(),null;case 24:return null;default:return null}}var $c=!1,tn=!1,yB=typeof WeakSet=="function"?WeakSet:Set,we=null;function Ns(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(f){xt(i,s,f)}else l.current=null}function Bm(i,s,l){try{l()}catch(f){xt(i,s,f)}}var Pw=!1;function TB(i,s){if(Kp=lc,i=l_(),jp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var E=f.anchorOffset,T=f.focusNode;f=f.focusOffset;try{l.nodeType,T.nodeType}catch(Te){l=null;break e}var S=0,D=-1,H=-1,Z=0,fe=0,pe=i,le=null;t:for(;;){for(var _e;pe!==l||E!==0&&pe.nodeType!==3||(D=S+E),pe!==T||f!==0&&pe.nodeType!==3||(H=S+f),pe.nodeType===3&&(S+=pe.nodeValue.length),(_e=pe.firstChild)!==null;)le=pe,pe=_e;for(;;){if(pe===i)break t;if(le===l&&++Z===E&&(D=S),le===T&&++fe===f&&(H=S),(_e=pe.nextSibling)!==null)break;pe=le,le=pe.parentNode}pe=_e}l=D===-1||H===-1?null:{start:D,end:H}}else l=null}l=l||{start:0,end:0}}else l=null;for(Qp={focusedElem:i,selectionRange:l},lc=!1,we=s;we!==null;)if(s=we,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,we=i;else for(;we!==null;){s=we;try{var ve=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ve!==null){var Ne=ve.memoizedProps,At=ve.memoizedState,X=s.stateNode,V=X.getSnapshotBeforeUpdate(s.elementType===s.type?Ne:ur(s.type,Ne),At);X.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var Q=s.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(Te){xt(s,s.return,Te)}if(i=s.sibling,i!==null){i.return=s.return,we=i;break}we=s.return}return ve=Pw,Pw=!1,ve}function fu(i,s,l){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var E=f=f.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Bm(s,l,T)}E=E.next}while(E!==f)}}function Vc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var f=l.create;l.destroy=f()}l=l.next}while(l!==s)}}function Um(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function Iw(i){var s=i.alternate;s!==null&&(i.alternate=null,Iw(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Cr],delete s[tu],delete s[tm],delete s[tB],delete s[nB])),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 Rw(i){return i.tag===5||i.tag===3||i.tag===4}function Lw(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Rw(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Hm(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=xc));else if(f!==4&&(i=i.child,i!==null))for(Hm(i,s,l),i=i.sibling;i!==null;)Hm(i,s,l),i=i.sibling}function zm(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(zm(i,s,l),i=i.sibling;i!==null;)zm(i,s,l),i=i.sibling}var qt=null,lr=!1;function _i(i,s,l){for(l=l.child;l!==null;)Dw(i,s,l),l=l.sibling}function Dw(i,s,l){if(kr&&typeof kr.onCommitFiberUnmount=="function")try{kr.onCommitFiberUnmount(rc,l)}catch(D){}switch(l.tag){case 5:tn||Ns(l,s);case 6:var f=qt,E=lr;qt=null,_i(i,s,l),qt=f,lr=E,qt!==null&&(lr?(i=qt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):qt.removeChild(l.stateNode));break;case 18:qt!==null&&(lr?(i=qt,l=l.stateNode,i.nodeType===8?em(i.parentNode,l):i.nodeType===1&&em(i,l),Va(i)):em(qt,l.stateNode));break;case 4:f=qt,E=lr,qt=l.stateNode.containerInfo,lr=!0,_i(i,s,l),qt=f,lr=E;break;case 0:case 11:case 14:case 15:if(!tn&&(f=l.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){E=f=f.next;do{var T=E,S=T.destroy;T=T.tag,S!==void 0&&((T&2)!==0||(T&4)!==0)&&Bm(l,s,S),E=E.next}while(E!==f)}_i(i,s,l);break;case 1:if(!tn&&(Ns(l,s),f=l.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=l.memoizedProps,f.state=l.memoizedState,f.componentWillUnmount()}catch(D){xt(l,s,D)}_i(i,s,l);break;case 21:_i(i,s,l);break;case 22:l.mode&1?(tn=(f=tn)||l.memoizedState!==null,_i(i,s,l),tn=f):_i(i,s,l);break;default:_i(i,s,l)}}function Mw(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new yB),s.forEach(function(f){var E=CB.bind(null,i,f);l.has(f)||(l.add(f),f.then(E,E))})}}function cr(i,s){var l=s.deletions;if(l!==null)for(var f=0;f<l.length;f++){var E=l[f];try{var T=i,S=s,D=S;e:for(;D!==null;){switch(D.tag){case 5:qt=D.stateNode,lr=!1;break e;case 3:qt=D.stateNode.containerInfo,lr=!0;break e;case 4:qt=D.stateNode.containerInfo,lr=!0;break e}D=D.return}if(qt===null)throw Error(n(160));Dw(T,S,E),qt=null,lr=!1;var H=E.alternate;H!==null&&(H.return=null),E.return=null}catch(Z){xt(E,s,Z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Fw(s,i),s=s.sibling}function Fw(i,s){var l=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(cr(s,i),Pr(i),f&4){try{fu(3,i,i.return),Vc(3,i)}catch(Ne){xt(i,i.return,Ne)}try{fu(5,i,i.return)}catch(Ne){xt(i,i.return,Ne)}}break;case 1:cr(s,i),Pr(i),f&512&&l!==null&&Ns(l,l.return);break;case 5:if(cr(s,i),Pr(i),f&512&&l!==null&&Ns(l,l.return),i.flags&32){var E=i.stateNode;try{Je(E,"")}catch(Ne){xt(i,i.return,Ne)}}if(f&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,S=l!==null?l.memoizedProps:T,D=i.type,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{D==="input"&&T.type==="radio"&&T.name!=null&&Ra(E,T),Ar(D,S);var Z=Ar(D,T);for(S=0;S<H.length;S+=2){var fe=H[S],pe=H[S+1];fe==="style"?li(E,pe):fe==="dangerouslySetInnerHTML"?We(E,pe):fe==="children"?Je(E,pe):I(E,fe,pe,Z)}switch(D){case"input":as(E,T);break;case"textarea":Jl(E,T);break;case"select":var le=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var _e=T.value;_e!=null?ui(E,!!T.multiple,_e,!1):le!==!!T.multiple&&(T.defaultValue!=null?ui(E,!!T.multiple,T.defaultValue,!0):ui(E,!!T.multiple,T.multiple?[]:"",!1))}E[tu]=T}catch(Ne){xt(i,i.return,Ne)}}break;case 6:if(cr(s,i),Pr(i),f&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Ne){xt(i,i.return,Ne)}}break;case 3:if(cr(s,i),Pr(i),f&4&&l!==null&&l.memoizedState.isDehydrated)try{Va(s.containerInfo)}catch(Ne){xt(i,i.return,Ne)}break;case 4:cr(s,i),Pr(i);break;case 13:cr(s,i),Pr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(Vm=vt())),f&4&&Mw(i);break;case 22:if(fe=l!==null&&l.memoizedState!==null,i.mode&1?(tn=(Z=tn)||fe,cr(s,i),tn=Z):cr(s,i),Pr(i),f&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!fe&&(i.mode&1)!==0)for(we=i,fe=i.child;fe!==null;){for(pe=we=fe;we!==null;){switch(le=we,_e=le.child,le.tag){case 0:case 11:case 14:case 15:fu(4,le,le.return);break;case 1:Ns(le,le.return);var ve=le.stateNode;if(typeof ve.componentWillUnmount=="function"){f=le,l=le.return;try{s=f,ve.props=s.memoizedProps,ve.state=s.memoizedState,ve.componentWillUnmount()}catch(Ne){xt(f,l,Ne)}}break;case 5:Ns(le,le.return);break;case 22:if(le.memoizedState!==null){Hw(pe);continue}}_e!==null?(_e.return=le,we=_e):Hw(pe)}fe=fe.sibling}e:for(fe=null,pe=i;;){if(pe.tag===5){if(fe===null){fe=pe;try{E=pe.stateNode,Z?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(D=pe.stateNode,H=pe.memoizedProps.style,S=H!=null&&H.hasOwnProperty("display")?H.display:null,D.style.display=zn("display",S))}catch(Ne){xt(i,i.return,Ne)}}}else if(pe.tag===6){if(fe===null)try{pe.stateNode.nodeValue=Z?"":pe.memoizedProps}catch(Ne){xt(i,i.return,Ne)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;fe===pe&&(fe=null),pe=pe.return}fe===pe&&(fe=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:cr(s,i),Pr(i),f&4&&Mw(i);break;case 21:break;default:cr(s,i),Pr(i)}}function Pr(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(Rw(l)){var f=l;break e}l=l.return}throw Error(n(160))}switch(f.tag){case 5:var E=f.stateNode;f.flags&32&&(Je(E,""),f.flags&=-33);var T=Lw(i);zm(i,T,E);break;case 3:case 4:var S=f.stateNode.containerInfo,D=Lw(i);Hm(i,D,S);break;default:throw Error(n(161))}}catch(H){xt(i,i.return,H)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function bB(i,s,l){we=i,Bw(i)}function Bw(i,s,l){for(var f=(i.mode&1)!==0;we!==null;){var E=we,T=E.child;if(E.tag===22&&f){var S=E.memoizedState!==null||$c;if(!S){var D=E.alternate,H=D!==null&&D.memoizedState!==null||tn;D=$c;var Z=tn;if($c=S,(tn=H)&&!Z)for(we=E;we!==null;)S=we,H=S.child,S.tag===22&&S.memoizedState!==null?zw(E):H!==null?(H.return=S,we=H):zw(E);for(;T!==null;)we=T,Bw(T),T=T.sibling;we=E,$c=D,tn=Z}Uw(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,we=T):Uw(i)}}function Uw(i){for(;we!==null;){var s=we;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:tn||Vc(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!tn)if(l===null)f.componentDidMount();else{var E=s.elementType===s.type?l.memoizedProps:ur(s.type,l.memoizedProps);f.componentDidUpdate(E,l.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var T=s.updateQueue;T!==null&&H_(s,T,f);break;case 3:var S=s.updateQueue;if(S!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}H_(s,S,l)}break;case 5:var D=s.stateNode;if(l===null&&s.flags&4){l=D;var H=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&l.focus();break;case"img":H.src&&(l.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Z=s.alternate;if(Z!==null){var fe=Z.memoizedState;if(fe!==null){var pe=fe.dehydrated;pe!==null&&Va(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}tn||s.flags&512&&Um(s)}catch(le){xt(s,s.return,le)}}if(s===i){we=null;break}if(l=s.sibling,l!==null){l.return=s.return,we=l;break}we=s.return}}function Hw(i){for(;we!==null;){var s=we;if(s===i){we=null;break}var l=s.sibling;if(l!==null){l.return=s.return,we=l;break}we=s.return}}function zw(i){for(;we!==null;){var s=we;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{Vc(4,s)}catch(H){xt(s,l,H)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var E=s.return;try{f.componentDidMount()}catch(H){xt(s,E,H)}}var T=s.return;try{Um(s)}catch(H){xt(s,T,H)}break;case 5:var S=s.return;try{Um(s)}catch(H){xt(s,S,H)}}}catch(H){xt(s,s.return,H)}if(s===i){we=null;break}var D=s.sibling;if(D!==null){D.return=s.return,we=D;break}we=s.return}}var xB=Math.ceil,qc=j.ReactCurrentDispatcher,jm=j.ReactCurrentOwner,Yn=j.ReactCurrentBatchConfig,Ze=0,zt=null,Ot=null,Yt=0,Rn=0,Os=Ei(0),Lt=0,hu=null,fo=0,Yc=0,$m=0,pu=null,Tn=null,Vm=0,Ps=1/0,Gr=null,Wc=!1,qm=null,wi=null,Gc=!1,Si=null,Xc=0,mu=0,Ym=null,Kc=-1,Qc=0;function sn(){return(Ze&6)!==0?vt():Kc!==-1?Kc:Kc=vt()}function vi(i){return(i.mode&1)===0?1:(Ze&2)!==0&&Yt!==0?Yt&-Yt:iB.transition!==null?(Qc===0&&(Qc=Lx()),Qc):(i=nt,i!==0||(i=window.event,i=i===void 0?16:$x(i.type)),i)}function dr(i,s,l,f){if(50<mu)throw mu=0,Ym=null,Error(n(185));Ua(i,l,f),((Ze&2)===0||i!==zt)&&(i===zt&&((Ze&2)===0&&(Yc|=l),Lt===4&&Ai(i,Yt)),bn(i,f),l===1&&Ze===0&&(s.mode&1)===0&&(Ps=vt()+500,vc&&Ti()))}function bn(i,s){var l=i.callbackNode;iF(i,s);var f=sc(i,i===zt?Yt:0);if(f===0)l!==null&&Px(l),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(l!=null&&Px(l),s===1)i.tag===0?rB($w.bind(null,i)):C_($w.bind(null,i)),ZF(function(){(Ze&6)===0&&Ti()}),l=null;else{switch(Dx(f)){case 1:l=vp;break;case 4:l=Ix;break;case 16:l=nc;break;case 536870912:l=Rx;break;default:l=nc}l=Qw(l,jw.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function jw(i,s){if(Kc=-1,Qc=0,(Ze&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Is()&&i.callbackNode!==l)return null;var f=sc(i,i===zt?Yt:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=Jc(i,f);else{s=f;var E=Ze;Ze|=2;var T=qw();(zt!==i||Yt!==s)&&(Gr=null,Ps=vt()+500,po(i,s));do try{SB();break}catch(D){Vw(i,D)}while(!0);cm(),qc.current=T,Ze=E,Ot!==null?s=0:(zt=null,Yt=0,s=Lt)}if(s!==0){if(s===2&&(E=Ap(i),E!==0&&(f=E,s=Wm(i,E))),s===1)throw l=hu,po(i,0),Ai(i,f),bn(i,vt()),l;if(s===6)Ai(i,f);else{if(E=i.current.alternate,(f&30)===0&&!_B(E)&&(s=Jc(i,f),s===2&&(T=Ap(i),T!==0&&(f=T,s=Wm(i,T))),s===1))throw l=hu,po(i,0),Ai(i,f),bn(i,vt()),l;switch(i.finishedWork=E,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:mo(i,Tn,Gr);break;case 3:if(Ai(i,f),(f&130023424)===f&&(s=Vm+500-vt(),10<s)){if(sc(i,0)!==0)break;if(E=i.suspendedLanes,(E&f)!==f){sn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Zp(mo.bind(null,i,Tn,Gr),s);break}mo(i,Tn,Gr);break;case 4:if(Ai(i,f),(f&4194240)===f)break;for(s=i.eventTimes,E=-1;0<f;){var S=31-or(f);T=1<<S,S=s[S],S>E&&(E=S),f&=~T}if(f=E,f=vt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*xB(f/1960))-f,10<f){i.timeoutHandle=Zp(mo.bind(null,i,Tn,Gr),f);break}mo(i,Tn,Gr);break;case 5:mo(i,Tn,Gr);break;default:throw Error(n(329))}}}return bn(i,vt()),i.callbackNode===l?jw.bind(null,i):null}function Wm(i,s){var l=pu;return i.current.memoizedState.isDehydrated&&(po(i,s).flags|=256),i=Jc(i,s),i!==2&&(s=Tn,Tn=l,s!==null&&Gm(s)),i}function Gm(i){Tn===null?Tn=i:Tn.push.apply(Tn,i)}function _B(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var f=0;f<l.length;f++){var E=l[f],T=E.getSnapshot;E=E.value;try{if(!sr(T(),E))return!1}catch(S){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ai(i,s){for(s&=~$m,s&=~Yc,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-or(s),f=1<<l;i[l]=-1,s&=~f}}function $w(i){if((Ze&6)!==0)throw Error(n(327));Is();var s=sc(i,0);if((s&1)===0)return bn(i,vt()),null;var l=Jc(i,s);if(i.tag!==0&&l===2){var f=Ap(i);f!==0&&(s=f,l=Wm(i,f))}if(l===1)throw l=hu,po(i,0),Ai(i,s),bn(i,vt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,mo(i,Tn,Gr),bn(i,vt()),null}function Xm(i,s){var l=Ze;Ze|=1;try{return i(s)}finally{Ze=l,Ze===0&&(Ps=vt()+500,vc&&Ti())}}function ho(i){Si!==null&&Si.tag===0&&(Ze&6)===0&&Is();var s=Ze;Ze|=1;var l=Yn.transition,f=nt;try{if(Yn.transition=null,nt=1,i)return i()}finally{nt=f,Yn.transition=l,Ze=s,(Ze&6)===0&&Ti()}}function Km(){Rn=Os.current,ht(Os)}function po(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,JF(l)),Ot!==null)for(l=Ot.return;l!==null;){var f=l;switch(om(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&wc();break;case 3:ks(),ht(gn),ht(Jt),ym();break;case 5:gm(f);break;case 4:ks();break;case 13:ht(yt);break;case 19:ht(yt);break;case 10:dm(f.type._context);break;case 22:case 23:Km()}l=l.return}if(zt=i,Ot=i=ki(i.current,null),Yt=Rn=s,Lt=0,hu=null,$m=Yc=fo=0,Tn=pu=null,uo!==null){for(s=0;s<uo.length;s++)if(l=uo[s],f=l.interleaved,f!==null){l.interleaved=null;var E=f.next,T=l.pending;if(T!==null){var S=T.next;T.next=E,f.next=S}l.pending=f}uo=null}return i}function Vw(i,s){do{var l=Ot;try{if(cm(),Dc.current=Uc,Mc){for(var f=Tt.memoizedState;f!==null;){var E=f.queue;E!==null&&(E.pending=null),f=f.next}Mc=!1}if(co=0,Ht=Rt=Tt=null,au=!1,uu=0,jm.current=null,l===null||l.return===null){Lt=1,hu=s,Ot=null;break}e:{var T=i,S=l.return,D=l,H=s;if(s=Yt,D.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var Z=H,fe=D,pe=fe.tag;if((fe.mode&1)===0&&(pe===0||pe===11||pe===15)){var le=fe.alternate;le?(fe.updateQueue=le.updateQueue,fe.memoizedState=le.memoizedState,fe.lanes=le.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var _e=mw(S);if(_e!==null){_e.flags&=-257,gw(_e,S,D,T,s),_e.mode&1&&pw(T,Z,s),s=_e,H=Z;var ve=s.updateQueue;if(ve===null){var Ne=new Set;Ne.add(H),s.updateQueue=Ne}else ve.add(H);break e}else{if((s&1)===0){pw(T,Z,s),Qm();break e}H=Error(n(426))}}else if(Et&&D.mode&1){var At=mw(S);if(At!==null){(At.flags&65536)===0&&(At.flags|=256),gw(At,S,D,T,s),um(Cs(H,D));break e}}T=H=Cs(H,D),Lt!==4&&(Lt=2),pu===null?pu=[T]:pu.push(T),T=S;do{switch(T.tag){case 3:T.flags|=65536,s&=-s,T.lanes|=s;var X=fw(T,H,s);U_(T,X);break e;case 1:D=H;var V=T.type,Q=T.stateNode;if((T.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(wi===null||!wi.has(Q)))){T.flags|=65536,s&=-s,T.lanes|=s;var Te=hw(T,D,s);U_(T,Te);break e}}T=T.return}while(T!==null)}Ww(l)}catch(Oe){s=Oe,Ot===l&&l!==null&&(Ot=l=l.return);continue}break}while(!0)}function qw(){var i=qc.current;return qc.current=Uc,i===null?Uc:i}function Qm(){(Lt===0||Lt===3||Lt===2)&&(Lt=4),zt===null||(fo&268435455)===0&&(Yc&268435455)===0||Ai(zt,Yt)}function Jc(i,s){var l=Ze;Ze|=2;var f=qw();(zt!==i||Yt!==s)&&(Gr=null,po(i,s));do try{wB();break}catch(E){Vw(i,E)}while(!0);if(cm(),Ze=l,qc.current=f,Ot!==null)throw Error(n(261));return zt=null,Yt=0,Lt}function wB(){for(;Ot!==null;)Yw(Ot)}function SB(){for(;Ot!==null&&!X9();)Yw(Ot)}function Yw(i){var s=Kw(i.alternate,i,Rn);i.memoizedProps=i.pendingProps,s===null?Ww(i):Ot=s,jm.current=null}function Ww(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=gB(l,s,Rn),l!==null){Ot=l;return}}else{if(l=EB(l,s),l!==null){l.flags&=32767,Ot=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Lt=6,Ot=null;return}}if(s=s.sibling,s!==null){Ot=s;return}Ot=s=i}while(s!==null);Lt===0&&(Lt=5)}function mo(i,s,l){var f=nt,E=Yn.transition;try{Yn.transition=null,nt=1,vB(i,s,l,f)}finally{Yn.transition=E,nt=f}return null}function vB(i,s,l,f){do Is();while(Si!==null);if((Ze&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var T=l.lanes|l.childLanes;if(oF(i,T),i===zt&&(Ot=zt=null,Yt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Gc||(Gc=!0,Qw(nc,function(){return Is(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=Yn.transition,Yn.transition=null;var S=nt;nt=1;var D=Ze;Ze|=4,jm.current=null,TB(i,l),Fw(l,i),qF(Qp),lc=!!Kp,Qp=Kp=null,i.current=l,bB(l),K9(),Ze=D,nt=S,Yn.transition=T}else i.current=l;if(Gc&&(Gc=!1,Si=i,Xc=E),T=i.pendingLanes,T===0&&(wi=null),Z9(l.stateNode),bn(i,vt()),s!==null)for(f=i.onRecoverableError,l=0;l<s.length;l++)E=s[l],f(E.value,{componentStack:E.stack,digest:E.digest});if(Wc)throw Wc=!1,i=qm,qm=null,i;return(Xc&1)!==0&&i.tag!==0&&Is(),T=i.pendingLanes,(T&1)!==0?i===Ym?mu++:(mu=0,Ym=i):mu=0,Ti(),null}function Is(){if(Si!==null){var i=Dx(Xc),s=Yn.transition,l=nt;try{if(Yn.transition=null,nt=16>i?16:i,Si===null)var f=!1;else{if(i=Si,Si=null,Xc=0,(Ze&6)!==0)throw Error(n(331));var E=Ze;for(Ze|=4,we=i.current;we!==null;){var T=we,S=T.child;if((we.flags&16)!==0){var D=T.deletions;if(D!==null){for(var H=0;H<D.length;H++){var Z=D[H];for(we=Z;we!==null;){var fe=we;switch(fe.tag){case 0:case 11:case 15:fu(8,fe,T)}var pe=fe.child;if(pe!==null)pe.return=fe,we=pe;else for(;we!==null;){fe=we;var le=fe.sibling,_e=fe.return;if(Iw(fe),fe===Z){we=null;break}if(le!==null){le.return=_e,we=le;break}we=_e}}}var ve=T.alternate;if(ve!==null){var Ne=ve.child;if(Ne!==null){ve.child=null;do{var At=Ne.sibling;Ne.sibling=null,Ne=At}while(Ne!==null)}}we=T}}if((T.subtreeFlags&2064)!==0&&S!==null)S.return=T,we=S;else e:for(;we!==null;){if(T=we,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:fu(9,T,T.return)}var X=T.sibling;if(X!==null){X.return=T.return,we=X;break e}we=T.return}}var V=i.current;for(we=V;we!==null;){S=we;var Q=S.child;if((S.subtreeFlags&2064)!==0&&Q!==null)Q.return=S,we=Q;else e:for(S=V;we!==null;){if(D=we,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:Vc(9,D)}}catch(Oe){xt(D,D.return,Oe)}if(D===S){we=null;break e}var Te=D.sibling;if(Te!==null){Te.return=D.return,we=Te;break e}we=D.return}}if(Ze=E,Ti(),kr&&typeof kr.onPostCommitFiberRoot=="function")try{kr.onPostCommitFiberRoot(rc,i)}catch(Oe){}f=!0}return f}finally{nt=l,Yn.transition=s}}return!1}function Gw(i,s,l){s=Cs(l,s),s=fw(i,s,1),i=xi(i,s,1),s=sn(),i!==null&&(Ua(i,1,s),bn(i,s))}function xt(i,s,l){if(i.tag===3)Gw(i,i,l);else for(;s!==null;){if(s.tag===3){Gw(s,i,l);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(wi===null||!wi.has(f))){i=Cs(l,i),i=hw(s,i,1),s=xi(s,i,1),i=sn(),s!==null&&(Ua(s,1,i),bn(s,i));break}}s=s.return}}function AB(i,s,l){var f=i.pingCache;f!==null&&f.delete(s),s=sn(),i.pingedLanes|=i.suspendedLanes&l,zt===i&&(Yt&l)===l&&(Lt===4||Lt===3&&(Yt&130023424)===Yt&&500>vt()-Vm?po(i,0):$m|=l),bn(i,s)}function Xw(i,s){s===0&&((i.mode&1)===0?s=1:(s=oc,oc<<=1,(oc&130023424)===0&&(oc=4194304)));var l=sn();i=qr(i,s),i!==null&&(Ua(i,s,l),bn(i,l))}function kB(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),Xw(i,l)}function CB(i,s){var l=0;switch(i.tag){case 13:var f=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Xw(i,l)}var Kw;Kw=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||gn.current)yn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return yn=!1,mB(i,s,l);yn=(i.flags&131072)!==0}else yn=!1,Et&&(s.flags&1048576)!==0&&N_(s,kc,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;jc(i,s),i=s.pendingProps;var E=bs(s,Jt.current);As(s,l),E=xm(null,s,f,i,E,l);var T=_m();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,En(f)?(T=!0,Sc(s)):T=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,pm(s),E.updater=Hc,s.stateNode=E,E._reactInternals=s,Cm(s,f,i,l),s=Im(null,s,f,!0,T,l)):(s.tag=0,Et&&T&&im(s),on(null,s,E,l),s=s.child),s;case 16:f=s.elementType;e:{switch(jc(i,s),i=s.pendingProps,E=f._init,f=E(f._payload),s.type=f,E=s.tag=OB(f),i=ur(f,i),E){case 0:s=Pm(null,s,f,i,l);break e;case 1:s=_w(null,s,f,i,l);break e;case 11:s=Ew(null,s,f,i,l);break e;case 14:s=yw(null,s,f,ur(f.type,i),l);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:ur(f,E),Pm(i,s,f,E,l);case 1:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:ur(f,E),_w(i,s,f,E,l);case 3:e:{if(ww(s),i===null)throw Error(n(387));f=s.pendingProps,T=s.memoizedState,E=T.element,B_(i,s),Rc(s,f,null,l);var S=s.memoizedState;if(f=S.element,T.isDehydrated)if(T={element:f,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},s.updateQueue.baseState=T,s.memoizedState=T,s.flags&256){E=Cs(Error(n(423)),s),s=Sw(i,s,f,l,E);break e}else if(f!==E){E=Cs(Error(n(424)),s),s=Sw(i,s,f,l,E);break e}else for(In=gi(s.stateNode.containerInfo.firstChild),Pn=s,Et=!0,ar=null,l=M_(s,null,f,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ws(),f===E){s=Wr(i,s,l);break e}on(i,s,f,l)}s=s.child}return s;case 5:return z_(s),i===null&&am(s),f=s.type,E=s.pendingProps,T=i!==null?i.memoizedProps:null,S=E.children,Jp(f,E)?S=null:T!==null&&Jp(f,T)&&(s.flags|=32),xw(i,s),on(i,s,S,l),s.child;case 6:return i===null&&am(s),null;case 13:return vw(i,s,l);case 4:return mm(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=Ss(s,null,f,l):on(i,s,f,l),s.child;case 11:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:ur(f,E),Ew(i,s,f,E,l);case 7:return on(i,s,s.pendingProps,l),s.child;case 8:return on(i,s,s.pendingProps.children,l),s.child;case 12:return on(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(f=s.type._context,E=s.pendingProps,T=s.memoizedProps,S=E.value,ct(Oc,f._currentValue),f._currentValue=S,T!==null)if(sr(T.value,S)){if(T.children===E.children&&!gn.current){s=Wr(i,s,l);break e}}else for(T=s.child,T!==null&&(T.return=s);T!==null;){var D=T.dependencies;if(D!==null){S=T.child;for(var H=D.firstContext;H!==null;){if(H.context===f){if(T.tag===1){H=Yr(-1,l&-l),H.tag=2;var Z=T.updateQueue;if(Z!==null){Z=Z.shared;var fe=Z.pending;fe===null?H.next=H:(H.next=fe.next,fe.next=H),Z.pending=H}}T.lanes|=l,H=T.alternate,H!==null&&(H.lanes|=l),fm(T.return,l,s),D.lanes|=l;break}H=H.next}}else if(T.tag===10)S=T.type===s.type?null:T.child;else if(T.tag===18){if(S=T.return,S===null)throw Error(n(341));S.lanes|=l,D=S.alternate,D!==null&&(D.lanes|=l),fm(S,l,s),S=T.sibling}else S=T.child;if(S!==null)S.return=T;else for(S=T;S!==null;){if(S===s){S=null;break}if(T=S.sibling,T!==null){T.return=S.return,S=T;break}S=S.return}T=S}on(i,s,E.children,l),s=s.child}return s;case 9:return E=s.type,f=s.pendingProps.children,As(s,l),E=Vn(E),f=f(E),s.flags|=1,on(i,s,f,l),s.child;case 14:return f=s.type,E=ur(f,s.pendingProps),E=ur(f.type,E),yw(i,s,f,E,l);case 15:return Tw(i,s,s.type,s.pendingProps,l);case 17:return f=s.type,E=s.pendingProps,E=s.elementType===f?E:ur(f,E),jc(i,s),s.tag=1,En(f)?(i=!0,Sc(s)):i=!1,As(s,l),cw(s,f,E),Cm(s,f,E,l),Im(null,s,f,!0,i,l);case 19:return kw(i,s,l);case 22:return bw(i,s,l)}throw Error(n(156,s.tag))};function Qw(i,s){return Ox(i,s)}function NB(i,s,l,f){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wn(i,s,l,f){return new NB(i,s,l,f)}function Jm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function OB(i){if(typeof i=="function")return Jm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===re)return 11;if(i===be)return 14}return 2}function ki(i,s){var l=i.alternate;return l===null?(l=Wn(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Zc(i,s,l,f,E,T){var S=2;if(f=i,typeof i=="function")Jm(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case ee:return go(l.children,E,T,s);case ue:S=8,E|=8;break;case me:return i=Wn(12,l,s,E|2),i.elementType=me,i.lanes=T,i;case de:return i=Wn(13,l,s,E),i.elementType=de,i.lanes=T,i;case se:return i=Wn(19,l,s,E),i.elementType=se,i.lanes=T,i;case ae:return ed(l,E,T,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:S=10;break e;case ne:S=9;break e;case re:S=11;break e;case be:S=14;break e;case ke:S=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=Wn(S,l,s,E),s.elementType=i,s.type=f,s.lanes=T,s}function go(i,s,l,f){return i=Wn(7,i,f,s),i.lanes=l,i}function ed(i,s,l,f){return i=Wn(22,i,f,s),i.elementType=ae,i.lanes=l,i.stateNode={isHidden:!1},i}function Zm(i,s,l){return i=Wn(6,i,null,s),i.lanes=l,i}function e0(i,s,l){return s=Wn(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function PB(i,s,l,f,E){this.tag=s,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=kp(0),this.expirationTimes=kp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kp(0),this.identifierPrefix=f,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function t0(i,s,l,f,E,T,S,D,H){return i=new PB(i,s,l,D,H),s===1?(s=1,T===!0&&(s|=8)):s=0,T=Wn(3,null,null,s),i.current=T,T.stateNode=i,T.memoizedState={element:f,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},pm(T),i}function IB(i,s,l){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,key:f==null?null:""+f,children:i,containerInfo:s,implementation:l}}function Jw(i){if(!i)return yi;i=i._reactInternals;e:{if(ro(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(En(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(En(l))return A_(i,l,s)}return s}function Zw(i,s,l,f,E,T,S,D,H){return i=t0(l,f,!0,i,E,T,S,D,H),i.context=Jw(null),l=i.current,f=sn(),E=vi(l),T=Yr(f,E),T.callback=s!=null?s:null,xi(l,T,E),i.current.lanes=E,Ua(i,E,f),bn(i,f),i}function td(i,s,l,f){var E=s.current,T=sn(),S=vi(E);return l=Jw(l),s.context===null?s.context=l:s.pendingContext=l,s=Yr(T,S),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=xi(E,s,S),i!==null&&(dr(i,E,S,T),Ic(i,E,S)),S}function nd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function e2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function n0(i,s){e2(i,s),(i=i.alternate)&&e2(i,s)}function RB(){return null}var t2=typeof reportError=="function"?reportError:function(i){console.error(i)};function r0(i){this._internalRoot=i}rd.prototype.render=r0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));td(i,s,null,null)},rd.prototype.unmount=r0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;ho(function(){td(null,i,null,null)}),s[zr]=null}};function rd(i){this._internalRoot=i}rd.prototype.unstable_scheduleHydration=function(i){if(i){var s=Bx();i={blockedOn:null,target:i,priority:s};for(var l=0;l<hi.length&&s!==0&&s<hi[l].priority;l++);hi.splice(l,0,i),l===0&&zx(i)}};function i0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function id(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function n2(){}function LB(i,s,l,f,E){if(E){if(typeof f=="function"){var T=f;f=function(){var Z=nd(S);T.call(Z)}}var S=Zw(s,f,i,0,null,!1,!1,"",n2);return i._reactRootContainer=S,i[zr]=S.current,Za(i.nodeType===8?i.parentNode:i),ho(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof f=="function"){var D=f;f=function(){var Z=nd(H);D.call(Z)}}var H=t0(i,0,!1,null,null,!1,!1,"",n2);return i._reactRootContainer=H,i[zr]=H.current,Za(i.nodeType===8?i.parentNode:i),ho(function(){td(s,H,l,f)}),H}function od(i,s,l,f,E){var T=l._reactRootContainer;if(T){var S=T;if(typeof E=="function"){var D=E;E=function(){var H=nd(S);D.call(H)}}td(s,S,i,E)}else S=LB(l,s,i,E,f);return nd(S)}Mx=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=Ba(s.pendingLanes);l!==0&&(Cp(s,l|1),bn(s,vt()),(Ze&6)===0&&(Ps=vt()+500,Ti()))}break;case 13:ho(function(){var f=qr(i,1);if(f!==null){var E=sn();dr(f,i,1,E)}}),n0(i,1)}},Np=function(i){if(i.tag===13){var s=qr(i,134217728);if(s!==null){var l=sn();dr(s,i,134217728,l)}n0(i,134217728)}},Fx=function(i){if(i.tag===13){var s=vi(i),l=qr(i,s);if(l!==null){var f=sn();dr(l,i,s,f)}n0(i,s)}},Bx=function(){return nt},Ux=function(i,s){var l=nt;try{return nt=i,s()}finally{nt=l}},xp=function(i,s,l){switch(s){case"input":if(as(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var f=l[s];if(f!==i&&f.form===i.form){var E=_c(f);if(!E)throw Error(n(90));to(f),as(f,E)}}}break;case"textarea":Jl(i,l);break;case"select":s=l.value,s!=null&&ui(i,!!l.multiple,s,!1)}},wx=Xm,Sx=ho;var DB={usingClientEntryPoint:!1,Events:[nu,ys,_c,xx,_x,Xm]},gu={findFiberByHostInstance:io,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},MB={bundleType:gu.bundleType,version:gu.version,rendererPackageName:gu.rendererPackageName,rendererConfig:gu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Cx(i),i===null?null:i.stateNode},findFiberByHostInstance:gu.findFiberByHostInstance||RB,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var sd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sd.isDisabled&&sd.supportsFiber)try{rc=sd.inject(MB),kr=sd}catch(i){}}return cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DB,cn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!i0(s))throw Error(n(200));return IB(i,s,null,l)},cn.createRoot=function(i,s){if(!i0(i))throw Error(n(299));var l=!1,f="",E=t2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=t0(i,1,!1,null,null,l,!1,f,E),i[zr]=s.current,Za(i.nodeType===8?i.parentNode:i),new r0(s)},cn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=Cx(s),i=i===null?null:i.stateNode,i},cn.flushSync=function(i){return ho(i)},cn.hydrate=function(i,s,l){if(!id(s))throw Error(n(200));return od(null,i,s,!0,l)},cn.hydrateRoot=function(i,s,l){if(!i0(i))throw Error(n(405));var f=l!=null&&l.hydratedSources||null,E=!1,T="",S=t2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),s=Zw(s,null,i,1,l!=null?l:null,E,!1,T,S),i[zr]=s.current,Za(i),f)for(i=0;i<f.length;i++)l=f[i],E=l._getVersion,E=E(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,E]:s.mutableSourceEagerHydrationData.push(l,E);return new rd(s)},cn.render=function(i,s,l){if(!id(s))throw Error(n(200));return od(null,i,s,!1,l)},cn.unmountComponentAtNode=function(i){if(!id(i))throw Error(n(40));return i._reactRootContainer?(ho(function(){od(null,null,i,!1,function(){i._reactRootContainer=null,i[zr]=null})}),!0):!1},cn.unstable_batchedUpdates=Xm,cn.unstable_renderSubtreeIntoContainer=function(i,s,l,f){if(!id(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return od(i,s,l,!1,f)},cn.version="18.3.1-next-f1338f8080-20240426",cn}var Ug;function Hg(){if(Ug)return of.exports;Ug=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(),of.exports=KA(),of.exports}var Ao=Hg();function zg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=zg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function U(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=zg(e))&&(r&&(r+=" "),r+=t);return r}var jg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},$g=Ni.createContext&&Ni.createContext(jg),QA=["attr","size","title"];function JA(e,t){if(e==null)return{};var n=ZA(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZA(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 Gu(){return Gu=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},Gu.apply(this,arguments)}function Vg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vg(Object(n),!0).forEach(function(r){ek(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ek(e,t,n){return t=tk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tk(e){var t=nk(e,"string");return typeof t=="symbol"?t:t+""}function nk(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 qg(e){return e&&e.map((t,n)=>Ni.createElement(t.tag,Xu({key:n},t.attr),qg(t.child)))}function it(e){return t=>Ni.createElement(rk,Gu({attr:Xu({},e.attr)},t),qg(e.child))}function rk(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=JA(e,QA),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Ni.createElement("svg",Gu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Xu(Xu({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Ni.createElement("title",null,a),e.children)};return $g!==void 0?Ni.createElement($g.Consumer,null,n=>t(n)):t(jg)}function ik(e){return it({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 ok(e){return it({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 sk(e){return it({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 Jn=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:x.jsx("button",{className:U(e,`${L}-icon-button`),type:r,"aria-label":o,title:a,onClick:c,disabled:u,children:t?x.jsx("img",{className:U(`${L}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),ak="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",uk=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=ot(),o=r==="messaging",a=o?"Open Commerce Client":"Open Copilot",u=o?x.jsx(sk,{className:U(t,`${L}-minimized-icon`)}):x.jsx("img",{src:(n==null?void 0:n.logoUrl)||ak,alt:"Copilot",className:U(t,`${L}-minimized-icon-img`)});return x.jsx(Jn,{className:U(t,`${L}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},lk=()=>{const{globalClassName:e,themeVariables:t}=ot(),n=()=>{Yu(!1),Rr(!0)};return Ao.createPortal(x.jsx("div",{className:U(e,`${L}-minimized-container`),style:t,children:x.jsx(uk,{onClick:n})}),document.body)};function ck(e){return it({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 Mn(){const e=q.useContext(dg);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const dk=e=>({[`${xn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${xn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${xn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${xn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${xn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${xn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"});function fk(e){return it({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm18.31 6-2.76 5z"},child:[]},{tag:"path",attr:{d:"M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"},child:[]}]})(e)}function Yg(e){return it({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 hk(e){return it({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function uf(e){return it({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 pk(e){return it({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 mk(e){return it({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 gk(e){return it({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 Ek(e){return it({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 yk(e){return it({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 Tk(e){return it({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 bk(e){return it({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 Wg(e){return it({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 Ku=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>x.jsx("button",{className:U(`${L}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),xk=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?x.jsx("img",{className:U(`${L}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):x.jsx(uf,{size:"16px"})},_k=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return x.jsx(Jn,{className:U(e,n,`cim-${r}-component`,`${L}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:x.jsx(uf,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return x.jsxs(Ku,{className:U(e,n,`cim-${r}-component`,`${L}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&x.jsx(xk,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function f7(){}function h7(){}function Gg(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function Xg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const wk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vk={};function Kg(e,t){return(vk.jsx?Sk:wk).test(e)}const Ak=/[ \t\n\f\r]/g;function kk(e){return typeof e=="object"?e.type==="text"?Qg(e.value):!1:Qg(e)}function Qg(e){return e.replace(Ak,"")===""}let Ws=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ws.prototype.normal={},Ws.prototype.property={},Ws.prototype.space=void 0;function Jg(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ws(n,r,t)}function Gs(e){return e.toLowerCase()}let dn=class{constructor(t,n){this.attribute=n,this.property=t}};dn.prototype.attribute="",dn.prototype.booleanish=!1,dn.prototype.boolean=!1,dn.prototype.commaOrSpaceSeparated=!1,dn.prototype.commaSeparated=!1,dn.prototype.defined=!1,dn.prototype.mustUseProperty=!1,dn.prototype.number=!1,dn.prototype.overloadedBoolean=!1,dn.prototype.property="",dn.prototype.spaceSeparated=!1,dn.prototype.space=void 0;let Ck=0;const $e=Bi(),Ct=Bi(),lf=Bi(),ge=Bi(),ut=Bi(),ko=Bi(),Sn=Bi();function Bi(){return Eu(2,++Ck)}const cf=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Ct,commaOrSpaceSeparated:Sn,commaSeparated:ko,number:ge,overloadedBoolean:lf,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),df=Object.keys(cf);let ff=class extends dn{constructor(t,n,r,o){let a=-1;if(super(t,n),Zg(this,"space",o),typeof r=="number")for(;++a<df.length;){const u=df[a];Zg(this,df[a],(r&cf[u])===cf[u])}}};ff.prototype.defined=!0;function Zg(e,t,n){n&&(e[t]=n)}function Co(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new ff(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Gs(r)]=r,n[Gs(a.attribute)]=r}return new Ws(t,n,e.space)}const e1=Co({properties:{ariaActiveDescendant:null,ariaAtomic:Ct,ariaAutoComplete:null,ariaBusy:Ct,ariaChecked:Ct,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:Ct,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:Ct,ariaFlowTo:ut,ariaGrabbed:Ct,ariaHasPopup:null,ariaHidden:Ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:ge,ariaLive:null,ariaModal:Ct,ariaMultiLine:Ct,ariaMultiSelectable:Ct,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Ct,ariaReadOnly:Ct,ariaRelevant:null,ariaRequired:Ct,ariaRoleDescription:ut,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Ct,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function t1(e,t){return t in e?e[t]:t}function n1(e,t){return t1(e,t.toLowerCase())}const Nk=Co({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ko,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:ut,autoFocus:$e,autoPlay:$e,blocking:ut,capture:null,charSet:null,checked:$e,cite:null,className:ut,cols:ge,colSpan:null,content:null,contentEditable:Ct,controls:$e,controlsList:ut,coords:ge|ko,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:lf,draggable:Ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:ut,height:ge,hidden:lf,high:ge,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:ut,itemRef:ut,itemScope:$e,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,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:$e,optimum:ge,pattern:null,ping:ut,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:ut,required:$e,reversed:$e,rows:ge,rowSpan:ge,sandbox:ut,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Ct,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:Ct,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Ct,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:n1}),Ok=Co({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Sn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:ut,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:ko,g2:ko,glyphName:ko,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sn,rev:Sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sn,requiredFeatures:Sn,requiredFonts:Sn,requiredFormats:Sn,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:t1}),r1=Co({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()}}),i1=Co({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:n1}),o1=Co({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Pk={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"},Ik=/[A-Z]/g,s1=/-[a-z]/g,Rk=/^data[-\w.:]+$/i;function hf(e,t){const n=Gs(t);let r=t,o=dn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Rk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(s1,Dk);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!s1.test(a)){let u=a.replace(Ik,Lk);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=ff}return new o(r,t)}function Lk(e){return"-"+e.toLowerCase()}function Dk(e){return e.charAt(1).toUpperCase()}const Qu=Jg([e1,Nk,r1,i1,o1],"html"),No=Jg([e1,Ok,r1,i1,o1],"svg");function a1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function u1(e){return e.join(" ").trim()}var Oo={},pf,l1;function Mk(){if(l1)return pf;l1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
24
|
+
`,h="/",p="*",g="",b="comment",y="declaration";pf=function(v,A){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];A=A||{};var k=1,C=1;function I(de){var se=de.match(t);se&&(k+=se.length);var be=de.lastIndexOf(d);C=~be?de.length-be:C+de.length}function j(){var de={line:k,column:C};return function(se){return se.position=new W(de),ue(),se}}function W(de){this.start=de,this.end={line:k,column:C},this.source=A.source}W.prototype.content=v;function F(de){var se=new Error(A.source+":"+k+":"+C+": "+de);if(se.reason=de,se.filename=A.source,se.line=k,se.column=C,se.source=v,!A.silent)throw se}function ee(de){var se=de.exec(v);if(se){var be=se[0];return I(be),v=v.slice(be.length),se}}function ue(){ee(n)}function me(de){var se;for(de=de||[];se=$();)se!==!1&&de.push(se);return de}function $(){var de=j();if(!(h!=v.charAt(0)||p!=v.charAt(1))){for(var se=2;g!=v.charAt(se)&&(p!=v.charAt(se)||h!=v.charAt(se+1));)++se;if(se+=2,g===v.charAt(se-1))return F("End of comment missing");var be=v.slice(2,se-2);return C+=2,I(be),v=v.slice(se),C+=2,de({type:b,comment:be})}}function ne(){var de=j(),se=ee(r);if(se){if($(),!ee(o))return F("property missing ':'");var be=ee(a),ke=de({type:y,property:_(se[0].replace(e,g)),value:be?_(be[0].replace(e,g)):g});return ee(u),ke}}function re(){var de=[];me(de);for(var se;se=ne();)se!==!1&&(de.push(se),me(de));return de}return ue(),re()};function _(v){return v?v.replace(c,g):g}return pf}var c1;function Fk(){if(c1)return Oo;c1=1;var e=Oo&&Oo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.default=n;var t=e(Mk());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,p=d.value;c?o(h,p,d):p&&(a=a||{},a[h]=p)}}),a}return Oo}var Xs={},d1;function Bk(){if(d1)return Xs;d1=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},u=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),a(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,u))};return Xs.camelCase=d,Xs}var Ks,f1;function Uk(){if(f1)return Ks;f1=1;var e=Ks&&Ks.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(Fk()),n=Bk();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,Ks=r,Ks}var Hk=Uk();const zk=Ge(Hk),Ju=h1("end"),mr=h1("start");function h1(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 p1(e){const t=mr(e),n=Ju(e);if(t&&n)return{start:t,end:n}}function Qs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?m1(e.position):"start"in e||"end"in e?m1(e):"line"in e||"column"in e?mf(e):""}function mf(e){return g1(e&&e.line)+":"+g1(e&&e.column)}function m1(e){return mf(e&&e.start)+"-"+mf(e&&e.end)}function g1(e){return e&&typeof e=="number"?e:1}class Gt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",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=B({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=Qs(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,this.expected,this.note,this.url}}Gt.prototype.file="",Gt.prototype.name="",Gt.prototype.reason="",Gt.prototype.message="",Gt.prototype.stack="",Gt.prototype.column=void 0,Gt.prototype.line=void 0,Gt.prototype.ancestors=void 0,Gt.prototype.cause=void 0,Gt.prototype.fatal=void 0,Gt.prototype.place=void 0,Gt.prototype.ruleId=void 0,Gt.prototype.source=void 0;const gf={}.hasOwnProperty,jk=new Map,$k=/[A-Z]/g,Vk=new Set(["table","tbody","thead","tfoot","tr"]),qk=new Set(["td","th"]),E1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yk(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=eC(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=Zk(n,t.jsx,t.jsxs)}const o={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"?No:Qu,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=y1(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function y1(e,t,n){if(t.type==="element")return Wk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Gk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Kk(e,t,n);if(t.type==="mdxjsEsm")return Xk(e,t);if(t.type==="root")return Qk(e,t,n);if(t.type==="text")return Jk(e,t)}function Wk(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=No,e.schema=o),e.ancestors.push(t);const a=b1(e,t.tagName,!1),u=tC(e,t);let c=yf(e,t);return Vk.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!kk(d):!0})),T1(e,u,a,t),Ef(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Gk(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)}Js(e,t.position)}function Xk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Js(e,t.position)}function Kk(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=No,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:b1(e,t.name,!0),u=nC(e,t),c=yf(e,t);return T1(e,u,a,t),Ef(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Qk(e,t,n){const r={};return Ef(r,yf(e,t)),e.create(t,e.Fragment,r,n)}function Jk(e,t){return t.value}function T1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ef(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Zk(e,t,n){return r;function r(o,a,u,c){const h=Array.isArray(u.children)?n:t;return c?h(a,u,c):h(a,u)}}function eC(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=mr(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function tC(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&gf.call(t.properties,o)){const a=rC(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&qk.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function nC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Js(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Js(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function yf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:jk;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 h=o.get(d)||0;u=d+"-"+h,o.set(d,h+1)}}const c=y1(e,a,u);c!==void 0&&n.push(c)}return n}function rC(e,t,n){const r=hf(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Xg(n):u1(n)),r.property==="style"){let o=typeof n=="object"?n:iC(e,String(n));return e.stylePropertyNameCase==="css"&&(o=oC(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Pk[r.property]||r.property:r.attribute,n]}}function iC(e,t){try{return zk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Gt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=E1+"#cannot-parse-style-attribute",o}}function b1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=Kg(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=Kg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return gf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Js(e)}function Js(e,t){const n=new Gt("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=E1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function oC(e){const t={};let n;for(n in e)gf.call(e,n)&&(t[sC(n)]=e[n]);return t}function sC(e){let t=e.replace($k,aC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function aC(e){return"-"+e.toLowerCase()}const Tf={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"]},uC={};function bf(e,t){const n=uC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return x1(e,r,o)}function x1(e,t,n){if(lC(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 _1(e.children,t,n)}return Array.isArray(e)?_1(e,t,n):""}function _1(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=x1(e[o],t,n);return r.join("")}function lC(e){return!!(e&&typeof e=="object")}const w1=document.createElement("i");function xf(e){const t="&"+e+";";w1.innerHTML=t;const n=w1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function vn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o: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 Fn(e,t){return e.length>0?(vn(e,e.length,0,t),e):t}const S1={}.hasOwnProperty;function v1(e){const t={};let n=-1;for(;++n<e.length;)cC(t,e[n]);return t}function cC(e,t){let n;for(n in t){const o=(S1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){S1.call(o,u)||(o[u]=[]);const c=a[u];dC(o[u],Array.isArray(c)?c:c?[c]:[])}}}function dC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);vn(e,0,0,r)}function A1(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 Zn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const rn=Qr(/[A-Za-z]/),Xt=Qr(/[\dA-Za-z]/),fC=Qr(/[#-'*+\--9=?A-Z^-~]/);function Zu(e){return e!==null&&(e<32||e===127)}const _f=Qr(/\d/),hC=Qr(/[\dA-Fa-f]/),pC=Qr(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function Xe(e){return e===-2||e===-1||e===32}const el=Qr(new RegExp("\\p{P}|\\p{S}","u")),Ui=Qr(/\s/);function Qr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Po(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Xt(e.charCodeAt(n+1))&&Xt(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Qe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Xe(d)?(e.enter(n),c(d)):t(d)}function c(d){return Xe(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const mC={tokenize:gC};function gC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Qe(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const EC={tokenize:yC},k1={tokenize:TC};function yC(e){const t=this,n=[];let r=0,o,a,u;return c;function c(I){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,d,h)(I)}return h(I)}function d(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&C();const j=t.events.length;let W=j,F;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){F=t.events[W][1].end;break}k(r);let ee=j;for(;ee<t.events.length;)t.events[ee][1].end=B({},F),ee++;return vn(t.events,W+1,0,t.events.slice(j)),t.events.length=ee,h(I)}return c(I)}function h(I){if(r===n.length){if(!o)return b(I);if(o.currentConstruct&&o.currentConstruct.concrete)return _(I);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(k1,p,g)(I)}function p(I){return o&&C(),k(r),b(I)}function g(I){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(I)}function b(I){return t.containerState={},e.attempt(k1,y,_)(I)}function y(I){return r++,n.push([t.currentConstruct,t.containerState]),b(I)}function _(I){if(I===null){o&&C(),k(0),e.consume(I);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),v(I)}function v(I){if(I===null){A(e.exit("chunkFlow"),!0),k(0),e.consume(I);return}return Le(I)?(e.consume(I),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(I),v)}function A(I,j){const W=t.sliceStream(I);if(j&&W.push(null),I.previous=a,a&&(a.next=I),a=I,o.defineSkip(I.start),o.write(W),t.parser.lazy[I.start.line]){let F=o.events.length;for(;F--;)if(o.events[F][1].start.offset<u&&(!o.events[F][1].end||o.events[F][1].end.offset>u))return;const ee=t.events.length;let ue=ee,me,$;for(;ue--;)if(t.events[ue][0]==="exit"&&t.events[ue][1].type==="chunkFlow"){if(me){$=t.events[ue][1].end;break}me=!0}for(k(r),F=ee;F<t.events.length;)t.events[F][1].end=B({},$),F++;vn(t.events,ue+1,0,t.events.slice(ee)),t.events.length=F}}function k(I){let j=n.length;for(;j-- >I;){const W=n[j];t.containerState=W[1],W[0].exit.call(t,e)}n.length=I}function C(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function TC(e,t,n){return Qe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Io(e){if(e===null||st(e)||Ui(e))return 1;if(el(e))return 2}function tl(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const wf={name:"attention",resolveAll:bC,tokenize:xC};function bC(e,t){let n=-1,r,o,a,u,c,d,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g=B({},e[r][1].end),b=B({},e[n][1].start);C1(g,-d),C1(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:g,end:B({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:B({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:B({},e[r][1].end),end:B({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:B({},u.start),end:B({},c.end)},e[r][1].end=B({},u.start),e[n][1].start=B({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Fn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Fn(h,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),h=Fn(h,tl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Fn(h,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=Fn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,vn(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function xC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Io(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const h=e.exit("attentionSequence"),p=Io(d),g=!p||p===2&&o||n.includes(d),b=!o||o===2&&p||n.includes(r);return h._open=!!(a===42?g:g&&(o||!b)),h._close=!!(a===42?b:b&&(p||!g)),t(d)}}function C1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _C={name:"autolink",tokenize:wC};function wC(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return rn(y)?(e.consume(y),u):y===64?n(y):h(y)}function u(y){return y===43||y===45||y===46||Xt(y)?(r=1,c(y)):h(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Xt(y))&&r++<32?(e.consume(y),c):(r=0,h(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||Zu(y)?n(y):(e.consume(y),d)}function h(y){return y===64?(e.consume(y),p):fC(y)?(e.consume(y),h):n(y)}function p(y){return Xt(y)?g(y):n(y)}function g(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||Xt(y))&&r++<63){const _=y===45?b:g;return e.consume(y),_}return n(y)}}const Zs={partial:!0,tokenize:SC};function SC(e,t,n){return r;function r(a){return Xe(a)?Qe(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const N1={continuation:{tokenize:AC},exit:kC,name:"blockQuote",tokenize:vC};function vC(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Xe(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function AC(e,t,n){const r=this;return o;function o(u){return Xe(u)?Qe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(N1,t,n)(u)}}function kC(e){e.exit("blockQuote")}const O1={name:"characterEscape",tokenize:CC};function CC(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return pC(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const P1={name:"characterReference",tokenize:NC};function NC(e,t,n){const r=this;let o=0,a,u;return c;function c(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,u=Xt,p(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=hC,p):(e.enter("characterReferenceValue"),a=7,u=_f,p(g))}function p(g){if(g===59&&o){const b=e.exit("characterReferenceValue");return u===Xt&&!xf(r.sliceSerialize(b))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(g)&&o++<a?(e.consume(g),p):n(g)}}const I1={partial:!0,tokenize:PC},R1={concrete:!0,name:"codeFenced",tokenize:OC};function OC(e,t,n){const r=this,o={partial:!0,tokenize:W};let a=0,u=0,c;return d;function d(F){return h(F)}function h(F){const ee=r.events[r.events.length-1];return a=ee&&ee[1].type==="linePrefix"?ee[2].sliceSerialize(ee[1],!0).length:0,c=F,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(F)}function p(F){return F===c?(u++,e.consume(F),p):u<3?n(F):(e.exit("codeFencedFenceSequence"),Xe(F)?Qe(e,g,"whitespace")(F):g(F))}function g(F){return F===null||Le(F)?(e.exit("codeFencedFence"),r.interrupt?t(F):e.check(I1,v,j)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(F))}function b(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(F)):Xe(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qe(e,y,"whitespace")(F)):F===96&&F===c?n(F):(e.consume(F),b)}function y(F){return F===null||Le(F)?g(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(F))}function _(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(F)):F===96&&F===c?n(F):(e.consume(F),_)}function v(F){return e.attempt(o,j,A)(F)}function A(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),k}function k(F){return a>0&&Xe(F)?Qe(e,C,"linePrefix",a+1)(F):C(F)}function C(F){return F===null||Le(F)?e.check(I1,v,j)(F):(e.enter("codeFlowValue"),I(F))}function I(F){return F===null||Le(F)?(e.exit("codeFlowValue"),C(F)):(e.consume(F),I)}function j(F){return e.exit("codeFenced"),t(F)}function W(F,ee,ue){let me=0;return $;function $(be){return F.enter("lineEnding"),F.consume(be),F.exit("lineEnding"),ne}function ne(be){return F.enter("codeFencedFence"),Xe(be)?Qe(F,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(be):re(be)}function re(be){return be===c?(F.enter("codeFencedFenceSequence"),de(be)):ue(be)}function de(be){return be===c?(me++,F.consume(be),de):me>=u?(F.exit("codeFencedFenceSequence"),Xe(be)?Qe(F,se,"whitespace")(be):se(be)):ue(be)}function se(be){return be===null||Le(be)?(F.exit("codeFencedFence"),ee(be)):ue(be)}}}function PC(e,t,n){const r=this;return o;function o(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 Sf={name:"codeIndented",tokenize:RC},IC={partial:!0,tokenize:LC};function RC(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Qe(e,a,"linePrefix",5)(h)}function a(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):Le(h)?e.attempt(IC,u,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Le(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function LC(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Qe(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const DC={name:"codeText",previous:FC,resolve:MC,tokenize:BC};function MC(e){let t=e.length-4,n=3,r,o;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;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function FC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function BC(e,t,n){let r=0,o,a;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),c(g)}function c(g){return g===96?(e.consume(g),r++,c):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(a=e.enter("codeTextSequence"),o=0,p(g)):Le(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Le(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function p(g){return g===96?(e.consume(g),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(a.type="codeTextData",h(g))}}class UC{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 o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ea(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),ea(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ea(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);ea(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ea(this.left,n.reverse())}}}function ea(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 L1(e){const t={};let n=-1,r,o,a,u,c,d,h;const p=new UC(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,HC(p,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=B({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return vn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function HC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],h={};let p,g,b=-1,y=n,_=0,v=0;const A=[v];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),g&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(v=b+1,A.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),b=A.length;b--;){const k=c.slice(A[b],A[b+1]),C=a.pop();d.push([C,C+k.length-1]),e.splice(C,2,k)}for(d.reverse(),b=-1;++b<d.length;)h[_+d[b][0]]=_+d[b][1],_+=d[b][1]-d[b][0]-1;return h}const zC={resolve:$C,tokenize:VC},jC={partial:!0,tokenize:qC};function $C(e){return L1(e),e}function VC(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(jC,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function qC(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Qe(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function D1(e,t,n,r,o,a,u,c,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return g;function g(k){return k===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(k),e.exit(a),b):k===null||k===32||k===41||Zu(k)?n(k):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),v(k))}function b(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(k))}function y(k){return k===62?(e.exit("chunkString"),e.exit(c),b(k)):k===null||k===60||Le(k)?n(k):(e.consume(k),k===92?_:y)}function _(k){return k===60||k===62||k===92?(e.consume(k),y):y(k)}function v(k){return!p&&(k===null||k===41||st(k))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(k)):p<h&&k===40?(e.consume(k),p++,v):k===41?(e.consume(k),p--,v):k===null||k===32||k===40||Zu(k)?n(k):(e.consume(k),k===92?A:v)}function A(k){return k===40||k===41||k===92?(e.consume(k),v):v(k)}}function M1(e,t,n,r,o,a){const u=this;let c=0,d;return h;function h(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):Le(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===null||y===91||y===93||Le(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Xe(y)),y===92?b:g)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,g):g(y)}}function F1(e,t,n,r,o,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(o),e.consume(b),e.exit(o),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):(e.enter(a),h(b))}function h(b){return b===u?(e.exit(a),d(u)):b===null?n(b):Le(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Qe(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Le(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?g:p)}function g(b){return b===u||b===92?(e.consume(b),p):p(b)}}function ta(e,t){let n;return r;function r(o){return Le(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Xe(o)?Qe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const YC={name:"definition",tokenize:GC},WC={partial:!0,tokenize:XC};function GC(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return M1.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return o=Zn(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 st(y)?ta(e,h)(y):h(y)}function h(y){return D1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(WC,g,g)(y)}function g(y){return Xe(y)?Qe(e,b,"whitespace")(y):b(y)}function b(y){return y===null||Le(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function XC(e,t,n){return r;function r(c){return st(c)?ta(e,o)(c):n(c)}function o(c){return F1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Xe(c)?Qe(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const KC={name:"hardBreakEscape",tokenize:QC};function QC(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const JC={name:"headingAtx",resolve:ZC,tokenize:eN};function ZC(e,t){let n=e.length-2,r=3,o,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&&(o={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"},vn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function eN(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||st(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Le(p)?(e.exit("atxHeading"),t(p)):Xe(p)?Qe(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||st(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const tN=["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"],B1=["pre","script","style","textarea"],nN={concrete:!0,name:"htmlFlow",resolveTo:oN,tokenize:sN},rN={partial:!0,tokenize:uN},iN={partial:!0,tokenize:aN};function oN(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 sN(e,t,n){const r=this;let o,a,u,c,d;return h;function h(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),g}function g(O){return O===33?(e.consume(O),b):O===47?(e.consume(O),a=!0,v):O===63?(e.consume(O),o=3,r.interrupt?t:w):rn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function b(O){return O===45?(e.consume(O),o=2,y):O===91?(e.consume(O),o=5,c=0,_):rn(O)?(e.consume(O),o=4,r.interrupt?t:w):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:w):n(O)}function _(O){const ye="CDATA[";return O===ye.charCodeAt(c++)?(e.consume(O),c===ye.length?r.interrupt?t:re:_):n(O)}function v(O){return rn(O)?(e.consume(O),u=String.fromCharCode(O),A):n(O)}function A(O){if(O===null||O===47||O===62||st(O)){const ye=O===47,Ce=u.toLowerCase();return!ye&&!a&&B1.includes(Ce)?(o=1,r.interrupt?t(O):re(O)):tN.includes(u.toLowerCase())?(o=6,ye?(e.consume(O),k):r.interrupt?t(O):re(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?C(O):I(O))}return O===45||Xt(O)?(e.consume(O),u+=String.fromCharCode(O),A):n(O)}function k(O){return O===62?(e.consume(O),r.interrupt?t:re):n(O)}function C(O){return Xe(O)?(e.consume(O),C):$(O)}function I(O){return O===47?(e.consume(O),$):O===58||O===95||rn(O)?(e.consume(O),j):Xe(O)?(e.consume(O),I):$(O)}function j(O){return O===45||O===46||O===58||O===95||Xt(O)?(e.consume(O),j):W(O)}function W(O){return O===61?(e.consume(O),F):Xe(O)?(e.consume(O),W):I(O)}function F(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,ee):Xe(O)?(e.consume(O),F):ue(O)}function ee(O){return O===d?(e.consume(O),d=null,me):O===null||Le(O)?n(O):(e.consume(O),ee)}function ue(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||st(O)?W(O):(e.consume(O),ue)}function me(O){return O===47||O===62||Xe(O)?I(O):n(O)}function $(O){return O===62?(e.consume(O),ne):n(O)}function ne(O){return O===null||Le(O)?re(O):Xe(O)?(e.consume(O),ne):n(O)}function re(O){return O===45&&o===2?(e.consume(O),ke):O===60&&o===1?(e.consume(O),ae):O===62&&o===4?(e.consume(O),N):O===63&&o===3?(e.consume(O),w):O===93&&o===5?(e.consume(O),J):Le(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(rN,Y,de)(O)):O===null||Le(O)?(e.exit("htmlFlowData"),de(O)):(e.consume(O),re)}function de(O){return e.check(iN,se,Y)(O)}function se(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),be}function be(O){return O===null||Le(O)?de(O):(e.enter("htmlFlowData"),re(O))}function ke(O){return O===45?(e.consume(O),w):re(O)}function ae(O){return O===47?(e.consume(O),u="",z):re(O)}function z(O){if(O===62){const ye=u.toLowerCase();return B1.includes(ye)?(e.consume(O),N):re(O)}return rn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),z):re(O)}function J(O){return O===93?(e.consume(O),w):re(O)}function w(O){return O===62?(e.consume(O),N):O===45&&o===2?(e.consume(O),w):re(O)}function N(O){return O===null||Le(O)?(e.exit("htmlFlowData"),Y(O)):(e.consume(O),N)}function Y(O){return e.exit("htmlFlow"),t(O)}}function aN(e,t,n){const r=this;return o;function o(u){return Le(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 uN(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Zs,t,n)}}const lN={name:"htmlText",tokenize:cN};function cN(e,t,n){const r=this;let o,a,u;return c;function c(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),d}function d(w){return w===33?(e.consume(w),h):w===47?(e.consume(w),W):w===63?(e.consume(w),I):rn(w)?(e.consume(w),ue):n(w)}function h(w){return w===45?(e.consume(w),p):w===91?(e.consume(w),a=0,_):rn(w)?(e.consume(w),C):n(w)}function p(w){return w===45?(e.consume(w),y):n(w)}function g(w){return w===null?n(w):w===45?(e.consume(w),b):Le(w)?(u=g,ae(w)):(e.consume(w),g)}function b(w){return w===45?(e.consume(w),y):g(w)}function y(w){return w===62?ke(w):w===45?b(w):g(w)}function _(w){const N="CDATA[";return w===N.charCodeAt(a++)?(e.consume(w),a===N.length?v:_):n(w)}function v(w){return w===null?n(w):w===93?(e.consume(w),A):Le(w)?(u=v,ae(w)):(e.consume(w),v)}function A(w){return w===93?(e.consume(w),k):v(w)}function k(w){return w===62?ke(w):w===93?(e.consume(w),k):v(w)}function C(w){return w===null||w===62?ke(w):Le(w)?(u=C,ae(w)):(e.consume(w),C)}function I(w){return w===null?n(w):w===63?(e.consume(w),j):Le(w)?(u=I,ae(w)):(e.consume(w),I)}function j(w){return w===62?ke(w):I(w)}function W(w){return rn(w)?(e.consume(w),F):n(w)}function F(w){return w===45||Xt(w)?(e.consume(w),F):ee(w)}function ee(w){return Le(w)?(u=ee,ae(w)):Xe(w)?(e.consume(w),ee):ke(w)}function ue(w){return w===45||Xt(w)?(e.consume(w),ue):w===47||w===62||st(w)?me(w):n(w)}function me(w){return w===47?(e.consume(w),ke):w===58||w===95||rn(w)?(e.consume(w),$):Le(w)?(u=me,ae(w)):Xe(w)?(e.consume(w),me):ke(w)}function $(w){return w===45||w===46||w===58||w===95||Xt(w)?(e.consume(w),$):ne(w)}function ne(w){return w===61?(e.consume(w),re):Le(w)?(u=ne,ae(w)):Xe(w)?(e.consume(w),ne):me(w)}function re(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,de):Le(w)?(u=re,ae(w)):Xe(w)?(e.consume(w),re):(e.consume(w),se)}function de(w){return w===o?(e.consume(w),o=void 0,be):w===null?n(w):Le(w)?(u=de,ae(w)):(e.consume(w),de)}function se(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||st(w)?me(w):(e.consume(w),se)}function be(w){return w===47||w===62||st(w)?me(w):n(w)}function ke(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function ae(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),z}function z(w){return Xe(w)?Qe(e,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):J(w)}function J(w){return e.enter("htmlTextData"),u(w)}}const vf={name:"labelEnd",resolveAll:pN,resolveTo:mN,tokenize:gN},dN={tokenize:EN},fN={tokenize:yN},hN={tokenize:TN};function pN(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 o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&vn(e,0,e.length,n),e}function mN(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},h={type:"label",start:B({},e[a][1].start),end:B({},e[u][1].end)},p={type:"labelText",start:B({},e[a+r+2][1].end),end:B({},e[u-2][1].start)};return c=[["enter",d,t],["enter",h,t]],c=Fn(c,e.slice(a+1,a+r+3)),c=Fn(c,[["enter",p,t]]),c=Fn(c,tl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=Fn(c,[["exit",p,t],e[u-2],e[u-1],["exit",h,t]]),c=Fn(c,e.slice(u+1)),c=Fn(c,[["exit",d,t]]),vn(e,a,e.length,c),e}function gN(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(b){return a?a._inactive?g(b):(u=r.parser.defined.includes(Zn(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(dN,p,u?p:g)(b):b===91?e.attempt(fN,p,u?h:g)(b):u?p(b):g(b)}function h(b){return e.attempt(hN,p,g)(b)}function p(b){return t(b)}function g(b){return a._balanced=!0,n(b)}}function EN(e,t,n){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return st(g)?ta(e,a)(g):a(g)}function a(g){return g===41?p(g):D1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return st(g)?ta(e,d)(g):p(g)}function c(g){return n(g)}function d(g){return g===34||g===39||g===40?F1(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function h(g){return st(g)?ta(e,p)(g):p(g)}function p(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function yN(e,t,n){const r=this;return o;function o(c){return M1.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Zn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function TN(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const bN={name:"labelStartImage",resolveAll:vf.resolveAll,tokenize:xN};function xN(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const _N={name:"labelStartLink",resolveAll:vf.resolveAll,tokenize:wN};function wN(e,t,n){const r=this;return o;function o(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 Af={name:"lineEnding",tokenize:SN};function SN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qe(e,t,"linePrefix")}}const nl={name:"thematicBreak",tokenize:vN};function vN(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),u(h)}function u(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Le(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Xe(h)?Qe(e,c,"whitespace")(h):c(h))}}const fn={continuation:{tokenize:NN},exit:PN,name:"list",tokenize:CN},AN={partial:!0,tokenize:IN},kN={partial:!0,tokenize:ON};function CN(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:_f(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(nl,n,h)(y):h(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return _f(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),h(y)):n(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Zs,r.interrupt?n:p,e.attempt(AN,b,g))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function g(y){return Xe(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 NN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Zs,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qe(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Xe(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(kN,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qe(e,e.attempt(fn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function ON(e,t,n){const r=this;return Qe(e,o,"listItemIndent",r.containerState.size+1);function o(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 PN(e){e.exit(this.containerState.type)}function IN(e,t,n){const r=this;return Qe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Xe(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const U1={name:"setextUnderline",resolveTo:RN,tokenize:LN};function RN(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:B({},e[r][1].start),end:B({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=B({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function LN(e,t,n){const r=this;let o;return a;function a(h){let p=r.events.length,g;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){g=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),o=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Xe(h)?Qe(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Le(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const DN={tokenize:MN};function MN(e){const t=this,n=e.attempt(Zs,r,e.attempt(this.parser.constructs.flowInitial,o,Qe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(zC,o)),"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 o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const FN={resolveAll:z1()},BN=H1("string"),UN=H1("text");function H1(e){return{resolveAll:z1(e==="text"?HN:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return h(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const g=o[p];let b=-1;if(g)for(;++b<g.length;){const y=g[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function z1(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function HN(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],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const h=o[a];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)d=!0,c++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:B({},r.end)};r.end=B({},h.start),r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const zN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:YC},disable:{null:[]},document:{42:fn,43:fn,45:fn,48:fn,49:fn,50:fn,51:fn,52:fn,53:fn,54:fn,55:fn,56:fn,57:fn,62:N1},flow:{35:JC,42:nl,45:[U1,nl],60:nN,61:U1,95:nl,96:R1,126:R1},flowInitial:{[-2]:Sf,[-1]:Sf,32:Sf},insideSpan:{null:[wf,FN]},string:{38:P1,92:O1},text:{[-5]:Af,[-4]:Af,[-3]:Af,33:bN,38:P1,42:wf,60:[_C,lN],91:_N,92:[KC,O1],93:vf,95:wf,96:DC}},Symbol.toStringTag,{value:"Module"}));function jN(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 o={},a=[];let u=[],c=[];const d={attempt:ee(W),check:ee(F),consume:C,enter:I,exit:j,interrupt:ee(F,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:g};let p=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function g(ne){return u=Fn(u,ne),A(),u[u.length-1]!==null?[]:(ue(t,0),h.events=tl(a,h.events,h),h.events)}function b(ne,re){return VN(y(ne),re)}function y(ne){return $N(u,ne)}function _(){const{_bufferIndex:ne,_index:re,line:de,column:se,offset:be}=r;return{_bufferIndex:ne,_index:re,line:de,column:se,offset:be}}function v(ne){o[ne.line]=ne.column,$()}function A(){let ne;for(;r._index<u.length;){const re=u[r._index];if(typeof re=="string")for(ne=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ne&&r._bufferIndex<re.length;)k(re.charCodeAt(r._bufferIndex));else k(re)}}function k(ne){p=p(ne)}function C(ne){Le(ne)?(r.line++,r.column=1,r.offset+=ne===-3?2:1,$()):ne!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=ne}function I(ne,re){const de=re||{};return de.type=ne,de.start=_(),h.events.push(["enter",de,h]),c.push(de),de}function j(ne){const re=c.pop();return re.end=_(),h.events.push(["exit",re,h]),re}function W(ne,re){ue(ne,re.from)}function F(ne,re){re.restore()}function ee(ne,re){return de;function de(se,be,ke){let ae,z,J,w;return Array.isArray(se)?Y(se):"tokenize"in se?Y([se]):N(se);function N(Ie){return He;function He(Se){const Ye=Se!==null&&Ie[Se],dt=Se!==null&&Ie.null,mn=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(dt)?dt:dt?[dt]:[]];return Y(mn)(Se)}}function Y(Ie){return ae=Ie,z=0,Ie.length===0?ke:O(Ie[z])}function O(Ie){return He;function He(Se){return w=me(),J=Ie,Ie.partial||(h.currentConstruct=Ie),Ie.name&&h.parser.constructs.disable.null.includes(Ie.name)?Ce():Ie.tokenize.call(re?Object.assign(Object.create(h),re):h,d,ye,Ce)(Se)}}function ye(Ie){return ne(J,w),be}function Ce(Ie){return w.restore(),++z<ae.length?O(ae[z]):ke}}}function ue(ne,re){ne.resolveAll&&!a.includes(ne)&&a.push(ne),ne.resolve&&vn(h.events,re,h.events.length-re,ne.resolve(h.events.slice(re),h)),ne.resolveTo&&(h.events=ne.resolveTo(h.events,h))}function me(){const ne=_(),re=h.previous,de=h.currentConstruct,se=h.events.length,be=Array.from(c);return{from:se,restore:ke};function ke(){r=ne,h.previous=re,h.currentConstruct=de,h.events.length=se,c=be,$()}}function $(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function $N(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function VN(e,t){let n=-1;const r=[];let o;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&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function VN(e){const r={constructs:S1([HN,...(e||{}).extensions||[]]),content:o(pk),defined:[],document:o(gk),flow:o(LN),lazy:{},string:o(FN),text:o(BN)};return r;function o(a){return u;function u(c){return zN(r,a,c)}}}function qN(e){for(;!R1(e););return e}const z1=/[\0\t\n\r]/g;function YN(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let h,p,g,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),g=0,t="",n&&(a.charCodeAt(0)===65279&&g++,n=void 0);g<a.length;){if(z1.lastIndex=g,h=z1.exec(a),b=h&&h.index!==void 0?h.index:a.length,y=a.charCodeAt(b),!h){t=a.slice(g);break}if(y===10&&g===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),g<b&&(d.push(a.slice(g,b)),e+=b-g),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}g=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const WN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function GN(e){return e.replace(WN,XN)}function XN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return v1(n.slice(a?2:1),a?16:10)}return _f(n)||e}const j1={}.hasOwnProperty;function KN(e,t,n){return typeof t!="string"&&(n=t,t=void 0),QN(n)(qN(VN(n).document().write(YN()(e,t,!0))))}function QN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(us),autolinkProtocol:pe,autolinkEmail:pe,atxHeading:a(Ia),blockQuote:a(dt),characterEscape:pe,characterReference:pe,codeFenced:a(mn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(mn,u),codeText:a(to,u),codeTextData:pe,data:pe,codeFlowValue:pe,definition:a(si),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(ir),hardBreakEscape:a(Ra),hardBreakTrailing:a(Ra),htmlFlow:a(as,u),htmlFlowData:pe,htmlText:a(as,u),htmlTextData:pe,image:a(Kl),label:u,link:a(us),listItem:a(ui),listItemValue:b,listOrdered:a(ai,g),listUnordered:a(ai),paragraph:a(La),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Ia),strong:a(Ql),thematicBreak:a(Zl)},exit:{atxHeading:d(),atxHeadingSequence:W,autolink:d(),autolinkEmail:Ye,autolinkProtocol:Se,blockQuote:d(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:ke,characterReferenceMarkerNumeric:ke,characterReferenceValue:Ie,characterReference:He,codeFenced:d(A),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:U,codeIndented:d(C),codeText:d(be),codeTextData:U,data:U,definition:d(),definitionDestinationString:$,definitionLabelString:k,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(ae),hardBreakTrailing:d(ae),htmlFlow:d(de),htmlFlowData:U,htmlText:d(oe),htmlTextData:U,image:d(se),label:J,labelText:j,lineEnding:ne,link:d(Ce),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ye,resourceDestinationString:w,resourceTitleString:N,resource:q,setextHeading:d(ce),setextHeadingLineSequence:ee,setextHeadingText:F,strong:d(),thematicBreak:d()}};$1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(re){let _e={type:"root",children:[]};const Be={stack:[_e],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:p,data:n},We=[];let Je=-1;for(;++Je<re.length;)if(re[Je][1].type==="listOrdered"||re[Je][1].type==="listUnordered")if(re[Je][0]==="enter")We.push(Je);else{const $t=We.pop();Je=o(re,$t,Je)}for(Je=-1;++Je<re.length;){const $t=t[re[Je][0]];j1.call($t,re[Je][1].type)&&$t[re[Je][1].type].call(Object.assign({sliceSerialize:re[Je][2].sliceSerialize},Be),re[Je][1])}if(Be.tokenStack.length>0){const $t=Be.tokenStack[Be.tokenStack.length-1];($t[1]||V1).call(Be,void 0,$t[0])}for(_e.position={start:Jr(re.length>0?re[0][1].start:{line:1,column:1,offset:0}),end:Jr(re.length>0?re[re.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<t.transforms.length;)_e=t.transforms[Je](_e)||_e;return _e}function o(re,_e,Be){let We=_e-1,Je=-1,$t=!1,Hr,zn,li,no;for(;++We<=Be;){const Vt=re[We];switch(Vt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Vt[0]==="enter"?Je++:Je--,no=void 0;break}case"lineEndingBlank":{Vt[0]==="enter"&&(Hr&&!no&&!Je&&!li&&(li=We),no=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:no=void 0}if(!Je&&Vt[0]==="enter"&&Vt[1].type==="listItemPrefix"||Je===-1&&Vt[0]==="exit"&&(Vt[1].type==="listUnordered"||Vt[1].type==="listOrdered")){if(Hr){let Ar=We;for(zn=void 0;Ar--;){const Nn=re[Ar];if(Nn[1].type==="lineEnding"||Nn[1].type==="lineEndingBlank"){if(Nn[0]==="exit")continue;zn&&(re[zn][1].type="lineEndingBlank",$t=!0),Nn[1].type="lineEnding",zn=Ar}else if(!(Nn[1].type==="linePrefix"||Nn[1].type==="blockQuotePrefix"||Nn[1].type==="blockQuotePrefixWhitespace"||Nn[1].type==="blockQuoteMarker"||Nn[1].type==="listItemIndent"))break}li&&(!zn||li<zn)&&(Hr._spread=!0),Hr.end=Object.assign({},zn?re[zn][1].start:Vt[1].end),re.splice(zn||We,0,["exit",Hr,Vt[2]]),We++,Be++}if(Vt[1].type==="listItemPrefix"){const Ar={type:"listItem",_spread:!1,start:Object.assign({},Vt[1].start),end:void 0};Hr=Ar,re.splice(We,0,["enter",Ar,Vt[2]]),We++,Be++,li=void 0,no=!0}}}return re[_e][1]._spread=$t,Be}function a(re,_e){return Be;function Be(We){c.call(this,re(We),We),_e&&_e.call(this,We)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(re,_e,Be){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([_e,Be||void 0]),re.position={start:Jr(_e.start),end:void 0}}function d(re){return _e;function _e(Be){re&&re.call(this,Be),h.call(this,Be)}}function h(re,_e){const Be=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==re.type&&(_e?_e.call(this,re,We[0]):(We[1]||V1).call(this,re,We[0]));else throw new Error("Cannot close `"+re.type+"` ("+Qs({start:re.start,end:re.end})+"): it’s not open");Be.position.end=Jr(re.end)}function p(){return bf(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(re){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function y(){const re=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=re}function x(){const re=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=re}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const re=this.resume(),_e=this.stack[this.stack.length-1];_e.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const re=this.resume(),_e=this.stack[this.stack.length-1];_e.value=re.replace(/(\r?\n|\r)$/g,"")}function k(re){const _e=this.resume(),Be=this.stack[this.stack.length-1];Be.label=_e,Be.identifier=Zn(this.sliceSerialize(re)).toLowerCase()}function I(){const re=this.resume(),_e=this.stack[this.stack.length-1];_e.title=re}function $(){const re=this.resume(),_e=this.stack[this.stack.length-1];_e.url=re}function W(re){const _e=this.stack[this.stack.length-1];if(!_e.depth){const Be=this.sliceSerialize(re).length;_e.depth=Be}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function ee(re){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function ce(){this.data.setextHeadingSlurpLineEnding=void 0}function pe(re){const Be=this.stack[this.stack.length-1].children;let We=Be[Be.length-1];(!We||We.type!=="text")&&(We=Jl(),We.position={start:Jr(re.start),end:void 0},Be.push(We)),this.stack.push(We)}function U(re){const _e=this.stack.pop();_e.value+=this.sliceSerialize(re),_e.position.end=Jr(re.end)}function ne(re){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=_e.children[_e.children.length-1];Be.position.end=Jr(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&(pe.call(this,re),U.call(this,re))}function ae(){this.data.atHardBreak=!0}function de(){const re=this.resume(),_e=this.stack[this.stack.length-1];_e.value=re}function oe(){const re=this.resume(),_e=this.stack[this.stack.length-1];_e.value=re}function be(){const re=this.resume(),_e=this.stack[this.stack.length-1];_e.value=re}function Ce(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=_e,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function se(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=_e,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function j(re){const _e=this.sliceSerialize(re),Be=this.stack[this.stack.length-2];Be.label=GN(_e),Be.identifier=Zn(_e).toLowerCase()}function J(){const re=this.stack[this.stack.length-1],_e=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const We=re.children;Be.children=We}else Be.alt=_e}function w(){const re=this.resume(),_e=this.stack[this.stack.length-1];_e.url=re}function N(){const re=this.resume(),_e=this.stack[this.stack.length-1];_e.title=re}function q(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function ye(re){const _e=this.resume(),Be=this.stack[this.stack.length-1];Be.label=_e,Be.identifier=Zn(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function ke(re){this.data.characterReferenceType=re.type}function Ie(re){const _e=this.sliceSerialize(re),Be=this.data.characterReferenceType;let We;Be?(We=v1(_e,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=_f(_e);const Je=this.stack[this.stack.length-1];Je.value+=We}function He(re){const _e=this.stack.pop();_e.position.end=Jr(re.end)}function Se(re){U.call(this,re);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(re)}function Ye(re){U.call(this,re);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(re)}function dt(){return{type:"blockquote",children:[]}}function mn(){return{type:"code",lang:null,meta:null,value:""}}function to(){return{type:"inlineCode",value:""}}function si(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ir(){return{type:"emphasis",children:[]}}function Ia(){return{type:"heading",depth:0,children:[]}}function Ra(){return{type:"break"}}function as(){return{type:"html",value:""}}function Kl(){return{type:"image",title:null,url:"",alt:null}}function us(){return{type:"link",title:null,url:"",children:[]}}function ai(re){return{type:"list",ordered:re.type==="listOrdered",start:null,spread:re._spread,children:[]}}function ui(re){return{type:"listItem",spread:re._spread,checked:null,children:[]}}function La(){return{type:"paragraph",children:[]}}function Ql(){return{type:"strong",children:[]}}function Jl(){return{type:"text",value:""}}function Zl(){return{type:"thematicBreak"}}}function Jr(e){return{line:e.line,column:e.column,offset:e.offset}}function $1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?$1(e,r):JN(e,r)}}function JN(e,t){let n;for(n in t)if(j1.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 V1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qs({start:t.start,end:t.end})+") is still open")}function ZN(e){const t=this;t.parser=n;function n(r){return KN(r,ie(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function e3(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 t3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
27
|
-
`}]}function
|
|
28
|
-
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[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
|
|
26
|
+
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function qN(e){const r={constructs:v1([zN,...(e||{}).extensions||[]]),content:o(mC),defined:[],document:o(EC),flow:o(DN),lazy:{},string:o(BN),text:o(UN)};return r;function o(a){return u;function u(c){return jN(r,a,c)}}}function YN(e){for(;!L1(e););return e}const j1=/[\0\t\n\r]/g;function WN(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let h,p,g,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),g=0,t="",n&&(a.charCodeAt(0)===65279&&g++,n=void 0);g<a.length;){if(j1.lastIndex=g,h=j1.exec(a),b=h&&h.index!==void 0?h.index:a.length,y=a.charCodeAt(b),!h){t=a.slice(g);break}if(y===10&&g===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),g<b&&(d.push(a.slice(g,b)),e+=b-g),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}g=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const GN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function XN(e){return e.replace(GN,KN)}function KN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return A1(n.slice(a?2:1),a?16:10)}return xf(n)||e}const $1={}.hasOwnProperty;function QN(e,t,n){return typeof t!="string"&&(n=t,t=void 0),JN(n)(YN(qN(n).document().write(WN()(e,t,!0))))}function JN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(us),autolinkProtocol:me,autolinkEmail:me,atxHeading:a(Ia),blockQuote:a(dt),characterEscape:me,characterReference:me,codeFenced:a(mn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(mn,u),codeText:a(to,u),codeTextData:me,data:me,codeFlowValue:me,definition:a(si),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(ir),hardBreakEscape:a(Ra),hardBreakTrailing:a(Ra),htmlFlow:a(as,u),htmlFlowData:me,htmlText:a(as,u),htmlTextData:me,image:a(Kl),label:u,link:a(us),listItem:a(ui),listItemValue:b,listOrdered:a(ai,g),listUnordered:a(ai),paragraph:a(La),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Ia),strong:a(Ql),thematicBreak:a(Zl)},exit:{atxHeading:d(),atxHeadingSequence:W,autolink:d(),autolinkEmail:Ye,autolinkProtocol:Se,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:Ce,characterReferenceMarkerNumeric:Ce,characterReferenceValue:Ie,characterReference:He,codeFenced:d(A),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:$,codeIndented:d(k),codeText:d(be),codeTextData:$,data:$,definition:d(),definitionDestinationString:j,definitionLabelString:C,definitionTitleString:I,emphasis:d(),hardBreakEscape:d(re),hardBreakTrailing:d(re),htmlFlow:d(de),htmlFlowData:$,htmlText:d(se),htmlTextData:$,image:d(ae),label:J,labelText:z,lineEnding:ne,link:d(ke),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ye,resourceDestinationString:w,resourceTitleString:N,resource:Y,setextHeading:d(ue),setextHeadingLineSequence:ee,setextHeadingText:F,strong:d(),thematicBreak:d()}};V1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){let xe={type:"root",children:[]};const Be={stack:[xe],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:p,data:n},We=[];let Je=-1;for(;++Je<ie.length;)if(ie[Je][1].type==="listOrdered"||ie[Je][1].type==="listUnordered")if(ie[Je][0]==="enter")We.push(Je);else{const $t=We.pop();Je=o(ie,$t,Je)}for(Je=-1;++Je<ie.length;){const $t=t[ie[Je][0]];$1.call($t,ie[Je][1].type)&&$t[ie[Je][1].type].call(Object.assign({sliceSerialize:ie[Je][2].sliceSerialize},Be),ie[Je][1])}if(Be.tokenStack.length>0){const $t=Be.tokenStack[Be.tokenStack.length-1];($t[1]||q1).call(Be,void 0,$t[0])}for(xe.position={start:Jr(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:Jr(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<t.transforms.length;)xe=t.transforms[Je](xe)||xe;return xe}function o(ie,xe,Be){let We=xe-1,Je=-1,$t=!1,Hr,zn,li,no;for(;++We<=Be;){const Vt=ie[We];switch(Vt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Vt[0]==="enter"?Je++:Je--,no=void 0;break}case"lineEndingBlank":{Vt[0]==="enter"&&(Hr&&!no&&!Je&&!li&&(li=We),no=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:no=void 0}if(!Je&&Vt[0]==="enter"&&Vt[1].type==="listItemPrefix"||Je===-1&&Vt[0]==="exit"&&(Vt[1].type==="listUnordered"||Vt[1].type==="listOrdered")){if(Hr){let Ar=We;for(zn=void 0;Ar--;){const Nn=ie[Ar];if(Nn[1].type==="lineEnding"||Nn[1].type==="lineEndingBlank"){if(Nn[0]==="exit")continue;zn&&(ie[zn][1].type="lineEndingBlank",$t=!0),Nn[1].type="lineEnding",zn=Ar}else if(!(Nn[1].type==="linePrefix"||Nn[1].type==="blockQuotePrefix"||Nn[1].type==="blockQuotePrefixWhitespace"||Nn[1].type==="blockQuoteMarker"||Nn[1].type==="listItemIndent"))break}li&&(!zn||li<zn)&&(Hr._spread=!0),Hr.end=Object.assign({},zn?ie[zn][1].start:Vt[1].end),ie.splice(zn||We,0,["exit",Hr,Vt[2]]),We++,Be++}if(Vt[1].type==="listItemPrefix"){const Ar={type:"listItem",_spread:!1,start:Object.assign({},Vt[1].start),end:void 0};Hr=Ar,ie.splice(We,0,["enter",Ar,Vt[2]]),We++,Be++,li=void 0,no=!0}}}return ie[xe][1]._spread=$t,Be}function a(ie,xe){return Be;function Be(We){c.call(this,ie(We),We),xe&&xe.call(this,We)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ie,xe,Be){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([xe,Be||void 0]),ie.position={start:Jr(xe.start),end:void 0}}function d(ie){return xe;function xe(Be){ie&&ie.call(this,Be),h.call(this,Be)}}function h(ie,xe){const Be=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==ie.type&&(xe?xe.call(this,ie,We[0]):(We[1]||q1).call(this,ie,We[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Qs({start:ie.start,end:ie.end})+"): it’s not open");Be.position.end=Jr(ie.end)}function p(){return bf(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(ie){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=ie}function _(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=ie}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ie.replace(/(\r?\n|\r)$/g,"")}function C(ie){const xe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=xe,Be.identifier=Zn(this.sliceSerialize(ie)).toLowerCase()}function I(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ie}function j(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ie}function W(ie){const xe=this.stack[this.stack.length-1];if(!xe.depth){const Be=this.sliceSerialize(ie).length;xe.depth=Be}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function ee(ie){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function ue(){this.data.setextHeadingSlurpLineEnding=void 0}function me(ie){const Be=this.stack[this.stack.length-1].children;let We=Be[Be.length-1];(!We||We.type!=="text")&&(We=Jl(),We.position={start:Jr(ie.start),end:void 0},Be.push(We)),this.stack.push(We)}function $(ie){const xe=this.stack.pop();xe.value+=this.sliceSerialize(ie),xe.position.end=Jr(ie.end)}function ne(ie){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=xe.children[xe.children.length-1];Be.position.end=Jr(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(me.call(this,ie),$.call(this,ie))}function re(){this.data.atHardBreak=!0}function de(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ie}function se(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ie}function be(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ie}function ke(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=xe,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function ae(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=xe,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function z(ie){const xe=this.sliceSerialize(ie),Be=this.stack[this.stack.length-2];Be.label=XN(xe),Be.identifier=Zn(xe).toLowerCase()}function J(){const ie=this.stack[this.stack.length-1],xe=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const We=ie.children;Be.children=We}else Be.alt=xe}function w(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ie}function N(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ie}function Y(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function ye(ie){const xe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=xe,Be.identifier=Zn(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function Ce(ie){this.data.characterReferenceType=ie.type}function Ie(ie){const xe=this.sliceSerialize(ie),Be=this.data.characterReferenceType;let We;Be?(We=A1(xe,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=xf(xe);const Je=this.stack[this.stack.length-1];Je.value+=We}function He(ie){const xe=this.stack.pop();xe.position.end=Jr(ie.end)}function Se(ie){$.call(this,ie);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(ie)}function Ye(ie){$.call(this,ie);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(ie)}function dt(){return{type:"blockquote",children:[]}}function mn(){return{type:"code",lang:null,meta:null,value:""}}function to(){return{type:"inlineCode",value:""}}function si(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ir(){return{type:"emphasis",children:[]}}function Ia(){return{type:"heading",depth:0,children:[]}}function Ra(){return{type:"break"}}function as(){return{type:"html",value:""}}function Kl(){return{type:"image",title:null,url:"",alt:null}}function us(){return{type:"link",title:null,url:"",children:[]}}function ai(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function ui(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function La(){return{type:"paragraph",children:[]}}function Ql(){return{type:"strong",children:[]}}function Jl(){return{type:"text",value:""}}function Zl(){return{type:"thematicBreak"}}}function Jr(e){return{line:e.line,column:e.column,offset:e.offset}}function V1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?V1(e,r):ZN(e,r)}}function ZN(e,t){let n;for(n in t)if($1.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 q1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qs({start:t.start,end:t.end})+") is still open")}function e3(e){const t=this;t.parser=n;function n(r){return QN(r,oe(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function t3(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 n3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
27
|
+
`}]}function r3(e,t){const n=t.value?t.value+`
|
|
28
|
+
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[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 i3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function o3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function s3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Po(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function a3(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 u3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Y1(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 o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function l3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Y1(e,t);const o={src:Po(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function c3(e,t){const n={src:Po(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 d3(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 f3(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Y1(e,t);const o={href:Po(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function h3(e,t){const n={href:Po(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 p3(e,t,n){const r=e.all(t),o=n?m3(n):W1(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let g;p&&p.type==="element"&&p.tagName==="p"?g=p:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
|
|
29
29
|
`}),p.type==="element"&&p.tagName==="p"&&!o?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
|
|
30
|
-
`});const h={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,h),e.applyData(t,h)}function
|
|
30
|
+
`});const h={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,h),e.applyData(t,h)}function m3(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=W1(n[r])}return t}function W1(e){const t=e.spread;return t==null?e.children.length>1:t}function g3(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const u=r[o];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 E3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function y3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function T3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function b3(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=mr(t.children[1]),d=Ju(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function x3(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const h=[];for(;++d<c;){const g=t.children[d],b={},y=u?u[d]:void 0;y&&(b.align=y);let _={type:"element",tagName:a,properties:b,children:[]};g&&(_.children=e.all(g),e.patch(g,_),_=e.applyData(g,_)),h.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function _3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const G1=9,X1=32;function w3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(K1(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(K1(t.slice(o),o>0,!1)),a.join("")}function K1(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===G1||a===X1;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===G1||a===X1;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function S3(e,t){const n={type:"text",value:w3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function v3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const A3={blockquote:t3,break:n3,code:r3,delete:i3,emphasis:o3,footnoteReference:s3,heading:a3,html:u3,imageReference:l3,image:c3,inlineCode:d3,linkReference:f3,link:h3,listItem:p3,list:g3,paragraph:E3,root:y3,strong:T3,table:b3,tableCell:_3,tableRow:x3,text:S3,thematicBreak:v3,toml:rl,yaml:rl,definition:rl,footnoteDefinition:rl};function rl(){}const Q1=-1,il=0,na=1,ol=2,kf=3,Cf=4,Nf=5,Of=6,J1=7,Z1=8,eE=typeof self=="object"?self:globalThis,k3=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,u]=t[o];switch(a){case il:case Q1:return n(u,o);case na:{const c=n([],o);for(const d of u)c.push(r(d));return c}case ol:{const c=n({},o);for(const[d,h]of u)c[r(d)]=r(h);return c}case kf:return n(new Date(u),o);case Cf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),o)}case Nf:{const c=n(new Map,o);for(const[d,h]of u)c.set(r(d),r(h));return c}case Of:{const c=n(new Set,o);for(const d of u)c.add(r(d));return c}case J1:{const{name:c,message:d}=u;return n(new eE[c](d),o)}case Z1:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new eE[a](u),o)};return r},tE=e=>k3(new Map,e)(0),Ro="",{toString:C3}={},{keys:N3}=Object,ra=e=>{const t=typeof e;if(t!=="object"||!e)return[il,t];const n=C3.call(e).slice(8,-1);switch(n){case"Array":return[na,Ro];case"Object":return[ol,Ro];case"Date":return[kf,Ro];case"RegExp":return[Cf,Ro];case"Map":return[Nf,Ro];case"Set":return[Of,Ro];case"DataView":return[na,n]}return n.includes("Array")?[na,n]:n.includes("Error")?[J1,n]:[ol,n]},sl=([e,t])=>e===il&&(t==="function"||t==="symbol"),O3=(e,t,n,r)=>{const o=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=ra(u);switch(c){case il:{let p=u;switch(d){case"bigint":c=Z1,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([Q1],u)}return o([c,p],u)}case na:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),o([d,[...b]],u)}const p=[],g=o([c,p],u);for(const b of u)p.push(a(b));return g}case ol:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],g=o([c,p],u);for(const b of N3(u))(e||!sl(ra(u[b])))&&p.push([a(b),a(u[b])]);return g}case kf:return o([c,u.toISOString()],u);case Cf:{const{source:p,flags:g}=u;return o([c,{source:p,flags:g}],u)}case Nf:{const p=[],g=o([c,p],u);for(const[b,y]of u)(e||!(sl(ra(b))||sl(ra(y))))&&p.push([a(b),a(y)]);return g}case Of:{const p=[],g=o([c,p],u);for(const b of u)(e||!sl(ra(b)))&&p.push(a(b));return g}}const{message:h}=u;return o([c,{name:d,message:h}],u)};return a},nE=(e,{json:t,lossy:n}={})=>{const r=[];return O3(!(t||n),!!t,new Map,r)(e),r},Hi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?tE(nE(e,t)):structuredClone(e):(e,t)=>tE(nE(e,t));function P3(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 I3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function R3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||P3,r=e.options.footnoteBackLabel||I3,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const p=e.all(h),g=String(h.identifier).toUpperCase(),b=Po(g.toLowerCase());let y=0;const _=[],v=e.footnoteCounts.get(g);for(;v!==void 0&&++y<=v;){_.length>0&&_.push({type:"text",value:" "});let C=typeof n=="string"?n:n(d,y);typeof C=="string"&&(C={type:"text",value:C}),_.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=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const C=A.children[A.children.length-1];C&&C.type==="text"?C.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(..._)}else p.push(..._);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(h,k),c.push(k)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:oe(B({},Hi(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
|
|
31
31
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
32
|
-
`}]}}const al=(function(e){if(e==null)return
|
|
32
|
+
`}]}}const al=(function(e){if(e==null)return F3;if(typeof e=="function")return ul(e);if(typeof e=="object")return Array.isArray(e)?L3(e):D3(e);if(typeof e=="string")return M3(e);throw new Error("Expected function, string, or object as test")});function L3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=al(e[n]);return ul(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function D3(e){const t=e;return ul(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function M3(e){return ul(t);function t(n){return n&&n.type===e}}function ul(e){return t;function t(n,r,o){return!!(B3(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function F3(){return!0}function B3(e){return e!==null&&typeof e=="object"&&"type"in e}function w7(e){return e}const rE=[],U3=!0,Pf=!1,H3="skip";function iE(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=al(o),u=r?-1:1;c(e,void 0,[])();function c(d,h,p){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const y=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=rE,_,v,A;if((!t||a(d,h,p[p.length-1]||void 0))&&(y=z3(n(d,p)),y[0]===Pf))return y;if("children"in d&&d.children){const k=d;if(k.children&&y[0]!==H3)for(v=(r?k.children.length:-1)+u,A=p.concat(k);v>-1&&v<k.children.length;){const C=k.children[v];if(_=c(C,v,A)(),_[0]===Pf)return _;v=typeof _[1]=="number"?_[1]:v+u}}return y}}}function z3(e){return Array.isArray(e)?e:typeof e=="number"?[U3,e]:e==null?rE:[e]}function ll(e,t,n,r){let o,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,o=n):(a=t,u=n,o=r),iE(e,a,c,o);function c(d,h){const p=h[h.length-1],g=p?p.children.indexOf(d):void 0;return u(d,g,p)}}const If={}.hasOwnProperty,j3={};function $3(e,t){const n=t||j3,r=new Map,o=new Map,a=new Map,u=B(B({},A3),n.handlers),c={all:h,applyData:q3,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:V3,wrap:W3};return ll(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const g=p.type==="definition"?r:o,b=String(p.identifier).toUpperCase();g.has(b)||g.set(b,p)}}),c;function d(p,g){const b=p.type,y=c.handlers[b];if(If.call(c.handlers,b)&&y)return y(c,p,g);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in p){const v=p,{children:A}=v,k=an(v,["children"]),C=Hi(k);return C.children=c.all(p),C}return Hi(p)}return(c.options.unknownHandler||Y3)(c,p,g)}function h(p){const g=[];if("children"in p){const b=p.children;let y=-1;for(;++y<b.length;){const _=c.one(b[y],p);if(_){if(y&&b[y-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=oE(_.value)),!Array.isArray(_)&&_.type==="element")){const v=_.children[0];v&&v.type==="text"&&(v.value=oE(v.value))}Array.isArray(_)?g.push(..._):g.push(_)}}}return g}}function V3(e,t){e.position&&(t.position=p1(e))}function q3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=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,Hi(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function Y3(e,t){const n=t.data||{},r="value"in t&&!(If.call(n,"hProperties")||If.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function W3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
33
33
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
34
34
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
35
|
-
`}),n}function
|
|
36
|
-
`},o),a}function W3(e,t){return e&&"run"in e?function(n,r){return ze(this,null,function*(){const o=oE(n,B({file:r},t));yield e.run(o,r)})}:function(n,r){return oE(n,B({file:r},e||t))}}function sE(e){if(e)throw e}var Rf,aE;function G3(){if(aE)return Rf;aE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},a=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!g)return!1;var b;for(b in h);return typeof b=="undefined"||e.call(h,b)},u=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(r)return r(h,p).value}else return;return h[p]};return Rf=function d(){var h,p,g,b,y,x,v=arguments[0],A=1,C=arguments.length,k=!1;for(typeof v=="boolean"&&(k=v,v=arguments[1]||{},A=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});A<C;++A)if(h=arguments[A],h!=null)for(p in h)g=c(v,p),b=c(h,p),v!==b&&(k&&b&&(a(b)||(y=o(b)))?(y?(y=!1,x=g&&o(g)?g:[]):x=g&&a(g)?g:{},u(v,{name:p,newValue:d(k,x,b)})):typeof b!="undefined"&&u(v,{name:p,newValue:b}));return v},Rf}var X3=G3();const Lf=Ge(X3);function Df(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 K3(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...h){const p=e[++a];let g=-1;if(d){u(d);return}for(;++g<o.length;)(h[g]===null||h[g]===void 0)&&(h[g]=o[g]);o=h,p?Q3(p,c)(...h):u(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function Q3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(h){const p=h;if(c&&n)throw p;return o(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const gr={basename:J3,dirname:Z3,extname:eO,join:tO,sep:"/"};function J3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ia(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function Z3(e){if(ia(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 eO(e){ia(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function tO(...e){let t=-1,n;for(;++t<e.length;)ia(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":nO(n)}function nO(e){ia(e);const t=e.codePointAt(0)===47;let n=rO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function rO(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==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("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function ia(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const iO={cwd:oO};function oO(){return"/"}function Mf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function sO(e){if(typeof e=="string")e=new URL(e);else if(!Mf(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 aO(e)}function aO(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 o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Ff=["history","path","basename","stem","extname","dirname"];class uE{constructor(t){let n;t?Mf(t)?n={path:t}:typeof t=="string"||uO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":iO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ff.length;){const a=Ff[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)Ff.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?gr.basename(this.path):void 0}set basename(t){Uf(t,"basename"),Bf(t,"basename"),this.path=gr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?gr.dirname(this.path):void 0}set dirname(t){lE(this.basename,"dirname"),this.path=gr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?gr.extname(this.path):void 0}set extname(t){if(Bf(t,"extname"),lE(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=gr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Mf(t)&&(t=sO(t)),Uf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?gr.basename(this.path,this.extname):void 0}set stem(t){Uf(t,"stem"),Bf(t,"stem"),this.path=gr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Gt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Bf(e,t){if(e&&e.includes(gr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+gr.sep+"`")}function Uf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function lE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function uO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lO=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),cO={}.hasOwnProperty;class Hf extends lO{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=K3()}copy(){const t=new Hf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Lf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?($f("data",this.frozen),this.namespace[t]=n,this):cO.call(this.namespace,t)&&this.namespace[t]||void 0:t?($f("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 o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=cl(t),r=this.parser||this.Parser;return zf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),zf("process",this.parser||this.Parser),jf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=cl(t),d=r.parse(c);r.run(d,c,function(p,g,b){if(p||!g||!b)return h(p);const y=g,x=r.stringify(y,b);hO(x)?b.value=x:b.result=x,h(p,b)});function h(p,g){p||!g?u(p):a?a(g):n(void 0,g)}}}processSync(t){let n=!1,r;return this.freeze(),zf("processSync",this.parser||this.Parser),jf("processSync",this.compiler||this.Compiler),this.process(t,o),dE("processSync","process",n),r;function o(a,u){n=!0,sE(a),r=u}}run(t,n,r){cE(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=cl(n);o.run(t,d,h);function h(p,g,b){const y=g||t;p?c(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),dE("runSync","run",r),o;function a(u,c){sE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=cl(n),o=this.compiler||this.Compiler;return jf("stringify",o),cE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if($f("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...g]=h;d(p,g)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(o.settings=Lf(!0,o.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const g=h[p];a(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let g=-1,b=-1;for(;++g<r.length;)if(r[g][0]===h){b=g;break}if(b===-1)r.push([h,...p]);else if(p.length>0){let[y,...x]=p;const v=r[b][1];Df(v)&&Df(y)&&(y=Lf(!0,v,y)),r[b]=[h,y,...x]}}}}const dO=new Hf().freeze();function zf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function jf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $f(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 cE(e){if(!Df(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function dE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function cl(e){return fO(e)?e:new uE(e)}function fO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function hO(e){return typeof e=="string"||pO(e)}function pO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const mO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",fE=[],hE={allowDangerousHtml:!0},gO=/^(https?|ircs?|mailto|xmpp)$/i,EO=[{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 pE(e){const t=yO(e),n=TO(e);return bO(t.runSync(t.parse(n),n),e)}function yO(e){const t=e.rehypePlugins||fE,n=e.remarkPlugins||fE,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),hE):hE;return dO().use(ZN).use(n).use(W3,r).use(t)}function TO(e){const t=e.children||"",n=new uE;return typeof t=="string"&&(n.value=t),n}function bO(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||_O;for(const p of EO)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+mO+p.id,void 0);return ll(e,h),qC(e,{Fragment:_.Fragment,components:o,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function h(p,g,b){if(p.type==="raw"&&b&&typeof g=="number")return u?b.children.splice(g,1):b.children[g]={type:"text",value:p.value},g;if(p.type==="element"){let y;for(y in Tf)if(Object.hasOwn(Tf,y)&&Object.hasOwn(p.properties,y)){const x=p.properties[y],v=Tf[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(x||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof g=="number"&&(y=!r(p,g,b)),y&&b&&typeof g=="number")return c&&p.children?b.children.splice(g,1,...p.children):b.children.splice(g,1),g}}}function _O(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||gO.test(e.slice(0,t))?e:""}const mE=/[#.]/g;function xO(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){mE.lastIndex=o;const c=mE.exec(n),d=n.slice(o,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function gE(e,t,n){const r=n?AO(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const h=u;c.unshift(h)}else{d=xO(a,t);const h=d.tagName.toLowerCase(),p=r?r.get(h):void 0;if(d.tagName=p||h,wO(u))c.unshift(u);else for(const[g,b]of Object.entries(u))SO(e,d.properties,g,b)}for(const h of c)Vf(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function wO(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 o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function SO(e,t,n,r){const o=hf(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"?o.spaceSeparated?a=s1(r):o.commaSeparated?a=Wg(r):o.commaOrSpaceSeparated?a=s1(Wg(r).join(" ")):a=EE(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?vO(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(EE(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function Vf(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)Vf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Vf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function EE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Gs(n)===Gs(t)))return!0}return n}function vO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function AO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const CO=["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"],kO=gE(Qu,"div"),NO=gE(No,"g",CO);function OO(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=yE(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=yE(t,c),h=d===-1?t.length+1:d+1;if(c===h)break;n.push(h)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function yE(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 zi={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/"},TE={}.hasOwnProperty,PO=Object.prototype;function IO(e,t){const n=t||{};return qf({file:n.file||void 0,location:!1,schema:n.space==="svg"?No:Qu,verbose:n.verbose||!1},e)}function qf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},dl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:bE(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=OO(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},dl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},dl(e,r,n),n}default:return n=RO(e,t),n}}function bE(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=qf(e,t[n]);r.push(o)}return r}function RO(e,t){const n=e.schema;e.schema=t.namespaceURI===zi.svg?No:Qu;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;TE.call(PO,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?NO:kO)(t.tagName,o,bE(e,t.childNodes));if(dl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&Lo(d.startTag),p=d&&d.endTag&&Lo(d.endTag),g=qf(e,c.content);h&&p&&e.file&&(g.position={start:h.end,end:p.start}),u.content=g}return e.schema=n,u}function dl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=LO(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function LO(e,t,n){const r=Lo(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)TE.call(n.attrs,u)&&(a[hf(e.schema,u).property]=Lo(n.attrs[u]));n.startTag;const c=Lo(n.startTag),d=n.endTag?Lo(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=a,t.data={position:h}}}return r}function Lo(e){const t=_E({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=_E({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function _E(e){return e.line&&e.column?e:void 0}class oa{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}oa.prototype.property={},oa.prototype.normal={},oa.prototype.space=null;function xE(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new oa(n,r,t)}function Yf(e){return e.toLowerCase()}class Bn{constructor(t,n){this.property=t,this.attribute=n}}Bn.prototype.space=null,Bn.prototype.boolean=!1,Bn.prototype.booleanish=!1,Bn.prototype.overloadedBoolean=!1,Bn.prototype.number=!1,Bn.prototype.commaSeparated=!1,Bn.prototype.spaceSeparated=!1,Bn.prototype.commaOrSpaceSeparated=!1,Bn.prototype.mustUseProperty=!1,Bn.prototype.defined=!1;let DO=0;const je=ji(),Nt=ji(),wE=ji(),Ee=ji(),lt=ji(),Do=ji(),An=ji();function ji(){return Eu(2,++DO)}const Wf=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Nt,commaOrSpaceSeparated:An,commaSeparated:Do,number:Ee,overloadedBoolean:wE,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Gf=Object.keys(Wf);class Xf extends Bn{constructor(t,n,r,o){let a=-1;if(super(t,n),SE(this,"space",o),typeof r=="number")for(;++a<Gf.length;){const u=Gf[a];SE(this,Gf[a],(r&Wf[u])===Wf[u])}}}Xf.prototype.defined=!0;function SE(e,t,n){n&&(e[t]=n)}const MO={}.hasOwnProperty;function Mo(e){const t={},n={};let r;for(r in e.properties)if(MO.call(e.properties,r)){const o=e.properties[r],a=new Xf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Yf(r)]=r,n[Yf(a.attribute)]=r}return new oa(t,n,e.space)}const vE=Mo({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),AE=Mo({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function CE(e,t){return t in e?e[t]:t}function kE(e,t){return CE(e,t.toLowerCase())}const NE=Mo({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:kE,properties:{xmlns:null,xmlnsXLink:null}}),OE=Mo({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Nt,ariaAutoComplete:null,ariaBusy:Nt,ariaChecked:Nt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Nt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Nt,ariaFlowTo:lt,ariaGrabbed:Nt,ariaHasPopup:null,ariaHidden:Nt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:Ee,ariaLive:null,ariaModal:Nt,ariaMultiLine:Nt,ariaMultiSelectable:Nt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Nt,ariaReadOnly:Nt,ariaRelevant:null,ariaRequired:Nt,ariaRoleDescription:lt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Nt,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null}}),FO=Mo({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:kE,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Do,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:lt,autoFocus:je,autoPlay:je,blocking:lt,capture:null,charSet:null,checked:je,cite:null,className:lt,cols:Ee,colSpan:null,content:null,contentEditable:Nt,controls:je,controlsList:lt,coords:Ee|Do,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:wE,draggable:Nt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:lt,height:Ee,hidden:je,high:Ee,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:lt,itemRef:lt,itemScope:je,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:Ee,pattern:null,ping:lt,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:lt,required:je,reversed:je,rows:Ee,rowSpan:Ee,sandbox:lt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Nt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Nt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Nt,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:Ee,security:null,unselectable:null}}),BO=Mo({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:CE,properties:{about:An,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Do,g2:Do,glyphName:Do,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:An,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:An,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:An,rev:An,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:An,requiredFeatures:An,requiredFonts:An,requiredFormats:An,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:An,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:An,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:An,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),UO=/^data[-\w.:]+$/i,PE=/-[a-z]/g,HO=/[A-Z]/g;function zO(e,t){const n=Yf(t);let r=t,o=Bn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&UO.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(PE,$O);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!PE.test(a)){let u=a.replace(HO,jO);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Xf}return new o(r,t)}function jO(e){return"-"+e.toLowerCase()}function $O(e){return e.charAt(1).toUpperCase()}const VO=xE([AE,vE,NE,OE,FO],"html"),IE=xE([AE,vE,NE,OE,BO],"svg"),RE={}.hasOwnProperty;function LE(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&RE.call(o,e)){const d=String(o[e]);u=RE.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const qO={},YO={}.hasOwnProperty,DE=LE("type",{handlers:{root:GO,element:ZO,text:QO,comment:JO,doctype:KO}});function WO(e,t){const r=(t||qO).space;return DE(e,r==="svg"?IE:VO)}function GO(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Kf(e.children,n,t),Fo(e,n),n}function XO(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Kf(e.children,n,t),Fo(e,n),n}function KO(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Fo(e,t),t}function QO(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Fo(e,t),t}function JO(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Fo(e,t),t}function ZO(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=IE);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&YO.call(e.properties,a)){const d=eP(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:zi[u],childNodes:[],parentNode:null};return c.childNodes=Kf(e.children,c,r),Fo(e,c),e.tagName==="template"&&e.content&&(c.content=XO(e.content,r)),c}function eP(e,t,n){const r=zO(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?Gg(n):a1(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=zi[r.space]}return o}function Kf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=DE(e[r],n);a.parentNode=t,o.push(a)}return o}function Fo(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 tP=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],nP=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]),mt="�";var P;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(P||(P={}));const hn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ME(e){return e>=55296&&e<=57343}function rP(e){return e>=56320&&e<=57343}function iP(e,t){return(e-55296)*1024+9216+t}function FE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function BE(e){return e>=64976&&e<=65007||nP.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const oP=65536;class sP{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=oP,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:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(rP(n))return this.pos++,this._addGap(),iP(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ME(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){FE(t)?this._err(te.controlCharacterInInputStream):BE(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var qe;(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"})(qe||(qe={}));function UE(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 aP=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),uP=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 lP(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=uP.get(e))!==null&&t!==void 0?t:e}var Mt;(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"})(Mt||(Mt={}));const cP=32;var Zr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Zr||(Zr={}));function Qf(e){return e>=Mt.ZERO&&e<=Mt.NINE}function dP(e){return e>=Mt.UPPER_A&&e<=Mt.UPPER_F||e>=Mt.LOWER_A&&e<=Mt.LOWER_F}function fP(e){return e>=Mt.UPPER_A&&e<=Mt.UPPER_Z||e>=Mt.LOWER_A&&e<=Mt.LOWER_Z||Qf(e)}function hP(e){return e===Mt.EQUALS||fP(e)}var Ft;(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"})(Ft||(Ft={}));var Lr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Lr||(Lr={}));class pP{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ft.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Lr.Strict}startEntity(t){this.decodeMode=t,this.state=Ft.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ft.EntityStart:return t.charCodeAt(n)===Mt.NUM?(this.state=Ft.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ft.NamedEntity,this.stateNamedEntity(t,n));case Ft.NumericStart:return this.stateNumericStart(t,n);case Ft.NumericDecimal:return this.stateNumericDecimal(t,n);case Ft.NumericHex:return this.stateNumericHex(t,n);case Ft.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|cP)===Mt.LOWER_X?(this.state=Ft.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ft.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Qf(o)||dP(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Qf(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,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===Mt.SEMI)this.consumed+=1;else if(this.decodeMode===Lr.Strict)return 0;return this.emitCodePoint(lP(this.result),this.consumed),this.errors&&(t!==Mt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&Zr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=mP(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Lr.Attribute&&(a===0||hP(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Zr.VALUE_LENGTH)>>14,a!==0){if(u===Mt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Lr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Zr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Zr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Ft.NamedEntity:return this.result!==0&&(this.decodeMode!==Lr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ft.NumericDecimal:return this.emitNumericEntity(0,2);case Ft.NumericHex:return this.emitNumericEntity(0,3);case Ft.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ft.EntityStart:return 0}}}function mP(e,t,n,r){const o=(t&Zr.BRANCH_LENGTH)>>7,a=t&Zr.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,h=e[d];if(h<r)u=d+1;else if(h>r)c=d-1;else return e[d+o]}return-1}var le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var $i;(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"})($i||($i={}));var Un;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Un||(Un={}));var K;(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"})(K||(K={}));var m;(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"})(m||(m={}));const gP=new Map([[K.A,m.A],[K.ADDRESS,m.ADDRESS],[K.ANNOTATION_XML,m.ANNOTATION_XML],[K.APPLET,m.APPLET],[K.AREA,m.AREA],[K.ARTICLE,m.ARTICLE],[K.ASIDE,m.ASIDE],[K.B,m.B],[K.BASE,m.BASE],[K.BASEFONT,m.BASEFONT],[K.BGSOUND,m.BGSOUND],[K.BIG,m.BIG],[K.BLOCKQUOTE,m.BLOCKQUOTE],[K.BODY,m.BODY],[K.BR,m.BR],[K.BUTTON,m.BUTTON],[K.CAPTION,m.CAPTION],[K.CENTER,m.CENTER],[K.CODE,m.CODE],[K.COL,m.COL],[K.COLGROUP,m.COLGROUP],[K.DD,m.DD],[K.DESC,m.DESC],[K.DETAILS,m.DETAILS],[K.DIALOG,m.DIALOG],[K.DIR,m.DIR],[K.DIV,m.DIV],[K.DL,m.DL],[K.DT,m.DT],[K.EM,m.EM],[K.EMBED,m.EMBED],[K.FIELDSET,m.FIELDSET],[K.FIGCAPTION,m.FIGCAPTION],[K.FIGURE,m.FIGURE],[K.FONT,m.FONT],[K.FOOTER,m.FOOTER],[K.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[K.FORM,m.FORM],[K.FRAME,m.FRAME],[K.FRAMESET,m.FRAMESET],[K.H1,m.H1],[K.H2,m.H2],[K.H3,m.H3],[K.H4,m.H4],[K.H5,m.H5],[K.H6,m.H6],[K.HEAD,m.HEAD],[K.HEADER,m.HEADER],[K.HGROUP,m.HGROUP],[K.HR,m.HR],[K.HTML,m.HTML],[K.I,m.I],[K.IMG,m.IMG],[K.IMAGE,m.IMAGE],[K.INPUT,m.INPUT],[K.IFRAME,m.IFRAME],[K.KEYGEN,m.KEYGEN],[K.LABEL,m.LABEL],[K.LI,m.LI],[K.LINK,m.LINK],[K.LISTING,m.LISTING],[K.MAIN,m.MAIN],[K.MALIGNMARK,m.MALIGNMARK],[K.MARQUEE,m.MARQUEE],[K.MATH,m.MATH],[K.MENU,m.MENU],[K.META,m.META],[K.MGLYPH,m.MGLYPH],[K.MI,m.MI],[K.MO,m.MO],[K.MN,m.MN],[K.MS,m.MS],[K.MTEXT,m.MTEXT],[K.NAV,m.NAV],[K.NOBR,m.NOBR],[K.NOFRAMES,m.NOFRAMES],[K.NOEMBED,m.NOEMBED],[K.NOSCRIPT,m.NOSCRIPT],[K.OBJECT,m.OBJECT],[K.OL,m.OL],[K.OPTGROUP,m.OPTGROUP],[K.OPTION,m.OPTION],[K.P,m.P],[K.PARAM,m.PARAM],[K.PLAINTEXT,m.PLAINTEXT],[K.PRE,m.PRE],[K.RB,m.RB],[K.RP,m.RP],[K.RT,m.RT],[K.RTC,m.RTC],[K.RUBY,m.RUBY],[K.S,m.S],[K.SCRIPT,m.SCRIPT],[K.SEARCH,m.SEARCH],[K.SECTION,m.SECTION],[K.SELECT,m.SELECT],[K.SOURCE,m.SOURCE],[K.SMALL,m.SMALL],[K.SPAN,m.SPAN],[K.STRIKE,m.STRIKE],[K.STRONG,m.STRONG],[K.STYLE,m.STYLE],[K.SUB,m.SUB],[K.SUMMARY,m.SUMMARY],[K.SUP,m.SUP],[K.TABLE,m.TABLE],[K.TBODY,m.TBODY],[K.TEMPLATE,m.TEMPLATE],[K.TEXTAREA,m.TEXTAREA],[K.TFOOT,m.TFOOT],[K.TD,m.TD],[K.TH,m.TH],[K.THEAD,m.THEAD],[K.TITLE,m.TITLE],[K.TR,m.TR],[K.TRACK,m.TRACK],[K.TT,m.TT],[K.U,m.U],[K.UL,m.UL],[K.SVG,m.SVG],[K.VAR,m.VAR],[K.WBR,m.WBR],[K.XMP,m.XMP]]);function Bo(e){var t;return(t=gP.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const he=m,EP={[le.HTML]:new Set([he.ADDRESS,he.APPLET,he.AREA,he.ARTICLE,he.ASIDE,he.BASE,he.BASEFONT,he.BGSOUND,he.BLOCKQUOTE,he.BODY,he.BR,he.BUTTON,he.CAPTION,he.CENTER,he.COL,he.COLGROUP,he.DD,he.DETAILS,he.DIR,he.DIV,he.DL,he.DT,he.EMBED,he.FIELDSET,he.FIGCAPTION,he.FIGURE,he.FOOTER,he.FORM,he.FRAME,he.FRAMESET,he.H1,he.H2,he.H3,he.H4,he.H5,he.H6,he.HEAD,he.HEADER,he.HGROUP,he.HR,he.HTML,he.IFRAME,he.IMG,he.INPUT,he.LI,he.LINK,he.LISTING,he.MAIN,he.MARQUEE,he.MENU,he.META,he.NAV,he.NOEMBED,he.NOFRAMES,he.NOSCRIPT,he.OBJECT,he.OL,he.P,he.PARAM,he.PLAINTEXT,he.PRE,he.SCRIPT,he.SECTION,he.SELECT,he.SOURCE,he.STYLE,he.SUMMARY,he.TABLE,he.TBODY,he.TD,he.TEMPLATE,he.TEXTAREA,he.TFOOT,he.TH,he.THEAD,he.TITLE,he.TR,he.TRACK,he.UL,he.WBR,he.XMP]),[le.MATHML]:new Set([he.MI,he.MO,he.MN,he.MS,he.MTEXT,he.ANNOTATION_XML]),[le.SVG]:new Set([he.TITLE,he.FOREIGN_OBJECT,he.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},Jf=new Set([he.H1,he.H2,he.H3,he.H4,he.H5,he.H6]);K.STYLE,K.SCRIPT,K.XMP,K.IFRAME,K.NOEMBED,K.NOFRAMES,K.PLAINTEXT;var R;(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"})(R||(R={}));const St={DATA:R.DATA,RCDATA:R.RCDATA,RAWTEXT:R.RAWTEXT,SCRIPT_DATA:R.SCRIPT_DATA,PLAINTEXT:R.PLAINTEXT,CDATA_SECTION:R.CDATA_SECTION};function yP(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function sa(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function TP(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function ei(e){return TP(e)||sa(e)}function HE(e){return ei(e)||yP(e)}function fl(e){return e+32}function zE(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function jE(e){return zE(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function bP(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:ME(e)?te.surrogateCharacterReference:BE(e)?te.noncharacterCharacterReference:FE(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class _P{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=R.DATA,this.returnState=R.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new sP(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new pP(aP,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=bP(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.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:qe.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qe.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:qe.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(UE(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Bo(t.tagName),t.type===qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case qe.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:qe.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=zE(t)?qe.WHITESPACE_CHARACTER:t===P.NULL?qe.NULL_CHARACTER:qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=R.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Lr.Attribute:Lr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===R.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case R.DATA:{this._stateData(t);break}case R.RCDATA:{this._stateRcdata(t);break}case R.RAWTEXT:{this._stateRawtext(t);break}case R.SCRIPT_DATA:{this._stateScriptData(t);break}case R.PLAINTEXT:{this._statePlaintext(t);break}case R.TAG_OPEN:{this._stateTagOpen(t);break}case R.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case R.TAG_NAME:{this._stateTagName(t);break}case R.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case R.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case R.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case R.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case R.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case R.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case R.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case R.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case R.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case R.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case R.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case R.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case R.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case R.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case R.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case R.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case R.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case R.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case R.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case R.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case R.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case R.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case R.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case R.BOGUS_COMMENT:{this._stateBogusComment(t);break}case R.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case R.COMMENT_START:{this._stateCommentStart(t);break}case R.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case R.COMMENT:{this._stateComment(t);break}case R.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case R.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case R.COMMENT_END:{this._stateCommentEnd(t);break}case R.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case R.DOCTYPE:{this._stateDoctype(t);break}case R.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case R.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case R.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case R.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case R.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case R.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case R.CDATA_SECTION:{this._stateCdataSection(t);break}case R.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case R.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case R.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case R.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=R.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=R.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(mt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=R.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(mt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(mt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(mt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ei(t))this._createStartTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=R.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=R.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=R.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ei(t))this._createEndTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=R.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=R.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=mt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(sa(t)?fl(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=R.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ei(t)?(this.state=R.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=R.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=R.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=R.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=R.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ei(t)?(this.state=R.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=R.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=R.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=R.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ei(t)?(this.state=R.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(mt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(mt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(mt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ei(t)?(this._emitChars("<"),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ei(t)?(this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(hn.SCRIPT,!1)&&jE(this.preprocessor.peek(hn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<hn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(mt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(mt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(mt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(hn.SCRIPT,!1)&&jE(this.preprocessor.peek(hn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<hn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=R.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=mt;break}default:this.currentAttr.name+=String.fromCodePoint(sa(t)?fl(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=R.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=R.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=R.DATA,this.emitCurrentTagToken();break}default:this.state=R.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=mt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=mt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=mt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=R.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=R.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=mt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(hn.DASH_DASH,!0)?(this._createCommentToken(hn.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(hn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(hn.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(hn.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(hn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=R.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=R.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=R.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=R.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=R.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=R.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=mt;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=R.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=R.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=R.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=R.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=R.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=R.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=R.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=R.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(sa(t))this._createDoctypeToken(String.fromCharCode(fl(t))),this.state=R.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(mt),this.state=R.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=R.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=R.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=mt;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(sa(t)?fl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(hn.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(hn.SYSTEM,!1)?this.state=R.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=mt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=mt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=mt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=mt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=R.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=R.CDATA_SECTION_END:(this._emitChars("]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=R.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&HE(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){HE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const $E=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),VE=new Set([...$E,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),hl=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),xP=new Set([...hl,m.OL,m.UL]),wP=new Set([...hl,m.BUTTON]),qE=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),YE=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),SP=new Set([m.TR,m.TEMPLATE,m.HTML]),vP=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),AP=new Set([m.TABLE,m.TEMPLATE,m.HTML]),CP=new Set([m.TD,m.TH]);class kP{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=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Jf,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(CP,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(AP,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(vP,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(SP,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===m.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]===m.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case le.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case le.SVG:{if(YE.has(o))return!1;break}case le.MATHML:{if(qE.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,hl)}hasInListItemScope(t){return this.hasInDynamicScope(t,xP)}hasInButtonScope(t){return this.hasInDynamicScope(t,wP)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(Jf.has(n))return!0;if(hl.has(n))return!1;break}case le.SVG:{if(YE.has(n))return!1;break}case le.MATHML:{if(qE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===le.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&$E.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&VE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&VE.has(this.currentTagId);)this.pop()}}const Zf=3;var Er;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Er||(Er={}));const WE={type:Er.Marker};class NP{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Er.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===a&&this.treeAdapter.getNamespaceURI(h)===u){const p=this.treeAdapter.getAttrList(h);p.length===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Zf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Zf)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=Zf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(WE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Er.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Er.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(WE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Er.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Er.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Er.Element&&n.element===t)}}const ti={createDocument(){return{nodeName:"#document",mode:Un.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 o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ti.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(ti.isTextNode(n)){n.value+=t;return}}ti.appendChild(e,ti.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ti.isTextNode(r)?r.value+=t:ti.insertBefore(e,ti.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=B(B({},e.sourceCodeLocation),t)}},GE="html",OP="about:legacy-compat",PP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",XE=["+//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//"],IP=[...XE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],RP=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),KE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],LP=[...KE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function QE(e,t){return t.some(n=>e.startsWith(n))}function DP(e){return e.name===GE&&e.publicId===null&&(e.systemId===null||e.systemId===OP)}function MP(e){if(e.name!==GE)return Un.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===PP)return Un.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),RP.has(n))return Un.QUIRKS;let r=t===null?IP:XE;if(QE(n,r))return Un.QUIRKS;if(r=t===null?KE:LP,QE(n,r))return Un.LIMITED_QUIRKS}return Un.NO_QUIRKS}const JE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},FP="definitionurl",BP="definitionURL",UP=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])),HP=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),zP=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])),jP=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function $P(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===$i.COLOR||r===$i.SIZE||r===$i.FACE)||jP.has(t)}function ZE(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===FP){e.attrs[t].name=BP;break}}function ey(e){for(let t=0;t<e.attrs.length;t++){const n=UP.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function eh(e){for(let t=0;t<e.attrs.length;t++){const n=HP.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 VP(e){const t=zP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Bo(e.tagName))}function qP(e,t){return t===le.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function YP(e,t,n){if(t===le.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===$i.ENCODING){const o=n[r].value.toLowerCase();return o===JE.TEXT_HTML||o===JE.APPLICATION_XML}}return t===le.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function WP(e,t,n,r){return(!r||r===le.HTML)&&YP(e,t,n)||(!r||r===le.MATHML)&&qP(e,t)}const GP="hidden",XP=8,KP=3;var M;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(M||(M={}));const QP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ty=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),ny={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ti,onParseError:null};class ry{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=B(B({},ny),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new _P(this.options,this),this.activeFormattingElements=new NP(this.treeAdapter),this.fragmentContextID=r?Bo(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new kP(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=B(B({},ny),n);t!=null||(t=r.treeAdapter.createElement(K.TEMPLATE,le.HTML,[]));const o=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:QP,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 o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=St.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)===K.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==le.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=St.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=St.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=St.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=St.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&ie(B({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(K.HTML,le.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:h,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:h,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),a=n.type===qe.END_TAG&&o===n.tagName?{endTag:B({},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===m.SVG&&this.treeAdapter.getTagName(n)===K.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case qe.CHARACTER:{this.onCharacter(t);break}case qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case qe.COMMENT:{this.onComment(t);break}case qe.DOCTYPE:{this.onDoctype(t);break}case qe.START_TAG:{this._processStartTag(t);break}case qe.END_TAG:{this.onEndTag(t);break}case qe.EOF:{this.onEof(t);break}case qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return WP(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Er.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=M.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=M.IN_TABLE;return}case m.BODY:{this.insertionMode=M.IN_BODY;return}case m.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return ty.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 m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.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 EP[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){CR(this,t);return}switch(this.insertionMode){case M.INITIAL:{aa(this,t);break}case M.BEFORE_HTML:{ua(this,t);break}case M.BEFORE_HEAD:{la(this,t);break}case M.IN_HEAD:{ca(this,t);break}case M.IN_HEAD_NO_SCRIPT:{da(this,t);break}case M.AFTER_HEAD:{fa(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{oy(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{ih(this,t);break}case M.IN_TABLE_TEXT:{hy(this,t);break}case M.IN_COLUMN_GROUP:{gl(this,t);break}case M.AFTER_BODY:{Tl(this,t);break}case M.AFTER_AFTER_BODY:{bl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){AR(this,t);return}switch(this.insertionMode){case M.INITIAL:{aa(this,t);break}case M.BEFORE_HTML:{ua(this,t);break}case M.BEFORE_HEAD:{la(this,t);break}case M.IN_HEAD:{ca(this,t);break}case M.IN_HEAD_NO_SCRIPT:{da(this,t);break}case M.AFTER_HEAD:{fa(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{ih(this,t);break}case M.IN_COLUMN_GROUP:{gl(this,t);break}case M.AFTER_BODY:{Tl(this,t);break}case M.AFTER_AFTER_BODY:{bl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){nh(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{nh(this,t);break}case M.IN_TABLE_TEXT:{ma(this,t);break}case M.AFTER_BODY:{iI(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{oI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{sI(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{ma(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?kR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{aa(this,t);break}case M.BEFORE_HTML:{aI(this,t);break}case M.BEFORE_HEAD:{lI(this,t);break}case M.IN_HEAD:{er(this,t);break}case M.IN_HEAD_NO_SCRIPT:{fI(this,t);break}case M.AFTER_HEAD:{pI(this,t);break}case M.IN_BODY:{Kt(this,t);break}case M.IN_TABLE:{Uo(this,t);break}case M.IN_TABLE_TEXT:{ma(this,t);break}case M.IN_CAPTION:{cR(this,t);break}case M.IN_COLUMN_GROUP:{oh(this,t);break}case M.IN_TABLE_BODY:{El(this,t);break}case M.IN_ROW:{yl(this,t);break}case M.IN_CELL:{hR(this,t);break}case M.IN_SELECT:{gy(this,t);break}case M.IN_SELECT_IN_TABLE:{mR(this,t);break}case M.IN_TEMPLATE:{ER(this,t);break}case M.AFTER_BODY:{TR(this,t);break}case M.IN_FRAMESET:{bR(this,t);break}case M.AFTER_FRAMESET:{xR(this,t);break}case M.AFTER_AFTER_BODY:{SR(this,t);break}case M.AFTER_AFTER_FRAMESET:{vR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?NR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{aa(this,t);break}case M.BEFORE_HTML:{uI(this,t);break}case M.BEFORE_HEAD:{cI(this,t);break}case M.IN_HEAD:{dI(this,t);break}case M.IN_HEAD_NO_SCRIPT:{hI(this,t);break}case M.AFTER_HEAD:{mI(this,t);break}case M.IN_BODY:{ml(this,t);break}case M.TEXT:{eR(this,t);break}case M.IN_TABLE:{ha(this,t);break}case M.IN_TABLE_TEXT:{ma(this,t);break}case M.IN_CAPTION:{dR(this,t);break}case M.IN_COLUMN_GROUP:{fR(this,t);break}case M.IN_TABLE_BODY:{sh(this,t);break}case M.IN_ROW:{my(this,t);break}case M.IN_CELL:{pR(this,t);break}case M.IN_SELECT:{Ey(this,t);break}case M.IN_SELECT_IN_TABLE:{gR(this,t);break}case M.IN_TEMPLATE:{yR(this,t);break}case M.AFTER_BODY:{Ty(this,t);break}case M.IN_FRAMESET:{_R(this,t);break}case M.AFTER_FRAMESET:{wR(this,t);break}case M.AFTER_AFTER_BODY:{bl(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{aa(this,t);break}case M.BEFORE_HTML:{ua(this,t);break}case M.BEFORE_HEAD:{la(this,t);break}case M.IN_HEAD:{ca(this,t);break}case M.IN_HEAD_NO_SCRIPT:{da(this,t);break}case M.AFTER_HEAD:{fa(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{dy(this,t);break}case M.TEXT:{tR(this,t);break}case M.IN_TABLE_TEXT:{ma(this,t);break}case M.IN_TEMPLATE:{yy(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{rh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{iy(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{ih(this,t);break}case M.IN_TABLE_TEXT:{fy(this,t);break}}}}function JP(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):cy(e,t),n}function ZP(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function eI(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=KP;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=tI(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function tI(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 nI(e,t,n){const r=e.treeAdapter.getTagName(t),o=Bo(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function rI(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function th(e,t){for(let n=0;n<XP;n++){const r=JP(e,t);if(!r)break;const o=ZP(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=eI(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&nI(e,u,a),rI(e,o,r)}}function nh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function iI(e,t){e._appendCommentNode(t,e.openElements.items[0])}function oI(e,t){e._appendCommentNode(t,e.document)}function rh(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],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.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 sI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Un.QUIRKS:MP(t);DP(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function aa(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Un.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function aI(e,t){t.tagID===m.HTML?(e._insertElement(t,le.HTML),e.insertionMode=M.BEFORE_HEAD):ua(e,t)}function uI(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&ua(e,t)}function ua(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function lI(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:la(e,t)}}function cI(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?la(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function la(e,t){e._insertFakeElement(K.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function er(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,St.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,St.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,St.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,St.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case m.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:ca(e,t)}}function dI(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{ca(e,t);break}case m.TEMPLATE:{Vi(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Vi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function ca(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function fI(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{er(e,t);break}case m.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:da(e,t)}}function hI(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case m.BR:{da(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function da(e,t){const n=t.type===qe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function pI(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),er(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:fa(e,t)}}function mI(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{fa(e,t);break}case m.TEMPLATE:{Vi(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function fa(e,t){e._insertFakeElement(K.BODY,m.BODY),e.insertionMode=M.IN_BODY,pl(e,t)}function pl(e,t){switch(t.type){case qe.CHARACTER:{oy(e,t);break}case qe.WHITESPACE_CHARACTER:{iy(e,t);break}case qe.COMMENT:{nh(e,t);break}case qe.START_TAG:{Kt(e,t);break}case qe.END_TAG:{ml(e,t);break}case qe.EOF:{dy(e,t);break}}}function iy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function oy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function gI(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function EI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function yI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET)}function TI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function bI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Jf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function _I(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function xI(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function wI(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===m.LI&&o===m.LI||(n===m.DD||n===m.DT)&&(o===m.DD||o===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function SI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=St.PLAINTEXT}function vI(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function AI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(K.A);n&&(th(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function CI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function kI(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(th(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function NI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function OI(e,t){e.treeAdapter.getDocumentMode(e.document)!==Un.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function sy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ay(e){const t=UE(e,$i.TYPE);return t!=null&&t.toLowerCase()===GP}function PI(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),ay(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function II(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function RI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function LI(e,t){t.tagName=K.IMG,t.tagID=m.IMG,sy(e,t)}function DI(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=St.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function MI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,St.RAWTEXT)}function FI(e,t){e.framesetOk=!1,e._switchToTextParsing(t,St.RAWTEXT)}function uy(e,t){e._switchToTextParsing(t,St.RAWTEXT)}function BI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function UI(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function HI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function zI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,le.HTML)}function jI(e,t){e._reconstructActiveFormattingElements(),ZE(t),eh(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function $I(e,t){e._reconstructActiveFormattingElements(),ey(t),eh(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function ly(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function Kt(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{CI(e,t);break}case m.A:{AI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{bI(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{TI(e,t);break}case m.LI:case m.DD:case m.DT:{wI(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{sy(e,t);break}case m.HR:{RI(e,t);break}case m.RB:case m.RTC:{HI(e,t);break}case m.RT:case m.RP:{zI(e,t);break}case m.PRE:case m.LISTING:{_I(e,t);break}case m.XMP:{MI(e,t);break}case m.SVG:{$I(e,t);break}case m.HTML:{gI(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{er(e,t);break}case m.BODY:{EI(e,t);break}case m.FORM:{xI(e,t);break}case m.NOBR:{kI(e,t);break}case m.MATH:{jI(e,t);break}case m.TABLE:{OI(e,t);break}case m.INPUT:{PI(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{II(e,t);break}case m.IMAGE:{LI(e,t);break}case m.BUTTON:{vI(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{NI(e,t);break}case m.IFRAME:{FI(e,t);break}case m.SELECT:{BI(e,t);break}case m.OPTION:case m.OPTGROUP:{UI(e,t);break}case m.NOEMBED:case m.NOFRAMES:{uy(e,t);break}case m.FRAMESET:{yI(e,t);break}case m.TEXTAREA:{DI(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?uy(e,t):ly(e,t);break}case m.PLAINTEXT:{SI(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:ly(e,t)}}function VI(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function qI(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=M.AFTER_BODY,Ty(e,t))}function YI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function WI(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function GI(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(K.P,m.P),e._closePElement()}function XI(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function KI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function QI(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function JI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function ZI(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(K.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function cy(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==m.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function ml(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{th(e,t);break}case m.P:{GI(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{YI(e,t);break}case m.LI:{XI(e);break}case m.DD:case m.DT:{KI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{QI(e);break}case m.BR:{ZI(e);break}case m.BODY:{VI(e,t);break}case m.HTML:{qI(e,t);break}case m.FORM:{WI(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{JI(e,t);break}case m.TEMPLATE:{Vi(e,t);break}default:cy(e,t)}}function dy(e,t){e.tmplInsertionModeStack.length>0?yy(e,t):rh(e,t)}function eR(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function tR(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ih(e,t){if(e.openElements.currentTagId!==void 0&&ty.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case qe.CHARACTER:{hy(e,t);break}case qe.WHITESPACE_CHARACTER:{fy(e,t);break}}else pa(e,t)}function nR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CAPTION}function rR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function iR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.COLGROUP,m.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,oh(e,t)}function oR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_TABLE_BODY}function sR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.TBODY,m.TBODY),e.insertionMode=M.IN_TABLE_BODY,El(e,t)}function aR(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function uR(e,t){ay(t)?e._appendElement(t,le.HTML):pa(e,t),t.ackSelfClosing=!0}function lR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Uo(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{sR(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{er(e,t);break}case m.COL:{iR(e,t);break}case m.FORM:{lR(e,t);break}case m.TABLE:{aR(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{oR(e,t);break}case m.INPUT:{uR(e,t);break}case m.CAPTION:{nR(e,t);break}case m.COLGROUP:{rR(e,t);break}default:pa(e,t)}}function ha(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{Vi(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:pa(e,t)}}function pa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,pl(e,t),e.fosterParentingEnabled=n}function fy(e,t){e.pendingCharacterTokens.push(t)}function hy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ma(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)pa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const py=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function cR(e,t){const n=t.tagID;py.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,Uo(e,t)):Kt(e,t)}function dR(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===m.TABLE&&ha(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:ml(e,t)}}function oh(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{er(e,t);break}default:gl(e,t)}}function fR(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case m.TEMPLATE:{Vi(e,t);break}case m.COL:break;default:gl(e,t)}}function gl(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function El(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(K.TR,m.TR),e.insertionMode=M.IN_ROW,yl(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Uo(e,t));break}default:Uo(e,t)}}function sh(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,ha(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:ha(e,t)}}function yl(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,El(e,t));break}default:Uo(e,t)}}function my(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,sh(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,sh(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:ha(e,t)}}function hR(e,t){const n=t.tagID;py.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),yl(e,t)):Kt(e,t)}function pR(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),my(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:ml(e,t)}}function gy(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{er(e,t);break}}}function Ey(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{Vi(e,t);break}}}function mR(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):gy(e,t)}function gR(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ey(e,t)}function ER(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{er(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,Uo(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,oh(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,El(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,yl(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,Kt(e,t)}}function yR(e,t){t.tagID===m.TEMPLATE&&Vi(e,t)}function yy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):rh(e,t)}function TR(e,t){t.tagID===m.HTML?Kt(e,t):Tl(e,t)}function Ty(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.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 Tl(e,t)}function Tl(e,t){e.insertionMode=M.IN_BODY,pl(e,t)}function bR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.FRAMESET:{e._insertElement(t,le.HTML);break}case m.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{er(e,t);break}}}function _R(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function xR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{er(e,t);break}}}function wR(e,t){t.tagID===m.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function SR(e,t){t.tagID===m.HTML?Kt(e,t):bl(e,t)}function bl(e,t){e.insertionMode=M.IN_BODY,pl(e,t)}function vR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{er(e,t);break}}}function AR(e,t){t.chars=mt,e._insertCharacters(t)}function CR(e,t){e._insertCharacters(t),e.framesetOk=!1}function by(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function kR(e,t){if($P(t))by(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?ZE(t):r===le.SVG&&(VP(t),ey(t)),eh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function NR(e,t){if(t.tagID===m.P||t.tagID===m.BR){by(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===le.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}K.AREA,K.BASE,K.BASEFONT,K.BGSOUND,K.BR,K.COL,K.EMBED,K.FRAME,K.HR,K.IMG,K.INPUT,K.KEYGEN,K.LINK,K.META,K.PARAM,K.SOURCE,K.TRACK,K.WBR;const OR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,PR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),_y={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function xy(e,t){const n=zR(e),r=LE("type",{handlers:{root:IR,element:RR,text:LR,comment:Sy,doctype:DR,raw:FR},unknown:BR}),o={parser:n?new ry(_y):ry.getFragmentParser(void 0,_y),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Ho(o,mr());const a=n?o.parser.document:o.parser.getFragment(),u=IO(a,{file:o.options.file});return o.stitches&&ll(u,"comment",function(c,d,h){const p=c;if(p.value.stitch&&h&&d!==void 0){const g=h.children;return g[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function wy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function IR(e,t){wy(e.children,t)}function RR(e,t){UR(e,t),wy(e.children,t),HR(e,t)}function LR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qe.CHARACTER,chars:e.value,location:ga(e)};Ho(t,mr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function DR(e,t){const n={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ga(e)};Ho(t,mr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function MR(e,t){t.stitches=!0;const n=jR(e);if("children"in e&&"children"in n){const r=xy({type:"root",children:e.children},t.options);n.children=r.children}Sy({type:"comment",value:{stitch:n}},t)}function Sy(e,t){const n=e.value,r={type:qe.COMMENT,data:n,location:ga(e)};Ho(t,mr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function FR(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,vy(t,mr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(OR,"<$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 BR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))MR(n,t);else{let r="";throw PR.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 Ho(e,t){vy(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=St.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 vy(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 UR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===St.PLAINTEXT)return;Ho(t,mr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:zi.html;o===zi.html&&n==="svg"&&(o=zi.svg);const a=WO(ie(B({},e),{children:[]}),{space:o===zi.svg?"svg":"html"}),u={type:qe.START_TAG,tagName:n,tagID:Bo(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ga(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function HR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&tP.includes(n)||t.parser.tokenizer.state===St.PLAINTEXT)return;Ho(t,Ju(e));const r={type:qe.END_TAG,tagName:n,tagID:Bo(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ga(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===St.RCDATA||t.parser.tokenizer.state===St.RAWTEXT||t.parser.tokenizer.state===St.SCRIPT_DATA)&&(t.parser.tokenizer.state=St.DATA)}function zR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ga(e){const t=mr(e)||{line:void 0,column:void 0,offset:void 0},n=Ju(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 jR(e){return"children"in e?Hi(ie(B({},e),{children:[]})):Hi(e)}function Ay(e){return function(t,n){return xy(t,ie(B({},e),{file:n}))}}const qi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Cy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...qi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...qi],h2:[["className","sr-only"]],img:[...qi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...qi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...qi],table:[...qi],ul:[...qi,["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"]},ni={}.hasOwnProperty;function $R(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},Cy),t):Cy,stack:[]},o=ky(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function ky(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return VR(e,n);case"doctype":return qR(e,n);case"element":return YR(e,n);case"root":return WR(e,n);case"text":return GR(e,n)}}}function VR(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 Ea(a,t),a}}function qR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ea(n,t),n}}function YR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Ny(e,t.children),o=XR(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&&ni.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Ea(u,t),u}function WR(e,t){const r={type:"root",children:Ny(e,t.children)};return Ea(r,t),r}function GR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ea(r,t),r}function Ny(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=ky(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function XR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&ni.call(r,n)?r[n]:void 0,u=r&&ni.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(ni.call(c,h)){const p=c[h];let g=Oy(e,Iy(a,h),h,p);g==null&&(g=Oy(e,Iy(u,h),h,p)),g!=null&&(d[h]=g)}if(o&&ni.call(o,n)){const p=o[n];for(h in p)ni.call(p,h)&&!ni.call(d,h)&&(d[h]=p[h])}return d}function Oy(e,t,n,r){return t?Array.isArray(r)?KR(e,t,n,r):Py(e,t,n,r):void 0}function KR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Py(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Py(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&QR(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function QR(e,t,n){const r=e.schema.protocols&&ni.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let h=-1;for(;++h<r.length;){const p=r[h];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function Ea(e,t){const n=h1(t);t.data&&(e.data=Hi(t.data)),n&&(e.position=n)}function Iy(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function JR(e){return function(t){return $R(t,e)}}const Ry=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return _.jsx("a",ie(B(B({className:z(e,`${L}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},ZR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ot();return!e&&!t?null:_.jsx("div",{className:z(n,`${L}-disclaimer`),children:t?_.jsx(pE,{rehypePlugins:[Ay,JR],components:{ul:({children:r})=>_.jsx("ul",{className:z(n,`${L}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:z(n,`${L}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:z(n,`${L}-li`),children:r}),a:({href:r,title:o,children:a})=>_.jsx(Ry,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>_.jsx("img",{className:z(n,`${L}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>_.jsx("p",{className:z(n,`${L}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:z(n,`${L}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:z(n,`${L}-disclaimer-text`),children:e})})},ah=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:o,sessionExpired:a}=Mn(),{globalClassName:u,searchConfig:c}=ot(),d=Y.useRef(null),h=t||!o&&!a,p=b=>{var x;b.preventDefault();const y=(((x=d.current)==null?void 0:x.value)||"").trim();y&&(d.current.value="",r(y))},g=()=>{r("Can you connect me to a human?")};return _.jsxs("div",{className:z(u,e,`cim-${n}-component`,`${L}-search-bar-wrapper`),children:[_.jsxs("form",{className:z(u,e,`cim-${n}-component`,`${L}-search-bar`),name:`${L}-search-form`,onSubmit:p,children:[_.jsx("input",{className:z(u,e,`cim-${n}-component`,`${L}-search-input`),type:"text",ref:d,placeholder:(c==null?void 0:c.placeholder)||"Ask us anything",name:`${L}-user-input`,disabled:h}),_.jsx(_C,{className:e,globalClassName:u,searchConfig:c,componentType:n,isLoading:h}),_.jsx(Jn,{className:z(u,`${L}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:h,onClick:g,icon:_.jsx(lC,{})})]}),_.jsx(ZR,{})]})};function e6(e){return it({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 t6(e){return it({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 Ly=Y.createContext({isOpen:!1}),uh=Y.createContext(null),Dy=Y.createContext(null),zo=()=>{var n,r;const e=Y.useContext(uh),t=Y.useContext(Dy);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},My=({onClearChat:e,componentType:t})=>{const n=zo(),r=()=>{e(),n()};return _.jsxs("button",{className:z(`${L}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(t6,{}),"Clear chat"]})},Fy=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=ot(),r=zo(),[o,a]=Y.useState(!1),u=()=>ze(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return _.jsxs("button",{className:z(`${L}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:o,children:[_.jsx(e6,{}),"Download transcript"]})};function n6(e){return e==null?[]:Array.isArray(e)?e:[e]}var r6=(e,...t)=>e.concat(t),i6=(e,...t)=>e.filter(n=>!t.includes(n)),o6=e=>Array.from(new Set(e));function By(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function s6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return By(e,t,{step:-r,loop:o})}var a6=e=>Array.isArray(e),Uy=e=>e!=null&&typeof e=="object",u6=e=>Uy(e)&&!a6(e),_l=e=>typeof e=="string",jo=e=>typeof e=="function",l6=e=>e==null,c6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d6=e=>Object.prototype.toString.call(e),Hy=Function.prototype.toString,f6=Hy.call(Object),h6=e=>{if(!Uy(e)||d6(e)!="[object Object]"||g6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=c6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Hy.call(n)==f6},p6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,m6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,g6=e=>p6(e)||m6(e),E6=e=>e(),y6=()=>{},lh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function T6(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:b6,max:_6}=Math,x6=e=>Number.isNaN(e),w6=e=>x6(e)?0:e,zy=(e,t,n)=>b6(_6(w6(e),t),n);function ch(e){if(!h6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=ch(o))}return n}function dh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function S6(e,t){if(e==null)throw new Error(t())}function v6(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var A6=Object.defineProperty,C6=(e,t,n)=>t in e?A6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fh=(e,t,n)=>C6(e,typeof t!="symbol"?t+"":t,n),jy=()=>{},xl=e=>typeof e=="object"&&e!==null,$o=e=>e?"":void 0,$y=e=>e?"true":void 0,k6=1,N6=9,O6=11,Bt=e=>xl(e)&&e.nodeType===k6&&typeof e.nodeName=="string",wl=e=>xl(e)&&e.nodeType===N6,P6=e=>xl(e)&&e===e.window,Vy=e=>Bt(e)?e.localName||"":"#document";function I6(e){return["html","body","#document"].includes(Vy(e))}var R6=e=>xl(e)&&e.nodeType!==void 0,Yi=e=>R6(e)&&e.nodeType===O6&&"host"in e,L6=e=>Bt(e)&&e.localName==="input",D6=e=>Bt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ya(e){if(!e)return!1;const t=e.getRootNode();return Yo(t)===e}var M6=/(textarea|select)/;function F6(e){if(e==null||!Bt(e))return!1;try{return L6(e)&&e.selectionStart!=null||M6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Vo(e,t){var r;if(!e||!t||!Bt(e)||!Bt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Yi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function yr(e){var t;return wl(e)?e:P6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function B6(e){return yr(e).documentElement}function qo(e){var t,n,r;return Yi(e)?qo(e.host):wl(e)?(t=e.defaultView)!=null?t:window:Bt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Yo(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 U6(e){if(Vy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yi(e)&&e.host||B6(e);return Yi(t)?t.host:t}function hh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),wl(t)||Yi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var ph=new WeakMap;function Wo(e){return ph.has(e)||ph.set(e,qo(e).getComputedStyle(e)),ph.get(e)}var mh=new Set(["menu","listbox","dialog","grid","tree","region"]),H6=e=>mh.has(e),qy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Yy(e,t){const n=new Set,r=hh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=qy(c);for(const h of d){if(!h||n.has(h))continue;n.add(h);const p=r.getElementById(h);if(p){const g=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(g&&H6(g)&&!b&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Wy(e,t){const n=hh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=qy(c);for(const h of d){if(!h||r.has(h))continue;r.add(h);const p=n.getElementById(h);if(p){const g=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";g&&mh.has(g)&&!b&&(t(p),o(p))}}}};o(e)}function z6(e){const t=new Set;return Wy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function j6(e){const t=e.getAttribute("role");return!!(t&&mh.has(t))}function $6(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function V6(e){var t;return $6(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function q6(e){if(!e.id)return!1;const t=hh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&j6(e))}var gh=()=>typeof document!="undefined";function Y6(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Eh=e=>gh()&&e.test(Y6()),W6=e=>gh()&&e.test(navigator.vendor),Gy=()=>gh()&&!!navigator.maxTouchPoints,G6=()=>Eh(/^iPhone/i),X6=()=>Eh(/^iPad/i)||yh()&&navigator.maxTouchPoints>1,Sl=()=>G6()||X6(),K6=()=>yh()||Sl(),yh=()=>Eh(/^Mac/i),Q6=()=>K6()&&W6(/apple/i);function J6(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function tr(e){var n;const t=J6(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Xy=e=>e.button===0,Z6=e=>e.button===2||yh()&&e.ctrlKey&&e.button===0,e4=e=>"touches"in e&&e.touches.length>0,t4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Ky={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function n4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=t4[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in Ky&&(o=Ky[o]),o}function Qy(e,t="client"){const n=e4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Ut=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},Jy=e=>Bt(e)&&e.tagName==="IFRAME",r4=/^(audio|video|details)$/;function Zy(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var i4=e=>!Number.isNaN(Zy(e)),o4=e=>Zy(e)<0;function s4(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 eT(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,h)=>u.set(d,h));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const h=s4(d,t);if(h){const p=Array.from(h.querySelectorAll(vl)).filter(n),g=u.get(d);if(g!==void 0){const b=g+1;r.splice(b,0,...p),p.forEach((y,x)=>{u.set(y,b+x)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,x)=>{u.set(y,b+x)})}o.push(...p)}}return r}var vl="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",tT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(vl));(n==!0||n=="if-empty"&&o.length===0)&&Bt(e)&&Tr(e)&&o.unshift(e);const u=[];for(const c of o)if(Tr(c)){if(Jy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...tT(d,{getShadowRoot:r}));continue}u.push(c)}return r?eT(u,r,Tr):u};function Tr(e){return!Bt(e)||e.closest("[inert]")?!1:e.matches(vl)&&D6(e)}function Go(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(vl));n&&Wi(e)&&o.unshift(e);const a=[];for(const u of o)if(Wi(u)){if(Jy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Go(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=eT(a,r,Wi);return!u.length&&n?o:u}return!a.length&&n?o:a}function Wi(e){return Bt(e)&&e.tabIndex>0?!0:Tr(e)&&!o4(e)}function a4(e,t={}){const n=Go(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function u4(e,t={}){const{current:n,getShadowRoot:r}=t,o=Go(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Yo(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Ta(e){return e.tabIndex<0&&(r4.test(e.localName)||F6(e))&&!i4(e)?0:e.tabIndex}function nT(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)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=Go(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var l4=class a2{constructor(){fh(this,"id",null),fh(this,"fn_cleanup"),fh(this,"cleanup",()=>{this.cancel()})}static create(){return new a2}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function Pt(e){const t=l4.create();return t.request(e),t.cleanup}function rT(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function Th(e){const t=U6(e);return I6(t)?yr(t).body:Bt(t)&&f4(t)?t:Th(t)}var c4=/auto|scroll|overlay|hidden|clip/,d4=new Set(["inline","contents"]);function f4(e){const t=qo(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return c4.test(n+o+r)&&!d4.has(a)}var Xo="default",bh="",Al=new WeakMap;function h4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Sl()?(Xo==="default"&&(bh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Xo="disabled"):t&&(Al.set(t,t.style.userSelect),t.style.userSelect="none"),()=>p4({target:t,doc:r})}function p4(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Sl()){if(Xo!=="disabled")return;Xo="restoring",setTimeout(()=>{rT(()=>{Xo==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=bh||""),bh="",Xo="default")})},300)}else if(t&&Al.has(t)){const a=Al.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Al.delete(t)}}function m4(e={}){const u=e,{defer:t,target:n}=u,r=an(u,["defer","target"]),o=t?Pt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(h4(ie(B({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function g4(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=Qy(c),h=Math.sqrt(Eu(d.x,2)+Eu(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(h<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=Qy(c);r({point:d,event:c})},u=[Ut(e,"pointermove",o,!1),Ut(e,"pointerup",a,!1),Ut(e,"pointercancel",a,!1),Ut(e,"contextmenu",a,!1),m4({doc:e})];return()=>{u.forEach(c=>c())}}function E4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(h){if(h.key!=="Tab")return;let p=null;const[g,b]=a4(e,{includeContainer:!0,getShadowRoot:a}),y=u4(c,{current:n,getShadowRoot:a}),x=!g&&!b;h.shiftKey&&ya(y)?(o==null||o(),p=b):h.shiftKey&&(ya(g)||x)?p=n:!h.shiftKey&&ya(n)?(o==null||o(),p=g):!h.shiftKey&&(ya(b)||x)&&(p=y),p&&(h.preventDefault(),typeof r=="function"?r(p):p.focus())}return Ut(u,"keydown",d,!0)}function y4(e,t){const c=t,{defer:n,triggerElement:r}=c,o=an(c,["defer","triggerElement"]),a=n?Pt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(E4(d,B({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function T4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Cl(e,t){if(!e)return jy;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function b4(e,t,n){if(!e)return jy;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function _4(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(h=>{r.aborted||(clearTimeout(d),u(h))}).catch(h=>{r.aborted||(clearTimeout(d),c(h))})}),()=>t.abort()]}function x4(e,t){const{timeout:n,rootNode:r}=t,o=qo(r),a=yr(r),u=new o.AbortController;return _4(new Promise(c=>{const d=e();if(d){c(d);return}const h=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(h.disconnect(),c(p))});h.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var w4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),S4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,iT=e=>{const t={};let n;for(;n=S4.exec(e);)t[n[1]]=n[2];return t},v4=(e,t)=>{if(_l(e)){if(_l(t))return`${e};${t}`;e=iT(e)}else _l(t)&&(t=iT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function It(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=lh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=w4(t[o],n[o]);continue}if(o==="style"){t[o]=v4(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function T7(e){return e}var Ko=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ko||{}),_h="__init__";function A4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>yr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Yo(t()),a=u=>t().getElementById(u);return ie(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:ya,getById:a})}function C4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Qo=()=>e=>Array.from(new Set(e)),oT=typeof globalThis.document!="undefined"?Y.useLayoutEffect:Y.useEffect;function kl(e){var g,b;const t=(g=e().value)!=null?g:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=Y.useState(t),[o,a]=Y.useState(r),u=e().value!==void 0,c=Y.useRef(o);c.current=u?e().value:o;const d=Y.useRef(c.current);oT(()=>{d.current=c.current},[o,e().value]);const h=y=>{var A,C;const x=d.current,v=jo(y)?y(x):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:x}),u||a(v),n(v,x)||(C=(A=e()).onChange)==null||C.call(A,v,x)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Ao.flushSync:E6)(()=>h(y))},invoke(y,x){var v,A;(A=(v=e()).onChange)==null||A.call(v,y,x)},hash(y){var x,v,A;return(A=(v=(x=e()).hash)==null?void 0:v.call(x,y))!=null?A:String(y)}}}kl.cleanup=e=>{Y.useEffect(()=>e,[])},kl.ref=e=>{const t=Y.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function k4(e){const t=Y.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var N4=(e,t)=>{const n=Y.useRef(!1),r=Y.useRef(!1);Y.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),Y.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Nl(e,t={}){var ne,ae,de,oe,be,Ce;const n=Y.useMemo(()=>{const{id:se,ids:j,getRootNode:J}=t;return A4({id:se,ids:j,getRootNode:J})},[t]),r=(...se)=>{e.debug&&console.log(...se)},o=(ae=(ne=e.props)==null?void 0:ne.call(e,{props:ch(t),scope:n}))!=null?ae:t,a=O4(o),u=(de=e.context)==null?void 0:de.call(e,{prop:a,bindable:kl,scope:n,flush:aT,getContext(){return d},getComputed(){return W},getRefs(){return v},getEvent(){return y()}}),c=sT(u),d={get(se){var j;return(j=c.current)==null?void 0:j[se].ref.current},set(se,j){var J;(J=c.current)==null||J[se].set(j)},initial(se){var j;return(j=c.current)==null?void 0:j[se].initial},hash(se){var J,w;const j=(J=c.current)==null?void 0:J[se].get();return(w=c.current)==null?void 0:w[se].hash(j)}},h=Y.useRef(new Map),p=Y.useRef(null),g=Y.useRef(null),b=Y.useRef({type:""}),y=()=>ie(B({},b.current),{current(){return b.current},previous(){return g.current}}),x=()=>ie(B({},F),{matches(...se){return se.includes(F.ref.current)},hasTag(se){var j,J;return!!((J=(j=e.states[F.ref.current])==null?void 0:j.tags)!=null&&J.includes(se))}}),v=k4((be=(oe=e.refs)==null?void 0:oe.call(e,{prop:a,context:d}))!=null?be:{}),A=()=>({state:x(),context:d,event:y(),prop:a,send:U,action:C,guard:k,track:N4,refs:v,computed:W,flush:aT,scope:n,choose:$}),C=se=>{const j=jo(se)?se(A()):se;if(!j)return;const J=j.map(w=>{var q,O;const N=(O=(q=e.implementations)==null?void 0:q.actions)==null?void 0:O[w];return N||dh(`[zag-js] No implementation found for action "${JSON.stringify(w)}"`),N});for(const w of J)w==null||w(A())},k=se=>{var j,J;return jo(se)?se(A()):(J=(j=e.implementations)==null?void 0:j.guards)==null?void 0:J[se](A())},I=se=>{const j=jo(se)?se(A()):se;if(!j)return;const J=j.map(N=>{var O,ye;const q=(ye=(O=e.implementations)==null?void 0:O.effects)==null?void 0:ye[N];return q||dh(`[zag-js] No implementation found for effect "${JSON.stringify(N)}"`),q}),w=[];for(const N of J){const q=N==null?void 0:N(A());q&&w.push(q)}return()=>w.forEach(N=>N==null?void 0:N())},$=se=>n6(se).find(j=>{let J=!j.guard;return _l(j.guard)?J=!!k(j.guard):jo(j.guard)&&(J=j.guard(A())),J}),W=se=>{S6(e.computed,()=>"[zag-js] No computed object found on machine");const j=e.computed[se];return j({context:d,event:y(),prop:a,refs:v,scope:n,computed:W})},F=kl(()=>({defaultValue:e.initialState({prop:a}),onChange(se,j){var w,N,q,O;if(j){const ye=h.current.get(j);ye==null||ye(),h.current.delete(j)}j&&C((w=e.states[j])==null?void 0:w.exit),C((N=p.current)==null?void 0:N.actions);const J=I((q=e.states[se])==null?void 0:q.effects);if(J&&h.current.set(se,J),j===_h){C(e.entry);const ye=I(e.effects);ye&&h.current.set(_h,ye)}C((O=e.states[se])==null?void 0:O.entry)}})),ee=Y.useRef(void 0),ce=Y.useRef(Ko.NotStarted);oT(()=>{queueMicrotask(()=>{var N;const J=ce.current===Ko.Started;ce.current=Ko.Started,r(J?"rehydrating...":"initializing...");const w=(N=ee.current)!=null?N:F.initial;F.invoke(w,J?F.get():_h)});const se=h.current,j=F.ref.current;return()=>{r("unmounting..."),ee.current=j,ce.current=Ko.Stopped,se.forEach(J=>J==null?void 0:J()),h.current=new Map,p.current=null,queueMicrotask(()=>{C(e.exit)})}},[]);const pe=()=>"ref"in F?F.ref.current:F.get(),U=se=>{queueMicrotask(()=>{var O,ye,ke,Ie,He;if(ce.current!==Ko.Started)return;g.current=b.current,b.current=se;let j=pe();const J=(ke=(O=e.states[j].on)==null?void 0:O[se.type])!=null?ke:(ye=e.on)==null?void 0:ye[se.type],w=$(J);if(!w)return;p.current=w;const N=(Ie=w.target)!=null?Ie:j;r("transition",se.type,w.target||j,`(${w.actions})`);const q=N!==j;q?Ao.flushSync(()=>F.set(N)):w.reenter&&!q?F.invoke(j,j):C((He=w.actions)!=null?He:[])})};return(Ce=e.watch)==null||Ce.call(e,A()),{state:x(),send:U,context:d,prop:a,scope:n,refs:v,computed:W,event:y(),getStatus:()=>ce.current}}function sT(e){const t=Y.useRef(e);return t.current=e,t}function O4(e){const t=sT(e);return function(r){return t.current[r]}}function aT(e){queueMicrotask(()=>{Ao.flushSync(()=>e())})}var xh=C4(e=>e);function Ol(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function P4(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const wh=e=>{const t=Y.memo(Y.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=an(h,["asChild","children"]);if(!o)return Y.createElement(e,ie(B({},u),{ref:r}),a);if(!Y.isValidElement(a))return null;const c=Y.Children.only(a),d=P4(c);return Y.cloneElement(c,ie(B({},It(u,c.props)),{ref:r?Ol(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Qt=(()=>{const e=new Map;return new Proxy(wh,{apply(t,n,r){return wh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,wh(r)),e.get(r)}})})();function I4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Gi(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=Y.createContext(u);c.displayName=t;function d(){var p;const h=Y.useContext(c);if(!h&&n){const g=new Error(a!=null?a:I4(r,o));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return h}return[c.Provider,d,c]}const[R4,Sh]=Gi({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[uT,ba]=Gi({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),lT=Y.forwardRef((e,t)=>{const n=Sh(),r=ba(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Qt.div,ie(B({},o),{ref:Ol(r.ref,t)}))});lT.displayName="PopoverContent";const cT=Y.forwardRef((e,t)=>{const n=Sh(),r=ba(),o=It(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(Qt.div,ie(B({},o),{ref:t}))});cT.displayName="PopoverPositioner";const _a=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},B({},e)]),dT=e=>_a()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function L4(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var D4={props({props:e}){return ie(B({},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",Wo(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Pt(()=>{var c,d;const u=Pl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Pt(()=>{e.set("prevAnimationName",Pl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,g,b;((b=(g=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:g[0])!=null?b:d.target)===o&&e.set("prevAnimationName",Pl(t.get("styles")))},u=d=>{const h=Pl(t.get("styles"));tr(d)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=Cl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),rT(()=>c())}}}}};function Pl(e){return(e==null?void 0:e.animationName)||"none"}Qo()(["onExitComplete","present","immediate"]);function M4(e,t={}){const{sync:n=!1}=t,r=F4(e);return Y.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function F4(e){const t=Y.useRef(e);return t.current=e,t}const vh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,a=an(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=Y.useRef(!1),c=ie(B({},a),{present:r,onExitComplete:M4(e.onExitComplete)}),d=Nl(D4,c),h=L4(d);h.present&&(u.current=!0);const p=!h.present&&!u.current&&t||n&&!h.present&&u.current,g=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:g,present:h.present,unmounted:p}};var Xi=(e,t=[])=>({parts:(...n)=>{if(B4(t))return Xi(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Xi(e,[...t,...n]),omit:(...n)=>Xi(e,t.filter(r=>!n.includes(r))),rename:n=>Xi(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Jo(e)}"][data-part="${Jo(r)}"]`,`& [data-scope="${Jo(e)}"][data-part="${Jo(r)}"]`].join(", "),attrs:{"data-scope":Jo(e),"data-part":Jo(r)}}}),{})}),Jo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),B4=e=>e.length===0;const U4=["top","right","bottom","left"],ri=Math.min,Cn=Math.max,Il=Math.round,Rl=Math.floor,br=e=>({x:e,y:e}),H4={left:"right",right:"left",bottom:"top",top:"bottom"},z4={start:"end",end:"start"};function Ah(e,t,n){return Cn(e,ri(t,n))}function Dr(e,t){return typeof e=="function"?e(t):e}function Mr(e){return e.split("-")[0]}function Zo(e){return e.split("-")[1]}function Ch(e){return e==="x"?"y":"x"}function kh(e){return e==="y"?"height":"width"}const j4=new Set(["top","bottom"]);function _r(e){return j4.has(Mr(e))?"y":"x"}function Nh(e){return Ch(_r(e))}function $4(e,t,n){n===void 0&&(n=!1);const r=Zo(e),o=Nh(e),a=kh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Ll(u)),[u,Ll(u)]}function V4(e){const t=Ll(e);return[Oh(e),t,Oh(t)]}function Oh(e){return e.replace(/start|end/g,t=>z4[t])}const fT=["left","right"],hT=["right","left"],q4=["top","bottom"],Y4=["bottom","top"];function W4(e,t,n){switch(e){case"top":case"bottom":return n?t?hT:fT:t?fT:hT;case"left":case"right":return t?q4:Y4;default:return[]}}function G4(e,t,n,r){const o=Zo(e);let a=W4(Mr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Oh)))),a}function Ll(e){return e.replace(/left|right|bottom|top/g,t=>H4[t])}function X4(e){return B({top:0,right:0,bottom:0,left:0},e)}function pT(e){return typeof e!="number"?X4(e):{top:e,right:e,bottom:e,left:e}}function Dl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function mT(e,t,n){let{reference:r,floating:o}=e;const a=_r(t),u=Nh(t),c=kh(u),d=Mr(t),h=a==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,b=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-o.width,y:g};break;default:y={x:r.x,y:r.y}}switch(Zo(t)){case"start":y[u]-=b*(n&&h?-1:1);break;case"end":y[u]+=b*(n&&h?-1:1);break}return y}const K4=(e,t,n)=>ze(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let h=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:g}=mT(h,r,d),b=r,y={},x=0;for(let v=0;v<c.length;v++){const{name:A,fn:C}=c[v],{x:k,y:I,data:$,reset:W}=yield C({x:p,y:g,initialPlacement:r,placement:b,strategy:o,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});p=k!=null?k:p,g=I!=null?I:g,y=ie(B({},y),{[A]:B(B({},y[A]),$)}),W&&x<=50&&(x++,typeof W=="object"&&(W.placement&&(b=W.placement),W.rects&&(h=W.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):W.rects),{x:p,y:g}=mT(h,b,d)),v=-1)}return{x:p,y:g,placement:b,strategy:o,middlewareData:y}});function xa(e,t){return ze(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:b=!1,padding:y=0}=Dr(t,e),x=pT(y),A=c[b?g==="floating"?"reference":"floating":g],C=Dl(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(c.floating)),boundary:h,rootBoundary:p,strategy:d})),k=g==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,I=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),$=(yield a.isElement==null?void 0:a.isElement(I))?(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1}:{x:1,y:1},W=Dl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:I,strategy:d}):k);return{top:(C.top-W.top+x.top)/$.y,bottom:(W.bottom-C.bottom+x.bottom)/$.y,left:(C.left-W.left+x.left)/$.x,right:(W.right-C.right+x.right)/$.x}})}const Q4=e=>({name:"arrow",options:e,fn(n){return ze(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:p,padding:g=0}=Dr(e,n)||{};if(p==null)return{};const b=pT(g),y={x:r,y:o},x=Nh(a),v=kh(x),A=yield c.getDimensions(p),C=x==="y",k=C?"top":"left",I=C?"bottom":"right",$=C?"clientHeight":"clientWidth",W=u.reference[v]+u.reference[x]-y[x]-u.floating[v],F=y[x]-u.reference[x],ee=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ce=ee?ee[$]:0;(!ce||!(yield c.isElement==null?void 0:c.isElement(ee)))&&(ce=d.floating[$]||u.floating[v]);const pe=W/2-F/2,U=ce/2-A[v]/2-1,ne=ri(b[k],U),ae=ri(b[I],U),de=ne,oe=ce-A[v]-ae,be=ce/2-A[v]/2+pe,Ce=Ah(de,be,oe),se=!h.arrow&&Zo(a)!=null&&be!==Ce&&u.reference[v]/2-(be<de?ne:ae)-A[v]/2<0,j=se?be<de?be-de:be-oe:0;return{[x]:y[x]+j,data:B({[x]:Ce,centerOffset:be-Ce-j},se&&{alignmentOffset:j}),reset:se}})}}),J4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return ze(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:p}=n,be=Dr(e,n),{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:A=!0}=be,C=an(be,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=Mr(a),I=_r(d),$=Mr(d)===d,W=yield h.isRTL==null?void 0:h.isRTL(p.floating),F=y||($||!A?[Ll(d)]:V4(d)),ee=v!=="none";!y&&ee&&F.push(...G4(d,A,v,W));const ce=[d,...F],pe=yield xa(n,C),U=[];let ne=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&U.push(pe[k]),b){const Ce=$4(a,c,W);U.push(pe[Ce[0]],pe[Ce[1]])}if(ne=[...ne,{placement:a,overflows:U}],!U.every(Ce=>Ce<=0)){var ae,de;const Ce=(((ae=u.flip)==null?void 0:ae.index)||0)+1,se=ce[Ce];if(se&&(!(b==="alignment"?I!==_r(se):!1)||ne.every(w=>_r(w.placement)===I?w.overflows[0]>0:!0)))return{data:{index:Ce,overflows:ne},reset:{placement:se}};let j=(de=ne.filter(J=>J.overflows[0]<=0).sort((J,w)=>J.overflows[1]-w.overflows[1])[0])==null?void 0:de.placement;if(!j)switch(x){case"bestFit":{var oe;const J=(oe=ne.filter(w=>{if(ee){const N=_r(w.placement);return N===I||N==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(N=>N>0).reduce((N,q)=>N+q,0)]).sort((w,N)=>w[1]-N[1])[0])==null?void 0:oe[0];J&&(j=J);break}case"initialPlacement":j=d;break}if(a!==j)return{reset:{placement:j}}}return{}})}}};function gT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ET(e){return U4.some(t=>e[t]>=0)}const Z4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return ze(this,null,function*(){const{rects:r}=n,u=Dr(e,n),{strategy:o="referenceHidden"}=u,a=an(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield xa(n,ie(B({},a),{elementContext:"reference"})),d=gT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:ET(d)}}}case"escaped":{const c=yield xa(n,ie(B({},a),{altBoundary:!0})),d=gT(c,r.floating);return{data:{escapedOffsets:d,escaped:ET(d)}}}default:return{}}})}}},yT=new Set(["left","top"]);function eL(e,t){return ze(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Mr(n),c=Zo(n),d=_r(n)==="y",h=yT.has(u)?-1:1,p=a&&d?-1:1,g=Dr(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof x=="number"&&(y=c==="end"?x*-1:x),d?{x:y*p,y:b*h}:{x:b*h,y:y*p}})}const tL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return ze(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield eL(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+h.x,y:u+h.y,data:ie(B({},h),{placement:c})}})}}},nL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return ze(this,null,function*(){const{x:r,y:o,placement:a}=n,C=Dr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:k=>{let{x:I,y:$}=k;return{x:I,y:$}}}}=C,h=an(C,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},g=yield xa(n,h),b=_r(Mr(a)),y=Ch(b);let x=p[y],v=p[b];if(u){const k=y==="y"?"top":"left",I=y==="y"?"bottom":"right",$=x+g[k],W=x-g[I];x=Ah($,x,W)}if(c){const k=b==="y"?"top":"left",I=b==="y"?"bottom":"right",$=v+g[k],W=v-g[I];v=Ah($,v,W)}const A=d.fn(ie(B({},n),{[y]:x,[b]:v}));return ie(B({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[y]:u,[b]:c}}})})}}},rL=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=Dr(e,t),p={x:n,y:r},g=_r(o),b=Ch(g);let y=p[b],x=p[g];const v=Dr(c,t),A=typeof v=="number"?{mainAxis:v,crossAxis:0}:B({mainAxis:0,crossAxis:0},v);if(d){const I=b==="y"?"height":"width",$=a.reference[b]-a.floating[I]+A.mainAxis,W=a.reference[b]+a.reference[I]-A.mainAxis;y<$?y=$:y>W&&(y=W)}if(h){var C,k;const I=b==="y"?"width":"height",$=yT.has(Mr(o)),W=a.reference[g]-a.floating[I]+($&&((C=u.offset)==null?void 0:C[g])||0)+($?0:A.crossAxis),F=a.reference[g]+a.reference[I]+($?0:((k=u.offset)==null?void 0:k[g])||0)-($?A.crossAxis:0);x<W?x=W:x>F&&(x=F)}return{[b]:y,[g]:x}}}},iL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return ze(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,ne=Dr(e,n),{apply:h=()=>{}}=ne,p=an(ne,["apply"]),g=yield xa(n,p),b=Mr(a),y=Zo(a),x=_r(a)==="y",{width:v,height:A}=u.floating;let C,k;b==="top"||b==="bottom"?(C=b,k=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(k=b,C=y==="end"?"top":"bottom");const I=A-g.top-g.bottom,$=v-g.left-g.right,W=ri(A-g[C],I),F=ri(v-g[k],$),ee=!n.middlewareData.shift;let ce=W,pe=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(pe=$),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ce=I),ee&&!y){const ae=Cn(g.left,0),de=Cn(g.right,0),oe=Cn(g.top,0),be=Cn(g.bottom,0);x?pe=v-2*(ae!==0||de!==0?ae+de:Cn(g.left,g.right)):ce=A-2*(oe!==0||be!==0?oe+be:Cn(g.top,g.bottom))}yield h(ie(B({},n),{availableWidth:pe,availableHeight:ce}));const U=yield c.getDimensions(d.floating);return v!==U.width||A!==U.height?{reset:{rects:!0}}:{}})}}};function Ml(){return typeof window!="undefined"}function es(e){return TT(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xr(e){var t;return(t=(TT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function TT(e){return Ml()?e instanceof Node||e instanceof kn(e).Node:!1}function nr(e){return Ml()?e instanceof Element||e instanceof kn(e).Element:!1}function wr(e){return Ml()?e instanceof HTMLElement||e instanceof kn(e).HTMLElement:!1}function bT(e){return!Ml()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}const oL=new Set(["inline","contents"]);function wa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!oL.has(o)}const sL=new Set(["table","td","th"]);function aL(e){return sL.has(es(e))}const uL=[":popover-open",":modal"];function Fl(e){return uL.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const lL=["transform","translate","scale","rotate","perspective"],cL=["transform","translate","scale","rotate","perspective","filter"],dL=["paint","layout","strict","content"];function Ph(e){const t=Ih(),n=nr(e)?rr(e):e;return lL.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||cL.some(r=>(n.willChange||"").includes(r))||dL.some(r=>(n.contain||"").includes(r))}function fL(e){let t=ii(e);for(;wr(t)&&!ts(t);){if(Ph(t))return t;if(Fl(t))return null;t=ii(t)}return null}function Ih(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const hL=new Set(["html","body","#document"]);function ts(e){return hL.has(es(e))}function rr(e){return kn(e).getComputedStyle(e)}function Bl(e){return nr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ii(e){if(es(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bT(e)&&e.host||xr(e);return bT(t)?t.host:t}function _T(e){const t=ii(e);return ts(t)?e.ownerDocument?e.ownerDocument.body:e.body:wr(t)&&wa(t)?t:_T(t)}function Sa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=_T(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=kn(o);if(a){const c=Rh(u);return t.concat(u,u.visualViewport||[],wa(o)?o:[],c&&n?Sa(c):[])}return t.concat(o,Sa(o,[],n))}function Rh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xT(e){const t=rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=Il(n)!==a||Il(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Lh(e){return nr(e)?e:e.contextElement}function ns(e){const t=Lh(e);if(!wr(t))return br(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=xT(t);let u=(a?Il(n.width):n.width)/r,c=(a?Il(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const pL=br(0);function wT(e){const t=kn(e);return!Ih()||!t.visualViewport?pL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function Ki(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Lh(e);let u=br(1);t&&(r?nr(r)&&(u=ns(r)):u=ns(e));const c=mL(a,n,r)?wT(a):br(0);let d=(o.left+c.x)/u.x,h=(o.top+c.y)/u.y,p=o.width/u.x,g=o.height/u.y;if(a){const b=kn(a),y=r&&nr(r)?kn(r):r;let x=b,v=Rh(x);for(;v&&r&&y!==x;){const A=ns(v),C=v.getBoundingClientRect(),k=rr(v),I=C.left+(v.clientLeft+parseFloat(k.paddingLeft))*A.x,$=C.top+(v.clientTop+parseFloat(k.paddingTop))*A.y;d*=A.x,h*=A.y,p*=A.x,g*=A.y,d+=I,h+=$,x=kn(v),v=Rh(x)}}return Dl({width:p,height:g,x:d,y:h})}function Ul(e,t){const n=Bl(e).scrollLeft;return t?t.left+n:Ki(xr(e)).left+n}function ST(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ul(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function gL(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=xr(r),c=t?Fl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=br(1);const p=br(0),g=wr(r);if((g||!g&&!a)&&((es(r)!=="body"||wa(u))&&(d=Bl(r)),wr(r))){const y=Ki(r);h=ns(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!g&&!a?ST(u,d):br(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+b.x,y:n.y*h.y-d.scrollTop*h.y+p.y+b.y}}function EL(e){return Array.from(e.getClientRects())}function yL(e){const t=xr(e),n=Bl(e),r=e.ownerDocument.body,o=Cn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Cn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Ul(e);const c=-n.scrollTop;return rr(r).direction==="rtl"&&(u+=Cn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const vT=25;function TL(e,t){const n=kn(e),r=xr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=Ih();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const h=Ul(r);if(h<=0){const p=r.ownerDocument,g=p.body,b=getComputedStyle(g),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,x=Math.abs(r.clientWidth-g.clientWidth-y);x<=vT&&(a-=x)}else h<=vT&&(a+=h);return{width:a,height:u,x:c,y:d}}const bL=new Set(["absolute","fixed"]);function _L(e,t){const n=Ki(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=wr(e)?ns(e):br(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,h=r*a.y;return{width:u,height:c,x:d,y:h}}function AT(e,t,n){let r;if(t==="viewport")r=TL(e,n);else if(t==="document")r=yL(xr(e));else if(nr(t))r=_L(t,n);else{const o=wT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Dl(r)}function CT(e,t){const n=ii(e);return n===t||!nr(n)||ts(n)?!1:rr(n).position==="fixed"||CT(n,t)}function xL(e,t){const n=t.get(e);if(n)return n;let r=Sa(e,[],!1).filter(c=>nr(c)&&es(c)!=="body"),o=null;const a=rr(e).position==="fixed";let u=a?ii(e):e;for(;nr(u)&&!ts(u);){const c=rr(u),d=Ph(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&bL.has(o.position)||wa(u)&&!d&&CT(e,u))?r=r.filter(p=>p!==u):o=c,u=ii(u)}return t.set(e,r),r}function wL(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?Fl(t)?[]:xL(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,p)=>{const g=AT(t,p,o);return h.top=Cn(g.top,h.top),h.right=ri(g.right,h.right),h.bottom=ri(g.bottom,h.bottom),h.left=Cn(g.left,h.left),h},AT(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function SL(e){const{width:t,height:n}=xT(e);return{width:t,height:n}}function vL(e,t,n){const r=wr(t),o=xr(t),a=n==="fixed",u=Ki(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=br(0);function h(){d.x=Ul(o)}if(r||!r&&!a)if((es(t)!=="body"||wa(o))&&(c=Bl(t)),r){const y=Ki(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&h();a&&!r&&o&&h();const p=o&&!r&&!a?ST(o,c):br(0),g=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:g,y:b,width:u.width,height:u.height}}function Dh(e){return rr(e).position==="static"}function kT(e,t){if(!wr(e)||rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return xr(e)===n&&(n=n.ownerDocument.body),n}function NT(e,t){const n=kn(e);if(Fl(e))return n;if(!wr(e)){let o=ii(e);for(;o&&!ts(o);){if(nr(o)&&!Dh(o))return o;o=ii(o)}return n}let r=kT(e,t);for(;r&&aL(r)&&Dh(r);)r=kT(r,t);return r&&ts(r)&&Dh(r)&&!Ph(r)?n:r||fL(e)||n}const AL=function(e){return ze(this,null,function*(){const t=this.getOffsetParent||NT,n=this.getDimensions,r=yield n(e.floating);return{reference:vL(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function CL(e){return rr(e).direction==="rtl"}const kL={convertOffsetParentRelativeRectToViewportRelativeRect:gL,getDocumentElement:xr,getClippingRect:wL,getOffsetParent:NT,getElementRects:AL,getClientRects:EL,getDimensions:SL,getScale:ns,isElement:nr,isRTL:CL};function OT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function NL(e,t){let n=null,r;const o=xr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const h=e.getBoundingClientRect(),{left:p,top:g,width:b,height:y}=h;if(c||t(),!b||!y)return;const x=Rl(g),v=Rl(o.clientWidth-(p+b)),A=Rl(o.clientHeight-(g+y)),C=Rl(p),I={rootMargin:-x+"px "+-v+"px "+-A+"px "+-C+"px",threshold:Cn(0,ri(1,d))||1};let $=!0;function W(F){const ee=F[0].intersectionRatio;if(ee!==d){if(!$)return u();ee?u(!1,ee):r=setTimeout(()=>{u(!1,1e-7)},1e3)}ee===1&&!OT(h,e.getBoundingClientRect())&&u(),$=!1}try{n=new IntersectionObserver(W,ie(B({},I),{root:o.ownerDocument}))}catch(F){n=new IntersectionObserver(W,I)}n.observe(e)}return u(!0),a}function OL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Lh(e),p=o||a?[...h?Sa(h):[],...Sa(t)]:[];p.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),a&&C.addEventListener("resize",n)});const g=h&&c?NL(h,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(C=>{let[k]=C;k&&k.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),h&&!d&&y.observe(h),y.observe(t));let x,v=d?Ki(e):null;d&&A();function A(){const C=Ki(e);v&&!OT(v,C)&&n(),v=C,x=requestAnimationFrame(A)}return n(),()=>{var C;p.forEach(k=>{o&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),g==null||g(),(C=y)==null||C.disconnect(),y=null,d&&cancelAnimationFrame(x)}}const PL=tL,IL=nL,RL=J4,LL=iL,DL=Z4,ML=Q4,FL=rL,BL=(e,t,n)=>{const r=new Map,o=B({platform:kL},n),a=ie(B({},o.platform),{_c:r});return K4(e,t,ie(B({},o),{platform:a}))};function PT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return ie(B({},o),{toJSON:()=>o})}function UL(e){if(!e)return PT();const{x:t,y:n,width:r,height:o}=e;return PT(t,n,r,o)}function HL(e,t){return{contextElement:Bt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?UL(r):n.getBoundingClientRect()}}}var va=e=>({variable:e,reference:`var(${e})`}),Fr={arrowSize:va("--arrow-size"),arrowSizeHalf:va("--arrow-size-half"),arrowBg:va("--arrow-background"),transformOrigin:va("--transform-origin"),arrowOffset:va("--arrow-offset")},zL=e=>e==="top"||e==="bottom"?"y":"x";function jL(e,t){return{name:"transformOrigin",fn(n){var pe,U,ne,ae,de;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=zL(d),p=((pe=o.arrow)==null?void 0:pe.x)||0,g=((U=o.arrow)==null?void 0:U.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,x=p+b/2,v=g+y/2,A=Math.abs(((ne=o.shift)==null?void 0:ne.y)||0),C=u.reference.height/2,k=y/2,I=(de=(ae=e.offset)==null?void 0:ae.mainAxis)!=null?de:e.gutter,$=typeof I=="number"?I+k:I!=null?I:k,W=A>$,F={top:`${x}px calc(100% + ${$}px)`,bottom:`${x}px ${-$}px`,left:`calc(100% + ${$}px) ${v}px`,right:`${-$}px ${v}px`}[d],ee=`${x}px ${u.reference.y+C-c}px`,ce=!!e.overlap&&h==="y"&&W;return r.floating.style.setProperty(Fr.transformOrigin.variable,ce?ee:F),{data:{transformOrigin:ce?ee:F}}}}}var $L={name:"rects",fn({rects:e}){return{data:e}}},VL=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${Fr.arrowOffset.reference})`}),{}}}};function qL(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var YL={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function IT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Mh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function WL(e,t,n){const r=e||t.createElement("div");return ML({element:r,padding:n.arrowPadding})}function GL(e,t){var n;if(!l6((n=t.offset)!=null?n:t.gutter))return PL(({placement:r})=>{var p,g,b,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(g=(p=t.offset)==null?void 0:p.mainAxis)!=null?g:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=qL(r),d=c?void 0:t.shift,h=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return ch({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function XL(e){if(!e.flip)return;const t=Mh(e.boundary);return RL(ie(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function KL(e){if(!e.slide&&!e.overlap)return;const t=Mh(e.boundary);return IL(ie(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:FL()}))}function QL(e){return LL({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function JL(e){var t;if(e.hideWhenDetached)return DL({strategy:"referenceHidden",boundary:(t=Mh(e.boundary))!=null?t:"clippingAncestors"})}function ZL(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function eD(e,t,n={}){const r=HL(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},YL,n),a=t.querySelector("[data-part=arrow]"),u=[GL(a,o),XL(o),KL(o),WL(a,t.ownerDocument,o),VL(a),jL({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),QL(o),JL(o),$L],{placement:c,strategy:d,onComplete:h,onPositioned:p}=o,g=()=>ze(null,null,function*(){var $;if(!r||!t)return;const v=yield BL(r,t,{placement:c,middleware:u,strategy:d});h==null||h(v),p==null||p({placed:!0});const A=qo(t),C=IT(A,v.x),k=IT(A,v.y);t.style.setProperty("--x",`${C}px`),t.style.setProperty("--y",`${k}px`),o.hideWhenDetached&&((($=v.middlewareData.hide)==null?void 0:$.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const I=t.firstElementChild;if(I){const W=Wo(I);t.style.setProperty("--z-index",W.zIndex)}}),b=()=>ze(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=ZL(o.listeners),x=o.listeners?OL(r,t,b,y):y6;return b(),()=>{x==null||x(),p==null||p({placed:!1})}}function RT(e,t,n={}){const c=n,{defer:r}=c,o=an(c,["defer"]),a=r?Pt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(eD(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var tD={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function nD(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Fr.arrowSize.reference,height:Fr.arrowSize.reference,[Fr.arrowSizeHalf.variable]:`calc(${Fr.arrowSize.reference} / 2)`,[Fr.arrowOffset.variable]:`calc(${Fr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?tD[t.split("-")[0]]:void 0,background:Fr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,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 rs=new WeakMap,Hl=new WeakMap,zl={},Fh=0,LT=e=>e&&(e.host||LT(e.parentNode)),rD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=LT(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),iD=new Set(["script","output","status","next-route-announcer"]),oD=e=>iD.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:o,followControlledElements:a=!0}=t,u=rD(n,Array.isArray(e)?e:[e]);zl[r]||(zl[r]=new WeakMap);const c=zl[r],d=[],h=new Set,p=new Set(u),g=y=>{!y||h.has(y)||(h.add(y),g(y.parentNode))};u.forEach(y=>{g(y),a&&Bt(y)&&Wy(y,x=>{g(x)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,x=>{if(h.has(x))b(x);else try{if(oD(x))return;const A=x.getAttribute(o)==="true",C=(rs.get(x)||0)+1,k=(c.get(x)||0)+1;rs.set(x,C),c.set(x,k),d.push(x),C===1&&A&&Hl.set(x,!0),k===1&&x.setAttribute(r,""),A||x.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",x,v)}})};return b(n),h.clear(),Fh++,()=>{d.forEach(y=>{const x=rs.get(y)-1,v=c.get(y)-1;rs.set(y,x),c.set(y,v),x||(Hl.has(y)||y.removeAttribute(o),Hl.delete(y)),v||y.removeAttribute(r)}),Fh--,Fh||(rs=new WeakMap,rs=new WeakMap,Hl=new WeakMap,zl={})}},aD=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,uD=(e,t=aD(e),n="data-aria-hidden",r=!0)=>{if(t)return sD(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},lD=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function DT(e,t={}){const{defer:n=!0}=t,r=n?lD:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(uD(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function cD(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function dD(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var MT="pointerdown.outside",FT="focus.outside";function fD(e){for(const t of e)if(Bt(t)&&Tr(t))return!0;return!1}var BT=e=>"clientY"in e;function hD(e,t){if(!BT(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function pD(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function UT(e,t){if(!t||!BT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return pD(u,c)?r||a:!1}function mD(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=yr(e),h=qo(e),p=cD(h),g=dD(h);function b(I,$){if(!Bt($)||!$.isConnected||Vo(e,$)||hD(e,I)||c&&Yy(e,$))return!1;const W=d.querySelector(`[aria-controls="${e.id}"]`);if(W){const ee=Th(W);if(UT(I,ee))return!1}const F=Th(e);return UT(I,F)?!1:!(n!=null&&n($))}const y=new Set,x=Yi(e==null?void 0:e.getRootNode());function v(I){function $(W){var pe,U;const F=u&&!Gy()?Pt:ne=>ne(),ee=W!=null?W:I,ce=(U=(pe=ee==null?void 0:ee.composedPath)==null?void 0:pe.call(ee))!=null?U:[ee==null?void 0:ee.target];F(()=>{const ne=x?ce[0]:tr(I);if(!(!e||!b(I,ne))){if(o||a){const ae=lh(o,a);e.addEventListener(MT,ae,{once:!0})}HT(e,MT,{bubbles:!1,cancelable:!0,detail:{originalEvent:ee,contextmenu:Z6(ee),focusable:fD(ce),target:ne}})}})}I.pointerType==="touch"?(y.forEach(W=>W()),y.add(Ut(d,"click",$,{once:!0})),y.add(g.addEventListener("click",$,{once:!0})),y.add(p.addEventListener("click",$,{once:!0}))):$()}const A=new Set,C=setTimeout(()=>{A.add(Ut(d,"pointerdown",v,!0)),A.add(g.addEventListener("pointerdown",v,!0)),A.add(p.addEventListener("pointerdown",v,!0))},0);function k(I){(u?Pt:W=>W())(()=>{var ee,ce;const W=(ce=(ee=I==null?void 0:I.composedPath)==null?void 0:ee.call(I))!=null?ce:[I==null?void 0:I.target],F=x?W[0]:tr(I);if(!(!e||!b(I,F))){if(r||a){const pe=lh(r,a);e.addEventListener(FT,pe,{once:!0})}HT(e,FT,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:Tr(F),target:F}})}})}return Gy()||(A.add(Ut(d,"focusin",k,!0)),A.add(g.addEventListener("focusin",k,!0)),A.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(C),y.forEach(I=>I()),A.forEach(I=>I())}}function gD(e,t){const{defer:n}=t,r=n?Pt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(mD(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function HT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function ED(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Ut(yr(e),"keydown",n,{capture:!0})}var zT="layer:request-dismiss",Hn={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=>Vo(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Vo(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=>Hn.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];TD(e,zT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),yD(e,zT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function yD(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function TD(e,t,n){e.addEventListener(t,n,{once:!0})}var jT;function $T(){Hn.layers.forEach(({node:e})=>{e.style.pointerEvents=Hn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function bD(e){e.style.pointerEvents=""}function _D(e,t){const n=yr(e),r=[];return Hn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(jT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=x4(()=>{const c=o();return Bt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Cl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Hn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=jT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function xD(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){dh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,h={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};Hn.add(h),$T();function p(v){var C,k;const A=tr(v.detail.originalEvent);Hn.isBelowPointerBlockingLayer(e)||Hn.isInBranch(A)||((C=t.onPointerDownOutside)==null||C.call(t,v),(k=t.onInteractOutside)==null||k.call(t,v),!v.defaultPrevented&&(c&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function g(v){var C,k;const A=tr(v.detail.originalEvent);Hn.isInBranch(A)||((C=t.onFocusOutside)==null||C.call(t,v),(k=t.onInteractOutside)==null||k.call(t,v),!v.defaultPrevented&&(c&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function b(v){var A;Hn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var I;if(!e)return!1;const A=typeof u=="function"?u():u,C=Array.isArray(A)?A:[A],k=(I=t.persistentElements)==null?void 0:I.map($=>$()).filter(Bt);return k&&C.push(...k),C.some($=>Vo($,v))||Hn.isInNestedLayer(e,v)}const x=[a?_D(e,t.persistentElements):void 0,ED(e,b),gD(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{Hn.remove(e),$T(),bD(e),x.forEach(v=>v==null?void 0:v())}}function VT(e,t){const{defer:n}=t,r=n?Pt:a=>a(),o=[];return o.push(r(()=>{const a=jo(e)?e():e;o.push(xD(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var wD=Object.defineProperty,SD=(e,t,n)=>t in e?wD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gt=(e,t,n)=>SD(e,typeof t!="symbol"?t+"":t,n),qT={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},vD=[],AD=class{constructor(e,t){gt(this,"trapStack"),gt(this,"config"),gt(this,"doc"),gt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),gt(this,"portalContainers",new Set),gt(this,"listenerCleanups",[]),gt(this,"handleFocus",r=>{const o=tr(r),a=this.findContainerIndex(o,r)>=0;if(a||wl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Ta(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[d];if(h.length>0){const p=h.findIndex(g=>g===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<h.length&&(u=h[p+1],c=!1):p-1>=0&&(u=h[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(h=>Ta(h)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),gt(this,"handlePointerDown",r=>{const o=tr(r);if(!(this.findContainerIndex(o,r)>=0)){if(Ca(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ca(this.config.allowOutsideClick,r)||r.preventDefault()}}),gt(this,"handleClick",r=>{const o=tr(r);this.findContainerIndex(o,r)>=0||Ca(this.config.clickOutsideDeactivates,r)||Ca(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),gt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;Aa(r)&&r.preventDefault(),this.tryFocus(a)}}),gt(this,"handleEscapeKey",r=>{CD(r)&&Ca(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),gt(this,"_mutationObserver"),gt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(h=>h===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const h=d;return V6(h)?!0:h.id&&!this.state.containers.some(p=>p.contains(h))?q6(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),gt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),gt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Tr(r)){const o=Yo(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;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}),gt(this,"tryFocus",r=>{if(r!==!1&&r!==Yo(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()}}),gt(this,"deactivate",r=>{if(!this.state.active)return this;const o=B({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),qT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const h=()=>{YT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(h,h),this}return h(),this}),gt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),gt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),gt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),gt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),gt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),gt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),gt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||tr(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),h=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:g})=>u===g);if(p<0&&((h==null?void 0:h.container)===u||Tr(u)&&!Wi(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(p=d),p>=0){const g=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[g];c=Ta(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Aa(o)||(c=h==null?void 0:h.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:g})=>u===g);if(p<0&&((h==null?void 0:h.container)===u||Tr(u)&&!Wi(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(p=d),p>=0){const g=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[g];c=Ta(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Aa(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||vD;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Aa(r)&&!r.shiftKey},isKeyBackward(r){return Aa(r)&&r.shiftKey}},t);this.doc=n.document||yr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{z6(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Yy(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Go(e,{getShadowRoot:this.config.getShadowRoot}),n=tT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let h=0;h<t.length;h++)if(Ta(t[h])>0){c=!0;break}function d(h,p=!0){const g=t.indexOf(h);if(g>=0)return t[g+(p?1:-1)];const b=n.indexOf(h);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(Wi(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(Wi(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return qT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?YT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ut(this.doc,"focusin",this.handleFocus,!0),Ut(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ut(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ut(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ut(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ut(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=Yo(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},Aa=e=>e.key==="Tab",Ca=(e,...t)=>typeof e=="function"?e(...t):e,CD=e=>!e.isComposing&&e.key==="Escape",YT=e=>setTimeout(e,0),kD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function WT(e,t={}){let n;const r=Pt(()=>{const o=typeof e=="function"?e():e;if(o){n=new AD(o,ie(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:yr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Bh="data-scroll-lock";function ND(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function GT(e){const t=Wo(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function XT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Bh))return;const u=GT(r)||GT(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Bh,"");const d=()=>b4(r,"--scrollbar-width",`${c}px`),h=ND(r),p=()=>{const x={overflow:"hidden"};return!u&&c>0&&(x[h]=`${c}px`),Cl(o,x)},g=()=>{var W,F;const{scrollX:x,scrollY:v,visualViewport:A}=n,C=(W=A==null?void 0:A.offsetLeft)!=null?W:0,k=(F=A==null?void 0:A.offsetTop)!=null?F:0,I={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(k))}px`,left:`${-(x-Math.floor(C))}px`,right:"0"};!u&&c>0&&(I[h]=`${c}px`);const $=Cl(o,I);return()=>{$==null||$(),n.scrollTo({left:x,top:v,behavior:"instant"})}},b=[d(),Sl()?g():p()];return()=>{b.forEach(x=>x==null?void 0:x()),o.removeAttribute(Bh)}}var OD=Xi("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Sr=OD.build(),KT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},QT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},JT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},PD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Hh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},ID=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},ZT=e=>e.getById(KT(e)),is=e=>e.getById(QT(e)),os=e=>e.getById(Uh(e)),eb=e=>e.getById(JT(e)),RD=e=>e.getById(Hh(e)),LD=e=>e.getById(zh(e));function DD(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),h=r.get("currentPlacement"),p=a("currentPortalled"),g=r.get("renderedElements"),b=nD(ie(B({},u("positioning")),{placement:h}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(ie(B({id:PD(c)},Sr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(ie(B({},Sr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(ie(B({},Sr.anchor.attrs),{dir:u("dir"),id:KT(c)}))},getTriggerProps(){return t.button(ie(B({},Sr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:QT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Uh(c),onPointerDown(y){Xy(y)&&Q6()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(ie(B({},Sr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ie(B({id:JT(c)},Sr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(ie(B({},Sr.content.attrs),{dir:u("dir"),id:Uh(c),tabIndex:-1,role:"dialog","aria-modal":$y(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":$o(d),"aria-labelledby":g.title?Hh(c):void 0,"aria-describedby":g.description?zh(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(ie(B({},Sr.title.attrs),{id:Hh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ie(B({},Sr.description.attrs),{id:zh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ie(B({},Sr.closeTrigger.attrs),{dir:u("dir"),id:ID(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var MD={props({props:e}){return ie(B({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:B({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=ZT(n))!=null?a:is(n);return RT(r,()=>eb(n),ie(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>os(n);let o=!0;return VT(r,{type:"popover",pointerBlocking:t("modal"),exclude:is(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&&(o=!(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:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:y4(()=>os(t),{triggerElement:is(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?DT(()=>[os(t),is(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return XT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?WT(()=>os(t),{initialFocus:()=>nT({root:os(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=ZT(n))!=null?u:is(n);RT(o,()=>eb(n),ie(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Pt(()=>{Object.assign(e.get("renderedElements"),{title:!!RD(t),description:!!LD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Pt(()=>{const n=nT({root:os(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Pt(()=>{const a=is(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})}}}};Qo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[_7,jl]=Gi({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[x7,jh]=Gi({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),FD=e=>{const t=Y.useId(),{getRootNode:n}=jl(),{dir:r}=jh(),o=B({id:t,dir:r,getRootNode:n},e),a=Nl(MD,o);return DD(a,xh)},BD=e=>{const[t,u]=dT(e),c=u,{children:n}=c,r=an(c,["children"]),o=FD(r),a=vh(It({present:o.open},t));return _.jsx(R4,{value:o,children:_.jsx(uT,{value:a,children:n})})},tb=Y.forwardRef((e,t)=>{const n=Sh(),r=ba(),o=It(ie(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(Qt.button,ie(B({},o),{ref:t}))});tb.displayName="PopoverTrigger";function UD(e){return it({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 HD(e){return it({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function nb(e){return it({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function rb(e){return it({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 zD(e){return it({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 it({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 $h(e){return it({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function ib(e){return it({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 $D=({className:e,componentType:t,children:n})=>{const[r,o]=Y.useState(!1),{globalClassName:a}=ot(),u=h=>{o(h.open)},c=Y.useCallback(()=>{o(!1)},[]),d=Y.useMemo(()=>({closeMenu:c}),[c]);return _.jsxs(BD,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(tb,{"aria-label":`Overflow menu for ${t}`,className:z(`${L}-overflow-menu-button-trigger`,`${L}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(ib,{})}),_.jsx(cT,{children:_.jsx(lT,{className:z(`${L}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(Dy.Provider,{value:d,children:n})})})]})};function ob(e){return it({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 sb(e){return it({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[VD,Qi]=Gi({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Vh=Y.forwardRef((e,t)=>{const n=Qi(),r=It(n.getControlProps(),e);return _.jsx(Qt.div,ie(B(B({},r),e),{ref:t}))});Vh.displayName="CarouselControl";const qh=Y.forwardRef((e,t)=>{const[n,r]=_a()(e,["readOnly","index"]),o=Qi(),a=It(o.getIndicatorProps(n),r);return _.jsx(Qt.button,ie(B({},a),{ref:t}))});qh.displayName="CarouselIndicator";const Yh=Y.forwardRef((e,t)=>{const n=Qi(),r=It(n.getIndicatorGroupProps(),e);return _.jsx(Qt.div,ie(B({},r),{ref:t}))});Yh.displayName="CarouselIndicatorGroup";const Wh=Y.forwardRef((e,t)=>{const[n,r]=_a()(e,["index","snapAlign"]),o=Qi(),a=It(o.getItemProps(n),r);return _.jsx(Qt.div,ie(B({},a),{ref:t}))});Wh.displayName="CarouselItem";const Gh=Y.forwardRef((e,t)=>{const n=Qi(),r=It(n.getItemGroupProps(),e);return _.jsx(Qt.div,ie(B({},r),{ref:t}))});Gh.displayName="CarouselItemGroup";const Xh=Y.forwardRef((e,t)=>{const n=Qi(),r=It(n.getNextTriggerProps(),e);return _.jsx(Qt.button,ie(B({},r),{ref:t}))});Xh.displayName="CarouselNextTrigger";const Kh=Y.forwardRef((e,t)=>{const n=Qi(),r=It(n.getPrevTriggerProps(),e);return _.jsx(Qt.button,ie(B({},r),{ref:t}))});Kh.displayName="CarouselPrevTrigger";function qD(e){const t=Wo(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(b,y){let x=parseFloat(b);return/%/.test(b)&&(x/=100,x*=y),Number.isNaN(x)?0:x}let d=c(r,n.width),h=c(o,n.height),p=c(a,n.width),g=c(u,n.height);return{x:{before:d,after:p},y:{before:h,after:g}}}function YD(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function ab(e){let t=[];for(const n of e.children)t=t.concat(n,ab(n));return t}function ub(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?ab(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",h=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const g=p.getBoundingClientRect();if(!YD(n,g,u))continue;const b=Wo(p);let[y,x]=b.getPropertyValue("scroll-snap-align").split(" ");typeof x=="undefined"&&(x=y);const v=a==="x"?x:y,A=g[c]-n[c]+e[h];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+g[d]/2});break;case"end":r[a].end.push({node:p,position:A+g[d]});break}}}return r}function lb(e){const t=e.getBoundingClientRect(),n=qD(e),r=ub(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:cb([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(db(0,o.x))),y:cb([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(db(0,o.y)))}}function WD(e,t,n){const r=ub(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var cb=e=>[...new Set(e)],db=(e,t)=>n=>Math.max(e,Math.min(t,n)),GD=Xi("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Br=GD.build(),XD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},KD=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},$l=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},QD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},JD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},ZD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},fb=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},pn=e=>e.getById($l(e)),hb=e=>T4(pn(e),"[data-part=item]"),e5=(e,t)=>e.getById(fb(e,t)),pb=e=>{const t=pn(e);if(!t)return;const n=Go(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function t5(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),h=n.matches("dragging"),p=o("canScrollNext"),g=o("canScrollPrev"),b=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),x=r.get("page"),v=c("slidesPerPage"),A=c("padding"),C=c("translations");return{isPlaying:d,isDragging:h,page:x,pageSnapPoints:y,canScrollNext:p,canScrollPrev:g,getProgress(){return x/y.length},scrollToIndex(k,I){a({type:"INDEX.SET",index:k,instant:I})},scrollTo(k,I){a({type:"PAGE.SET",index:k,instant:I})},scrollNext(k){a({type:"PAGE.NEXT",instant:k})},scrollPrev(k){a({type:"PAGE.PREV",instant:k})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(k){return Array.from(r.get("slidesInView")).includes(k)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(ie(B({},Br.root.attrs),{id:XD(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":v,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(ie(B({},Br.itemGroup.attrs),{id:$l(u),"data-orientation":c("orientation"),"data-dragging":$o(h),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(k){Vo(k.currentTarget,tr(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){Vo(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!c("allowMouseDrag")||!Xy(k))return;const I=tr(k);Tr(I)&&I!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:T6(k=>{const I=c("orientation")==="horizontal"?"deltaX":"deltaY";k[I]<0&&!o("canScrollPrev")||k[I]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:A,[b?"paddingInline":"paddingBlock"]:A,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const I=r.get("slidesInView").includes(k.index);return t.element(ie(B({},Br.item.attrs),{id:KD(u,k.index),dir:c("dir"),role:"group","data-index":k.index,"data-inview":$o(I),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":C.item(k.index,c("slideCount")),"aria-hidden":$y(!I),style:{scrollSnapAlign:(()=>{var ce;const $=(ce=k.snapAlign)!=null?ce:"start",W=c("slidesPerMove"),F=W==="auto"?Math.floor(c("slidesPerPage")):W;return(k.index+F)%F===0?$:void 0})()}}))},getControlProps(){return t.element(ie(B({},Br.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(ie(B({},Br.prevTrigger.attrs),{id:JD(u),type:"button",disabled:!g,dir:c("dir"),"aria-label":C.prevTrigger,"data-orientation":c("orientation"),"aria-controls":$l(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ie(B({},Br.nextTrigger.attrs),{dir:c("dir"),id:QD(u),type:"button","aria-label":C.nextTrigger,"data-orientation":c("orientation"),"aria-controls":$l(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ie(B({},Br.indicatorGroup.attrs),{dir:c("dir"),id:ZD(u),"data-orientation":c("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const I="indicator",$={ArrowDown(ee){b||(a({type:"PAGE.NEXT",src:I}),ee.preventDefault())},ArrowUp(ee){b||(a({type:"PAGE.PREV",src:I}),ee.preventDefault())},ArrowRight(ee){b&&(a({type:"PAGE.NEXT",src:I}),ee.preventDefault())},ArrowLeft(ee){b&&(a({type:"PAGE.PREV",src:I}),ee.preventDefault())},Home(ee){a({type:"PAGE.SET",index:0,src:I}),ee.preventDefault()},End(ee){a({type:"PAGE.SET",index:y.length-1,src:I}),ee.preventDefault()}},W=n4(k,{dir:c("dir"),orientation:c("orientation")}),F=$[W];F==null||F(k)}}))},getIndicatorProps(k){return t.button(ie(B({},Br.indicator.attrs),{dir:c("dir"),id:fb(u,k.index),type:"button","data-orientation":c("orientation"),"data-index":k.index,"data-readonly":$o(k.readOnly),"data-current":$o(k.index===x),"aria-label":C.indicator(k.index),onClick(I){I.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ie(B({},Br.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":$o(d),"aria-label":d?C.autoplayStop:C.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var n5={props({props:e}){return v6(e,["slideCount"],"carousel"),ie(B({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:B({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:r5(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 u6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({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(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),pb(e)});return pb(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!pn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Pt(()=>{o(),Pt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return hb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=pn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,h)=>{var b;const p=h.target,g=Number((b=p.dataset.index)!=null?b:"-1");return g==null||Number.isNaN(g)||g===-1?d:h.isIntersecting?r6(d,g):i6(d,g)},n.get("slidesInView"));n.set("slidesInView",o6(c))},{root:r,threshold:t("inViewThreshold")});return hb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=pn(n);return r?Ut(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 Ut(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return g4(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 Ut(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:o}){var h;const a=t.instant?"instant":"smooth",u=zy((h=t.index)!=null?h:e.get("page"),0,e.get("pageSnapPoints").length-1),c=pn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=pn(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=By(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=s6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=pn(r);if(!o)return;const a=WD(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=zy(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 o=lb(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.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 o=r.scrollLeft,a=r.scrollTop,u=lb(r),c=u.x.reduce((h,p)=>Math.abs(p-o)<Math.abs(h-o)?p:h,u.x[0]),d=u.y.reduce((h,p)=>Math.abs(p-a)<Math.abs(h-a)?p:h,u.y[0]);Pt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const h=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(h));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=e5(n,e.get("page"));r&&Pt(()=>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 r5(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}Qo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Qo()(["index","readOnly"]),Qo()(["index","snapAlign"]);const i5=e=>{const t=Y.useId(),{getRootNode:n}=jl(),{dir:r}=jh(),o=B({id:t,dir:r,getRootNode:n},e),a=Nl(n5,o);return t5(a,xh)},Qh=Y.forwardRef((e,t)=>{const[n,r]=_a()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=i5(n),a=It(o.getRootProps(),r);return _.jsx(VD,{value:o,children:_.jsx(Qt.div,ie(B({},a),{ref:t}))})});Qh.displayName="CarouselRoot";const o5=180,s5=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},a5=({globalClassName:e,className:t,itemMinWidth:n=o5,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:h="Product carousel",children:p})=>{const g=Array.from(p),b=g.length,y=Y.useRef(null),[x,v]=Y.useState(0),{width:A}=HA();Y.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[A,b]);const C=s5(r),k=n+C,I=x>0?(x+C)/k:1,$=Math.max(1,Math.floor(I));if(b===0)return null;const W=b>$,F=Math.ceil(b/$),ee=W?Math.max(1,I):$;return _.jsxs(Qh,{ref:y,className:z(e,t,`${L}-carousel`),slidesPerPage:ee,slidesPerMove:$,spacing:r,loop:o,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":h,children:[_.jsx(Gh,{className:z(e,`${L}-carousel__item-group`,{"carousel-row-container":!W}),children:g.map((ce,pe)=>_.jsx(Wh,{index:pe,className:z(e,`${L}-carousel__item`),children:ce},pe))}),c&&W&&_.jsxs(Vh,{className:z(e,`${L}-carousel__control`),children:[_.jsx(Kh,{className:z(e,`${L}-carousel__prev-trigger`),"aria-label":"Previous slide",children:_.jsx(nb,{size:"16px"})}),_.jsx(Xh,{className:z(e,`${L}-carousel__next-trigger`),"aria-label":"Next slide",children:_.jsx(rb,{size:"16px"})})]}),u&&W&&_.jsx(Yh,{className:z(e,`${L}-carousel__indicator-group`),children:Array.from({length:F},(ce,pe)=>_.jsx(qh,{index:pe,className:z(e,`${L}-carousel__indicator`),"aria-label":`Go to slide group ${pe+1}`},pe))})]})},u5=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:z(e,`${L}-close-button`),disabled:r,onClick:n,children:_.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),[l5,c5]=Gi({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),d5=e=>_a()(e,["lazyMount","unmountOnExit"]),[f5,ka]=Gi({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),mb=Y.forwardRef((e,t)=>{const n=ka(),r=c5(),o=vh(ie(B({},r),{present:n.open})),a=It(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:_.jsx(Qt.div,ie(B({},a),{ref:Ol(o.ref,t)}))});mb.displayName="DialogBackdrop";const Jh=Y.forwardRef((e,t)=>{const n=ka(),r=ba(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Qt.div,ie(B({},o),{ref:Ol(r.ref,t)}))});Jh.displayName="DialogContent";const Zh=Y.forwardRef((e,t)=>{const n=ka(),r=It(n.getDescriptionProps(),e);return _.jsx(Qt.div,ie(B({},r),{ref:t}))});Zh.displayName="DialogDescription";const ep=Y.forwardRef((e,t)=>{const n=ka(),r=It(n.getPositionerProps(),e);return ba().unmounted?null:_.jsx(Qt.div,ie(B({},r),{ref:t}))});ep.displayName="DialogPositioner";var h5=Xi("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Ji=h5.build(),gb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},yb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},np=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},rp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Tb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Vl=e=>e.getById(tp(e)),p5=e=>e.getById(gb(e)),m5=e=>e.getById(Eb(e)),g5=e=>e.getById(yb(e)),E5=e=>e.getById(np(e)),y5=e=>e.getById(rp(e)),T5=e=>e.getById(Tb(e));function b5(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ie(B({},Ji.trigger.attrs),{dir:a("dir"),id:yb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":tp(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ie(B({},Ji.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Eb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ie(B({},Ji.positioner.attrs),{dir:a("dir"),id:gb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(ie(B({},Ji.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:tp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:np(u),"aria-describedby":h.description?rp(u):void 0}))},getTitleProps(){return t.element(ie(B({},Ji.title.attrs),{dir:a("dir"),id:np(u)}))},getDescriptionProps(){return t.element(ie(B({},Ji.description.attrs),{dir:a("dir"),id:rp(u)}))},getCloseTriggerProps(){return t.button(ie(B({},Ji.closeTrigger.attrs),{dir:a("dir"),id:Tb(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var _5={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>T5(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return B({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return VT(()=>Vl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[g5(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return XT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?WT(()=>Vl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?DT(()=>[Vl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Pt(()=>{e.set("rendered",{title:!!E5(t),description:!!y5(t)})})},syncZIndex({scope:e}){Pt(()=>{const t=Vl(e);if(!t)return;const n=Wo(t);[p5(e),m5(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.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})}}}};Qo()(["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 x5=e=>{const t=Y.useId(),{getRootNode:n}=jl(),{dir:r}=jh(),o=B({id:t,getRootNode:n,dir:r},e),a=Nl(_5,o);return b5(a,xh)},bb=e=>{const[t,c]=dT(e),d=c,{children:n}=d,r=an(d,["children"]),[o]=d5(t),a=x5(r),u=vh(It({present:a.open},t));return _.jsx(f5,{value:a,children:_.jsx(l5,{value:o,children:_.jsx(uT,{value:u,children:n})})})},_b=Y.forwardRef((e,t)=>{const n=ka(),r=It(n.getTitleProps(),e);return _.jsx(Qt.h2,ie(B({},r),{ref:t}))});_b.displayName="DialogTitle";const w5=({children:e})=>{const[t,n]=Y.useState(!1),r=Y.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=Y.useMemo(()=>({isOpen:t}),[t]);return _.jsx(uh.Provider,{value:r,children:_.jsx(Ly.Provider,{value:o,children:e})})},xb=()=>Y.useContext(Ly),wb=()=>{const e=Y.useContext(uh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},S5=`${L}-overflow-menu-button-trigger`,v5=({componentType:e,children:t})=>{const{isOpen:n}=xb(),{closeMenu:r}=wb(),{globalClassName:o}=ot(),a=Y.useRef(null);return Y.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const h=d.target;h instanceof Element&&h.closest(`.${S5}`)||a.current&&!a.current.contains(h)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?_.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:z(`${L}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},A5=({componentType:e,className:t})=>{const{toggleMenu:n}=wb(),{isOpen:r}=xb(),{globalClassName:o}=ot();return _.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:z(`${L}-overflow-menu-button-trigger`,`${L}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:_.jsx(ib,{})})};class C5{constructor(){Ve(this,"initialState",kg);Ve(this,"promptsStateProxy");Ve(this,"promptsParamsProxy");Ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return O5(n,r),Reflect.set(t,n,r)});Ve(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Ve(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Ve(this,"updatePromptsParamsProxy",t=>new Proxy(B({},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 oi=new C5,k5=e=>{window.addEventListener(tf,e)},N5=e=>{window.removeEventListener(tf,e)},O5=(e,t)=>{const n=new CustomEvent(tf,{detail:{property:e,value:t}});window.dispatchEvent(n)},Sb=e=>{const t=oi.isOpen,n=typeof e=="boolean"?e:!t;oi.promptsStateProxy.isOpen=n},P5=e=>{const t=oi.isInline,n=typeof e=="boolean"?e:!t;oi.promptsStateProxy.isInline=n},I5=({elementId:e,entryType:t,params:n,isInline:r})=>{oi.promptsStateProxy.elementId=e,t&&(oi.promptsStateProxy.entryType=t),typeof r=="boolean"&&P5(r),n&&oi.updatePromptsParamsProxy(n),oi.isOpen||Sb(!0)},R5=()=>{const e=Y.useContext(Og);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ql=()=>{const e=Y.useContext(Ng);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},L5=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ot(),{previousComponentType:r}=Fi(),o=zo(),a=()=>{Wu(r||"dialog"),o()};return t?_.jsx(Jn,{className:z(n,`${L}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(ob,{})}):_.jsxs("button",{className:z(n,`${L}-overflow-menu-button`,`${L}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(ob,{}),"Show ",r||"dialog"]})},D5=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ot(),{isModalFullscreen:r}=Fi(),o=zo(),a=()=>{nf(!r),o()},u=r?EC:yC,c="Toggle Fullscreen";return t?_.jsx(Jn,{ariaLabel:c,title:c,className:z(n,`${L}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:z(n,`${L}-overflow-menu-button`,`${L}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{}),c]})},M5=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ot(),{dialogPosition:r}=Fi(),o=zo(),a=r==="bottom-left",u=()=>{rf(a?"bottom-right":"bottom-left"),o()},c=a?HD:UD,d=a?"Move right":"Move left";return t?_.jsx(Jn,{className:z(n,`${L}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(c,{})}):_.jsxs("button",{className:z(n,`${L}-overflow-menu-button`,`${L}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(c,{}),d]})},vb=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:o,globalClassName:a,mode:u,enableDownloadTranscript:c}=ot(),{mode:d}=Fi(),h=u==="messaging"&&c&&!!r,p=d==="standalone",g=e==="modal",b=g?L5:kb,y=g?D5:M5,x=Y.useMemo(()=>o?cC(o):{},[o]);return _.jsx(w5,{children:_.jsxs("div",{className:z(a,`${L}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:z(a,`${L}-${e}-header`,{standalone:p,embedded:!p}),style:x,children:[(o==null?void 0:o.logoUrl)&&_.jsx("img",{alt:"",role:"img",className:z(a,`${L}-${e}-logo`,{standalone:p,embedded:!p}),src:o.logoUrl}),_.jsx(_b,{className:z(a,`${L}-${e}-title`,{standalone:p,embedded:!p}),children:o==null?void 0:o.headerText}),_.jsxs("div",{className:z(a,`${L}-${e}-controls`),children:[_.jsx(b,{componentType:e,isIcon:!0}),_.jsx(A5,{componentType:e}),_.jsx(u5,{className:z(a,`cim-${e}-component`),onClick:n})]})]}),_.jsxs(v5,{componentType:e,children:[_.jsx(y,{componentType:e}),_.jsx(H5,{componentType:e}),_.jsx(My,{componentType:e,onClearChat:t}),h&&_.jsx(Fy,{componentType:e,onDownloadTranscript:r})]})]})})},Ab="USD",Na=(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}`}},F5=({retailPrice:e,discountPrice:t,currencyCode:n=Ab})=>{const r=n||Ab,o=typeof t=="number"&&typeof e=="number"&&t<e,a=o?t:e||t||null,u=o?e:null;return{price:Na(a,r),comparePrice:Na(u,r),hasDiscount:o}},ip=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:o,className:a})=>{const{price:u,comparePrice:c,hasDiscount:d}=F5({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const h=typeof r=="string"?{fontSize:r}:{};return _.jsxs("div",{className:z(o,a,`${L}-price`),style:h,children:[_.jsx("span",{className:z(o,`${L}-price__amount`),children:u}),d&&c&&_.jsx("span",{className:z(o,`${L}-price__compare`),children:c})]})},B5={sparkle:$h,plus:zD,"paper-plane":jD},Cb=({icon:e,className:t})=>{const n=B5[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},U5=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=ot(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",h=o?"standalone":"embedded",p=x=>()=>{a(x)},g={"has-icon":!!c,"icon-right":!!c&&d==="right"},b=x=>_.jsxs(_.Fragment,{children:[c&&_.jsx(Cb,{icon:c,className:`${L}-suggestion-button-icon`}),_.jsx("span",{children:x})]});return _.jsx("div",{className:z(t,`${L}-suggestion-container ${h}`,e),children:n.map(x=>o?_.jsx(Ku,{disabled:r,className:z(t,`${L}-suggestion-button standalone`,g),onClick:p(x),children:b(x)},x):_.jsx("button",{disabled:r,className:z(t,`${L}-suggestion-button embedded`,g),onClick:p(x),children:b(x)},x))})},H5=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ot();if(!r)return null;const o=()=>{Rr(!1),Yu(!0)};return t?_.jsx(Jn,{className:z(n,`${L}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:_.jsx(qg,{})}):_.jsxs("button",{className:z(n,`${L}-overflow-menu-button`,`${L}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(qg,{}),"Minimize"]})},kb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ot(),r=zo(),o=()=>{Wu("modal"),r()};return t?_.jsx(Jn,{className:z(n,`${L}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:_.jsx(sb,{})}):_.jsxs("button",{className:z(n,`${L}-overflow-menu-button`,`${L}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(sb,{}),"Show modal"]})},z5=["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"],j5=3e3,$5=400,V5=({globalClassName:e,isWidgetStandalone:t,messages:n=z5})=>{const[r,o]=Y.useState(0),[a,u]=Y.useState(!0);return Y.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{o(h=>(h+1)%n.length),u(!0)},$5)},j5);return()=>{clearInterval(d),clearTimeout(c)}},[n.length]),_.jsxs("div",{className:z(e,`${L}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[_.jsxs("div",{className:`${L}-connecting-pulse-wrapper`,children:[_.jsx("div",{className:`${L}-connecting-pulse`}),_.jsx("div",{className:`${L}-connecting-ring`})]}),_.jsx("span",{className:z(`${L}-connecting-text`,a&&`${L}-connecting-text--visible`),children:n[r]})]})},q5=({shouldShow:e,loadingText:t})=>e?_.jsx("span",{className:`${L}-processing-text`,children:t}):null,Y5=({shouldShow:e})=>e?_.jsxs(_.Fragment,{children:[_.jsx("div",{className:`${L}-processing-shimmer-bar`}),_.jsx("div",{className:`${L}-processing-shimmer-bar`}),_.jsx("div",{className:`${L}-processing-shimmer-bar`})]}):null,op=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>_.jsxs("div",{className:z(e,`${L}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[_.jsx(q5,{shouldShow:!!n,loadingText:n}),_.jsx(Y5,{shouldShow:!n})]});function Nb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function W5(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function G5(e,t,n){const o=al((n||{}).ignore||[]),a=X5(t);let u=-1;for(;++u<a.length;)rE(e,"text",c);function c(h,p){let g=-1,b;for(;++g<p.length;){const y=p[g],x=b?b.children:void 0;if(o(y,x?x.indexOf(y):void 0,b))return;b=y}if(b)return d(h,p)}function d(h,p){const g=p[p.length-1],b=a[u][0],y=a[u][1];let x=0;const A=g.children.indexOf(h);let C=!1,k=[];b.lastIndex=0;let I=b.exec(h.value);for(;I;){const $=I.index,W={index:I.index,input:I.input,stack:[...p,h]};let F=y(...I,W);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?b.lastIndex=$+1:(x!==$&&k.push({type:"text",value:h.value.slice(x,$)}),Array.isArray(F)?k.push(...F):F&&k.push(F),x=$+I[0].length,C=!0),!b.global)break;I=b.exec(h.value)}return C?(x<h.value.length&&k.push({type:"text",value:h.value.slice(x)}),g.children.splice(A,1,...k)):k=[h],A+k.length}}function X5(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 o=n[r];t.push([K5(o[0]),Q5(o[1])])}return t}function K5(e){return typeof e=="string"?new RegExp(W5(e),"g"):e}function Q5(e){return typeof e=="function"?e:function(){return e}}const sp="phrasing",ap=["autolink","link","image","label"];function J5(){return{transforms:[o8],enter:{literalAutolink:e8,literalAutolinkEmail:up,literalAutolinkHttp:up,literalAutolinkWww:up},exit:{literalAutolink:i8,literalAutolinkEmail:r8,literalAutolinkHttp:t8,literalAutolinkWww:n8}}}function Z5(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:sp,notInConstruct:ap},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:sp,notInConstruct:ap},{character:":",before:"[ps]",after:"\\/",inConstruct:sp,notInConstruct:ap}]}}function e8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function up(e){this.config.enter.autolinkProtocol.call(this,e)}function t8(e){this.config.exit.autolinkProtocol.call(this,e)}function n8(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function r8(e){this.config.exit.autolinkEmail.call(this,e)}function i8(e){this.exit(e)}function o8(e){G5(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,s8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),a8]],{ignore:["link","linkReference"]})}function s8(e,t,n,r,o){let a="";if(!Ob(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!u8(n)))return!1;const u=l8(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function a8(e,t,n,r){return!Ob(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function u8(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function l8(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=Nb(e,"(");let a=Nb(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Ob(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ui(n)||el(n))&&(!t||n!==47)}Pb.peek=y8;function c8(){this.buffer()}function d8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function f8(){this.buffer()}function h8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function p8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Zn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function m8(e){this.exit(e)}function g8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Zn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function E8(e){this.exit(e)}function y8(){return"["}function Pb(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function T8(){return{enter:{gfmFootnoteCallString:c8,gfmFootnoteCall:d8,gfmFootnoteDefinitionLabelString:f8,gfmFootnoteDefinition:h8},exit:{gfmFootnoteCallString:p8,gfmFootnoteCall:m8,gfmFootnoteDefinitionLabelString:g8,gfmFootnoteDefinition:E8}}}function b8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Pb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const h=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
38
|
-
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?
|
|
39
|
-
`)}function
|
|
40
|
-
`&&
|
|
41
|
-
`}function
|
|
35
|
+
`}),n}function oE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function sE(e,t){const n=$3(e,t),r=n.one(e,void 0),o=R3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
36
|
+
`},o),a}function G3(e,t){return e&&"run"in e?function(n,r){return ze(this,null,function*(){const o=sE(n,B({file:r},t));yield e.run(o,r)})}:function(n,r){return sE(n,B({file:r},e||t))}}function aE(e){if(e)throw e}var Rf,uE;function X3(){if(uE)return Rf;uE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},a=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!g)return!1;var b;for(b in h);return typeof b=="undefined"||e.call(h,b)},u=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(r)return r(h,p).value}else return;return h[p]};return Rf=function d(){var h,p,g,b,y,_,v=arguments[0],A=1,k=arguments.length,C=!1;for(typeof v=="boolean"&&(C=v,v=arguments[1]||{},A=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});A<k;++A)if(h=arguments[A],h!=null)for(p in h)g=c(v,p),b=c(h,p),v!==b&&(C&&b&&(a(b)||(y=o(b)))?(y?(y=!1,_=g&&o(g)?g:[]):_=g&&a(g)?g:{},u(v,{name:p,newValue:d(C,_,b)})):typeof b!="undefined"&&u(v,{name:p,newValue:b}));return v},Rf}var K3=X3();const Lf=Ge(K3);function Df(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 Q3(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...h){const p=e[++a];let g=-1;if(d){u(d);return}for(;++g<o.length;)(h[g]===null||h[g]===void 0)&&(h[g]=o[g]);o=h,p?J3(p,c)(...h):u(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function J3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(h){const p=h;if(c&&n)throw p;return o(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const gr={basename:Z3,dirname:eO,extname:tO,join:nO,sep:"/"};function Z3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ia(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function eO(e){if(ia(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 tO(e){ia(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function nO(...e){let t=-1,n;for(;++t<e.length;)ia(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":rO(n)}function rO(e){ia(e);const t=e.codePointAt(0)===47;let n=iO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function iO(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==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("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function ia(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const oO={cwd:sO};function sO(){return"/"}function Mf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function aO(e){if(typeof e=="string")e=new URL(e);else if(!Mf(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 uO(e)}function uO(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 o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Ff=["history","path","basename","stem","extname","dirname"];class lE{constructor(t){let n;t?Mf(t)?n={path:t}:typeof t=="string"||lO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":oO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ff.length;){const a=Ff[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)Ff.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?gr.basename(this.path):void 0}set basename(t){Uf(t,"basename"),Bf(t,"basename"),this.path=gr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?gr.dirname(this.path):void 0}set dirname(t){cE(this.basename,"dirname"),this.path=gr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?gr.extname(this.path):void 0}set extname(t){if(Bf(t,"extname"),cE(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=gr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Mf(t)&&(t=aO(t)),Uf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?gr.basename(this.path,this.extname):void 0}set stem(t){Uf(t,"stem"),Bf(t,"stem"),this.path=gr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Gt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Bf(e,t){if(e&&e.includes(gr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+gr.sep+"`")}function Uf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function cE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function lO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cO=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),dO={}.hasOwnProperty;class Hf extends cO{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=Q3()}copy(){const t=new Hf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Lf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?($f("data",this.frozen),this.namespace[t]=n,this):dO.call(this.namespace,t)&&this.namespace[t]||void 0:t?($f("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 o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=cl(t),r=this.parser||this.Parser;return zf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),zf("process",this.parser||this.Parser),jf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=cl(t),d=r.parse(c);r.run(d,c,function(p,g,b){if(p||!g||!b)return h(p);const y=g,_=r.stringify(y,b);pO(_)?b.value=_:b.result=_,h(p,b)});function h(p,g){p||!g?u(p):a?a(g):n(void 0,g)}}}processSync(t){let n=!1,r;return this.freeze(),zf("processSync",this.parser||this.Parser),jf("processSync",this.compiler||this.Compiler),this.process(t,o),fE("processSync","process",n),r;function o(a,u){n=!0,aE(a),r=u}}run(t,n,r){dE(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=cl(n);o.run(t,d,h);function h(p,g,b){const y=g||t;p?c(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),fE("runSync","run",r),o;function a(u,c){aE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=cl(n),o=this.compiler||this.Compiler;return jf("stringify",o),dE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if($f("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...g]=h;d(p,g)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(o.settings=Lf(!0,o.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const g=h[p];a(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let g=-1,b=-1;for(;++g<r.length;)if(r[g][0]===h){b=g;break}if(b===-1)r.push([h,...p]);else if(p.length>0){let[y,..._]=p;const v=r[b][1];Df(v)&&Df(y)&&(y=Lf(!0,v,y)),r[b]=[h,y,..._]}}}}const fO=new Hf().freeze();function zf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function jf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $f(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 dE(e){if(!Df(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function fE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function cl(e){return hO(e)?e:new lE(e)}function hO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function pO(e){return typeof e=="string"||mO(e)}function mO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const gO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hE=[],pE={allowDangerousHtml:!0},EO=/^(https?|ircs?|mailto|xmpp)$/i,yO=[{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 mE(e){const t=TO(e),n=bO(e);return xO(t.runSync(t.parse(n),n),e)}function TO(e){const t=e.rehypePlugins||hE,n=e.remarkPlugins||hE,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),pE):pE;return fO().use(e3).use(n).use(G3,r).use(t)}function bO(e){const t=e.children||"",n=new lE;return typeof t=="string"&&(n.value=t),n}function xO(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||_O;for(const p of yO)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+gO+p.id,void 0);return ll(e,h),Yk(e,{Fragment:x.Fragment,components:o,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function h(p,g,b){if(p.type==="raw"&&b&&typeof g=="number")return u?b.children.splice(g,1):b.children[g]={type:"text",value:p.value},g;if(p.type==="element"){let y;for(y in Tf)if(Object.hasOwn(Tf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],v=Tf[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof g=="number"&&(y=!r(p,g,b)),y&&b&&typeof g=="number")return c&&p.children?b.children.splice(g,1,...p.children):b.children.splice(g,1),g}}}function _O(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||EO.test(e.slice(0,t))?e:""}const gE=/[#.]/g;function wO(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){gE.lastIndex=o;const c=gE.exec(n),d=n.slice(o,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function EE(e,t,n){const r=n?kO(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const h=u;c.unshift(h)}else{d=wO(a,t);const h=d.tagName.toLowerCase(),p=r?r.get(h):void 0;if(d.tagName=p||h,SO(u))c.unshift(u);else for(const[g,b]of Object.entries(u))vO(e,d.properties,g,b)}for(const h of c)Vf(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function SO(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 o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function vO(e,t,n,r){const o=hf(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"?o.spaceSeparated?a=a1(r):o.commaSeparated?a=Gg(r):o.commaOrSpaceSeparated?a=a1(Gg(r).join(" ")):a=yE(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?AO(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(yE(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function Vf(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)Vf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Vf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function yE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Gs(n)===Gs(t)))return!0}return n}function AO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function kO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const CO=["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"],NO=EE(Qu,"div"),OO=EE(No,"g",CO);function PO(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=TE(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=TE(t,c),h=d===-1?t.length+1:d+1;if(c===h)break;n.push(h)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function TE(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 zi={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/"},bE={}.hasOwnProperty,IO=Object.prototype;function RO(e,t){const n=t||{};return qf({file:n.file||void 0,location:!1,schema:n.space==="svg"?No:Qu,verbose:n.verbose||!1},e)}function qf(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},dl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:xE(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=PO(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},dl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},dl(e,r,n),n}default:return n=LO(e,t),n}}function xE(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=qf(e,t[n]);r.push(o)}return r}function LO(e,t){const n=e.schema;e.schema=t.namespaceURI===zi.svg?No:Qu;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;bE.call(IO,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?OO:NO)(t.tagName,o,xE(e,t.childNodes));if(dl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&Lo(d.startTag),p=d&&d.endTag&&Lo(d.endTag),g=qf(e,c.content);h&&p&&e.file&&(g.position={start:h.end,end:p.start}),u.content=g}return e.schema=n,u}function dl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=DO(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function DO(e,t,n){const r=Lo(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)bE.call(n.attrs,u)&&(a[hf(e.schema,u).property]=Lo(n.attrs[u]));n.startTag;const c=Lo(n.startTag),d=n.endTag?Lo(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=a,t.data={position:h}}}return r}function Lo(e){const t=_E({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=_E({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function _E(e){return e.line&&e.column?e:void 0}class oa{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}oa.prototype.property={},oa.prototype.normal={},oa.prototype.space=null;function wE(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new oa(n,r,t)}function Yf(e){return e.toLowerCase()}class Bn{constructor(t,n){this.property=t,this.attribute=n}}Bn.prototype.space=null,Bn.prototype.boolean=!1,Bn.prototype.booleanish=!1,Bn.prototype.overloadedBoolean=!1,Bn.prototype.number=!1,Bn.prototype.commaSeparated=!1,Bn.prototype.spaceSeparated=!1,Bn.prototype.commaOrSpaceSeparated=!1,Bn.prototype.mustUseProperty=!1,Bn.prototype.defined=!1;let MO=0;const je=ji(),Nt=ji(),SE=ji(),Ee=ji(),lt=ji(),Do=ji(),An=ji();function ji(){return Eu(2,++MO)}const Wf=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Nt,commaOrSpaceSeparated:An,commaSeparated:Do,number:Ee,overloadedBoolean:SE,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Gf=Object.keys(Wf);class Xf extends Bn{constructor(t,n,r,o){let a=-1;if(super(t,n),vE(this,"space",o),typeof r=="number")for(;++a<Gf.length;){const u=Gf[a];vE(this,Gf[a],(r&Wf[u])===Wf[u])}}}Xf.prototype.defined=!0;function vE(e,t,n){n&&(e[t]=n)}const FO={}.hasOwnProperty;function Mo(e){const t={},n={};let r;for(r in e.properties)if(FO.call(e.properties,r)){const o=e.properties[r],a=new Xf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Yf(r)]=r,n[Yf(a.attribute)]=r}return new oa(t,n,e.space)}const AE=Mo({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),kE=Mo({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function CE(e,t){return t in e?e[t]:t}function NE(e,t){return CE(e,t.toLowerCase())}const OE=Mo({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:NE,properties:{xmlns:null,xmlnsXLink:null}}),PE=Mo({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Nt,ariaAutoComplete:null,ariaBusy:Nt,ariaChecked:Nt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Nt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Nt,ariaFlowTo:lt,ariaGrabbed:Nt,ariaHasPopup:null,ariaHidden:Nt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:Ee,ariaLive:null,ariaModal:Nt,ariaMultiLine:Nt,ariaMultiSelectable:Nt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Nt,ariaReadOnly:Nt,ariaRelevant:null,ariaRequired:Nt,ariaRoleDescription:lt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Nt,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null}}),BO=Mo({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:NE,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Do,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:lt,autoFocus:je,autoPlay:je,blocking:lt,capture:null,charSet:null,checked:je,cite:null,className:lt,cols:Ee,colSpan:null,content:null,contentEditable:Nt,controls:je,controlsList:lt,coords:Ee|Do,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:SE,draggable:Nt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:lt,height:Ee,hidden:je,high:Ee,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:lt,itemRef:lt,itemScope:je,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:Ee,pattern:null,ping:lt,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:lt,required:je,reversed:je,rows:Ee,rowSpan:Ee,sandbox:lt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Nt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Nt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Nt,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:Ee,security:null,unselectable:null}}),UO=Mo({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:CE,properties:{about:An,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Do,g2:Do,glyphName:Do,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:An,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:An,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:An,rev:An,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:An,requiredFeatures:An,requiredFonts:An,requiredFormats:An,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:An,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:An,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:An,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),HO=/^data[-\w.:]+$/i,IE=/-[a-z]/g,zO=/[A-Z]/g;function jO(e,t){const n=Yf(t);let r=t,o=Bn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&HO.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(IE,VO);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!IE.test(a)){let u=a.replace(zO,$O);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Xf}return new o(r,t)}function $O(e){return"-"+e.toLowerCase()}function VO(e){return e.charAt(1).toUpperCase()}const qO=wE([kE,AE,OE,PE,BO],"html"),RE=wE([kE,AE,OE,PE,UO],"svg"),LE={}.hasOwnProperty;function DE(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&LE.call(o,e)){const d=String(o[e]);u=LE.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const YO={},WO={}.hasOwnProperty,ME=DE("type",{handlers:{root:XO,element:eP,text:JO,comment:ZO,doctype:QO}});function GO(e,t){const r=(t||YO).space;return ME(e,r==="svg"?RE:qO)}function XO(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Kf(e.children,n,t),Fo(e,n),n}function KO(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Kf(e.children,n,t),Fo(e,n),n}function QO(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Fo(e,t),t}function JO(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Fo(e,t),t}function ZO(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Fo(e,t),t}function eP(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=RE);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&WO.call(e.properties,a)){const d=tP(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:zi[u],childNodes:[],parentNode:null};return c.childNodes=Kf(e.children,c,r),Fo(e,c),e.tagName==="template"&&e.content&&(c.content=KO(e.content,r)),c}function tP(e,t,n){const r=jO(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?Xg(n):u1(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=zi[r.space]}return o}function Kf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=ME(e[r],n);a.parentNode=t,o.push(a)}return o}function Fo(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 nP=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],rP=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]),mt="�";var P;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(P||(P={}));const hn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function FE(e){return e>=55296&&e<=57343}function iP(e){return e>=56320&&e<=57343}function oP(e,t){return(e-55296)*1024+9216+t}function BE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function UE(e){return e>=64976&&e<=65007||rP.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const sP=65536;class aP{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=sP,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:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(iP(n))return this.pos++,this._addGap(),oP(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,FE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){BE(t)?this._err(te.controlCharacterInInputStream):UE(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var qe;(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"})(qe||(qe={}));function HE(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 uP=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),lP=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 cP(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=lP.get(e))!==null&&t!==void 0?t:e}var Mt;(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"})(Mt||(Mt={}));const dP=32;var Zr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Zr||(Zr={}));function Qf(e){return e>=Mt.ZERO&&e<=Mt.NINE}function fP(e){return e>=Mt.UPPER_A&&e<=Mt.UPPER_F||e>=Mt.LOWER_A&&e<=Mt.LOWER_F}function hP(e){return e>=Mt.UPPER_A&&e<=Mt.UPPER_Z||e>=Mt.LOWER_A&&e<=Mt.LOWER_Z||Qf(e)}function pP(e){return e===Mt.EQUALS||hP(e)}var Ft;(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"})(Ft||(Ft={}));var Lr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Lr||(Lr={}));class mP{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ft.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Lr.Strict}startEntity(t){this.decodeMode=t,this.state=Ft.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ft.EntityStart:return t.charCodeAt(n)===Mt.NUM?(this.state=Ft.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ft.NamedEntity,this.stateNamedEntity(t,n));case Ft.NumericStart:return this.stateNumericStart(t,n);case Ft.NumericDecimal:return this.stateNumericDecimal(t,n);case Ft.NumericHex:return this.stateNumericHex(t,n);case Ft.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|dP)===Mt.LOWER_X?(this.state=Ft.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ft.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Qf(o)||fP(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Qf(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,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===Mt.SEMI)this.consumed+=1;else if(this.decodeMode===Lr.Strict)return 0;return this.emitCodePoint(cP(this.result),this.consumed),this.errors&&(t!==Mt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&Zr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=gP(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Lr.Attribute&&(a===0||pP(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Zr.VALUE_LENGTH)>>14,a!==0){if(u===Mt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Lr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Zr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Zr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Ft.NamedEntity:return this.result!==0&&(this.decodeMode!==Lr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ft.NumericDecimal:return this.emitNumericEntity(0,2);case Ft.NumericHex:return this.emitNumericEntity(0,3);case Ft.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ft.EntityStart:return 0}}}function gP(e,t,n,r){const o=(t&Zr.BRANCH_LENGTH)>>7,a=t&Zr.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,h=e[d];if(h<r)u=d+1;else if(h>r)c=d-1;else return e[d+o]}return-1}var ce;(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/"})(ce||(ce={}));var $i;(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"})($i||($i={}));var Un;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Un||(Un={}));var K;(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"})(K||(K={}));var m;(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"})(m||(m={}));const EP=new Map([[K.A,m.A],[K.ADDRESS,m.ADDRESS],[K.ANNOTATION_XML,m.ANNOTATION_XML],[K.APPLET,m.APPLET],[K.AREA,m.AREA],[K.ARTICLE,m.ARTICLE],[K.ASIDE,m.ASIDE],[K.B,m.B],[K.BASE,m.BASE],[K.BASEFONT,m.BASEFONT],[K.BGSOUND,m.BGSOUND],[K.BIG,m.BIG],[K.BLOCKQUOTE,m.BLOCKQUOTE],[K.BODY,m.BODY],[K.BR,m.BR],[K.BUTTON,m.BUTTON],[K.CAPTION,m.CAPTION],[K.CENTER,m.CENTER],[K.CODE,m.CODE],[K.COL,m.COL],[K.COLGROUP,m.COLGROUP],[K.DD,m.DD],[K.DESC,m.DESC],[K.DETAILS,m.DETAILS],[K.DIALOG,m.DIALOG],[K.DIR,m.DIR],[K.DIV,m.DIV],[K.DL,m.DL],[K.DT,m.DT],[K.EM,m.EM],[K.EMBED,m.EMBED],[K.FIELDSET,m.FIELDSET],[K.FIGCAPTION,m.FIGCAPTION],[K.FIGURE,m.FIGURE],[K.FONT,m.FONT],[K.FOOTER,m.FOOTER],[K.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[K.FORM,m.FORM],[K.FRAME,m.FRAME],[K.FRAMESET,m.FRAMESET],[K.H1,m.H1],[K.H2,m.H2],[K.H3,m.H3],[K.H4,m.H4],[K.H5,m.H5],[K.H6,m.H6],[K.HEAD,m.HEAD],[K.HEADER,m.HEADER],[K.HGROUP,m.HGROUP],[K.HR,m.HR],[K.HTML,m.HTML],[K.I,m.I],[K.IMG,m.IMG],[K.IMAGE,m.IMAGE],[K.INPUT,m.INPUT],[K.IFRAME,m.IFRAME],[K.KEYGEN,m.KEYGEN],[K.LABEL,m.LABEL],[K.LI,m.LI],[K.LINK,m.LINK],[K.LISTING,m.LISTING],[K.MAIN,m.MAIN],[K.MALIGNMARK,m.MALIGNMARK],[K.MARQUEE,m.MARQUEE],[K.MATH,m.MATH],[K.MENU,m.MENU],[K.META,m.META],[K.MGLYPH,m.MGLYPH],[K.MI,m.MI],[K.MO,m.MO],[K.MN,m.MN],[K.MS,m.MS],[K.MTEXT,m.MTEXT],[K.NAV,m.NAV],[K.NOBR,m.NOBR],[K.NOFRAMES,m.NOFRAMES],[K.NOEMBED,m.NOEMBED],[K.NOSCRIPT,m.NOSCRIPT],[K.OBJECT,m.OBJECT],[K.OL,m.OL],[K.OPTGROUP,m.OPTGROUP],[K.OPTION,m.OPTION],[K.P,m.P],[K.PARAM,m.PARAM],[K.PLAINTEXT,m.PLAINTEXT],[K.PRE,m.PRE],[K.RB,m.RB],[K.RP,m.RP],[K.RT,m.RT],[K.RTC,m.RTC],[K.RUBY,m.RUBY],[K.S,m.S],[K.SCRIPT,m.SCRIPT],[K.SEARCH,m.SEARCH],[K.SECTION,m.SECTION],[K.SELECT,m.SELECT],[K.SOURCE,m.SOURCE],[K.SMALL,m.SMALL],[K.SPAN,m.SPAN],[K.STRIKE,m.STRIKE],[K.STRONG,m.STRONG],[K.STYLE,m.STYLE],[K.SUB,m.SUB],[K.SUMMARY,m.SUMMARY],[K.SUP,m.SUP],[K.TABLE,m.TABLE],[K.TBODY,m.TBODY],[K.TEMPLATE,m.TEMPLATE],[K.TEXTAREA,m.TEXTAREA],[K.TFOOT,m.TFOOT],[K.TD,m.TD],[K.TH,m.TH],[K.THEAD,m.THEAD],[K.TITLE,m.TITLE],[K.TR,m.TR],[K.TRACK,m.TRACK],[K.TT,m.TT],[K.U,m.U],[K.UL,m.UL],[K.SVG,m.SVG],[K.VAR,m.VAR],[K.WBR,m.WBR],[K.XMP,m.XMP]]);function Bo(e){var t;return(t=EP.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const he=m,yP={[ce.HTML]:new Set([he.ADDRESS,he.APPLET,he.AREA,he.ARTICLE,he.ASIDE,he.BASE,he.BASEFONT,he.BGSOUND,he.BLOCKQUOTE,he.BODY,he.BR,he.BUTTON,he.CAPTION,he.CENTER,he.COL,he.COLGROUP,he.DD,he.DETAILS,he.DIR,he.DIV,he.DL,he.DT,he.EMBED,he.FIELDSET,he.FIGCAPTION,he.FIGURE,he.FOOTER,he.FORM,he.FRAME,he.FRAMESET,he.H1,he.H2,he.H3,he.H4,he.H5,he.H6,he.HEAD,he.HEADER,he.HGROUP,he.HR,he.HTML,he.IFRAME,he.IMG,he.INPUT,he.LI,he.LINK,he.LISTING,he.MAIN,he.MARQUEE,he.MENU,he.META,he.NAV,he.NOEMBED,he.NOFRAMES,he.NOSCRIPT,he.OBJECT,he.OL,he.P,he.PARAM,he.PLAINTEXT,he.PRE,he.SCRIPT,he.SECTION,he.SELECT,he.SOURCE,he.STYLE,he.SUMMARY,he.TABLE,he.TBODY,he.TD,he.TEMPLATE,he.TEXTAREA,he.TFOOT,he.TH,he.THEAD,he.TITLE,he.TR,he.TRACK,he.UL,he.WBR,he.XMP]),[ce.MATHML]:new Set([he.MI,he.MO,he.MN,he.MS,he.MTEXT,he.ANNOTATION_XML]),[ce.SVG]:new Set([he.TITLE,he.FOREIGN_OBJECT,he.DESC]),[ce.XLINK]:new Set,[ce.XML]:new Set,[ce.XMLNS]:new Set},Jf=new Set([he.H1,he.H2,he.H3,he.H4,he.H5,he.H6]);K.STYLE,K.SCRIPT,K.XMP,K.IFRAME,K.NOEMBED,K.NOFRAMES,K.PLAINTEXT;var R;(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"})(R||(R={}));const St={DATA:R.DATA,RCDATA:R.RCDATA,RAWTEXT:R.RAWTEXT,SCRIPT_DATA:R.SCRIPT_DATA,PLAINTEXT:R.PLAINTEXT,CDATA_SECTION:R.CDATA_SECTION};function TP(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function sa(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function bP(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function ei(e){return bP(e)||sa(e)}function zE(e){return ei(e)||TP(e)}function fl(e){return e+32}function jE(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function $E(e){return jE(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function xP(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:FE(e)?te.surrogateCharacterReference:UE(e)?te.noncharacterCharacterReference:BE(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class _P{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=R.DATA,this.returnState=R.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new aP(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new mP(uP,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=xP(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.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:qe.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qe.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:qe.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(HE(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Bo(t.tagName),t.type===qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case qe.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:qe.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=jE(t)?qe.WHITESPACE_CHARACTER:t===P.NULL?qe.NULL_CHARACTER:qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=R.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Lr.Attribute:Lr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===R.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case R.DATA:{this._stateData(t);break}case R.RCDATA:{this._stateRcdata(t);break}case R.RAWTEXT:{this._stateRawtext(t);break}case R.SCRIPT_DATA:{this._stateScriptData(t);break}case R.PLAINTEXT:{this._statePlaintext(t);break}case R.TAG_OPEN:{this._stateTagOpen(t);break}case R.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case R.TAG_NAME:{this._stateTagName(t);break}case R.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case R.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case R.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case R.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case R.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case R.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case R.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case R.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case R.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case R.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case R.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case R.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case R.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case R.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case R.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case R.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case R.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case R.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case R.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case R.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case R.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case R.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case R.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case R.BOGUS_COMMENT:{this._stateBogusComment(t);break}case R.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case R.COMMENT_START:{this._stateCommentStart(t);break}case R.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case R.COMMENT:{this._stateComment(t);break}case R.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case R.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case R.COMMENT_END:{this._stateCommentEnd(t);break}case R.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case R.DOCTYPE:{this._stateDoctype(t);break}case R.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case R.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case R.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case R.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case R.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case R.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case R.CDATA_SECTION:{this._stateCdataSection(t);break}case R.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case R.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case R.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case R.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=R.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=R.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(mt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=R.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(mt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(mt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(mt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ei(t))this._createStartTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=R.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=R.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=R.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ei(t))this._createEndTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=R.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=R.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=mt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(sa(t)?fl(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=R.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ei(t)?(this.state=R.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=R.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=R.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=R.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=R.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ei(t)?(this.state=R.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=R.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=R.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=R.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ei(t)?(this.state=R.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(mt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(mt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(mt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ei(t)?(this._emitChars("<"),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ei(t)?(this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(hn.SCRIPT,!1)&&$E(this.preprocessor.peek(hn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<hn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(mt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(mt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(mt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(hn.SCRIPT,!1)&&$E(this.preprocessor.peek(hn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<hn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=R.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=mt;break}default:this.currentAttr.name+=String.fromCodePoint(sa(t)?fl(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=R.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=R.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=R.DATA,this.emitCurrentTagToken();break}default:this.state=R.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=mt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=mt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=mt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=R.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=R.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=mt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(hn.DASH_DASH,!0)?(this._createCommentToken(hn.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(hn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(hn.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(hn.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(hn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=R.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=R.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=R.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=R.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=R.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=R.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=mt;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=R.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=R.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=R.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=R.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=R.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=R.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=R.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=R.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(sa(t))this._createDoctypeToken(String.fromCharCode(fl(t))),this.state=R.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(mt),this.state=R.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=R.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=R.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=mt;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(sa(t)?fl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(hn.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(hn.SYSTEM,!1)?this.state=R.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=mt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=mt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=mt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=mt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=R.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=R.CDATA_SECTION_END:(this._emitChars("]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=R.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&zE(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){zE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const VE=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),qE=new Set([...VE,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),hl=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),wP=new Set([...hl,m.OL,m.UL]),SP=new Set([...hl,m.BUTTON]),YE=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),WE=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),vP=new Set([m.TR,m.TEMPLATE,m.HTML]),AP=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),kP=new Set([m.TABLE,m.TEMPLATE,m.HTML]),CP=new Set([m.TD,m.TH]);class NP{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=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ce.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 o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===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])!==ce.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(Jf,ce.HTML)}popUntilTableCellPopped(){this.popUntilPopped(CP,ce.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(kP,ce.HTML)}clearBackToTableBodyContext(){this.clearBackTo(AP,ce.HTML)}clearBackToTableRowContext(){this.clearBackTo(vP,ce.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]===m.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]===m.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ce.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ce.SVG:{if(WE.has(o))return!1;break}case ce.MATHML:{if(YE.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,hl)}hasInListItemScope(t){return this.hasInDynamicScope(t,wP)}hasInButtonScope(t){return this.hasInDynamicScope(t,SP)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ce.HTML:{if(Jf.has(n))return!0;if(hl.has(n))return!1;break}case ce.SVG:{if(WE.has(n))return!1;break}case ce.MATHML:{if(YE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ce.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ce.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ce.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&VE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&qE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&qE.has(this.currentTagId);)this.pop()}}const Zf=3;var Er;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Er||(Er={}));const GE={type:Er.Marker};class OP{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Er.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===a&&this.treeAdapter.getNamespaceURI(h)===u){const p=this.treeAdapter.getAttrList(h);p.length===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Zf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Zf)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=Zf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(GE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Er.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Er.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(GE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Er.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Er.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Er.Element&&n.element===t)}}const ti={createDocument(){return{nodeName:"#document",mode:Un.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 o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ti.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(ti.isTextNode(n)){n.value+=t;return}}ti.appendChild(e,ti.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ti.isTextNode(r)?r.value+=t:ti.insertBefore(e,ti.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=B(B({},e.sourceCodeLocation),t)}},XE="html",PP="about:legacy-compat",IP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",KE=["+//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//"],RP=[...KE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],LP=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),QE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],DP=[...QE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function JE(e,t){return t.some(n=>e.startsWith(n))}function MP(e){return e.name===XE&&e.publicId===null&&(e.systemId===null||e.systemId===PP)}function FP(e){if(e.name!==XE)return Un.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===IP)return Un.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),LP.has(n))return Un.QUIRKS;let r=t===null?RP:KE;if(JE(n,r))return Un.QUIRKS;if(r=t===null?QE:DP,JE(n,r))return Un.LIMITED_QUIRKS}return Un.NO_QUIRKS}const ZE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},BP="definitionurl",UP="definitionURL",HP=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])),zP=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ce.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ce.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ce.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ce.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ce.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ce.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ce.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ce.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ce.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ce.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ce.XMLNS}]]),jP=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])),$P=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function VP(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===$i.COLOR||r===$i.SIZE||r===$i.FACE)||$P.has(t)}function ey(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===BP){e.attrs[t].name=UP;break}}function ty(e){for(let t=0;t<e.attrs.length;t++){const n=HP.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function eh(e){for(let t=0;t<e.attrs.length;t++){const n=zP.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 qP(e){const t=jP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Bo(e.tagName))}function YP(e,t){return t===ce.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function WP(e,t,n){if(t===ce.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===$i.ENCODING){const o=n[r].value.toLowerCase();return o===ZE.TEXT_HTML||o===ZE.APPLICATION_XML}}return t===ce.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function GP(e,t,n,r){return(!r||r===ce.HTML)&&WP(e,t,n)||(!r||r===ce.MATHML)&&YP(e,t)}const XP="hidden",KP=8,QP=3;var M;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(M||(M={}));const JP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ny=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),ry={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ti,onParseError:null};class iy{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=B(B({},ry),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 _P(this.options,this),this.activeFormattingElements=new OP(this.treeAdapter),this.fragmentContextID=r?Bo(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new NP(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=B(B({},ry),n);t!=null||(t=r.treeAdapter.createElement(K.TEMPLATE,ce.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ce.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:JP,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 o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.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)===ce.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ce.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=St.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)===K.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ce.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=St.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=St.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=St.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=St.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&oe(B({},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,ce.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ce.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(K.HTML,ce.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:h,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:h,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),a=n.type===qe.END_TAG&&o===n.tagName?{endTag:B({},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===m.SVG&&this.treeAdapter.getTagName(n)===K.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ce.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ce.HTML)}_processToken(t){switch(t.type){case qe.CHARACTER:{this.onCharacter(t);break}case qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case qe.COMMENT:{this.onComment(t);break}case qe.DOCTYPE:{this.onDoctype(t);break}case qe.START_TAG:{this._processStartTag(t);break}case qe.END_TAG:{this.onEndTag(t);break}case qe.EOF:{this.onEof(t);break}case qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return GP(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Er.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=M.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=M.IN_TABLE;return}case m.BODY:{this.insertionMode=M.IN_BODY;return}case m.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return ny.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 m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ce.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.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 yP[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){CR(this,t);return}switch(this.insertionMode){case M.INITIAL:{aa(this,t);break}case M.BEFORE_HTML:{ua(this,t);break}case M.BEFORE_HEAD:{la(this,t);break}case M.IN_HEAD:{ca(this,t);break}case M.IN_HEAD_NO_SCRIPT:{da(this,t);break}case M.AFTER_HEAD:{fa(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{sy(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{ih(this,t);break}case M.IN_TABLE_TEXT:{py(this,t);break}case M.IN_COLUMN_GROUP:{gl(this,t);break}case M.AFTER_BODY:{Tl(this,t);break}case M.AFTER_AFTER_BODY:{bl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){kR(this,t);return}switch(this.insertionMode){case M.INITIAL:{aa(this,t);break}case M.BEFORE_HTML:{ua(this,t);break}case M.BEFORE_HEAD:{la(this,t);break}case M.IN_HEAD:{ca(this,t);break}case M.IN_HEAD_NO_SCRIPT:{da(this,t);break}case M.AFTER_HEAD:{fa(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{ih(this,t);break}case M.IN_COLUMN_GROUP:{gl(this,t);break}case M.AFTER_BODY:{Tl(this,t);break}case M.AFTER_AFTER_BODY:{bl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){nh(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{nh(this,t);break}case M.IN_TABLE_TEXT:{ma(this,t);break}case M.AFTER_BODY:{oI(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{sI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{aI(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{ma(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?NR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{aa(this,t);break}case M.BEFORE_HTML:{uI(this,t);break}case M.BEFORE_HEAD:{cI(this,t);break}case M.IN_HEAD:{er(this,t);break}case M.IN_HEAD_NO_SCRIPT:{hI(this,t);break}case M.AFTER_HEAD:{mI(this,t);break}case M.IN_BODY:{Kt(this,t);break}case M.IN_TABLE:{Uo(this,t);break}case M.IN_TABLE_TEXT:{ma(this,t);break}case M.IN_CAPTION:{dR(this,t);break}case M.IN_COLUMN_GROUP:{oh(this,t);break}case M.IN_TABLE_BODY:{El(this,t);break}case M.IN_ROW:{yl(this,t);break}case M.IN_CELL:{pR(this,t);break}case M.IN_SELECT:{Ey(this,t);break}case M.IN_SELECT_IN_TABLE:{gR(this,t);break}case M.IN_TEMPLATE:{yR(this,t);break}case M.AFTER_BODY:{bR(this,t);break}case M.IN_FRAMESET:{xR(this,t);break}case M.AFTER_FRAMESET:{wR(this,t);break}case M.AFTER_AFTER_BODY:{vR(this,t);break}case M.AFTER_AFTER_FRAMESET:{AR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?OR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{aa(this,t);break}case M.BEFORE_HTML:{lI(this,t);break}case M.BEFORE_HEAD:{dI(this,t);break}case M.IN_HEAD:{fI(this,t);break}case M.IN_HEAD_NO_SCRIPT:{pI(this,t);break}case M.AFTER_HEAD:{gI(this,t);break}case M.IN_BODY:{ml(this,t);break}case M.TEXT:{tR(this,t);break}case M.IN_TABLE:{ha(this,t);break}case M.IN_TABLE_TEXT:{ma(this,t);break}case M.IN_CAPTION:{fR(this,t);break}case M.IN_COLUMN_GROUP:{hR(this,t);break}case M.IN_TABLE_BODY:{sh(this,t);break}case M.IN_ROW:{gy(this,t);break}case M.IN_CELL:{mR(this,t);break}case M.IN_SELECT:{yy(this,t);break}case M.IN_SELECT_IN_TABLE:{ER(this,t);break}case M.IN_TEMPLATE:{TR(this,t);break}case M.AFTER_BODY:{by(this,t);break}case M.IN_FRAMESET:{_R(this,t);break}case M.AFTER_FRAMESET:{SR(this,t);break}case M.AFTER_AFTER_BODY:{bl(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{aa(this,t);break}case M.BEFORE_HTML:{ua(this,t);break}case M.BEFORE_HEAD:{la(this,t);break}case M.IN_HEAD:{ca(this,t);break}case M.IN_HEAD_NO_SCRIPT:{da(this,t);break}case M.AFTER_HEAD:{fa(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{fy(this,t);break}case M.TEXT:{nR(this,t);break}case M.IN_TABLE_TEXT:{ma(this,t);break}case M.IN_TEMPLATE:{Ty(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{rh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{oy(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{ih(this,t);break}case M.IN_TABLE_TEXT:{hy(this,t);break}}}}function ZP(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):dy(e,t),n}function eI(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function tI(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=QP;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=nI(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function nI(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 rI(e,t,n){const r=e.treeAdapter.getTagName(t),o=Bo(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===ce.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function iI(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function th(e,t){for(let n=0;n<KP;n++){const r=ZP(e,t);if(!r)break;const o=eI(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=tI(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&rI(e,u,a),iI(e,o,r)}}function nh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function oI(e,t){e._appendCommentNode(t,e.openElements.items[0])}function sI(e,t){e._appendCommentNode(t,e.document)}function rh(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],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.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 aI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Un.QUIRKS:FP(t);MP(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function aa(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Un.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function uI(e,t){t.tagID===m.HTML?(e._insertElement(t,ce.HTML),e.insertionMode=M.BEFORE_HEAD):ua(e,t)}function lI(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&ua(e,t)}function ua(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function cI(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.HEAD:{e._insertElement(t,ce.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:la(e,t)}}function dI(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?la(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function la(e,t){e._insertFakeElement(K.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function er(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,St.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,St.RAWTEXT):(e._insertElement(t,ce.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,St.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,St.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case m.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:ca(e,t)}}function fI(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{ca(e,t);break}case m.TEMPLATE:{Vi(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Vi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function ca(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function hI(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{er(e,t);break}case m.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:da(e,t)}}function pI(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case m.BR:{da(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function da(e,t){const n=t.type===qe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function mI(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.BODY:{e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ce.HTML),e.insertionMode=M.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),er(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:fa(e,t)}}function gI(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{fa(e,t);break}case m.TEMPLATE:{Vi(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function fa(e,t){e._insertFakeElement(K.BODY,m.BODY),e.insertionMode=M.IN_BODY,pl(e,t)}function pl(e,t){switch(t.type){case qe.CHARACTER:{sy(e,t);break}case qe.WHITESPACE_CHARACTER:{oy(e,t);break}case qe.COMMENT:{nh(e,t);break}case qe.START_TAG:{Kt(e,t);break}case qe.END_TAG:{ml(e,t);break}case qe.EOF:{fy(e,t);break}}}function oy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function sy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function EI(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function yI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function TI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_FRAMESET)}function bI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ce.HTML)}function xI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Jf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ce.HTML)}function _I(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function wI(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ce.HTML),n||(e.formElement=e.openElements.current))}function SI(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===m.LI&&o===m.LI||(n===m.DD||n===m.DT)&&(o===m.DD||o===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ce.HTML)}function vI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.tokenizer.state=St.PLAINTEXT}function AI(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1}function kI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(K.A);n&&(th(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function CI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function NI(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(th(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function OI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function PI(e,t){e.treeAdapter.getDocumentMode(e.document)!==Un.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function ay(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function uy(e){const t=HE(e,$i.TYPE);return t!=null&&t.toLowerCase()===XP}function II(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),uy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function RI(e,t){e._appendElement(t,ce.HTML),t.ackSelfClosing=!0}function LI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function DI(e,t){t.tagName=K.IMG,t.tagID=m.IMG,ay(e,t)}function MI(e,t){e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.tokenizer.state=St.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function FI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,St.RAWTEXT)}function BI(e,t){e.framesetOk=!1,e._switchToTextParsing(t,St.RAWTEXT)}function ly(e,t){e._switchToTextParsing(t,St.RAWTEXT)}function UI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function HI(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function zI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ce.HTML)}function jI(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ce.HTML)}function $I(e,t){e._reconstructActiveFormattingElements(),ey(t),eh(t),t.selfClosing?e._appendElement(t,ce.MATHML):e._insertElement(t,ce.MATHML),t.ackSelfClosing=!0}function VI(e,t){e._reconstructActiveFormattingElements(),ty(t),eh(t),t.selfClosing?e._appendElement(t,ce.SVG):e._insertElement(t,ce.SVG),t.ackSelfClosing=!0}function cy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function Kt(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{CI(e,t);break}case m.A:{kI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{xI(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{bI(e,t);break}case m.LI:case m.DD:case m.DT:{SI(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{ay(e,t);break}case m.HR:{LI(e,t);break}case m.RB:case m.RTC:{zI(e,t);break}case m.RT:case m.RP:{jI(e,t);break}case m.PRE:case m.LISTING:{_I(e,t);break}case m.XMP:{FI(e,t);break}case m.SVG:{VI(e,t);break}case m.HTML:{EI(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{er(e,t);break}case m.BODY:{yI(e,t);break}case m.FORM:{wI(e,t);break}case m.NOBR:{NI(e,t);break}case m.MATH:{$I(e,t);break}case m.TABLE:{PI(e,t);break}case m.INPUT:{II(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{RI(e,t);break}case m.IMAGE:{DI(e,t);break}case m.BUTTON:{AI(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{OI(e,t);break}case m.IFRAME:{BI(e,t);break}case m.SELECT:{UI(e,t);break}case m.OPTION:case m.OPTGROUP:{HI(e,t);break}case m.NOEMBED:case m.NOFRAMES:{ly(e,t);break}case m.FRAMESET:{TI(e,t);break}case m.TEXTAREA:{MI(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?ly(e,t):cy(e,t);break}case m.PLAINTEXT:{vI(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:cy(e,t)}}function qI(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function YI(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=M.AFTER_BODY,by(e,t))}function WI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function GI(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function XI(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(K.P,m.P),e._closePElement()}function KI(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function QI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function JI(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function ZI(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function eR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(K.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function dy(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==m.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function ml(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{th(e,t);break}case m.P:{XI(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{WI(e,t);break}case m.LI:{KI(e);break}case m.DD:case m.DT:{QI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{JI(e);break}case m.BR:{eR(e);break}case m.BODY:{qI(e,t);break}case m.HTML:{YI(e,t);break}case m.FORM:{GI(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{ZI(e,t);break}case m.TEMPLATE:{Vi(e,t);break}default:dy(e,t)}}function fy(e,t){e.tmplInsertionModeStack.length>0?Ty(e,t):rh(e,t)}function tR(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function nR(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ih(e,t){if(e.openElements.currentTagId!==void 0&&ny.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case qe.CHARACTER:{py(e,t);break}case qe.WHITESPACE_CHARACTER:{hy(e,t);break}}else pa(e,t)}function rR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_CAPTION}function iR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function oR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.COLGROUP,m.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,oh(e,t)}function sR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_TABLE_BODY}function aR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.TBODY,m.TBODY),e.insertionMode=M.IN_TABLE_BODY,El(e,t)}function uR(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function lR(e,t){uy(t)?e._appendElement(t,ce.HTML):pa(e,t),t.ackSelfClosing=!0}function cR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ce.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Uo(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{aR(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{er(e,t);break}case m.COL:{oR(e,t);break}case m.FORM:{cR(e,t);break}case m.TABLE:{uR(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{sR(e,t);break}case m.INPUT:{lR(e,t);break}case m.CAPTION:{rR(e,t);break}case m.COLGROUP:{iR(e,t);break}default:pa(e,t)}}function ha(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{Vi(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:pa(e,t)}}function pa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,pl(e,t),e.fosterParentingEnabled=n}function hy(e,t){e.pendingCharacterTokens.push(t)}function py(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ma(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)pa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const my=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function dR(e,t){const n=t.tagID;my.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,Uo(e,t)):Kt(e,t)}function fR(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===m.TABLE&&ha(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:ml(e,t)}}function oh(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.COL:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{er(e,t);break}default:gl(e,t)}}function hR(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case m.TEMPLATE:{Vi(e,t);break}case m.COL:break;default:gl(e,t)}}function gl(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function El(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(K.TR,m.TR),e.insertionMode=M.IN_ROW,yl(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Uo(e,t));break}default:Uo(e,t)}}function sh(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,ha(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:ha(e,t)}}function yl(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,El(e,t));break}default:Uo(e,t)}}function gy(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,sh(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,sh(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:ha(e,t)}}function pR(e,t){const n=t.tagID;my.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),yl(e,t)):Kt(e,t)}function mR(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),gy(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:ml(e,t)}}function Ey(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ce.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ce.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{er(e,t);break}}}function yy(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{Vi(e,t);break}}}function gR(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ey(e,t)}function ER(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):yy(e,t)}function yR(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{er(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,Uo(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,oh(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,El(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,yl(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,Kt(e,t)}}function TR(e,t){t.tagID===m.TEMPLATE&&Vi(e,t)}function Ty(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):rh(e,t)}function bR(e,t){t.tagID===m.HTML?Kt(e,t):Tl(e,t)}function by(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.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 Tl(e,t)}function Tl(e,t){e.insertionMode=M.IN_BODY,pl(e,t)}function xR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.FRAMESET:{e._insertElement(t,ce.HTML);break}case m.FRAME:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{er(e,t);break}}}function _R(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function wR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{er(e,t);break}}}function SR(e,t){t.tagID===m.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function vR(e,t){t.tagID===m.HTML?Kt(e,t):bl(e,t)}function bl(e,t){e.insertionMode=M.IN_BODY,pl(e,t)}function AR(e,t){switch(t.tagID){case m.HTML:{Kt(e,t);break}case m.NOFRAMES:{er(e,t);break}}}function kR(e,t){t.chars=mt,e._insertCharacters(t)}function CR(e,t){e._insertCharacters(t),e.framesetOk=!1}function xy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ce.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function NR(e,t){if(VP(t))xy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ce.MATHML?ey(t):r===ce.SVG&&(qP(t),ty(t)),eh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function OR(e,t){if(t.tagID===m.P||t.tagID===m.BR){xy(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)===ce.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}K.AREA,K.BASE,K.BASEFONT,K.BGSOUND,K.BR,K.COL,K.EMBED,K.FRAME,K.HR,K.IMG,K.INPUT,K.KEYGEN,K.LINK,K.META,K.PARAM,K.SOURCE,K.TRACK,K.WBR;const PR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,IR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),_y={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function wy(e,t){const n=jR(e),r=DE("type",{handlers:{root:RR,element:LR,text:DR,comment:vy,doctype:MR,raw:BR},unknown:UR}),o={parser:n?new iy(_y):iy.getFragmentParser(void 0,_y),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Ho(o,mr());const a=n?o.parser.document:o.parser.getFragment(),u=RO(a,{file:o.options.file});return o.stitches&&ll(u,"comment",function(c,d,h){const p=c;if(p.value.stitch&&h&&d!==void 0){const g=h.children;return g[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Sy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function RR(e,t){Sy(e.children,t)}function LR(e,t){HR(e,t),Sy(e.children,t),zR(e,t)}function DR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qe.CHARACTER,chars:e.value,location:ga(e)};Ho(t,mr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function MR(e,t){const n={type:qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ga(e)};Ho(t,mr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function FR(e,t){t.stitches=!0;const n=$R(e);if("children"in e&&"children"in n){const r=wy({type:"root",children:e.children},t.options);n.children=r.children}vy({type:"comment",value:{stitch:n}},t)}function vy(e,t){const n=e.value,r={type:qe.COMMENT,data:n,location:ga(e)};Ho(t,mr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function BR(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,Ay(t,mr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(PR,"<$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 UR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))FR(n,t);else{let r="";throw IR.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 Ho(e,t){Ay(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=St.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 Ay(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 HR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===St.PLAINTEXT)return;Ho(t,mr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:zi.html;o===zi.html&&n==="svg"&&(o=zi.svg);const a=GO(oe(B({},e),{children:[]}),{space:o===zi.svg?"svg":"html"}),u={type:qe.START_TAG,tagName:n,tagID:Bo(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ga(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function zR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&nP.includes(n)||t.parser.tokenizer.state===St.PLAINTEXT)return;Ho(t,Ju(e));const r={type:qe.END_TAG,tagName:n,tagID:Bo(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ga(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===St.RCDATA||t.parser.tokenizer.state===St.RAWTEXT||t.parser.tokenizer.state===St.SCRIPT_DATA)&&(t.parser.tokenizer.state=St.DATA)}function jR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ga(e){const t=mr(e)||{line:void 0,column:void 0,offset:void 0},n=Ju(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 $R(e){return"children"in e?Hi(oe(B({},e),{children:[]})):Hi(e)}function ky(e){return function(t,n){return wy(t,oe(B({},e),{file:n}))}}const qi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Cy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...qi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...qi],h2:[["className","sr-only"]],img:[...qi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...qi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...qi],table:[...qi],ul:[...qi,["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"]},ni={}.hasOwnProperty;function VR(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},Cy),t):Cy,stack:[]},o=Ny(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Ny(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return qR(e,n);case"doctype":return YR(e,n);case"element":return WR(e,n);case"root":return GR(e,n);case"text":return XR(e,n)}}}function qR(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 Ea(a,t),a}}function YR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ea(n,t),n}}function WR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Oy(e,t.children),o=KR(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&&ni.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Ea(u,t),u}function GR(e,t){const r={type:"root",children:Oy(e,t.children)};return Ea(r,t),r}function XR(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ea(r,t),r}function Oy(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Ny(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function KR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&ni.call(r,n)?r[n]:void 0,u=r&&ni.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(ni.call(c,h)){const p=c[h];let g=Py(e,Ry(a,h),h,p);g==null&&(g=Py(e,Ry(u,h),h,p)),g!=null&&(d[h]=g)}if(o&&ni.call(o,n)){const p=o[n];for(h in p)ni.call(p,h)&&!ni.call(d,h)&&(d[h]=p[h])}return d}function Py(e,t,n,r){return t?Array.isArray(r)?QR(e,t,n,r):Iy(e,t,n,r):void 0}function QR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Iy(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Iy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&JR(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function JR(e,t,n){const r=e.schema.protocols&&ni.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let h=-1;for(;++h<r.length;){const p=r[h];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function Ea(e,t){const n=p1(t);t.data&&(e.data=Hi(t.data)),n&&(e.position=n)}function Ry(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function ZR(e){return function(t){return VR(t,e)}}const Ly=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return x.jsx("a",oe(B(B({className:U(e,`${L}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},e6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=ot();return!e&&!t?null:x.jsx("div",{className:U(n,`${L}-disclaimer`),children:t?x.jsx(mE,{rehypePlugins:[ky,ZR],components:{ul:({children:r})=>x.jsx("ul",{className:U(n,`${L}-ul`),children:r}),ol:({children:r})=>x.jsx("ol",{className:U(n,`${L}-ol`),children:r}),li:({children:r})=>x.jsx("li",{className:U(n,`${L}-li`),children:r}),a:({href:r,title:o,children:a})=>x.jsx(Ly,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>x.jsx("img",{className:U(n,`${L}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>x.jsx("p",{className:U(n,`${L}-disclaimer-text`),children:r}),span:({children:r})=>x.jsx("span",{className:U(n,`${L}-disclaimer-text-span`),children:r})},children:t}):x.jsx("p",{className:U(n,`${L}-disclaimer-text`),children:e})})},ah=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:o,sessionExpired:a}=Mn(),{globalClassName:u,searchConfig:c}=ot(),d=q.useRef(null),h=t||!o&&!a,p=b=>{var _;b.preventDefault();const y=(((_=d.current)==null?void 0:_.value)||"").trim();y&&(d.current.value="",r(y))},g=()=>{r("Can you connect me to a human?")};return x.jsxs("div",{className:U(u,e,`cim-${n}-component`,`${L}-search-bar-wrapper`),children:[x.jsxs("form",{className:U(u,e,`cim-${n}-component`,`${L}-search-bar`),name:`${L}-search-form`,onSubmit:p,children:[x.jsx("input",{className:U(u,e,`cim-${n}-component`,`${L}-search-input`),type:"text",ref:d,placeholder:(c==null?void 0:c.placeholder)||"Ask us anything",name:`${L}-user-input`,disabled:h}),x.jsx(_k,{className:e,globalClassName:u,searchConfig:c,componentType:n,isLoading:h}),x.jsx(Jn,{className:U(u,`${L}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:h,onClick:g,icon:x.jsx(ck,{})})]}),x.jsx(e6,{})]})};function t6(e){return it({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 n6(e){return it({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 Dy=q.createContext({isOpen:!1}),uh=q.createContext(null),My=q.createContext(null),zo=()=>{var n,r;const e=q.useContext(uh),t=q.useContext(My);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Fy=({onClearChat:e,componentType:t})=>{const n=zo(),r=()=>{e(),n()};return x.jsxs("button",{className:U(`${L}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[x.jsx(n6,{}),"Clear chat"]})},By=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=ot(),r=zo(),[o,a]=q.useState(!1),u=()=>ze(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return x.jsxs("button",{className:U(`${L}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:o,children:[x.jsx(t6,{}),"Download transcript"]})};function r6(e){return e==null?[]:Array.isArray(e)?e:[e]}var i6=(e,...t)=>e.concat(t),o6=(e,...t)=>e.filter(n=>!t.includes(n)),s6=e=>Array.from(new Set(e));function Uy(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function a6(e,t,n={}){const{step:r=1,loop:o=!0}=n;return Uy(e,t,{step:-r,loop:o})}var u6=e=>Array.isArray(e),Hy=e=>e!=null&&typeof e=="object",l6=e=>Hy(e)&&!u6(e),xl=e=>typeof e=="string",jo=e=>typeof e=="function",c6=e=>e==null,d6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f6=e=>Object.prototype.toString.call(e),zy=Function.prototype.toString,h6=zy.call(Object),p6=e=>{if(!Hy(e)||f6(e)!="[object Object]"||E6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=d6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&zy.call(n)==h6},m6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,g6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,E6=e=>m6(e)||g6(e),y6=e=>e(),T6=()=>{},lh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function b6(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:x6,max:_6}=Math,w6=e=>Number.isNaN(e),S6=e=>w6(e)?0:e,jy=(e,t,n)=>x6(_6(S6(e),t),n);function ch(e){if(!p6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=ch(o))}return n}function dh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function v6(e,t){if(e==null)throw new Error(t())}function A6(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var k6=Object.defineProperty,C6=(e,t,n)=>t in e?k6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fh=(e,t,n)=>C6(e,typeof t!="symbol"?t+"":t,n),$y=()=>{},_l=e=>typeof e=="object"&&e!==null,$o=e=>e?"":void 0,Vy=e=>e?"true":void 0,N6=1,O6=9,P6=11,Bt=e=>_l(e)&&e.nodeType===N6&&typeof e.nodeName=="string",wl=e=>_l(e)&&e.nodeType===O6,I6=e=>_l(e)&&e===e.window,qy=e=>Bt(e)?e.localName||"":"#document";function R6(e){return["html","body","#document"].includes(qy(e))}var L6=e=>_l(e)&&e.nodeType!==void 0,Yi=e=>L6(e)&&e.nodeType===P6&&"host"in e,D6=e=>Bt(e)&&e.localName==="input",M6=e=>Bt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ya(e){if(!e)return!1;const t=e.getRootNode();return Yo(t)===e}var F6=/(textarea|select)/;function B6(e){if(e==null||!Bt(e))return!1;try{return D6(e)&&e.selectionStart!=null||F6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Vo(e,t){var r;if(!e||!t||!Bt(e)||!Bt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Yi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function yr(e){var t;return wl(e)?e:I6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function U6(e){return yr(e).documentElement}function qo(e){var t,n,r;return Yi(e)?qo(e.host):wl(e)?(t=e.defaultView)!=null?t:window:Bt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Yo(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 H6(e){if(qy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yi(e)&&e.host||U6(e);return Yi(t)?t.host:t}function hh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),wl(t)||Yi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var ph=new WeakMap;function Wo(e){return ph.has(e)||ph.set(e,qo(e).getComputedStyle(e)),ph.get(e)}var mh=new Set(["menu","listbox","dialog","grid","tree","region"]),z6=e=>mh.has(e),Yy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Wy(e,t){const n=new Set,r=hh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Yy(c);for(const h of d){if(!h||n.has(h))continue;n.add(h);const p=r.getElementById(h);if(p){const g=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(g&&z6(g)&&!b&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Gy(e,t){const n=hh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Yy(c);for(const h of d){if(!h||r.has(h))continue;r.add(h);const p=n.getElementById(h);if(p){const g=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";g&&mh.has(g)&&!b&&(t(p),o(p))}}}};o(e)}function j6(e){const t=new Set;return Gy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function $6(e){const t=e.getAttribute("role");return!!(t&&mh.has(t))}function V6(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function q6(e){var t;return V6(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function Y6(e){if(!e.id)return!1;const t=hh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&$6(e))}var gh=()=>typeof document!="undefined";function W6(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Eh=e=>gh()&&e.test(W6()),G6=e=>gh()&&e.test(navigator.vendor),Xy=()=>gh()&&!!navigator.maxTouchPoints,X6=()=>Eh(/^iPhone/i),K6=()=>Eh(/^iPad/i)||yh()&&navigator.maxTouchPoints>1,Sl=()=>X6()||K6(),Q6=()=>yh()||Sl(),yh=()=>Eh(/^Mac/i),J6=()=>Q6()&&G6(/apple/i);function Z6(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function tr(e){var n;const t=Z6(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Ky=e=>e.button===0,e4=e=>e.button===2||yh()&&e.ctrlKey&&e.button===0,t4=e=>"touches"in e&&e.touches.length>0,n4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Qy={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function r4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=n4[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in Qy&&(o=Qy[o]),o}function Jy(e,t="client"){const n=t4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Ut=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},Zy=e=>Bt(e)&&e.tagName==="IFRAME",i4=/^(audio|video|details)$/;function eT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var o4=e=>!Number.isNaN(eT(e)),s4=e=>eT(e)<0;function a4(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 tT(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,h)=>u.set(d,h));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const h=a4(d,t);if(h){const p=Array.from(h.querySelectorAll(vl)).filter(n),g=u.get(d);if(g!==void 0){const b=g+1;r.splice(b,0,...p),p.forEach((y,_)=>{u.set(y,b+_)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,b+_)})}o.push(...p)}}return r}var vl="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",nT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(vl));(n==!0||n=="if-empty"&&o.length===0)&&Bt(e)&&Tr(e)&&o.unshift(e);const u=[];for(const c of o)if(Tr(c)){if(Zy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...nT(d,{getShadowRoot:r}));continue}u.push(c)}return r?tT(u,r,Tr):u};function Tr(e){return!Bt(e)||e.closest("[inert]")?!1:e.matches(vl)&&M6(e)}function Go(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(vl));n&&Wi(e)&&o.unshift(e);const a=[];for(const u of o)if(Wi(u)){if(Zy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Go(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=tT(a,r,Wi);return!u.length&&n?o:u}return!a.length&&n?o:a}function Wi(e){return Bt(e)&&e.tabIndex>0?!0:Tr(e)&&!s4(e)}function u4(e,t={}){const n=Go(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function l4(e,t={}){const{current:n,getShadowRoot:r}=t,o=Go(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Yo(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Ta(e){return e.tabIndex<0&&(i4.test(e.localName)||B6(e))&&!o4(e)?0:e.tabIndex}function rT(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)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=Go(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var c4=class u2{constructor(){fh(this,"id",null),fh(this,"fn_cleanup"),fh(this,"cleanup",()=>{this.cancel()})}static create(){return new u2}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 Pt(e){const t=c4.create();return t.request(e),t.cleanup}function iT(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function Th(e){const t=H6(e);return R6(t)?yr(t).body:Bt(t)&&h4(t)?t:Th(t)}var d4=/auto|scroll|overlay|hidden|clip/,f4=new Set(["inline","contents"]);function h4(e){const t=qo(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return d4.test(n+o+r)&&!f4.has(a)}var Xo="default",bh="",Al=new WeakMap;function p4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Sl()?(Xo==="default"&&(bh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Xo="disabled"):t&&(Al.set(t,t.style.userSelect),t.style.userSelect="none"),()=>m4({target:t,doc:r})}function m4(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Sl()){if(Xo!=="disabled")return;Xo="restoring",setTimeout(()=>{iT(()=>{Xo==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=bh||""),bh="",Xo="default")})},300)}else if(t&&Al.has(t)){const a=Al.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Al.delete(t)}}function g4(e={}){const u=e,{defer:t,target:n}=u,r=an(u,["defer","target"]),o=t?Pt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(p4(oe(B({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function E4(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=Jy(c),h=Math.sqrt(Eu(d.x,2)+Eu(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(h<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=Jy(c);r({point:d,event:c})},u=[Ut(e,"pointermove",o,!1),Ut(e,"pointerup",a,!1),Ut(e,"pointercancel",a,!1),Ut(e,"contextmenu",a,!1),g4({doc:e})];return()=>{u.forEach(c=>c())}}function y4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(h){if(h.key!=="Tab")return;let p=null;const[g,b]=u4(e,{includeContainer:!0,getShadowRoot:a}),y=l4(c,{current:n,getShadowRoot:a}),_=!g&&!b;h.shiftKey&&ya(y)?(o==null||o(),p=b):h.shiftKey&&(ya(g)||_)?p=n:!h.shiftKey&&ya(n)?(o==null||o(),p=g):!h.shiftKey&&(ya(b)||_)&&(p=y),p&&(h.preventDefault(),typeof r=="function"?r(p):p.focus())}return Ut(u,"keydown",d,!0)}function T4(e,t){const c=t,{defer:n,triggerElement:r}=c,o=an(c,["defer","triggerElement"]),a=n?Pt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(y4(d,B({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function b4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function kl(e,t){if(!e)return $y;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function x4(e,t,n){if(!e)return $y;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 _4(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(h=>{r.aborted||(clearTimeout(d),u(h))}).catch(h=>{r.aborted||(clearTimeout(d),c(h))})}),()=>t.abort()]}function w4(e,t){const{timeout:n,rootNode:r}=t,o=qo(r),a=yr(r),u=new o.AbortController;return _4(new Promise(c=>{const d=e();if(d){c(d);return}const h=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(h.disconnect(),c(p))});h.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var S4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),v4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,oT=e=>{const t={};let n;for(;n=v4.exec(e);)t[n[1]]=n[2];return t},A4=(e,t)=>{if(xl(e)){if(xl(t))return`${e};${t}`;e=oT(e)}else xl(t)&&(t=oT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function It(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=lh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=S4(t[o],n[o]);continue}if(o==="style"){t[o]=A4(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function S7(e){return e}var Ko=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ko||{}),xh="__init__";function k4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>yr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Yo(t()),a=u=>t().getElementById(u);return oe(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:ya,getById:a})}function C4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Qo=()=>e=>Array.from(new Set(e)),sT=typeof globalThis.document!="undefined"?q.useLayoutEffect:q.useEffect;function Cl(e){var g,b;const t=(g=e().value)!=null?g:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=q.useState(t),[o,a]=q.useState(r),u=e().value!==void 0,c=q.useRef(o);c.current=u?e().value:o;const d=q.useRef(c.current);sT(()=>{d.current=c.current},[o,e().value]);const h=y=>{var A,k;const _=d.current,v=jo(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:_}),u||a(v),n(v,_)||(k=(A=e()).onChange)==null||k.call(A,v,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(y){(e().sync?Ao.flushSync:y6)(()=>h(y))},invoke(y,_){var v,A;(A=(v=e()).onChange)==null||A.call(v,y,_)},hash(y){var _,v,A;return(A=(v=(_=e()).hash)==null?void 0:v.call(_,y))!=null?A:String(y)}}}Cl.cleanup=e=>{q.useEffect(()=>e,[])},Cl.ref=e=>{const t=q.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function N4(e){const t=q.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var O4=(e,t)=>{const n=q.useRef(!1),r=q.useRef(!1);q.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),q.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Nl(e,t={}){var ne,re,de,se,be,ke;const n=q.useMemo(()=>{const{id:ae,ids:z,getRootNode:J}=t;return k4({id:ae,ids:z,getRootNode:J})},[t]),r=(...ae)=>{e.debug&&console.log(...ae)},o=(re=(ne=e.props)==null?void 0:ne.call(e,{props:ch(t),scope:n}))!=null?re:t,a=P4(o),u=(de=e.context)==null?void 0:de.call(e,{prop:a,bindable:Cl,scope:n,flush:uT,getContext(){return d},getComputed(){return W},getRefs(){return v},getEvent(){return y()}}),c=aT(u),d={get(ae){var z;return(z=c.current)==null?void 0:z[ae].ref.current},set(ae,z){var J;(J=c.current)==null||J[ae].set(z)},initial(ae){var z;return(z=c.current)==null?void 0:z[ae].initial},hash(ae){var J,w;const z=(J=c.current)==null?void 0:J[ae].get();return(w=c.current)==null?void 0:w[ae].hash(z)}},h=q.useRef(new Map),p=q.useRef(null),g=q.useRef(null),b=q.useRef({type:""}),y=()=>oe(B({},b.current),{current(){return b.current},previous(){return g.current}}),_=()=>oe(B({},F),{matches(...ae){return ae.includes(F.ref.current)},hasTag(ae){var z,J;return!!((J=(z=e.states[F.ref.current])==null?void 0:z.tags)!=null&&J.includes(ae))}}),v=N4((be=(se=e.refs)==null?void 0:se.call(e,{prop:a,context:d}))!=null?be:{}),A=()=>({state:_(),context:d,event:y(),prop:a,send:$,action:k,guard:C,track:O4,refs:v,computed:W,flush:uT,scope:n,choose:j}),k=ae=>{const z=jo(ae)?ae(A()):ae;if(!z)return;const J=z.map(w=>{var Y,O;const N=(O=(Y=e.implementations)==null?void 0:Y.actions)==null?void 0:O[w];return N||dh(`[zag-js] No implementation found for action "${JSON.stringify(w)}"`),N});for(const w of J)w==null||w(A())},C=ae=>{var z,J;return jo(ae)?ae(A()):(J=(z=e.implementations)==null?void 0:z.guards)==null?void 0:J[ae](A())},I=ae=>{const z=jo(ae)?ae(A()):ae;if(!z)return;const J=z.map(N=>{var O,ye;const Y=(ye=(O=e.implementations)==null?void 0:O.effects)==null?void 0:ye[N];return Y||dh(`[zag-js] No implementation found for effect "${JSON.stringify(N)}"`),Y}),w=[];for(const N of J){const Y=N==null?void 0:N(A());Y&&w.push(Y)}return()=>w.forEach(N=>N==null?void 0:N())},j=ae=>r6(ae).find(z=>{let J=!z.guard;return xl(z.guard)?J=!!C(z.guard):jo(z.guard)&&(J=z.guard(A())),J}),W=ae=>{v6(e.computed,()=>"[zag-js] No computed object found on machine");const z=e.computed[ae];return z({context:d,event:y(),prop:a,refs:v,scope:n,computed:W})},F=Cl(()=>({defaultValue:e.initialState({prop:a}),onChange(ae,z){var w,N,Y,O;if(z){const ye=h.current.get(z);ye==null||ye(),h.current.delete(z)}z&&k((w=e.states[z])==null?void 0:w.exit),k((N=p.current)==null?void 0:N.actions);const J=I((Y=e.states[ae])==null?void 0:Y.effects);if(J&&h.current.set(ae,J),z===xh){k(e.entry);const ye=I(e.effects);ye&&h.current.set(xh,ye)}k((O=e.states[ae])==null?void 0:O.entry)}})),ee=q.useRef(void 0),ue=q.useRef(Ko.NotStarted);sT(()=>{queueMicrotask(()=>{var N;const J=ue.current===Ko.Started;ue.current=Ko.Started,r(J?"rehydrating...":"initializing...");const w=(N=ee.current)!=null?N:F.initial;F.invoke(w,J?F.get():xh)});const ae=h.current,z=F.ref.current;return()=>{r("unmounting..."),ee.current=z,ue.current=Ko.Stopped,ae.forEach(J=>J==null?void 0:J()),h.current=new Map,p.current=null,queueMicrotask(()=>{k(e.exit)})}},[]);const me=()=>"ref"in F?F.ref.current:F.get(),$=ae=>{queueMicrotask(()=>{var O,ye,Ce,Ie,He;if(ue.current!==Ko.Started)return;g.current=b.current,b.current=ae;let z=me();const J=(Ce=(O=e.states[z].on)==null?void 0:O[ae.type])!=null?Ce:(ye=e.on)==null?void 0:ye[ae.type],w=j(J);if(!w)return;p.current=w;const N=(Ie=w.target)!=null?Ie:z;r("transition",ae.type,w.target||z,`(${w.actions})`);const Y=N!==z;Y?Ao.flushSync(()=>F.set(N)):w.reenter&&!Y?F.invoke(z,z):k((He=w.actions)!=null?He:[])})};return(ke=e.watch)==null||ke.call(e,A()),{state:_(),send:$,context:d,prop:a,scope:n,refs:v,computed:W,event:y(),getStatus:()=>ue.current}}function aT(e){const t=q.useRef(e);return t.current=e,t}function P4(e){const t=aT(e);return function(r){return t.current[r]}}function uT(e){queueMicrotask(()=>{Ao.flushSync(()=>e())})}var _h=C4(e=>e);function Ol(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function I4(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const wh=e=>{const t=q.memo(q.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=an(h,["asChild","children"]);if(!o)return q.createElement(e,oe(B({},u),{ref:r}),a);if(!q.isValidElement(a))return null;const c=q.Children.only(a),d=I4(c);return q.cloneElement(c,oe(B({},It(u,c.props)),{ref:r?Ol(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Qt=(()=>{const e=new Map;return new Proxy(wh,{apply(t,n,r){return wh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,wh(r)),e.get(r)}})})();function R4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Gi(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=q.createContext(u);c.displayName=t;function d(){var p;const h=q.useContext(c);if(!h&&n){const g=new Error(a!=null?a:R4(r,o));throw g.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,g,d),g}return h}return[c.Provider,d,c]}const[L4,Sh]=Gi({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[lT,ba]=Gi({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),cT=q.forwardRef((e,t)=>{const n=Sh(),r=ba(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Qt.div,oe(B({},o),{ref:Ol(r.ref,t)}))});cT.displayName="PopoverContent";const dT=q.forwardRef((e,t)=>{const n=Sh(),r=ba(),o=It(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(Qt.div,oe(B({},o),{ref:t}))});dT.displayName="PopoverPositioner";const xa=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},B({},e)]),fT=e=>xa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function D4(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var M4={props({props:e}){return oe(B({},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",Wo(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Pt(()=>{var c,d;const u=Pl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Pt(()=>{e.set("prevAnimationName",Pl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,g,b;((b=(g=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:g[0])!=null?b:d.target)===o&&e.set("prevAnimationName",Pl(t.get("styles")))},u=d=>{const h=Pl(t.get("styles"));tr(d)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=kl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),iT(()=>c())}}}}};function Pl(e){return(e==null?void 0:e.animationName)||"none"}Qo()(["onExitComplete","present","immediate"]);function F4(e,t={}){const{sync:n=!1}=t,r=B4(e);return q.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function B4(e){const t=q.useRef(e);return t.current=e,t}const vh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,a=an(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=q.useRef(!1),c=oe(B({},a),{present:r,onExitComplete:F4(e.onExitComplete)}),d=Nl(M4,c),h=D4(d);h.present&&(u.current=!0);const p=!h.present&&!u.current&&t||n&&!h.present&&u.current,g=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:g,present:h.present,unmounted:p}};var Xi=(e,t=[])=>({parts:(...n)=>{if(U4(t))return Xi(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Xi(e,[...t,...n]),omit:(...n)=>Xi(e,t.filter(r=>!n.includes(r))),rename:n=>Xi(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Jo(e)}"][data-part="${Jo(r)}"]`,`& [data-scope="${Jo(e)}"][data-part="${Jo(r)}"]`].join(", "),attrs:{"data-scope":Jo(e),"data-part":Jo(r)}}}),{})}),Jo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),U4=e=>e.length===0;const H4=["top","right","bottom","left"],ri=Math.min,kn=Math.max,Il=Math.round,Rl=Math.floor,br=e=>({x:e,y:e}),z4={left:"right",right:"left",bottom:"top",top:"bottom"},j4={start:"end",end:"start"};function Ah(e,t,n){return kn(e,ri(t,n))}function Dr(e,t){return typeof e=="function"?e(t):e}function Mr(e){return e.split("-")[0]}function Zo(e){return e.split("-")[1]}function kh(e){return e==="x"?"y":"x"}function Ch(e){return e==="y"?"height":"width"}const $4=new Set(["top","bottom"]);function xr(e){return $4.has(Mr(e))?"y":"x"}function Nh(e){return kh(xr(e))}function V4(e,t,n){n===void 0&&(n=!1);const r=Zo(e),o=Nh(e),a=Ch(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Ll(u)),[u,Ll(u)]}function q4(e){const t=Ll(e);return[Oh(e),t,Oh(t)]}function Oh(e){return e.replace(/start|end/g,t=>j4[t])}const hT=["left","right"],pT=["right","left"],Y4=["top","bottom"],W4=["bottom","top"];function G4(e,t,n){switch(e){case"top":case"bottom":return n?t?pT:hT:t?hT:pT;case"left":case"right":return t?Y4:W4;default:return[]}}function X4(e,t,n,r){const o=Zo(e);let a=G4(Mr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Oh)))),a}function Ll(e){return e.replace(/left|right|bottom|top/g,t=>z4[t])}function K4(e){return B({top:0,right:0,bottom:0,left:0},e)}function mT(e){return typeof e!="number"?K4(e):{top:e,right:e,bottom:e,left:e}}function Dl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function gT(e,t,n){let{reference:r,floating:o}=e;const a=xr(t),u=Nh(t),c=Ch(u),d=Mr(t),h=a==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,b=r[c]/2-o[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-o.width,y:g};break;default:y={x:r.x,y:r.y}}switch(Zo(t)){case"start":y[u]-=b*(n&&h?-1:1);break;case"end":y[u]+=b*(n&&h?-1:1);break}return y}const Q4=(e,t,n)=>ze(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let h=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:g}=gT(h,r,d),b=r,y={},_=0;for(let v=0;v<c.length;v++){const{name:A,fn:k}=c[v],{x:C,y:I,data:j,reset:W}=yield k({x:p,y:g,initialPlacement:r,placement:b,strategy:o,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});p=C!=null?C:p,g=I!=null?I:g,y=oe(B({},y),{[A]:B(B({},y[A]),j)}),W&&_<=50&&(_++,typeof W=="object"&&(W.placement&&(b=W.placement),W.rects&&(h=W.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):W.rects),{x:p,y:g}=gT(h,b,d)),v=-1)}return{x:p,y:g,placement:b,strategy:o,middlewareData:y}});function _a(e,t){return ze(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:b=!1,padding:y=0}=Dr(t,e),_=mT(y),A=c[b?g==="floating"?"reference":"floating":g],k=Dl(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(c.floating)),boundary:h,rootBoundary:p,strategy:d})),C=g==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,I=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),j=(yield a.isElement==null?void 0:a.isElement(I))?(yield a.getScale==null?void 0:a.getScale(I))||{x:1,y:1}:{x:1,y:1},W=Dl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:I,strategy:d}):C);return{top:(k.top-W.top+_.top)/j.y,bottom:(W.bottom-k.bottom+_.bottom)/j.y,left:(k.left-W.left+_.left)/j.x,right:(W.right-k.right+_.right)/j.x}})}const J4=e=>({name:"arrow",options:e,fn(n){return ze(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:p,padding:g=0}=Dr(e,n)||{};if(p==null)return{};const b=mT(g),y={x:r,y:o},_=Nh(a),v=Ch(_),A=yield c.getDimensions(p),k=_==="y",C=k?"top":"left",I=k?"bottom":"right",j=k?"clientHeight":"clientWidth",W=u.reference[v]+u.reference[_]-y[_]-u.floating[v],F=y[_]-u.reference[_],ee=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ue=ee?ee[j]:0;(!ue||!(yield c.isElement==null?void 0:c.isElement(ee)))&&(ue=d.floating[j]||u.floating[v]);const me=W/2-F/2,$=ue/2-A[v]/2-1,ne=ri(b[C],$),re=ri(b[I],$),de=ne,se=ue-A[v]-re,be=ue/2-A[v]/2+me,ke=Ah(de,be,se),ae=!h.arrow&&Zo(a)!=null&&be!==ke&&u.reference[v]/2-(be<de?ne:re)-A[v]/2<0,z=ae?be<de?be-de:be-se:0;return{[_]:y[_]+z,data:B({[_]:ke,centerOffset:be-ke-z},ae&&{alignmentOffset:z}),reset:ae}})}}),Z4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return ze(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:p}=n,be=Dr(e,n),{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:A=!0}=be,k=an(be,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=Mr(a),I=xr(d),j=Mr(d)===d,W=yield h.isRTL==null?void 0:h.isRTL(p.floating),F=y||(j||!A?[Ll(d)]:q4(d)),ee=v!=="none";!y&&ee&&F.push(...X4(d,A,v,W));const ue=[d,...F],me=yield _a(n,k),$=[];let ne=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&$.push(me[C]),b){const ke=V4(a,c,W);$.push(me[ke[0]],me[ke[1]])}if(ne=[...ne,{placement:a,overflows:$}],!$.every(ke=>ke<=0)){var re,de;const ke=(((re=u.flip)==null?void 0:re.index)||0)+1,ae=ue[ke];if(ae&&(!(b==="alignment"?I!==xr(ae):!1)||ne.every(w=>xr(w.placement)===I?w.overflows[0]>0:!0)))return{data:{index:ke,overflows:ne},reset:{placement:ae}};let z=(de=ne.filter(J=>J.overflows[0]<=0).sort((J,w)=>J.overflows[1]-w.overflows[1])[0])==null?void 0:de.placement;if(!z)switch(_){case"bestFit":{var se;const J=(se=ne.filter(w=>{if(ee){const N=xr(w.placement);return N===I||N==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(N=>N>0).reduce((N,Y)=>N+Y,0)]).sort((w,N)=>w[1]-N[1])[0])==null?void 0:se[0];J&&(z=J);break}case"initialPlacement":z=d;break}if(a!==z)return{reset:{placement:z}}}return{}})}}};function ET(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function yT(e){return H4.some(t=>e[t]>=0)}const eL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return ze(this,null,function*(){const{rects:r}=n,u=Dr(e,n),{strategy:o="referenceHidden"}=u,a=an(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield _a(n,oe(B({},a),{elementContext:"reference"})),d=ET(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:yT(d)}}}case"escaped":{const c=yield _a(n,oe(B({},a),{altBoundary:!0})),d=ET(c,r.floating);return{data:{escapedOffsets:d,escaped:yT(d)}}}default:return{}}})}}},TT=new Set(["left","top"]);function tL(e,t){return ze(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Mr(n),c=Zo(n),d=xr(n)==="y",h=TT.has(u)?-1:1,p=a&&d?-1:1,g=Dr(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:b*h}:{x:b*h,y:y*p}})}const nL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return ze(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield tL(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+h.x,y:u+h.y,data:oe(B({},h),{placement:c})}})}}},rL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return ze(this,null,function*(){const{x:r,y:o,placement:a}=n,k=Dr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:C=>{let{x:I,y:j}=C;return{x:I,y:j}}}}=k,h=an(k,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},g=yield _a(n,h),b=xr(Mr(a)),y=kh(b);let _=p[y],v=p[b];if(u){const C=y==="y"?"top":"left",I=y==="y"?"bottom":"right",j=_+g[C],W=_-g[I];_=Ah(j,_,W)}if(c){const C=b==="y"?"top":"left",I=b==="y"?"bottom":"right",j=v+g[C],W=v-g[I];v=Ah(j,v,W)}const A=d.fn(oe(B({},n),{[y]:_,[b]:v}));return oe(B({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[y]:u,[b]:c}}})})}}},iL=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=Dr(e,t),p={x:n,y:r},g=xr(o),b=kh(g);let y=p[b],_=p[g];const v=Dr(c,t),A=typeof v=="number"?{mainAxis:v,crossAxis:0}:B({mainAxis:0,crossAxis:0},v);if(d){const I=b==="y"?"height":"width",j=a.reference[b]-a.floating[I]+A.mainAxis,W=a.reference[b]+a.reference[I]-A.mainAxis;y<j?y=j:y>W&&(y=W)}if(h){var k,C;const I=b==="y"?"width":"height",j=TT.has(Mr(o)),W=a.reference[g]-a.floating[I]+(j&&((k=u.offset)==null?void 0:k[g])||0)+(j?0:A.crossAxis),F=a.reference[g]+a.reference[I]+(j?0:((C=u.offset)==null?void 0:C[g])||0)-(j?A.crossAxis:0);_<W?_=W:_>F&&(_=F)}return{[b]:y,[g]:_}}}},oL=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return ze(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,ne=Dr(e,n),{apply:h=()=>{}}=ne,p=an(ne,["apply"]),g=yield _a(n,p),b=Mr(a),y=Zo(a),_=xr(a)==="y",{width:v,height:A}=u.floating;let k,C;b==="top"||b==="bottom"?(k=b,C=y===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(C=b,k=y==="end"?"top":"bottom");const I=A-g.top-g.bottom,j=v-g.left-g.right,W=ri(A-g[k],I),F=ri(v-g[C],j),ee=!n.middlewareData.shift;let ue=W,me=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(me=j),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ue=I),ee&&!y){const re=kn(g.left,0),de=kn(g.right,0),se=kn(g.top,0),be=kn(g.bottom,0);_?me=v-2*(re!==0||de!==0?re+de:kn(g.left,g.right)):ue=A-2*(se!==0||be!==0?se+be:kn(g.top,g.bottom))}yield h(oe(B({},n),{availableWidth:me,availableHeight:ue}));const $=yield c.getDimensions(d.floating);return v!==$.width||A!==$.height?{reset:{rects:!0}}:{}})}}};function Ml(){return typeof window!="undefined"}function es(e){return bT(e)?(e.nodeName||"").toLowerCase():"#document"}function Cn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _r(e){var t;return(t=(bT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function bT(e){return Ml()?e instanceof Node||e instanceof Cn(e).Node:!1}function nr(e){return Ml()?e instanceof Element||e instanceof Cn(e).Element:!1}function wr(e){return Ml()?e instanceof HTMLElement||e instanceof Cn(e).HTMLElement:!1}function xT(e){return!Ml()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Cn(e).ShadowRoot}const sL=new Set(["inline","contents"]);function wa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!sL.has(o)}const aL=new Set(["table","td","th"]);function uL(e){return aL.has(es(e))}const lL=[":popover-open",":modal"];function Fl(e){return lL.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const cL=["transform","translate","scale","rotate","perspective"],dL=["transform","translate","scale","rotate","perspective","filter"],fL=["paint","layout","strict","content"];function Ph(e){const t=Ih(),n=nr(e)?rr(e):e;return cL.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||dL.some(r=>(n.willChange||"").includes(r))||fL.some(r=>(n.contain||"").includes(r))}function hL(e){let t=ii(e);for(;wr(t)&&!ts(t);){if(Ph(t))return t;if(Fl(t))return null;t=ii(t)}return null}function Ih(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const pL=new Set(["html","body","#document"]);function ts(e){return pL.has(es(e))}function rr(e){return Cn(e).getComputedStyle(e)}function Bl(e){return nr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ii(e){if(es(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xT(e)&&e.host||_r(e);return xT(t)?t.host:t}function _T(e){const t=ii(e);return ts(t)?e.ownerDocument?e.ownerDocument.body:e.body:wr(t)&&wa(t)?t:_T(t)}function Sa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=_T(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Cn(o);if(a){const c=Rh(u);return t.concat(u,u.visualViewport||[],wa(o)?o:[],c&&n?Sa(c):[])}return t.concat(o,Sa(o,[],n))}function Rh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wT(e){const t=rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=Il(n)!==a||Il(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Lh(e){return nr(e)?e:e.contextElement}function ns(e){const t=Lh(e);if(!wr(t))return br(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=wT(t);let u=(a?Il(n.width):n.width)/r,c=(a?Il(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const mL=br(0);function ST(e){const t=Cn(e);return!Ih()||!t.visualViewport?mL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Cn(e)?!1:t}function Ki(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Lh(e);let u=br(1);t&&(r?nr(r)&&(u=ns(r)):u=ns(e));const c=gL(a,n,r)?ST(a):br(0);let d=(o.left+c.x)/u.x,h=(o.top+c.y)/u.y,p=o.width/u.x,g=o.height/u.y;if(a){const b=Cn(a),y=r&&nr(r)?Cn(r):r;let _=b,v=Rh(_);for(;v&&r&&y!==_;){const A=ns(v),k=v.getBoundingClientRect(),C=rr(v),I=k.left+(v.clientLeft+parseFloat(C.paddingLeft))*A.x,j=k.top+(v.clientTop+parseFloat(C.paddingTop))*A.y;d*=A.x,h*=A.y,p*=A.x,g*=A.y,d+=I,h+=j,_=Cn(v),v=Rh(_)}}return Dl({width:p,height:g,x:d,y:h})}function Ul(e,t){const n=Bl(e).scrollLeft;return t?t.left+n:Ki(_r(e)).left+n}function vT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ul(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function EL(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=_r(r),c=t?Fl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=br(1);const p=br(0),g=wr(r);if((g||!g&&!a)&&((es(r)!=="body"||wa(u))&&(d=Bl(r)),wr(r))){const y=Ki(r);h=ns(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!g&&!a?vT(u,d):br(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+b.x,y:n.y*h.y-d.scrollTop*h.y+p.y+b.y}}function yL(e){return Array.from(e.getClientRects())}function TL(e){const t=_r(e),n=Bl(e),r=e.ownerDocument.body,o=kn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=kn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Ul(e);const c=-n.scrollTop;return rr(r).direction==="rtl"&&(u+=kn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const AT=25;function bL(e,t){const n=Cn(e),r=_r(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=Ih();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const h=Ul(r);if(h<=0){const p=r.ownerDocument,g=p.body,b=getComputedStyle(g),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-y);_<=AT&&(a-=_)}else h<=AT&&(a+=h);return{width:a,height:u,x:c,y:d}}const xL=new Set(["absolute","fixed"]);function _L(e,t){const n=Ki(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=wr(e)?ns(e):br(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,h=r*a.y;return{width:u,height:c,x:d,y:h}}function kT(e,t,n){let r;if(t==="viewport")r=bL(e,n);else if(t==="document")r=TL(_r(e));else if(nr(t))r=_L(t,n);else{const o=ST(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Dl(r)}function CT(e,t){const n=ii(e);return n===t||!nr(n)||ts(n)?!1:rr(n).position==="fixed"||CT(n,t)}function wL(e,t){const n=t.get(e);if(n)return n;let r=Sa(e,[],!1).filter(c=>nr(c)&&es(c)!=="body"),o=null;const a=rr(e).position==="fixed";let u=a?ii(e):e;for(;nr(u)&&!ts(u);){const c=rr(u),d=Ph(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&xL.has(o.position)||wa(u)&&!d&&CT(e,u))?r=r.filter(p=>p!==u):o=c,u=ii(u)}return t.set(e,r),r}function SL(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?Fl(t)?[]:wL(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,p)=>{const g=kT(t,p,o);return h.top=kn(g.top,h.top),h.right=ri(g.right,h.right),h.bottom=ri(g.bottom,h.bottom),h.left=kn(g.left,h.left),h},kT(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function vL(e){const{width:t,height:n}=wT(e);return{width:t,height:n}}function AL(e,t,n){const r=wr(t),o=_r(t),a=n==="fixed",u=Ki(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=br(0);function h(){d.x=Ul(o)}if(r||!r&&!a)if((es(t)!=="body"||wa(o))&&(c=Bl(t)),r){const y=Ki(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&h();a&&!r&&o&&h();const p=o&&!r&&!a?vT(o,c):br(0),g=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:g,y:b,width:u.width,height:u.height}}function Dh(e){return rr(e).position==="static"}function NT(e,t){if(!wr(e)||rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return _r(e)===n&&(n=n.ownerDocument.body),n}function OT(e,t){const n=Cn(e);if(Fl(e))return n;if(!wr(e)){let o=ii(e);for(;o&&!ts(o);){if(nr(o)&&!Dh(o))return o;o=ii(o)}return n}let r=NT(e,t);for(;r&&uL(r)&&Dh(r);)r=NT(r,t);return r&&ts(r)&&Dh(r)&&!Ph(r)?n:r||hL(e)||n}const kL=function(e){return ze(this,null,function*(){const t=this.getOffsetParent||OT,n=this.getDimensions,r=yield n(e.floating);return{reference:AL(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function CL(e){return rr(e).direction==="rtl"}const NL={convertOffsetParentRelativeRectToViewportRelativeRect:EL,getDocumentElement:_r,getClippingRect:SL,getOffsetParent:OT,getElementRects:kL,getClientRects:yL,getDimensions:vL,getScale:ns,isElement:nr,isRTL:CL};function PT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function OL(e,t){let n=null,r;const o=_r(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const h=e.getBoundingClientRect(),{left:p,top:g,width:b,height:y}=h;if(c||t(),!b||!y)return;const _=Rl(g),v=Rl(o.clientWidth-(p+b)),A=Rl(o.clientHeight-(g+y)),k=Rl(p),I={rootMargin:-_+"px "+-v+"px "+-A+"px "+-k+"px",threshold:kn(0,ri(1,d))||1};let j=!0;function W(F){const ee=F[0].intersectionRatio;if(ee!==d){if(!j)return u();ee?u(!1,ee):r=setTimeout(()=>{u(!1,1e-7)},1e3)}ee===1&&!PT(h,e.getBoundingClientRect())&&u(),j=!1}try{n=new IntersectionObserver(W,oe(B({},I),{root:o.ownerDocument}))}catch(F){n=new IntersectionObserver(W,I)}n.observe(e)}return u(!0),a}function PL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Lh(e),p=o||a?[...h?Sa(h):[],...Sa(t)]:[];p.forEach(k=>{o&&k.addEventListener("scroll",n,{passive:!0}),a&&k.addEventListener("resize",n)});const g=h&&c?OL(h,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(k=>{let[C]=k;C&&C.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var I;(I=y)==null||I.observe(t)})),n()}),h&&!d&&y.observe(h),y.observe(t));let _,v=d?Ki(e):null;d&&A();function A(){const k=Ki(e);v&&!PT(v,k)&&n(),v=k,_=requestAnimationFrame(A)}return n(),()=>{var k;p.forEach(C=>{o&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),g==null||g(),(k=y)==null||k.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const IL=nL,RL=rL,LL=Z4,DL=oL,ML=eL,FL=J4,BL=iL,UL=(e,t,n)=>{const r=new Map,o=B({platform:NL},n),a=oe(B({},o.platform),{_c:r});return Q4(e,t,oe(B({},o),{platform:a}))};function IT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return oe(B({},o),{toJSON:()=>o})}function HL(e){if(!e)return IT();const{x:t,y:n,width:r,height:o}=e;return IT(t,n,r,o)}function zL(e,t){return{contextElement:Bt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?HL(r):n.getBoundingClientRect()}}}var va=e=>({variable:e,reference:`var(${e})`}),Fr={arrowSize:va("--arrow-size"),arrowSizeHalf:va("--arrow-size-half"),arrowBg:va("--arrow-background"),transformOrigin:va("--transform-origin"),arrowOffset:va("--arrow-offset")},jL=e=>e==="top"||e==="bottom"?"y":"x";function $L(e,t){return{name:"transformOrigin",fn(n){var me,$,ne,re,de;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=jL(d),p=((me=o.arrow)==null?void 0:me.x)||0,g=(($=o.arrow)==null?void 0:$.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+b/2,v=g+y/2,A=Math.abs(((ne=o.shift)==null?void 0:ne.y)||0),k=u.reference.height/2,C=y/2,I=(de=(re=e.offset)==null?void 0:re.mainAxis)!=null?de:e.gutter,j=typeof I=="number"?I+C:I!=null?I:C,W=A>j,F={top:`${_}px calc(100% + ${j}px)`,bottom:`${_}px ${-j}px`,left:`calc(100% + ${j}px) ${v}px`,right:`${-j}px ${v}px`}[d],ee=`${_}px ${u.reference.y+k-c}px`,ue=!!e.overlap&&h==="y"&&W;return r.floating.style.setProperty(Fr.transformOrigin.variable,ue?ee:F),{data:{transformOrigin:ue?ee:F}}}}}var VL={name:"rects",fn({rects:e}){return{data:e}}},qL=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${Fr.arrowOffset.reference})`}),{}}}};function YL(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var WL={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function RT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Mh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function GL(e,t,n){const r=e||t.createElement("div");return FL({element:r,padding:n.arrowPadding})}function XL(e,t){var n;if(!c6((n=t.offset)!=null?n:t.gutter))return IL(({placement:r})=>{var p,g,b,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(g=(p=t.offset)==null?void 0:p.mainAxis)!=null?g:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=YL(r),d=c?void 0:t.shift,h=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return ch({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function KL(e){if(!e.flip)return;const t=Mh(e.boundary);return LL(oe(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function QL(e){if(!e.slide&&!e.overlap)return;const t=Mh(e.boundary);return RL(oe(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:BL()}))}function JL(e){return DL({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function ZL(e){var t;if(e.hideWhenDetached)return ML({strategy:"referenceHidden",boundary:(t=Mh(e.boundary))!=null?t:"clippingAncestors"})}function eD(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function tD(e,t,n={}){const r=zL(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},WL,n),a=t.querySelector("[data-part=arrow]"),u=[XL(a,o),KL(o),QL(o),GL(a,t.ownerDocument,o),qL(a),$L({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),JL(o),ZL(o),VL],{placement:c,strategy:d,onComplete:h,onPositioned:p}=o,g=()=>ze(null,null,function*(){var j;if(!r||!t)return;const v=yield UL(r,t,{placement:c,middleware:u,strategy:d});h==null||h(v),p==null||p({placed:!0});const A=qo(t),k=RT(A,v.x),C=RT(A,v.y);t.style.setProperty("--x",`${k}px`),t.style.setProperty("--y",`${C}px`),o.hideWhenDetached&&(((j=v.middlewareData.hide)==null?void 0:j.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const I=t.firstElementChild;if(I){const W=Wo(I);t.style.setProperty("--z-index",W.zIndex)}}),b=()=>ze(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:g,floatingElement:t}),p==null||p({placed:!0})):yield g()}),y=eD(o.listeners),_=o.listeners?PL(r,t,b,y):T6;return b(),()=>{_==null||_(),p==null||p({placed:!1})}}function LT(e,t,n={}){const c=n,{defer:r}=c,o=an(c,["defer"]),a=r?Pt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(tD(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var nD={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function rD(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Fr.arrowSize.reference,height:Fr.arrowSize.reference,[Fr.arrowSizeHalf.variable]:`calc(${Fr.arrowSize.reference} / 2)`,[Fr.arrowOffset.variable]:`calc(${Fr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?nD[t.split("-")[0]]:void 0,background:Fr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,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 rs=new WeakMap,Hl=new WeakMap,zl={},Fh=0,DT=e=>e&&(e.host||DT(e.parentNode)),iD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=DT(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),oD=new Set(["script","output","status","next-route-announcer"]),sD=e=>oD.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),aD=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=iD(n,Array.isArray(e)?e:[e]);zl[r]||(zl[r]=new WeakMap);const c=zl[r],d=[],h=new Set,p=new Set(u),g=y=>{!y||h.has(y)||(h.add(y),g(y.parentNode))};u.forEach(y=>{g(y),a&&Bt(y)&&Gy(y,_=>{g(_)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(h.has(_))b(_);else try{if(sD(_))return;const A=_.getAttribute(o)==="true",k=(rs.get(_)||0)+1,C=(c.get(_)||0)+1;rs.set(_,k),c.set(_,C),d.push(_),k===1&&A&&Hl.set(_,!0),C===1&&_.setAttribute(r,""),A||_.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",_,v)}})};return b(n),h.clear(),Fh++,()=>{d.forEach(y=>{const _=rs.get(y)-1,v=c.get(y)-1;rs.set(y,_),c.set(y,v),_||(Hl.has(y)||y.removeAttribute(o),Hl.delete(y)),v||y.removeAttribute(r)}),Fh--,Fh||(rs=new WeakMap,rs=new WeakMap,Hl=new WeakMap,zl={})}},uD=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,lD=(e,t=uD(e),n="data-aria-hidden",r=!0)=>{if(t)return aD(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},cD=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function MT(e,t={}){const{defer:n=!0}=t,r=n?cD:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(lD(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function dD(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function fD(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var FT="pointerdown.outside",BT="focus.outside";function hD(e){for(const t of e)if(Bt(t)&&Tr(t))return!0;return!1}var UT=e=>"clientY"in e;function pD(e,t){if(!UT(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 mD(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function HT(e,t){if(!t||!UT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return mD(u,c)?r||a:!1}function gD(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=yr(e),h=qo(e),p=dD(h),g=fD(h);function b(I,j){if(!Bt(j)||!j.isConnected||Vo(e,j)||pD(e,I)||c&&Wy(e,j))return!1;const W=d.querySelector(`[aria-controls="${e.id}"]`);if(W){const ee=Th(W);if(HT(I,ee))return!1}const F=Th(e);return HT(I,F)?!1:!(n!=null&&n(j))}const y=new Set,_=Yi(e==null?void 0:e.getRootNode());function v(I){function j(W){var me,$;const F=u&&!Xy()?Pt:ne=>ne(),ee=W!=null?W:I,ue=($=(me=ee==null?void 0:ee.composedPath)==null?void 0:me.call(ee))!=null?$:[ee==null?void 0:ee.target];F(()=>{const ne=_?ue[0]:tr(I);if(!(!e||!b(I,ne))){if(o||a){const re=lh(o,a);e.addEventListener(FT,re,{once:!0})}zT(e,FT,{bubbles:!1,cancelable:!0,detail:{originalEvent:ee,contextmenu:e4(ee),focusable:hD(ue),target:ne}})}})}I.pointerType==="touch"?(y.forEach(W=>W()),y.add(Ut(d,"click",j,{once:!0})),y.add(g.addEventListener("click",j,{once:!0})),y.add(p.addEventListener("click",j,{once:!0}))):j()}const A=new Set,k=setTimeout(()=>{A.add(Ut(d,"pointerdown",v,!0)),A.add(g.addEventListener("pointerdown",v,!0)),A.add(p.addEventListener("pointerdown",v,!0))},0);function C(I){(u?Pt:W=>W())(()=>{var ee,ue;const W=(ue=(ee=I==null?void 0:I.composedPath)==null?void 0:ee.call(I))!=null?ue:[I==null?void 0:I.target],F=_?W[0]:tr(I);if(!(!e||!b(I,F))){if(r||a){const me=lh(r,a);e.addEventListener(BT,me,{once:!0})}zT(e,BT,{bubbles:!1,cancelable:!0,detail:{originalEvent:I,contextmenu:!1,focusable:Tr(F),target:F}})}})}return Xy()||(A.add(Ut(d,"focusin",C,!0)),A.add(g.addEventListener("focusin",C,!0)),A.add(p.addEventListener("focusin",C,!0))),()=>{clearTimeout(k),y.forEach(I=>I()),A.forEach(I=>I())}}function ED(e,t){const{defer:n}=t,r=n?Pt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(gD(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function zT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function yD(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Ut(yr(e),"keydown",n,{capture:!0})}var jT="layer:request-dismiss",Hn={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=>Vo(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Vo(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=>Hn.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];bD(e,jT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),TD(e,jT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function TD(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function bD(e,t,n){e.addEventListener(t,n,{once:!0})}var $T;function VT(){Hn.layers.forEach(({node:e})=>{e.style.pointerEvents=Hn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function xD(e){e.style.pointerEvents=""}function _D(e,t){const n=yr(e),r=[];return Hn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&($T=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=w4(()=>{const c=o();return Bt(c)?c:null},{timeout:1e3});a.then(c=>r.push(kl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Hn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=$T,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function wD(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){dh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,h={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};Hn.add(h),VT();function p(v){var k,C;const A=tr(v.detail.originalEvent);Hn.isBelowPointerBlockingLayer(e)||Hn.isInBranch(A)||((k=t.onPointerDownOutside)==null||k.call(t,v),(C=t.onInteractOutside)==null||C.call(t,v),!v.defaultPrevented&&(c&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function g(v){var k,C;const A=tr(v.detail.originalEvent);Hn.isInBranch(A)||((k=t.onFocusOutside)==null||k.call(t,v),(C=t.onInteractOutside)==null||C.call(t,v),!v.defaultPrevented&&(c&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function b(v){var A;Hn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var I;if(!e)return!1;const A=typeof u=="function"?u():u,k=Array.isArray(A)?A:[A],C=(I=t.persistentElements)==null?void 0:I.map(j=>j()).filter(Bt);return C&&k.push(...C),k.some(j=>Vo(j,v))||Hn.isInNestedLayer(e,v)}const _=[a?_D(e,t.persistentElements):void 0,yD(e,b),ED(e,{exclude:y,onFocusOutside:g,onPointerDownOutside:p,defer:t.defer})];return()=>{Hn.remove(e),VT(),xD(e),_.forEach(v=>v==null?void 0:v())}}function qT(e,t){const{defer:n}=t,r=n?Pt:a=>a(),o=[];return o.push(r(()=>{const a=jo(e)?e():e;o.push(wD(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var SD=Object.defineProperty,vD=(e,t,n)=>t in e?SD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gt=(e,t,n)=>vD(e,typeof t!="symbol"?t+"":t,n),YT={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()}},AD=[],kD=class{constructor(e,t){gt(this,"trapStack"),gt(this,"config"),gt(this,"doc"),gt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),gt(this,"portalContainers",new Set),gt(this,"listenerCleanups",[]),gt(this,"handleFocus",r=>{const o=tr(r),a=this.findContainerIndex(o,r)>=0;if(a||wl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Ta(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[d];if(h.length>0){const p=h.findIndex(g=>g===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<h.length&&(u=h[p+1],c=!1):p-1>=0&&(u=h[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(h=>Ta(h)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),gt(this,"handlePointerDown",r=>{const o=tr(r);if(!(this.findContainerIndex(o,r)>=0)){if(ka(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ka(this.config.allowOutsideClick,r)||r.preventDefault()}}),gt(this,"handleClick",r=>{const o=tr(r);this.findContainerIndex(o,r)>=0||ka(this.config.clickOutsideDeactivates,r)||ka(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),gt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;Aa(r)&&r.preventDefault(),this.tryFocus(a)}}),gt(this,"handleEscapeKey",r=>{CD(r)&&ka(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),gt(this,"_mutationObserver"),gt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(h=>h===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const h=d;return q6(h)?!0:h.id&&!this.state.containers.some(p=>p.contains(h))?Y6(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),gt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),gt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Tr(r)){const o=Yo(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;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}),gt(this,"tryFocus",r=>{if(r!==!1&&r!==Yo(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,ND(r)&&r.select()}}),gt(this,"deactivate",r=>{if(!this.state.active)return this;const o=B({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(),YT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const h=()=>{WT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(h,h),this}return h(),this}),gt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),gt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),gt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),gt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),gt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),gt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),gt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||tr(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),h=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:g})=>u===g);if(p<0&&((h==null?void 0:h.container)===u||Tr(u)&&!Wi(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(p=d),p>=0){const g=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[g];c=Ta(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Aa(o)||(c=h==null?void 0:h.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:g})=>u===g);if(p<0&&((h==null?void 0:h.container)===u||Tr(u)&&!Wi(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(p=d),p>=0){const g=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[g];c=Ta(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Aa(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||AD;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Aa(r)&&!r.shiftKey},isKeyBackward(r){return Aa(r)&&r.shiftKey}},t);this.doc=n.document||yr(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=>{j6(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:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Wy(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Go(e,{getShadowRoot:this.config.getShadowRoot}),n=nT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let h=0;h<t.length;h++)if(Ta(t[h])>0){c=!0;break}function d(h,p=!0){const g=t.indexOf(h);if(g>=0)return t[g+(p?1:-1)];const b=n.indexOf(h);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(Wi(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(Wi(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,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 YT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?WT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ut(this.doc,"focusin",this.handleFocus,!0),Ut(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ut(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ut(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ut(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ut(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=Yo(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},Aa=e=>e.key==="Tab",ka=(e,...t)=>typeof e=="function"?e(...t):e,CD=e=>!e.isComposing&&e.key==="Escape",WT=e=>setTimeout(e,0),ND=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function GT(e,t={}){let n;const r=Pt(()=>{const o=typeof e=="function"?e():e;if(o){n=new kD(o,oe(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:yr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Bh="data-scroll-lock";function OD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function XT(e){const t=Wo(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function KT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Bh))return;const u=XT(r)||XT(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Bh,"");const d=()=>x4(r,"--scrollbar-width",`${c}px`),h=OD(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[h]=`${c}px`),kl(o,_)},g=()=>{var W,F;const{scrollX:_,scrollY:v,visualViewport:A}=n,k=(W=A==null?void 0:A.offsetLeft)!=null?W:0,C=(F=A==null?void 0:A.offsetTop)!=null?F:0,I={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(C))}px`,left:`${-(_-Math.floor(k))}px`,right:"0"};!u&&c>0&&(I[h]=`${c}px`);const j=kl(o,I);return()=>{j==null||j(),n.scrollTo({left:_,top:v,behavior:"instant"})}},b=[d(),Sl()?g():p()];return()=>{b.forEach(_=>_==null?void 0:_()),o.removeAttribute(Bh)}}var PD=Xi("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Sr=PD.build(),QT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},JT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Uh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},ZT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},ID=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Hh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},zh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},RD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},eb=e=>e.getById(QT(e)),is=e=>e.getById(JT(e)),os=e=>e.getById(Uh(e)),tb=e=>e.getById(ZT(e)),LD=e=>e.getById(Hh(e)),DD=e=>e.getById(zh(e));function MD(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),h=r.get("currentPlacement"),p=a("currentPortalled"),g=r.get("renderedElements"),b=rD(oe(B({},u("positioning")),{placement:h}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(oe(B({id:ID(c)},Sr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(oe(B({},Sr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(oe(B({},Sr.anchor.attrs),{dir:u("dir"),id:QT(c)}))},getTriggerProps(){return t.button(oe(B({},Sr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:JT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Uh(c),onPointerDown(y){Ky(y)&&J6()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(oe(B({},Sr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(oe(B({id:ZT(c)},Sr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(oe(B({},Sr.content.attrs),{dir:u("dir"),id:Uh(c),tabIndex:-1,role:"dialog","aria-modal":Vy(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":$o(d),"aria-labelledby":g.title?Hh(c):void 0,"aria-describedby":g.description?zh(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(oe(B({},Sr.title.attrs),{id:Hh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(oe(B({},Sr.description.attrs),{id:zh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(oe(B({},Sr.closeTrigger.attrs),{dir:u("dir"),id:RD(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var FD={props({props:e}){return oe(B({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:B({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=eb(n))!=null?a:is(n);return LT(r,()=>tb(n),oe(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>os(n);let o=!0;return qT(r,{type:"popover",pointerBlocking:t("modal"),exclude:is(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&&(o=!(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:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:T4(()=>os(t),{triggerElement:is(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?MT(()=>[os(t),is(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return KT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?GT(()=>os(t),{initialFocus:()=>rT({root:os(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=eb(n))!=null?u:is(n);LT(o,()=>tb(n),oe(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){Pt(()=>{Object.assign(e.get("renderedElements"),{title:!!LD(t),description:!!DD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Pt(()=>{const n=rT({root:os(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Pt(()=>{const a=is(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})}}}};Qo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[A7,jl]=Gi({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[k7,jh]=Gi({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),BD=e=>{const t=q.useId(),{getRootNode:n}=jl(),{dir:r}=jh(),o=B({id:t,dir:r,getRootNode:n},e),a=Nl(FD,o);return MD(a,_h)},UD=e=>{const[t,u]=fT(e),c=u,{children:n}=c,r=an(c,["children"]),o=BD(r),a=vh(It({present:o.open},t));return x.jsx(L4,{value:o,children:x.jsx(lT,{value:a,children:n})})},nb=q.forwardRef((e,t)=>{const n=Sh(),r=ba(),o=It(oe(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(Qt.button,oe(B({},o),{ref:t}))});nb.displayName="PopoverTrigger";function HD(e){return it({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 zD(e){return it({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 rb(e){return it({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 ib(e){return it({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 jD(e){return it({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 $D(e){return it({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 $h(e){return it({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 ob(e){return it({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 VD=({className:e,componentType:t,children:n})=>{const[r,o]=q.useState(!1),{globalClassName:a}=ot(),u=h=>{o(h.open)},c=q.useCallback(()=>{o(!1)},[]),d=q.useMemo(()=>({closeMenu:c}),[c]);return x.jsxs(UD,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(nb,{"aria-label":`Overflow menu for ${t}`,className:U(`${L}-overflow-menu-button-trigger`,`${L}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(ob,{})}),x.jsx(dT,{children:x.jsx(cT,{className:U(`${L}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(My.Provider,{value:d,children:n})})})]})};function sb(e){return it({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 ab(e){return it({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[qD,Qi]=Gi({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Vh=q.forwardRef((e,t)=>{const n=Qi(),r=It(n.getControlProps(),e);return x.jsx(Qt.div,oe(B(B({},r),e),{ref:t}))});Vh.displayName="CarouselControl";const qh=q.forwardRef((e,t)=>{const[n,r]=xa()(e,["readOnly","index"]),o=Qi(),a=It(o.getIndicatorProps(n),r);return x.jsx(Qt.button,oe(B({},a),{ref:t}))});qh.displayName="CarouselIndicator";const Yh=q.forwardRef((e,t)=>{const n=Qi(),r=It(n.getIndicatorGroupProps(),e);return x.jsx(Qt.div,oe(B({},r),{ref:t}))});Yh.displayName="CarouselIndicatorGroup";const Wh=q.forwardRef((e,t)=>{const[n,r]=xa()(e,["index","snapAlign"]),o=Qi(),a=It(o.getItemProps(n),r);return x.jsx(Qt.div,oe(B({},a),{ref:t}))});Wh.displayName="CarouselItem";const Gh=q.forwardRef((e,t)=>{const n=Qi(),r=It(n.getItemGroupProps(),e);return x.jsx(Qt.div,oe(B({},r),{ref:t}))});Gh.displayName="CarouselItemGroup";const Xh=q.forwardRef((e,t)=>{const n=Qi(),r=It(n.getNextTriggerProps(),e);return x.jsx(Qt.button,oe(B({},r),{ref:t}))});Xh.displayName="CarouselNextTrigger";const Kh=q.forwardRef((e,t)=>{const n=Qi(),r=It(n.getPrevTriggerProps(),e);return x.jsx(Qt.button,oe(B({},r),{ref:t}))});Kh.displayName="CarouselPrevTrigger";function YD(e){const t=Wo(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(b,y){let _=parseFloat(b);return/%/.test(b)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),h=c(o,n.height),p=c(a,n.width),g=c(u,n.height);return{x:{before:d,after:p},y:{before:h,after:g}}}function WD(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function ub(e){let t=[];for(const n of e.children)t=t.concat(n,ub(n));return t}function lb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?ub(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",h=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const g=p.getBoundingClientRect();if(!WD(n,g,u))continue;const b=Wo(p);let[y,_]=b.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const v=a==="x"?_:y,A=g[c]-n[c]+e[h];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:A});break;case"center":r[a].center.push({node:p,position:A+g[d]/2});break;case"end":r[a].end.push({node:p,position:A+g[d]});break}}}return r}function cb(e){const t=e.getBoundingClientRect(),n=YD(e),r=lb(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:db([...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(fb(0,o.x))),y:db([...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(fb(0,o.y)))}}function GD(e,t,n){const r=lb(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var db=e=>[...new Set(e)],fb=(e,t)=>n=>Math.max(e,Math.min(t,n)),XD=Xi("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Br=XD.build(),KD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},QD=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},$l=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},JD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},ZD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},e5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},hb=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},pn=e=>e.getById($l(e)),pb=e=>b4(pn(e),"[data-part=item]"),t5=(e,t)=>e.getById(hb(e,t)),mb=e=>{const t=pn(e);if(!t)return;const n=Go(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function n5(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),h=n.matches("dragging"),p=o("canScrollNext"),g=o("canScrollPrev"),b=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),v=c("slidesPerPage"),A=c("padding"),k=c("translations");return{isPlaying:d,isDragging:h,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:g,getProgress(){return _/y.length},scrollToIndex(C,I){a({type:"INDEX.SET",index:C,instant:I})},scrollTo(C,I){a({type:"PAGE.SET",index:C,instant:I})},scrollNext(C){a({type:"PAGE.NEXT",instant:C})},scrollPrev(C){a({type:"PAGE.PREV",instant:C})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(C){return Array.from(r.get("slidesInView")).includes(C)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(oe(B({},Br.root.attrs),{id:KD(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":v,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(oe(B({},Br.itemGroup.attrs),{id:$l(u),"data-orientation":c("orientation"),"data-dragging":$o(h),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(C){Vo(C.currentTarget,tr(C))&&a({type:"VIEWPORT.FOCUS"})},onBlur(C){Vo(C.currentTarget,C.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(C){if(C.defaultPrevented||!c("allowMouseDrag")||!Ky(C))return;const I=tr(C);Tr(I)&&I!==C.currentTarget||(C.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:b6(C=>{const I=c("orientation")==="horizontal"?"deltaX":"deltaY";C[I]<0&&!o("canScrollPrev")||C[I]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:A,[b?"paddingInline":"paddingBlock"]:A,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(C){const I=r.get("slidesInView").includes(C.index);return t.element(oe(B({},Br.item.attrs),{id:QD(u,C.index),dir:c("dir"),role:"group","data-index":C.index,"data-inview":$o(I),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":k.item(C.index,c("slideCount")),"aria-hidden":Vy(!I),style:{scrollSnapAlign:(()=>{var ue;const j=(ue=C.snapAlign)!=null?ue:"start",W=c("slidesPerMove"),F=W==="auto"?Math.floor(c("slidesPerPage")):W;return(C.index+F)%F===0?j:void 0})()}}))},getControlProps(){return t.element(oe(B({},Br.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(oe(B({},Br.prevTrigger.attrs),{id:ZD(u),type:"button",disabled:!g,dir:c("dir"),"aria-label":k.prevTrigger,"data-orientation":c("orientation"),"aria-controls":$l(u),onClick(C){C.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(oe(B({},Br.nextTrigger.attrs),{dir:c("dir"),id:JD(u),type:"button","aria-label":k.nextTrigger,"data-orientation":c("orientation"),"aria-controls":$l(u),disabled:!p,onClick(C){C.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(oe(B({},Br.indicatorGroup.attrs),{dir:c("dir"),id:e5(u),"data-orientation":c("orientation"),onKeyDown(C){if(C.defaultPrevented)return;const I="indicator",j={ArrowDown(ee){b||(a({type:"PAGE.NEXT",src:I}),ee.preventDefault())},ArrowUp(ee){b||(a({type:"PAGE.PREV",src:I}),ee.preventDefault())},ArrowRight(ee){b&&(a({type:"PAGE.NEXT",src:I}),ee.preventDefault())},ArrowLeft(ee){b&&(a({type:"PAGE.PREV",src:I}),ee.preventDefault())},Home(ee){a({type:"PAGE.SET",index:0,src:I}),ee.preventDefault()},End(ee){a({type:"PAGE.SET",index:y.length-1,src:I}),ee.preventDefault()}},W=r4(C,{dir:c("dir"),orientation:c("orientation")}),F=j[W];F==null||F(C)}}))},getIndicatorProps(C){return t.button(oe(B({},Br.indicator.attrs),{dir:c("dir"),id:hb(u,C.index),type:"button","data-orientation":c("orientation"),"data-index":C.index,"data-readonly":$o(C.readOnly),"data-current":$o(C.index===_),"aria-label":k.indicator(C.index),onClick(I){I.defaultPrevented||C.readOnly||a({type:"PAGE.SET",index:C.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(oe(B({},Br.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":$o(d),"aria-label":d?k.autoplayStop:k.autoplayStart,onClick(C){C.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var r5={props({props:e}){return A6(e,["slideCount"],"carousel"),oe(B({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:B({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:i5(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 l6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({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(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),mb(e)});return mb(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!pn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Pt(()=>{o(),Pt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return pb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=pn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,h)=>{var b;const p=h.target,g=Number((b=p.dataset.index)!=null?b:"-1");return g==null||Number.isNaN(g)||g===-1?d:h.isIntersecting?i6(d,g):o6(d,g)},n.get("slidesInView"));n.set("slidesInView",s6(c))},{root:r,threshold:t("inViewThreshold")});return pb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=pn(n);return r?Ut(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 Ut(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return E4(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 Ut(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:o}){var h;const a=t.instant?"instant":"smooth",u=jy((h=t.index)!=null?h:e.get("page"),0,e.get("pageSnapPoints").length-1),c=pn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=pn(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=Uy(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=a6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=pn(r);if(!o)return;const a=GD(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=jy(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 o=cb(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.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 o=r.scrollLeft,a=r.scrollTop,u=cb(r),c=u.x.reduce((h,p)=>Math.abs(p-o)<Math.abs(h-o)?p:h,u.x[0]),d=u.y.reduce((h,p)=>Math.abs(p-a)<Math.abs(h-a)?p:h,u.y[0]);Pt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const h=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(h));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=t5(n,e.get("page"));r&&Pt(()=>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 i5(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}Qo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Qo()(["index","readOnly"]),Qo()(["index","snapAlign"]);const o5=e=>{const t=q.useId(),{getRootNode:n}=jl(),{dir:r}=jh(),o=B({id:t,dir:r,getRootNode:n},e),a=Nl(r5,o);return n5(a,_h)},Qh=q.forwardRef((e,t)=>{const[n,r]=xa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=o5(n),a=It(o.getRootProps(),r);return x.jsx(qD,{value:o,children:x.jsx(Qt.div,oe(B({},a),{ref:t}))})});Qh.displayName="CarouselRoot";const s5=180,a5=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},u5=({globalClassName:e,className:t,itemMinWidth:n=s5,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:h="Product carousel",children:p})=>{const g=Array.from(p),b=g.length,y=q.useRef(null),[_,v]=q.useState(0),{width:A}=zA();q.useLayoutEffect(()=>{y.current&&v(y.current.getBoundingClientRect().width)},[A,b]);const k=a5(r),C=n+k,I=_>0?(_+k)/C:1,j=Math.max(1,Math.floor(I));if(b===0)return null;const W=b>j,F=Math.ceil(b/j),ee=W?Math.max(1,I):j;return x.jsxs(Qh,{ref:y,className:U(e,t,`${L}-carousel`),slidesPerPage:ee,slidesPerMove:j,spacing:r,loop:o,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":h,children:[x.jsx(Gh,{className:U(e,`${L}-carousel__item-group`,{"carousel-row-container":!W}),children:g.map((ue,me)=>x.jsx(Wh,{index:me,className:U(e,`${L}-carousel__item`),children:ue},me))}),c&&W&&x.jsxs(Vh,{className:U(e,`${L}-carousel__control`),children:[x.jsx(Kh,{className:U(e,`${L}-carousel__prev-trigger`),"aria-label":"Previous slide",children:x.jsx(rb,{size:"16px"})}),x.jsx(Xh,{className:U(e,`${L}-carousel__next-trigger`),"aria-label":"Next slide",children:x.jsx(ib,{size:"16px"})})]}),u&&W&&x.jsx(Yh,{className:U(e,`${L}-carousel__indicator-group`),children:Array.from({length:F},(ue,me)=>x.jsx(qh,{index:me,className:U(e,`${L}-carousel__indicator`),"aria-label":`Go to slide group ${me+1}`},me))})]})},l5=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>x.jsx("button",{"aria-label":t,title:t,className:U(e,`${L}-close-button`),disabled:r,onClick:n,children:x.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:x.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),[c5,d5]=Gi({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),f5=e=>xa()(e,["lazyMount","unmountOnExit"]),[h5,Ca]=Gi({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),gb=q.forwardRef((e,t)=>{const n=Ca(),r=d5(),o=vh(oe(B({},r),{present:n.open})),a=It(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:x.jsx(Qt.div,oe(B({},a),{ref:Ol(o.ref,t)}))});gb.displayName="DialogBackdrop";const Jh=q.forwardRef((e,t)=>{const n=Ca(),r=ba(),o=It(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Qt.div,oe(B({},o),{ref:Ol(r.ref,t)}))});Jh.displayName="DialogContent";const Zh=q.forwardRef((e,t)=>{const n=Ca(),r=It(n.getDescriptionProps(),e);return x.jsx(Qt.div,oe(B({},r),{ref:t}))});Zh.displayName="DialogDescription";const ep=q.forwardRef((e,t)=>{const n=Ca(),r=It(n.getPositionerProps(),e);return ba().unmounted?null:x.jsx(Qt.div,oe(B({},r),{ref:t}))});ep.displayName="DialogPositioner";var p5=Xi("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Ji=p5.build(),Eb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},yb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},tp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Tb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},np=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},rp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},bb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Vl=e=>e.getById(tp(e)),m5=e=>e.getById(Eb(e)),g5=e=>e.getById(yb(e)),E5=e=>e.getById(Tb(e)),y5=e=>e.getById(np(e)),T5=e=>e.getById(rp(e)),b5=e=>e.getById(bb(e));function x5(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(oe(B({},Ji.trigger.attrs),{dir:a("dir"),id:Tb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":tp(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(oe(B({},Ji.backdrop.attrs),{dir:a("dir"),hidden:!d,id:yb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(oe(B({},Ji.positioner.attrs),{dir:a("dir"),id:Eb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(oe(B({},Ji.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:tp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:np(u),"aria-describedby":h.description?rp(u):void 0}))},getTitleProps(){return t.element(oe(B({},Ji.title.attrs),{dir:a("dir"),id:np(u)}))},getDescriptionProps(){return t.element(oe(B({},Ji.description.attrs),{dir:a("dir"),id:rp(u)}))},getCloseTriggerProps(){return t.button(oe(B({},Ji.closeTrigger.attrs),{dir:a("dir"),id:bb(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var _5={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>b5(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return B({role:"dialog",modal:o,trapFocus:o,preventScroll:o,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 qT(()=>Vl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[E5(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return KT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?GT(()=>Vl(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?MT(()=>[Vl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Pt(()=>{e.set("rendered",{title:!!y5(t),description:!!T5(t)})})},syncZIndex({scope:e}){Pt(()=>{const t=Vl(e);if(!t)return;const n=Wo(t);[m5(e),g5(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.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})}}}};Qo()(["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 w5=e=>{const t=q.useId(),{getRootNode:n}=jl(),{dir:r}=jh(),o=B({id:t,getRootNode:n,dir:r},e),a=Nl(_5,o);return x5(a,_h)},xb=e=>{const[t,c]=fT(e),d=c,{children:n}=d,r=an(d,["children"]),[o]=f5(t),a=w5(r),u=vh(It({present:a.open},t));return x.jsx(h5,{value:a,children:x.jsx(c5,{value:o,children:x.jsx(lT,{value:u,children:n})})})},_b=q.forwardRef((e,t)=>{const n=Ca(),r=It(n.getTitleProps(),e);return x.jsx(Qt.h2,oe(B({},r),{ref:t}))});_b.displayName="DialogTitle";const S5=({children:e})=>{const[t,n]=q.useState(!1),r=q.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=q.useMemo(()=>({isOpen:t}),[t]);return x.jsx(uh.Provider,{value:r,children:x.jsx(Dy.Provider,{value:o,children:e})})},wb=()=>q.useContext(Dy),Sb=()=>{const e=q.useContext(uh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},v5=`${L}-overflow-menu-button-trigger`,A5=({componentType:e,children:t})=>{const{isOpen:n}=wb(),{closeMenu:r}=Sb(),{globalClassName:o}=ot(),a=q.useRef(null);return q.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const h=d.target;h instanceof Element&&h.closest(`.${v5}`)||a.current&&!a.current.contains(h)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?x.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:U(`${L}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},k5=({componentType:e,className:t})=>{const{toggleMenu:n}=Sb(),{isOpen:r}=wb(),{globalClassName:o}=ot();return x.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:U(`${L}-overflow-menu-button-trigger`,`${L}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:x.jsx(ob,{})})};class C5{constructor(){Ve(this,"initialState",Ng);Ve(this,"promptsStateProxy");Ve(this,"promptsParamsProxy");Ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));Ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return P5(n,r),Reflect.set(t,n,r)});Ve(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Ve(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Ve(this,"updatePromptsParamsProxy",t=>new Proxy(B({},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 oi=new C5,N5=e=>{window.addEventListener(tf,e)},O5=e=>{window.removeEventListener(tf,e)},P5=(e,t)=>{const n=new CustomEvent(tf,{detail:{property:e,value:t}});window.dispatchEvent(n)},vb=e=>{const t=oi.isOpen,n=typeof e=="boolean"?e:!t;oi.promptsStateProxy.isOpen=n},I5=e=>{const t=oi.isInline,n=typeof e=="boolean"?e:!t;oi.promptsStateProxy.isInline=n},R5=({elementId:e,entryType:t,params:n,isInline:r})=>{oi.promptsStateProxy.elementId=e,t&&(oi.promptsStateProxy.entryType=t),typeof r=="boolean"&&I5(r),n&&oi.updatePromptsParamsProxy(n),oi.isOpen||vb(!0)},L5=()=>{const e=q.useContext(Pg);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ql=()=>{const e=q.useContext(Og);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},D5=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ot(),{previousComponentType:r}=Fi(),o=zo(),a=()=>{Wu(r||"dialog"),o()};return t?x.jsx(Jn,{className:U(n,`${L}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:x.jsx(sb,{})}):x.jsxs("button",{className:U(n,`${L}-overflow-menu-button`,`${L}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(sb,{}),"Show ",r||"dialog"]})},M5=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ot(),{isModalFullscreen:r}=Fi(),o=zo(),a=()=>{nf(!r),o()},u=r?yk:Tk,c="Toggle Fullscreen";return t?x.jsx(Jn,{ariaLabel:c,title:c,className:U(n,`${L}-modal-fullscreen-button`,`cim-${e}-component`),icon:x.jsx(u,{}),onClick:a}):x.jsxs("button",{className:U(n,`${L}-overflow-menu-button`,`${L}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(u,{}),c]})},F5=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ot(),{dialogPosition:r}=Fi(),o=zo(),a=r==="bottom-left",u=()=>{rf(a?"bottom-right":"bottom-left"),o()},c=a?zD:HD,d=a?"Move right":"Move left";return t?x.jsx(Jn,{className:U(n,`${L}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:x.jsx(c,{})}):x.jsxs("button",{className:U(n,`${L}-overflow-menu-button`,`${L}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(c,{}),d]})},Ab=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:o,globalClassName:a,mode:u,enableDownloadTranscript:c}=ot(),{mode:d}=Fi(),h=u==="messaging"&&c&&!!r,p=d==="standalone",g=e==="modal",b=g?D5:Nb,y=g?M5:F5,_=q.useMemo(()=>o?dk(o):{},[o]);return x.jsx(S5,{children:x.jsxs("div",{className:U(a,`${L}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[x.jsxs("div",{className:U(a,`${L}-${e}-header`,{standalone:p,embedded:!p}),style:_,children:[(o==null?void 0:o.logoUrl)&&x.jsx("img",{alt:"",role:"img",className:U(a,`${L}-${e}-logo`,{standalone:p,embedded:!p}),src:o.logoUrl}),x.jsx(_b,{className:U(a,`${L}-${e}-title`,{standalone:p,embedded:!p}),children:o==null?void 0:o.headerText}),x.jsxs("div",{className:U(a,`${L}-${e}-controls`),children:[x.jsx(b,{componentType:e,isIcon:!0}),x.jsx(k5,{componentType:e}),x.jsx(l5,{className:U(a,`cim-${e}-component`),onClick:n})]})]}),x.jsxs(A5,{componentType:e,children:[x.jsx(y,{componentType:e}),x.jsx(z5,{componentType:e}),x.jsx(Fy,{componentType:e,onClearChat:t}),h&&x.jsx(By,{componentType:e,onDownloadTranscript:r})]})]})})},kb="USD",Na=(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}`}},B5=({retailPrice:e,discountPrice:t,currencyCode:n=kb})=>{const r=n||kb,o=typeof t=="number"&&typeof e=="number"&&t<e,a=o?t:e||t||null,u=o?e:null;return{price:Na(a,r),comparePrice:Na(u,r),hasDiscount:o}},ip=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:o,className:a})=>{const{price:u,comparePrice:c,hasDiscount:d}=B5({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const h=typeof r=="string"?{fontSize:r}:{};return x.jsxs("div",{className:U(o,a,`${L}-price`),style:h,children:[x.jsx("span",{className:U(o,`${L}-price__amount`),children:u}),d&&c&&x.jsx("span",{className:U(o,`${L}-price__compare`),children:c})]})},U5={sparkle:$h,plus:jD,"paper-plane":$D},Cb=({icon:e,className:t})=>{const n=U5[e];return n?x.jsx(n,{className:t,"aria-hidden":"true"}):null},H5=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=ot(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",h=o?"standalone":"embedded",p=_=>()=>{a(_)},g={"has-icon":!!c,"icon-right":!!c&&d==="right"},b=_=>x.jsxs(x.Fragment,{children:[c&&x.jsx(Cb,{icon:c,className:`${L}-suggestion-button-icon`}),x.jsx("span",{children:_})]});return x.jsx("div",{className:U(t,`${L}-suggestion-container ${h}`,e),children:n.map(_=>o?x.jsx(Ku,{disabled:r,className:U(t,`${L}-suggestion-button standalone`,g),onClick:p(_),children:b(_)},_):x.jsx("button",{disabled:r,className:U(t,`${L}-suggestion-button embedded`,g),onClick:p(_),children:b(_)},_))})},z5=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=ot();if(!r)return null;const o=()=>{Rr(!1),Yu(!0)};return t?x.jsx(Jn,{className:U(n,`${L}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:x.jsx(Yg,{})}):x.jsxs("button",{className:U(n,`${L}-overflow-menu-button`,`${L}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(Yg,{}),"Minimize"]})},Nb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=ot(),r=zo(),o=()=>{Wu("modal"),r()};return t?x.jsx(Jn,{className:U(n,`${L}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:x.jsx(ab,{})}):x.jsxs("button",{className:U(n,`${L}-overflow-menu-button`,`${L}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(ab,{}),"Show modal"]})},j5=["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"],$5=3e3,V5=400,q5=({globalClassName:e,isWidgetStandalone:t,messages:n=j5})=>{const[r,o]=q.useState(0),[a,u]=q.useState(!0);return q.useEffect(()=>{let c;const d=setInterval(()=>{u(!1),c=setTimeout(()=>{o(h=>(h+1)%n.length),u(!0)},V5)},$5);return()=>{clearInterval(d),clearTimeout(c)}},[n.length]),x.jsxs("div",{className:U(e,`${L}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[x.jsxs("div",{className:`${L}-connecting-pulse-wrapper`,children:[x.jsx("div",{className:`${L}-connecting-pulse`}),x.jsx("div",{className:`${L}-connecting-ring`})]}),x.jsx("span",{className:U(`${L}-connecting-text`,a&&`${L}-connecting-text--visible`),children:n[r]})]})},Y5=({shouldShow:e,loadingText:t})=>e?x.jsx("span",{className:`${L}-processing-text`,children:t}):null,W5=({shouldShow:e})=>e?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:`${L}-processing-shimmer-bar`}),x.jsx("div",{className:`${L}-processing-shimmer-bar`}),x.jsx("div",{className:`${L}-processing-shimmer-bar`})]}):null,op=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>x.jsxs("div",{className:U(e,`${L}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[x.jsx(Y5,{shouldShow:!!n,loadingText:n}),x.jsx(W5,{shouldShow:!n})]});function Ob(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function G5(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function X5(e,t,n){const o=al((n||{}).ignore||[]),a=K5(t);let u=-1;for(;++u<a.length;)iE(e,"text",c);function c(h,p){let g=-1,b;for(;++g<p.length;){const y=p[g],_=b?b.children:void 0;if(o(y,_?_.indexOf(y):void 0,b))return;b=y}if(b)return d(h,p)}function d(h,p){const g=p[p.length-1],b=a[u][0],y=a[u][1];let _=0;const A=g.children.indexOf(h);let k=!1,C=[];b.lastIndex=0;let I=b.exec(h.value);for(;I;){const j=I.index,W={index:I.index,input:I.input,stack:[...p,h]};let F=y(...I,W);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?b.lastIndex=j+1:(_!==j&&C.push({type:"text",value:h.value.slice(_,j)}),Array.isArray(F)?C.push(...F):F&&C.push(F),_=j+I[0].length,k=!0),!b.global)break;I=b.exec(h.value)}return k?(_<h.value.length&&C.push({type:"text",value:h.value.slice(_)}),g.children.splice(A,1,...C)):C=[h],A+C.length}}function K5(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 o=n[r];t.push([Q5(o[0]),J5(o[1])])}return t}function Q5(e){return typeof e=="string"?new RegExp(G5(e),"g"):e}function J5(e){return typeof e=="function"?e:function(){return e}}const sp="phrasing",ap=["autolink","link","image","label"];function Z5(){return{transforms:[s8],enter:{literalAutolink:t8,literalAutolinkEmail:up,literalAutolinkHttp:up,literalAutolinkWww:up},exit:{literalAutolink:o8,literalAutolinkEmail:i8,literalAutolinkHttp:n8,literalAutolinkWww:r8}}}function e8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:sp,notInConstruct:ap},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:sp,notInConstruct:ap},{character:":",before:"[ps]",after:"\\/",inConstruct:sp,notInConstruct:ap}]}}function t8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function up(e){this.config.enter.autolinkProtocol.call(this,e)}function n8(e){this.config.exit.autolinkProtocol.call(this,e)}function r8(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function i8(e){this.config.exit.autolinkEmail.call(this,e)}function o8(e){this.exit(e)}function s8(e){X5(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,a8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),u8]],{ignore:["link","linkReference"]})}function a8(e,t,n,r,o){let a="";if(!Pb(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!l8(n)))return!1;const u=c8(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function u8(e,t,n,r){return!Pb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function l8(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function c8(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=Ob(e,"(");let a=Ob(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Pb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ui(n)||el(n))&&(!t||n!==47)}Ib.peek=T8;function d8(){this.buffer()}function f8(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function h8(){this.buffer()}function p8(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function m8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Zn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function g8(e){this.exit(e)}function E8(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Zn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function y8(e){this.exit(e)}function T8(){return"["}function Ib(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function b8(){return{enter:{gfmFootnoteCallString:d8,gfmFootnoteCall:f8,gfmFootnoteDefinitionLabelString:h8,gfmFootnoteDefinition:p8},exit:{gfmFootnoteCallString:m8,gfmFootnoteCall:g8,gfmFootnoteDefinitionLabelString:E8,gfmFootnoteDefinition:y8}}}function x8(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ib},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const h=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
38
|
+
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?Rb:_8))),h(),d}}function _8(e,t,n){return t===0?e:Rb(e,t,n)}function Rb(e,t,n){return(n?"":" ")+e}const w8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Lb.peek=C8;function S8(){return{canContainEols:["delete"],enter:{strikethrough:A8},exit:{strikethrough:k8}}}function v8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:w8}],handlers:{delete:Lb}}}function A8(e){this.enter({type:"delete",children:[]},e)}function k8(e){this.exit(e)}function Lb(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,oe(B({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function C8(){return"~"}function N8(e){return e.length}function O8(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||N8,a=[],u=[],c=[],d=[];let h=0,p=-1;for(;++p<e.length;){const v=[],A=[];let k=-1;for(e[p].length>h&&(h=e[p].length);++k<e[p].length;){const C=P8(e[p][k]);if(n.alignDelimiters!==!1){const I=o(C);A[k]=I,(d[k]===void 0||I>d[k])&&(d[k]=I)}v.push(C)}u[p]=v,c[p]=A}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<h;)a[g]=Db(r[g]);else{const v=Db(r);for(;++g<h;)a[g]=v}g=-1;const b=[],y=[];for(;++g<h;){const v=a[g];let A="",k="";v===99?(A=":",k=":"):v===108?A=":":v===114&&(k=":");let C=n.alignDelimiters===!1?1:Math.max(1,d[g]-A.length-k.length);const I=A+"-".repeat(C)+k;n.alignDelimiters!==!1&&(C=A.length+C+k.length,C>d[g]&&(d[g]=C),y[g]=C),b[g]=I}u.splice(1,0,b),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const v=u[p],A=c[p];g=-1;const k=[];for(;++g<h;){const C=v[g]||"";let I="",j="";if(n.alignDelimiters!==!1){const W=d[g]-(A[g]||0),F=a[g];F===114?I=" ".repeat(W):F===99?W%2?(I=" ".repeat(W/2+.5),j=" ".repeat(W/2-.5)):(I=" ".repeat(W/2),j=I):j=" ".repeat(W)}n.delimiterStart!==!1&&!g&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||g)&&k.push(" "),n.alignDelimiters!==!1&&k.push(I),k.push(C),n.alignDelimiters!==!1&&k.push(j),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&k.push("|")}_.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return _.join(`
|
|
39
|
+
`)}function P8(e){return e==null?"":String(e)}function Db(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function I8(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),R8);return o(),u}function R8(e,t,n){return">"+(n?"":" ")+e}function L8(e,t){return Mb(e,t.inConstruct,!0)&&!Mb(e,t.notInConstruct,!1)}function Mb(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 Fb(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
40
|
+
`&&L8(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
41
|
+
`}function D8(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>u&&(u=a):a=1,o=r+t.length,r=n.indexOf(t,o);return u}function M8(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function F8(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function B8(e,t,n,r){const o=F8(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(M8(e,n)){const g=n.enter("codeIndented"),b=n.indentLines(a,U8);return g(),b}const c=n.createTracker(r),d=o.repeat(Math.max(D8(a,o)+1,3)),h=n.enter("codeFenced");let p=c.move(d);if(e.lang){const g=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,B({before:p,after:" ",encode:["`"]},c.current()))),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,B({before:p,after:`
|
|
42
42
|
`,encode:["`"]},c.current()))),g()}return p+=c.move(`
|
|
43
43
|
`),a&&(p+=c.move(a+`
|
|
44
|
-
`)),p+=c.move(d),h(),p}function
|
|
45
|
-
`},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,B({before:h,after:o},d.current()))),h+=d.move(o),c()),u(),h}function
|
|
44
|
+
`)),p+=c.move(d),h(),p}function U8(e,t,n){return(n?"":" ")+e}function lp(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function H8(e,t,n,r){const o=lp(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),B({before:h,after:"]"},d.current()))),h+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,B({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,B({before:h,after:e.title?" ":`
|
|
45
|
+
`},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,B({before:h,after:o},d.current()))),h+=d.move(o),c()),u(),h}function z8(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Oa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Yl(e,t,n){const r=Io(e),o=Io(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Bb.peek=j8;function Bb(e,t,n,r){const o=z8(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let d=u.move(n.containerPhrasing(e,B({after:o,before:c},u.current())));const h=d.charCodeAt(0),p=Yl(r.before.charCodeAt(r.before.length-1),h,o);p.inside&&(d=Oa(h)+d.slice(1));const g=d.charCodeAt(d.length-1),b=Yl(r.after.charCodeAt(0),g,o);b.inside&&(d=d.slice(0,-1)+Oa(g));const y=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function j8(e,t,n){return n.options.emphasis||"*"}function $8(e,t){let n=!1;return ll(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Pf}),!!((!e.depth||e.depth<3)&&bf(e)&&(t.options.setext||n))}function V8(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if($8(e,n)){const p=n.enter("headingSetext"),g=n.enter("phrasing"),b=n.containerPhrasing(e,oe(B({},a.current()),{before:`
|
|
46
46
|
`,after:`
|
|
47
47
|
`}));return g(),p(),b+`
|
|
48
48
|
`+(o===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
49
49
|
`))+1))}const u="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let h=n.containerPhrasing(e,B({before:"# ",after:`
|
|
50
|
-
`},a.current()));return/^[\t ]/.test(h)&&(h=Oa(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,n.options.closeAtx&&(h+=" "+u),d(),c(),h}
|
|
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:c}};function u(y,
|
|
52
|
-
`))}function d(y,x,v,A){const C=v.enter("tableCell"),k=v.enter("phrasing"),I=v.containerPhrasing(y,ie(B({},A),{before:a,after:a}));return k(),C(),I}function h(y,x){return N8(y,{align:x,alignDelimiters:r,padding:n,stringLength:o})}function p(y,x,v){const A=y.children;let C=-1;const k=[],I=x.enter("table");for(;++C<A.length;)k[C]=g(A[C],x,v);return I(),k}function g(y,x,v){const A=y.children;let C=-1;const k=[],I=x.enter("tableRow");for(;++C<A.length;)k[C]=d(A[C],y,x,v);return I(),k}function b(y,x,v){let A=Wb.inlineCode(y,x,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function gM(){return{exit:{taskListCheckValueChecked:Xb,taskListCheckValueUnchecked:Xb,paragraph:yM}}}function EM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:TM}}}function Xb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function yM(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function TM(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=Wb.listItem(e,t,n,B(B({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(p){return p+u}}function bM(){return[J5(),T8(),w8(),lM(),gM()]}function _M(e){return{extensions:[Z5(),b8(e),S8(),mM(e),EM()]}}const xM={tokenize:kM,partial:!0},Kb={tokenize:NM,partial:!0},Qb={tokenize:OM,partial:!0},Jb={tokenize:PM,partial:!0},wM={tokenize:IM,partial:!0},Zb={name:"wwwAutolink",tokenize:AM,previous:t_},e_={name:"protocolAutolink",tokenize:CM,previous:n_},Ur={name:"emailAutolink",tokenize:vM,previous:r_},vr={};function SM(){return{text:vr}}let Zi=48;for(;Zi<123;)vr[Zi]=Ur,Zi++,Zi===58?Zi=65:Zi===91&&(Zi=97);vr[43]=Ur,vr[45]=Ur,vr[46]=Ur,vr[95]=Ur,vr[72]=[Ur,e_],vr[104]=[Ur,e_],vr[87]=[Ur,Zb],vr[119]=[Ur,Zb];function vM(e,t,n){const r=this;let o,a;return u;function u(g){return!fp(g)||!r_.call(r,r.previous)||hp(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return fp(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(wM,p,h)(g):g===45||g===95||Xt(g)?(a=!0,e.consume(g),d):p(g)}function h(g){return e.consume(g),o=!0,d}function p(g){return a&&o&&rn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function AM(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!t_.call(r,r.previous)||hp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(xM,e.attempt(Kb,e.attempt(Qb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function CM(e,t,n){const r=this;let o="",a=!1;return u;function u(g){return(g===72||g===104)&&n_.call(r,r.previous)&&!hp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(rn(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),a?h:(a=!0,d)):n(g)}function h(g){return g===null||Zu(g)||st(g)||Ui(g)||el(g)?n(g):e.attempt(Kb,e.attempt(Qb,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function kM(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function NM(e,t,n){let r,o,a;return u;function u(h){return h===46||h===95?e.check(Jb,d,c)(h):h===null||st(h)||Ui(h)||h!==45&&el(h)?d(h):(a=!0,e.consume(h),u)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),u}function d(h){return o||r||!a?n(h):t(h)}}function OM(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(Jb,t,a)(u):u===null||st(u)||Ui(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function PM(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||st(c)||Ui(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||st(c)||Ui(c)?t(c):r(c)}function a(c){return rn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):rn(c)?(e.consume(c),u):n(c)}}function IM(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Xt(a)?n(a):t(a)}}function t_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function n_(e){return!rn(e)}function r_(e){return!(e===47||fp(e))}function fp(e){return e===43||e===45||e===46||e===95||Xt(e)}function hp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const RM={tokenize:zM,partial:!0};function LM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:BM,continuation:{tokenize:UM},exit:HM}},text:{91:{name:"gfmFootnoteCall",tokenize:FM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:DM,resolveTo:MM}}}}function DM(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const h=Zn(r.sliceSerialize({start:u.end,end:r.now()}));return h.codePointAt(0)!==94||!a.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function MM(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function FM(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(a>999||g===93&&!u||g===null||g===91||st(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(Zn(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return st(g)||(u=!0),a++,e.consume(g),g===92?p:h}function p(g){return g===91||g===92||g===93?(e.consume(g),a++,h):h(g)}}function BM(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(x)}function p(x){if(u>999||x===93&&!c||x===null||x===91||st(x))return n(x);if(x===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=Zn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return st(x)||(c=!0),u++,e.consume(x),x===92?g:p}function g(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}function b(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),o.includes(a)||o.push(a),Qe(e,y,"gfmFootnoteDefinitionWhitespace")):n(x)}function y(x){return t(x)}}function UM(e,t,n){return e.check(Zs,t,e.attempt(RM,t,n))}function HM(e){e.exit("gfmFootnoteDefinition")}function zM(e,t,n){const r=this;return Qe(e,o,"gfmFootnoteDefinitionIndent",5);function o(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 jM(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let h=d;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[d][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[d][1].end)},g={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,c],["enter",u[h][1],c],["exit",u[h][1],c],["enter",g,c]],y=c.parser.constructs.insideSpan.null;y&&vn(b,b.length,0,tl(y,u.slice(h+1,d),c)),vn(b,b.length,0,[["exit",g,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),vn(u,h-1,d-h+3,b),d=h+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const h=this.previous,p=this.events;let g=0;return b;function b(x){return h===126&&p[p.length-1][1].type!=="characterEscape"?d(x):(u.enter("strikethroughSequenceTemporary"),y(x))}function y(x){const v=Io(h);if(x===126)return g>1?d(x):(u.consume(x),g++,y);if(g<2&&!n)return d(x);const A=u.exit("strikethroughSequenceTemporary"),C=Io(x);return A._open=!C||C===2&&!!v,A._close=!v||v===2&&!!C,c(x)}}}class $M{constructor(){this.map=[]}add(t,n,r){VM(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function VM(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function qM(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function YM(){return{flow:{null:{name:"table",tokenize:WM,resolveAll:GM}}}}function WM(e,t,n){const r=this;let o=0,a=0,u;return c;function c(U){let ne=r.events.length-1;for(;ne>-1;){const oe=r.events[ne][1].type;if(oe==="lineEnding"||oe==="linePrefix")ne--;else break}const ae=ne>-1?r.events[ne][1].type:null,de=ae==="tableHead"||ae==="tableRow"?F:d;return de===F&&r.parser.lazy[r.now().line]?n(U):de(U)}function d(U){return e.enter("tableHead"),e.enter("tableRow"),h(U)}function h(U){return U===124||(u=!0,a+=1),p(U)}function p(U){return U===null?n(U):Le(U)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),y):n(U):Xe(U)?Qe(e,p,"whitespace")(U):(a+=1,u&&(u=!1,o+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g(U)))}function g(U){return U===null||U===124||st(U)?(e.exit("data"),p(U)):(e.consume(U),U===92?b:g)}function b(U){return U===92||U===124?(e.consume(U),g):g(U)}function y(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(U):(e.enter("tableDelimiterRow"),u=!1,Xe(U)?Qe(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"),v):W(U)}function v(U){return Xe(U)?Qe(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"),C):U===45?(a+=1,C(U)):U===null||Le(U)?$(U):W(U)}function C(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"),I):(e.exit("tableDelimiterFiller"),I(U))}function I(U){return Xe(U)?Qe(e,$,"whitespace")(U):$(U)}function $(U){return U===124?x(U):U===null||Le(U)?!u||o!==a?W(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):W(U)}function W(U){return n(U)}function F(U){return e.enter("tableRow"),ee(U)}function ee(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),ee):U===null||Le(U)?(e.exit("tableRow"),t(U)):Xe(U)?Qe(e,ee,"whitespace")(U):(e.enter("data"),ce(U))}function ce(U){return U===null||U===124||st(U)?(e.exit("data"),ee(U)):(e.consume(U),U===92?pe:ce)}function pe(U){return U===92||U===124?(e.consume(U),ce):ce(U)}}function GM(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,h,p,g;const b=new $M;for(;++n<e.length;){const y=e[n],x=y[1];y[0]==="enter"?x.type==="tableHead"?(c=!1,d!==0&&(i_(b,t,d,h,p),p=void 0,d=0),h={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",h,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,g=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},b.add(n,0,[["enter",p,t]])),o=x.type==="tableDelimiterRow"?2:p?3:1):o&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],g=Wl(b,t,a,o,void 0,g),a=[0,0,0,0]),u[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],g=Wl(b,t,a,o,void 0,g)),a=u,u=[a[1],n,0,0])):x.type==="tableHead"?(c=!0,d=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],g=Wl(b,t,a,o,n,g)):u[1]!==0&&(g=Wl(b,t,u,o,n,g)),o=0):o&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&i_(b,t,d,h,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=qM(t.events,n))}return e}function Wl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},ss(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=ss(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 h=ss(t.events,n[2]),p=ss(t.events,n[3]),g={type:c,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",g,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,v=n[3]-n[2]-1;e.add(x,v,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return o!==void 0&&(a.end=Object.assign({},ss(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function i_(e,t,n,r,o){const a=[],u=ss(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function ss(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const XM={name:"tasklistCheck",tokenize:QM};function KM(){return{text:{91:XM}}}function QM(e,t,n){const r=this;return o;function o(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 st(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Le(d)?t(d):Xe(d)?e.check({tokenize:JM},t,n)(d):n(d)}}function JM(e,t,n){return Qe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function ZM(e){return S1([SM(),LM(),jM(e),YM(),KM()])}const e9={};function t9(e){const t=this,n=e||e9,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(ZM(n)),a.push(bM()),u.push(_M(n))}const n9=()=>_.jsx("span",{className:`${L}-blinking-cursor`,children:_.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),pp=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>_.jsx(pE,{remarkPlugins:[t9],rehypePlugins:[Ay],components:{h1:({children:o})=>_.jsx("h1",{className:z(e,`${L}-header h1`),children:o}),h2:({children:o})=>_.jsx("h2",{className:z(e,`${L}-header h2`),children:o}),h3:({children:o})=>_.jsx("h3",{className:z(e,`${L}-header h3`),children:o}),ul:({children:o})=>_.jsx("ul",{className:z(e,`${L}-ul`),children:o}),ol:({children:o})=>_.jsx("ol",{className:z(e,`${L}-ol`),children:o}),li:({children:o})=>_.jsx("li",{className:z(e,`${L}-li`),children:o}),a:({href:o,children:a})=>_.jsx(Ry,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>_.jsx("div",{className:z(e,`${L}-table-container`),children:_.jsx("table",{className:z(e,`${L}-table`),children:o})}),thead:({children:o})=>_.jsx("thead",{className:z(e,`${L}-thead`),children:o}),tbody:({children:o})=>_.jsx("tbody",{className:z(e,`${L}-tbody`),children:o}),tr:({children:o})=>_.jsx("tr",{className:z(e,`${L}-tr`),children:o}),th:({children:o})=>_.jsx("th",{className:z(e,`${L}-th`),children:o}),td:({children:o})=>_.jsx("td",{className:z(e,`${L}-td`),children:o}),span:({className:o,children:a})=>o===`${L}-blinking-cursor`?_.jsx(n9,{}):_.jsx("span",{children:a})},children:r+(n?`<span className='${L}-blinking-cursor'></span>`:"")}),o_=({product:e,globalClassName:t,isFullWidth:n,openLinksInNewTab:r,isCartMgmtSupported:o=!1})=>{const{sendMessage:a,loading:u}=Mn(),{id:c,name:d,imageUrl:h,productPageUrl:p,price:g,discountPrice:b,compareAtPrice:y,currencyCode:x}=e,v=typeof b=="number"&&typeof g=="number"&&b<g,A=v?g:y!=null?y:g,C=v?b:g,k=()=>{if(u)return;const $=d||"this product",W=c?` [SKU: ${c}]`:"";a(`Show me details for ${$}${W}`)},I=o?`View details for ${d}`:`Go to product page for ${d}`;return _.jsxs("div",{className:z(t,`${L}-msg-product-card`,{"card-full-width":n}),children:[_.jsx("div",{className:z(t,`${L}-msg-product-card__image-wrapper`),children:h&&(o?_.jsx("button",{type:"button",className:z(t,`${L}-msg-product-card__image-button`),onClick:k,disabled:u,"aria-label":I,children:_.jsx("img",{className:z(t,`${L}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"})}):p?_.jsx("a",{href:p,target:r?"_blank":"_self",rel:"noopener","aria-label":I,children:_.jsx("img",{className:z(t,`${L}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"})}):_.jsx("img",{className:z(t,`${L}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"}))}),_.jsxs("div",{className:z(t,`${L}-msg-product-card__content`),children:[o?_.jsx("button",{type:"button",disabled:u,onClick:k,className:z(t,`${L}-msg-product-card__title-link`),"aria-label":I,children:d}):p?_.jsx("a",{href:p,target:r?"_blank":"_self",rel:"noopener",className:z(t,`${L}-msg-product-card__title-link`),"aria-label":I,children:d}):_.jsx("p",{className:z(t,`${L}-msg-product-card__title`),children:d}),_.jsx("div",{className:z(t,`${L}-msg-product-card__price-row`),children:_.jsx(ip,{globalClassName:t,retailPrice:A,discountPrice:C,currencyCode:x})})]})]})},s_=e=>({id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,currencyCode:e.data.currencyCode}),r9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a=!1})=>{if(t.length===1){const u=t[0];return _.jsxs("div",{children:[e&&_.jsx("p",{className:z(n,`${L}-product-carousel-title`),children:e}),_.jsx(o_,{product:s_(u),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a,isFullWidth:!o})]})}return _.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&_.jsx("p",{className:z(n,`${L}-product-carousel-title`),children:e}),_.jsx(a5,{globalClassName:n,spacing:o?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(u=>_.jsx(o_,{product:s_(u),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a},u.id))})]})},a_=({code:e,globalClassName:t})=>_.jsxs("span",{className:z(t,`${L}-cart-chip`),children:[_.jsx(Yg,{"aria-hidden":"true"}),_.jsx("span",{children:e})]}),eo=({label:e,badge:t,value:n,currencyCode:r,globalClassName:o,emphasized:a,isDiscount:u,fallback:c})=>{let d;if(typeof n=="number")n===0&&!u?d="Free":d=Na(u?-n:n,r);else if(c)d=c;else return null;return _.jsxs("div",{className:z(o,`${L}-cart-total-row`,{emphasized:a}),children:[_.jsxs("span",{className:z(o,`${L}-cart-total-label`),children:[e,t&&_.jsx("span",{className:z(o,`${L}-cart-total-badge`),children:t})]}),_.jsx("span",{className:z(o,`${L}-cart-total-value`),children:d})]})},i9=({item:e,currencyCode:t,loading:n,globalClassName:r,onRemove:o})=>{var u,c,d;const a=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return _.jsxs("li",{className:z(r,`${L}-cart-item`),children:[e.imageUrl&&_.jsx("div",{className:z(r,`${L}-cart-item-image`),children:_.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),_.jsxs("div",{className:z(r,`${L}-cart-item-details`),children:[_.jsx("p",{className:z(r,`${L}-cart-item-name`),children:e.name}),_.jsxs("div",{className:z(r,`${L}-cart-item-attrs`),children:[((u=e.variants)!=null?u:[]).map(h=>_.jsxs("p",{className:z(r,`${L}-cart-item-attr`),children:[h.lbl,": ",h.value]},`${h.type}-${h.value}`)),((c=e.promotions)!=null?c:[]).map(h=>_.jsxs("p",{className:z(r,`${L}-cart-item-attr`),children:["Promotion: ",h]},h))]}),((d=e.coupons)!=null?d:[]).length>0&&_.jsx("div",{className:z(r,`${L}-cart-chips`),children:e.coupons.map(h=>_.jsx(a_,{code:h,globalClassName:r},h))}),_.jsxs("span",{className:z(r,`${L}-cart-item-price`),children:[a&&_.jsx("span",{className:z(r,`${L}-cart-item-original-price`),children:Na(e.originalSubtotal,t)}),_.jsx("span",{className:z(r,`${L}-cart-item-final-price`),children:Na(e.itemSubtotal,t)})]}),_.jsxs("div",{className:z(r,`${L}-cart-item-footer`),children:[_.jsxs("span",{className:z(r,`${L}-cart-item-qty`),children:["Qty: ",e.quantity]}),_.jsx("button",{type:"button",className:z(r,`${L}-cart-item-remove`),disabled:n,onClick:()=>o(e),children:"Remove"})]})]})]})},o9=({cart:e,globalClassName:t,openLinksInNewTab:n})=>{const{sendMessage:r,loading:o}=Mn(),[a,u]=Y.useState(!0),[c,d]=Y.useState(""),{items:h=[],currencyCode:p="USD",subtotal:g,total:b,taxes:y,shippingCost:x,shippingDiscount:v,shippingPromotions:A=[],promotionsDiscount:C,promotions:k=[],couponsDiscount:I,couponsApplied:$=[],bodyMessage:W,footerMessage:F,checkoutButtonUrl:ee}=e,ce=U=>{o||r(`Remove ${U.name} from my cart`)},pe=()=>{const U=c.trim();!U||o||(r(`Apply coupon code ${U}`),d(""))};return _.jsxs("div",{className:z(t,`${L}-cart`),children:[_.jsxs("div",{className:z(t,`${L}-cart-box`),children:[W&&_.jsxs("button",{type:"button",className:z(t,`${L}-cart-summary`),"aria-expanded":a,onClick:()=>u(U=>!U),children:[_.jsx("span",{className:z(t,`${L}-cart-summary-text`),children:_.jsx(pp,{text:W,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),_.jsx("span",{className:z(t,`${L}-cart-summary-toggle`),"aria-hidden":"true",children:a?_.jsx(mC,{}):_.jsx(gC,{})})]}),a&&_.jsxs("div",{className:z(t,`${L}-cart-expanded`),children:[_.jsx("ul",{className:z(t,`${L}-cart-items`),children:h.map(U=>_.jsx(i9,{item:U,currencyCode:p,loading:o,globalClassName:t,onRemove:ce},U.itemId))}),$.length>0&&_.jsx("div",{className:z(t,`${L}-cart-chips`,`${L}-cart-applied-coupons`),children:$.map(U=>_.jsx(a_,{code:U,globalClassName:t},U))}),_.jsxs("div",{className:z(t,`${L}-cart-totals`),children:[_.jsx(eo,{label:"Subtotal",value:g,currencyCode:p,globalClassName:t}),_.jsx(eo,{label:"Coupon",value:I,currencyCode:p,globalClassName:t,isDiscount:!0}),_.jsx(eo,{label:"Promotions",badge:k[0],value:C,currencyCode:p,globalClassName:t,isDiscount:!0}),_.jsx(eo,{label:"Shipping",value:x,currencyCode:p,globalClassName:t,fallback:"TBD"}),_.jsx(eo,{label:"Shipping Discount",badge:A[0],value:v,currencyCode:p,globalClassName:t,isDiscount:!0}),_.jsx(eo,{label:"Tax",value:y,currencyCode:p,globalClassName:t,fallback:"TBD"}),_.jsx(eo,{label:"Total",value:b,currencyCode:p,globalClassName:t,emphasized:!0})]})]})]}),_.jsxs("div",{className:z(t,`${L}-cart-coupon`),children:[_.jsxs("div",{className:z(t,`${L}-cart-coupon-field`),children:[_.jsx("span",{className:z(t,`${L}-cart-coupon-icon`),"aria-hidden":"true",children:_.jsx(Yg,{})}),_.jsx("input",{type:"text",className:z(t,`${L}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:c,disabled:o,onChange:U=>d(U.target.value),onKeyDown:U=>{U.key==="Enter"&&(U.preventDefault(),pe())}})]}),_.jsx("button",{type:"button",className:z(t,`${L}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:o||!c.trim(),onClick:pe,children:_.jsx(pC,{"aria-hidden":"true"})})]}),ee&&_.jsxs("a",{className:z(t,`${L}-cart-checkout-button`),href:ee,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[_.jsx(fC,{"aria-hidden":"true"}),_.jsx("span",{children:"Checkout"})]}),_.jsx("p",{className:z(t,`${L}-cart-footer`),children:F||"Shipping and taxes calculated at checkout."})]})},s9=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return _.jsxs(Qh,{className:z(n,`${L}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[_.jsx(Gh,{className:z(n,`${L}-pdp-gallery__item-group`),children:e.map((o,a)=>_.jsx(Wh,{index:a,className:z(n,`${L}-pdp-gallery__item`),children:_.jsx("img",{className:z(n,`${L}-pdp-gallery__image`),src:o,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,loading:"lazy"})},o))}),r&&_.jsxs(Vh,{className:z(n,`${L}-pdp-gallery__control`),children:[_.jsx(Kh,{className:z(n,`${L}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:_.jsx(nb,{size:"16px"})}),_.jsx(Xh,{className:z(n,`${L}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:_.jsx(rb,{size:"16px"})})]}),r&&_.jsx(Yh,{className:z(n,`${L}-pdp-gallery__indicator-group`),children:e.map((o,a)=>_.jsx(qh,{index:a,className:z(n,`${L}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Pa="color",mp=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,u_=e=>e.replace(/(^|\/)large\//,"$1medium/"),l_=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Pa&&n.vals.includes(t)),a9=(e,t)=>{var c,d;const n=((c=e.imgGroups)!=null?c:[]).filter(h=>h.viewType==="large"),r=t&&n.find(h=>l_(h,t)),o=n.find(h=>h.vattr===null),a=r||o||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(h=>mp(e.baseUrl,u_(h.url)));return u.length>0?u:e.imageUrl?[mp(e.baseUrl,u_(e.imageUrl))]:[]},u9=(e,t)=>{var o,a,u;const n=((o=e.imgGroups)!=null?o:[]).find(c=>c.viewType==="swatch"&&l_(c,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?mp(e.baseUrl,r):""},Gl=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(o=>{var a;return((a=o.vars)==null?void 0:a[t])!==n||o.ord===!1?!1:Object.entries(r).every(([u,c])=>{var d;return u===t||((d=o.vars)==null?void 0:d[u])===c})}),l9=(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(o=>{var a;return((a=r.vars)==null?void 0:a[o])===t[o]}))},c9=(e,t,n,r,o)=>{if(!e||e.length===0)return ie(B({},o),{[n]:r});const a=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length&&Object.entries(o).every(([h,p])=>{var g;return h===n||((g=c.vars)==null?void 0:g[h])===p})});if(a)return B({},a.vars);const u=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length});return u?B({},u.vars):ie(B({},o),{[n]:r})},d9=(e,t)=>{var o,a,u,c;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(o=e.id)!=null?o: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(([h,p])=>{var g;return((g=d.vars)==null?void 0:g[h])===p}));return(c=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?c:null},f9=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([o,a])=>{var u;return((u=r.vars)==null?void 0:u[o])===a}));return n!=null&&n.pr?n.pr:e.pr},h9=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const o=r.opts.find(u=>Gl(e.vmat,r.id,u.val)),a=o!=null?o:r.opts[0];a&&(t[r.id]=a.val)}return t},p9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var oe,be,Ce,se,j,J,w;const{addToCart:o,loading:a}=Mn(),u=e.data,c=(oe=u.vattr)!=null?oe:[],[d,h]=Y.useState(()=>h9(u)),p=l9(u.vmat,d),g=(Ce=(be=u.quantity)==null?void 0:be.minQuantity)!=null?Ce:1,b=(j=(se=u.quantity)==null?void 0:se.maxQuantity)!=null?j:Number.POSITIVE_INFINITY,y=(w=(J=u.quantity)==null?void 0:J.increment)!=null?w:1,[x,v]=Y.useState(g),A=d[Pa],C=Y.useMemo(()=>a9(u,A),[u,A]),k=Y.useMemo(()=>f9(u,d),[u,d]),I=c.find(N=>N.id===Pa),$=c.filter(N=>N.id!==Pa),W=(N,q)=>()=>{h(O=>{const ye=!Gl(u.vmat,N,q,O);return N===Pa||ye?c9(u.vmat,c,N,q,O):ie(B({},O),{[N]:q})})},F=()=>{if(a)return;const N=d9(u,d);if(!N)return;const q=c.map(O=>{const ye=O.opts.find(ke=>ke.val===d[O.id]);return ye?{label:O.lbl||O.id,value:ye.name||ye.val}:null}).filter(O=>O!==null);o({productName:u.name,sku:N,quantity:x,variants:q})},ee=!p||x-y<g,ce=!p||x+y>b,pe=N=>{var O;const q=d[N.id];return(O=N.opts.find(ye=>ye.val===q))==null?void 0:O.name},U=()=>v(N=>Math.max(g,N-y)),ne=()=>v(N=>Math.min(b,N+y)),ae=N=>_.jsxs("div",{className:z(t,`${L}-msg-pdp__variant`),children:[_.jsxs("div",{className:z(t,`${L}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${N.id}`,className:z(t,`${L}-msg-pdp__variant-name`),children:N.lbl||N.id}),pe(N)&&_.jsx("span",{className:z(t,`${L}-msg-pdp__variant-value`),children:pe(N)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${N.id}`,className:z(t,`${L}-msg-pdp__chips`),children:N.opts.map(q=>{const O=Gl(u.vmat,N.id,q.val,d),ye=d[N.id]===q.val;return _.jsxs("label",{className:z(`${L}-msg-pdp__chip`,{selected:ye,unavailable:!O}),children:[_.jsx("input",{type:"radio",name:`variant-${N.id}`,value:q.val,checked:ye,"aria-description":O?void 0:"unavailable",onChange:W(N.id,q.val),className:`${L}-msg-pdp__radio-input`}),_.jsx("span",{children:q.name||q.val})]},q.val)})})]},N.id),de=N=>_.jsxs("div",{className:z(t,`${L}-msg-pdp__variant`),children:[_.jsxs("div",{className:z(t,`${L}-msg-pdp__variant-label`),children:[_.jsx("span",{id:`variant-label-${N.id}`,className:z(t,`${L}-msg-pdp__variant-name`),children:N.lbl||"Color"}),pe(N)&&_.jsx("span",{className:z(t,`${L}-msg-pdp__variant-value`),children:pe(N)})]}),_.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${N.id}`,className:z(t,`${L}-msg-pdp__swatches`),children:N.opts.map(q=>{const O=Gl(u.vmat,N.id,q.val,d),ye=d[N.id]===q.val,ke=u9(u,q.val);return ke?_.jsxs("label",{className:z(`${L}-msg-pdp__swatch`,{selected:ye,unavailable:!O}),children:[_.jsx("input",{type:"radio",name:`variant-${N.id}`,value:q.val,checked:ye,"aria-label":q.name||q.val,"aria-description":O?void 0:"unavailable",onChange:W(N.id,q.val),className:`${L}-msg-pdp__radio-input`}),_.jsx("img",{className:z(t,`${L}-msg-pdp__swatch-image`),src:ke,alt:q.name||q.val,loading:"lazy"})]},q.val):_.jsxs("label",{className:z(`${L}-msg-pdp__chip`,{selected:ye,unavailable:!O}),children:[_.jsx("input",{type:"radio",name:`variant-${N.id}`,value:q.val,checked:ye,"aria-description":O?void 0:"unavailable",onChange:W(N.id,q.val),className:`${L}-msg-pdp__radio-input`}),_.jsx("span",{children:q.name||q.val})]},q.val)})})]});return _.jsx("div",{className:z(t,`${L}-msg-pdp`),children:_.jsxs("div",{className:z(t,`${L}-msg-pdp__card`),children:[_.jsx("div",{className:z(t,`${L}-msg-pdp__gallery`),children:_.jsx(s9,{images:C,altText:u.name,globalClassName:t})}),_.jsxs("div",{className:z(t,`${L}-msg-pdp__content`),children:[u.slugUrl?_.jsx("a",{href:u.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:z(t,`${L}-msg-pdp__title-link`),"aria-label":`Go to product page for ${u.name}`,children:u.name}):_.jsx("p",{className:z(t,`${L}-msg-pdp__title`),children:u.name}),_.jsx(ip,{globalClassName:t,className:`${L}-msg-pdp__price`,retailPrice:k==null?void 0:k.orig,discountPrice:(k==null?void 0:k.cur)||(k==null?void 0:k.prom),currencyCode:u.ccy,fontSize:"14px"}),u.dscr&&_.jsx("p",{className:z(t,`${L}-msg-pdp__description`),children:u.dscr}),I&&de(I),$.map(ae),_.jsxs("div",{className:z(t,`${L}-msg-pdp__variant`),children:[_.jsxs("div",{className:z(t,`${L}-msg-pdp__variant-label`),children:[_.jsx("span",{className:z(t,`${L}-msg-pdp__variant-name`),children:"Quantity"}),_.jsx("span",{className:z(t,`${L}-msg-pdp__variant-value`),children:x})]}),_.jsxs("div",{className:z(t,`${L}-msg-pdp__stepper`),children:[_.jsx(Jn,{className:`${L}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:_.jsx(rC,{}),disabled:ee,onClick:U}),_.jsx("span",{className:z(t,`${L}-msg-pdp__quantity`),children:x}),_.jsx(Jn,{className:`${L}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:_.jsx(iC,{}),disabled:ce,onClick:ne})]})]}),r&&_.jsx("div",{className:z(t,`${L}-msg-pdp__actions`),children:_.jsx(Ku,{className:`${L}-msg-pdp__add-to-cart`,disabled:!p||a,onClick:F,children:a?"Adding...":"Add to cart"})})]})]})})},m9=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},g9=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:o=!1})=>{const{addToCart:a,loading:u}=Mn();if(!e.length)return null;const c=`auto repeat(${e.length}, 1fr)`,d=`${90+e.length*140}px`,h=p=>()=>{u||a({productName:p.name,sku:p.id})};return _.jsx("div",{className:z(n,`${L}-product-comparison`),children:_.jsxs("div",{className:`${L}-product-comparison__grid`,style:{gridTemplateColumns:c,minWidth:d},children:[_.jsxs("div",{className:`${L}-product-comparison__header`,children:[_.jsx("div",{className:`${L}-product-comparison__header-spacer`}),e.map(p=>{var b,y,x,v;const g=m9(p);return _.jsxs("div",{className:z(n,`${L}-product-comparison__product-col`),children:[g&&_.jsx("img",{className:z(n,`${L}-product-comparison__image`),src:g,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?_.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:z(n,`${L}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):_.jsx("span",{className:z(n,`${L}-product-comparison__name`),children:p.name}),_.jsx(ip,{globalClassName:n,retailPrice:(b=p.pr)==null?void 0:b.orig,discountPrice:(v=(y=p.pr)==null?void 0:y.prom)!=null?v:(x=p.pr)==null?void 0:x.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),_.jsx("div",{className:`${L}-product-comparison__table`,children:t.map(p=>_.jsxs("div",{className:`${L}-product-comparison__row`,children:[_.jsx("div",{className:z(n,`${L}-product-comparison__row-label`),children:p.row_name}),p.values.map((g,b)=>_.jsx("div",{className:z(n,`${L}-product-comparison__row-value`),children:g},`${p.row_name}-${b}`))]},p.row_name))}),o&&_.jsxs("div",{className:`${L}-product-comparison__footer`,children:[_.jsx("div",{className:`${L}-product-comparison__footer-spacer`}),e.map(p=>_.jsx("div",{className:z(n,`${L}-product-comparison__footer-cell`),children:_.jsxs(Ku,{className:`${L}-product-comparison__add-to-cart`,disabled:u,onClick:h(p),children:[_.jsx(dC,{size:"14px"}),"Add to cart"]})},`cart-${p.id}`))]})]})})},c_=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:o,loading:a}=Mn(),{isCartMgmtSupported:u}=ot();return _.jsx(_.Fragment,{children:e.response.map((c,d)=>{var h,p,g,b,y,x,v,A,C,k,I,$,W,F,ee,ce,pe,U,ne,ae,de;switch(c.type){case"markdown":return _.jsx(pp,{text:(p=(h=c.data)==null?void 0:h.content)!=null?p:"",globalClassName:t,openLinksInNewTab:n,showIsLoading:!1},`${c.type}-${(g=c.index)!=null?g:d}`);case"product_carousel":return _.jsx(r9,{title:(y=(b=c.data)==null?void 0:b.title)!=null?y:"",products:(v=(x=c.data)==null?void 0:x.products)!=null?v:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(A=c.index)!=null?A:d}`);case"product_tile":return _.jsx(p9,{product:c.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(C=c.index)!=null?C:d}`);case"product_comparison":return _.jsx(g9,{products:(I=(k=c.data)==null?void 0:k.products)!=null?I:[],table:(W=($=c.data)==null?void 0:$.table)!=null?W:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(F=c.index)!=null?F:d}`);case"cart":{const oe=(pe=(ce=(ee=c.data)==null?void 0:ee.cart)==null?void 0:ce.cartSummary)==null?void 0:pe.cartDetails;return oe?_.jsx(o9,{cart:oe,productsToHighlight:c.data.products_to_highlight,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${c.type}-${(U=c.index)!=null?U:d}`):null}case"suggestions":return _.jsx("div",{style:{marginTop:"0.5rem"},children:_.jsx(U5,{disabled:a,suggestions:(ae=(ne=c.data)==null?void 0:ne.display_text)!=null?ae:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:o})},`${c.type}-${(de=c.index)!=null?de:d}`);default:return null}})})},E9=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:o}=ot(),a=Y.useMemo(()=>{try{const c=JSON.parse(e.content);return Array.isArray(c==null?void 0:c.response)?c:null}catch(c){return null}},[e.content]),u=Y.useMemo(()=>{const c="Oops, I had trouble with your request.";if(typeof e.content!="string")return o==null||o.warn("Message content is not richtext format. Showing fallback text.",e.content),c;const d=e.content.trim();try{const h=JSON.parse(d);if(typeof h=="object"&&h!==null)return o==null||o.debug("Detected JSON object instead of array of responses in message content",e.content),h.text||h.message||c}catch(h){if(d.startsWith("{")||d.startsWith("["))return o==null||o.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),c}return e.content||c},[o,e.content]);switch(e.role){case"user":return _.jsx("div",{className:z(t,`${L}-message`,r?"standalone":"embedded"),children:_.jsx("div",{className:z(t,`${L}-user-message`,r?"standalone":"embedded"),children:_.jsxs("div",{className:z(t,`${L}-user-message-row`,r?"standalone":"embedded"),children:[_.jsx("span",{className:z(t,`${L}-message-icon user-message-icon`,r?"standalone":"embedded"),children:_.jsx(hC,{})}),_.jsx("p",{className:z(t,`${L}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return _.jsx("div",{className:z(t,`${L}-message-group`,r?"standalone":"embedded"),children:_.jsx("div",{className:`${L}-message-group-child`,children:a?_.jsx(c_,{content:a,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):_.jsx(pp,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return _.jsx("div",{className:z(t,`${L}-message`,r?"standalone":"embedded"),children:_.jsx("p",{className:z(t,`${L}-reset-message`),children:e.content})})}},y9=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>_.jsxs("div",{className:z(n,`${L}-send-error`,r?"standalone":"embedded"),role:"alert",children:[_.jsx("span",{className:z(n,`${L}-send-error-text`),children:e}),_.jsxs("button",{type:"button",className:z(n,`${L}-retry-button`),onClick:t,children:[_.jsx(TC,{"aria-hidden":"true"})," Retry"]})]}),T9="You are offline or we couldn't reach the assistant. Check connection and try again.",gp=({isWidgetStandalone:e})=>{var ce,pe;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:o}=ot(),{messages:a,streamingBlocks:u,isAgentTyping:c,loading:d,progressMessage:h,connectionStatus:p,error:g,sendError:b,retryLastMessage:y,retryConnection:x}=Mn(),v=Y.useRef(null),A=a.length>0,C=u.length>0,k=A&&(d||c)&&!C,I=p==="reconnecting"&&!k,$=p==="error";let W=null;$?W={message:g!=null?g:T9,kind:"connection",onRetry:x}:b&&(W={message:b.message,kind:"send",onRetry:y}),Y.useEffect(()=>{var U;(U=v.current)==null||U.scrollIntoView({behavior:"smooth"})},[]),Y.useEffect(()=>{var U;o&&((U=v.current)==null||U.scrollIntoView({behavior:"smooth"}))},[a,u,b,g,o]);const F=(ce=W==null?void 0:W.message)!=null?ce:null,ee=(pe=W==null?void 0:W.kind)!=null?pe:null;return Y.useEffect(()=>{F&&(r==null||r.error("Error message shown to user",{message:F,kind:ee}))},[F,ee,r]),_.jsxs(_.Fragment,{children:[d&&!A&&_.jsx(V5,{globalClassName:t,isWidgetStandalone:e}),a.map(U=>_.jsx(E9,{message:U,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},U.id)),W&&_.jsx(y9,{message:W.message,onRetry:W.onRetry,globalClassName:t,isWidgetStandalone:e}),C&&_.jsxs("div",{className:z(t,`${L}-message-group`,e?"standalone":"embedded"),children:[_.jsx(c_,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(d||c)&&_.jsx(op,{globalClassName:t,isWidgetStandalone:e})]}),k&&_.jsx(op,{globalClassName:t,isWidgetStandalone:e,loadingText:h}),I&&_.jsx(op,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),_.jsx("div",{ref:v})]})},b9=()=>_.jsxs("svg",{className:`${L}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),_9=()=>_.jsx("svg",{className:`${L}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("path",{d:"M8 1v3M8 12v3M1 8h3M12 8h3M3.05 3.05l2.12 2.12M10.83 10.83l2.12 2.12M3.05 12.95l2.12-2.12M10.83 5.17l2.12-2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),Ep=({steps:e,globalClassName:t})=>e.length===0?null:_.jsx("div",{className:z(t,`${L}-progress-steps-panel`),children:_.jsxs("div",{className:`${L}-progress-steps`,children:[_.jsxs("span",{className:`${L}-progress-steps-header`,children:["Loading Step ",e.length]}),_.jsx("ul",{className:`${L}-progress-steps-list`,children:e.map((n,r)=>{const o=r<e.length-1,a=r===e.length-1;return _.jsxs("li",{className:z(`${L}-progress-step`,a&&"active"),children:[a&&_.jsx("span",{className:`${L}-progress-step-arc`}),_.jsx("span",{className:`${L}-progress-step-text`,children:n}),_.jsx("span",{className:z(`${L}-progress-step-icon`,o?"done":"active"),children:o?_.jsx(b9,{}):_.jsx(_9,{})})]},`${r}-${n}`)})})]})}),d_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=ot(),{isAgentTyping:o,sendMessage:a,resetConversation:u,progressSteps:c,downloadTranscript:d}=Mn(),h=o;return _.jsxs("div",{className:z(e,`${L}-container`,`${L}-embedded-chat`),style:t,children:[_.jsx("div",{className:z(e,`${L}-message-container`,`container-${n}`,"embedded"),children:_.jsx(gp,{isWidgetStandalone:!1})}),_.jsx(Ep,{steps:c,globalClassName:e}),_.jsx(ah,{componentType:"chat",className:"embedded-chat",isLoading:h,onSubmit:p=>a(p)}),_.jsx("div",{className:z(`${L}-embedded-chat-menu`),children:_.jsxs($D,{componentType:"chat",children:[_.jsx(kb,{componentType:"chat"}),_.jsx(My,{componentType:"chat",onClearChat:u}),r&&_.jsx(Fy,{componentType:"chat",onDownloadTranscript:d})]})})]})},f_=e=>{var d;const{children:t,disabled:n}=e,[r,o]=Y.useState((d=e.container)==null?void 0:d.current),a=Y.useSyncExternalStore(w9,()=>!1,()=>!0),{getRootNode:u}=jl();if(Y.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const c=r!=null?r:x9(u);return _.jsx(_.Fragment,{children:Y.Children.map(t,h=>Ao.createPortal(h,c))})},x9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Yi(n)?n:yr(t).body},w9=()=>()=>{},h_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ot(),{mode:r,status:o,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=Fi(),{loading:d,isAgentTyping:h,sendMessage:p,resetConversation:g,progressSteps:b,downloadTranscript:y}=Mn(),{isOpen:x}=o||{},v=!!o.isOpen,A=r==="standalone",C=h||d,k=()=>{Rr(!1)};return v?_.jsx(bb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:v,children:_.jsx(f_,{children:_.jsx(ep,{className:z(e,`${L}-container`,`${L}-dialog`,a,u&&"full-height"),style:B(B({},t),c&&{width:c}),children:_.jsxs(Jh,{className:z(e,`${L}-dialog-content`,{standalone:A,embedded:!A}),children:[_.jsx(vb,{componentType:"dialog",onClearChat:g,onClose:k,onDownloadTranscript:y}),_.jsx(Zh,{className:z(e,`${L}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:_.jsx(gp,{isWidgetStandalone:A,isOpen:x})}),_.jsx(Ep,{steps:b,globalClassName:e}),_.jsx(ah,{componentType:"dialog",isLoading:C,onSubmit:I=>p(I)})]})})})}):null},p_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ot(),{mode:r,status:o,isModalFullscreen:a}=Fi(),{loading:u,isAgentTyping:c,sendMessage:d,resetConversation:h,progressSteps:p,downloadTranscript:g}=Mn(),{isOpen:b}=o||{},y=!!o.isOpen,x=r==="standalone",v=c||u,A=({open:k})=>{Rr(k)},C=()=>{Rr(!1)};return y?_.jsx(bb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:_.jsx(f_,{children:_.jsxs("div",{className:z(e,`${L}-modal-container`),style:t,children:[_.jsx(mb,{className:z(e,`${L}-modal-backdrop`)}),_.jsx(ep,{className:z(e,`${L}-container`,`${L}-modal`,{fullscreen:a,standalone:x,embedded:!x}),children:_.jsxs(Jh,{className:z(e,`${L}-modal-content`,{standalone:x,embedded:!x}),children:[_.jsx(vb,{componentType:"modal",onClearChat:h,onClose:C,onDownloadTranscript:g}),_.jsx(Zh,{className:z(e,`${L}-message-container`,`container-${n}`,{standalone:x,embedded:!x}),children:_.jsx(gp,{isWidgetStandalone:x,isOpen:b})}),_.jsx(Ep,{steps:p,globalClassName:e}),_.jsx(ah,{componentType:"modal",isLoading:v,onSubmit:k=>d(k)})]})})]})})}):null},S9=()=>{const e=Fi(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(uC,{}):t==="dialog"?_.jsx(h_,{}):t==="modal"?_.jsx(p_,{}):_.jsx(d_,{})},v9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=R5();Y.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&o(d))};return k5(a),()=>{N5(a)}},[e,t,n,r,o])};function A9({isReady:e,hasError:t,transmit:n}){const r=Y.useRef([]),o=Y.useRef(e);o.current=e;const a=Y.useRef(n);a.current=n;const u=Y.useCallback(c=>{o.current?a.current(c):r.current.push(c)},[]);return Y.useEffect(()=>{if(e&&r.current.length){const c=r.current;r.current=[],c.forEach(d=>a.current(d))}},[e]),Y.useEffect(()=>{t&&(r.current=[])},[t]),u}const m_={copilot:"Ask Copilot",messaging:"Ask a question"},C9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ot(),{placeholder:o,isResponseLoading:a}=ql(),u=o||m_[r],[c,d]=Y.useState(""),h=t||a,p=g=>{const b=c.trim();b&&(g.preventDefault(),e(b),d(""))};return _.jsxs("form",{className:z(n,`${L}-prompts-input-container`),name:`${L}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${L}-prompts-input`,"aria-label":u,children:_.jsx($h,{className:z(n,`${L}-prompts-input-icon`)})}),_.jsx("input",{id:`${L}-prompts-input`,className:z(n,`${L}-prompts-input`),name:`${L}-prompts-input`,placeholder:u,type:"text",disabled:h,value:c,onChange:g=>d(g.target.value)}),_.jsx(Jn,{className:z(n,`${L}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(uf,{}),disabled:h})]})},k9=()=>{const{globalClassName:e,mode:t}=ot(),{placeholder:n}=ql(),r=n||m_[t];return _.jsxs("div",{className:z(e,`${L}-prompts-header`),children:[_.jsx($h,{className:z(e,`${L}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:z(e,`${L}-prompts-header-text`),children:r})]})},g_=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:o}=ot(),a=o==null?void 0:o.icon,u=(c=o==null?void 0:o.iconPosition)!=null?c:"left";return _.jsxs("button",{className:z(r,`${L}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&_.jsx(Cb,{icon:a,className:`${L}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},N9="Ask me something else",O9=({label:e,disabled:t=!1})=>_.jsx(g_,{label:e||N9,disabled:t,onClick:()=>Rr(!0)}),P9=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),I9=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=ot(),{staticQuestions:r,askElseButtonLabel:o,disableAskElseButton:a}=ql(),u=P9(r);if(u.length===0)return null;const c=d=>()=>{const h=d.trim();h&&e(h)};return _.jsxs("div",{className:z(n,`${L}-prompts-button-group`),children:[u.map(d=>_.jsx(g_,{label:d,disabled:t,onClick:c(d)},d)),!a&&_.jsx(O9,{label:o,disabled:t})]})},R9=()=>{const{globalClassName:e,themeVariables:t}=ot(),{isOpen:n,elementId:r,promptsDisplay:o}=ql(),{isConnected:a,sendMessage:u,connectionStatus:c}=Mn(),d=o!=="buttons",h=o!=="input",[p,g]=Y.useState(null),b=c==="error",y=c==="connecting",x=A9({isReady:a,hasError:b,transmit:u});Y.useEffect(()=>{if(!r||p)return;const A=document.getElementById(r);A&&g(A)},[r,p]);const v=Y.useCallback(A=>{Rr(!0),x(A)},[x]);return!n||!p?null:Ao.createPortal(_.jsxs("div",{className:z(e,`${L}-prompts-extension-container`),style:t,children:[d&&_.jsx(C9,{onSubmit:v,disabled:b}),!d&&_.jsx(k9,{}),h&&_.jsx(I9,{onPromptClick:v,disabled:b}),!b&&y&&_.jsx("p",{className:z(e,`${L}-prompts-connecting-message`),children:"Connecting to agent..."}),b&&_.jsx("p",{className:z(e,`${L}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),p)},L9=()=>(v9(),_.jsx(R9,{})),yp=e=>_.jsxs(Lg,ie(B({},e),{children:[_.jsx(S9,{}),_.jsx(L9,{})]}));var Xl={},E_;function D9(){if(E_)return Xl;E_=1;var e=Ug();return Xl.createRoot=e.createRoot,Xl.hydrateRoot=e.hydrateRoot,Xl}var y_=D9();const M9=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=an(o,["elementId","timeout"]);let a;const u=(d,h)=>{var p;for(const g of d)if(g.type==="childList"&&g.addedNodes.length)for(const b of g.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(Ri(!0,"log","Target element found, rendering Messaging Widget"),h.disconnect(),clearTimeout(a),(p=y_.createRoot(b))==null||p.render(_.jsx(yp,ie(B({},n),{mode:"messaging"}))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ri(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},F9=r=>{var o=r,{timeout:e,elementId:t}=o,n=an(o,["timeout","elementId"]);if(!n.messagingConfig){Ri(!0,"error","Messaging Widget requires messagingConfig");return}if(!n.messagingConfig.scrt2Url||!n.messagingConfig.orgId||!n.messagingConfig.esDeveloperName){Ri(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const a=document.getElementById(t);if(!a){Ri(!0,"warn","Container element not found for id:",t),Ri(!0,"warn","Beginning observation for element"),M9(B({elementId:t,timeout:e},n));return}y_.createRoot(a).render(_.jsx(yp,ie(B({},n),{mode:"messaging"})))},B9={components:{setEntryType:Ig,toggleWidgetOpen:Rr,toggleWidgetMinimized:Yu,toggleModalFullscreen:nf,setWidgetType:Wu,setWidgetDialogPosition:rf,loadPromptsComponent:I5,togglePromptsExtensionOpen:Sb}};Pe.AgentForceWidget=yp,Pe.AgentforceWidgetProvider=Lg,Pe.CIMULATE_WIDGET_READY_EVENT=hg,Pe.MessagingDialog=h_,Pe.MessagingEmbed=d_,Pe.MessagingModal=p_,Pe.MessagingProvider=gg,Pe.eventHandlers=B9,Pe.injectMessagingWidget=F9,Pe.useMessaging=Mn,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})}));
|
|
50
|
+
`},a.current()));return/^[\t ]/.test(h)&&(h=Oa(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,n.options.closeAtx&&(h+=" "+u),d(),c(),h}Ub.peek=q8;function Ub(e){return e.value||""}function q8(){return"<"}Hb.peek=Y8;function Hb(e,t,n,r){const o=lp(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,B({before:h,after:"]"},d.current()))),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,B({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,B({before:h,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,B({before:h,after:o},d.current()))),h+=d.move(o),c()),h+=d.move(")"),u(),h}function Y8(){return"!"}zb.peek=W8;function zb(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const h=n.safe(e.alt,B({before:d,after:"]"},c.current()));d+=c.move(h+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const g=n.safe(n.associationId(e),B({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!h||h!==g?d+=c.move(g+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function W8(){return"!"}jb.peek=G8;function jb(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return o+r+o}function G8(){return"`"}function $b(e,t){const n=bf(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))}Vb.peek=X8;function Vb(e,t,n,r){const o=lp(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if($b(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let g=u.move("<");return g+=u.move(n.containerPhrasing(e,B({before:g,after:">"},u.current()))),g+=u.move(">"),c(),n.stack=p,g}c=n.enter("link"),d=n.enter("label");let h=u.move("[");return h+=u.move(n.containerPhrasing(e,B({before:h,after:"]("},u.current()))),h+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(n.safe(e.url,B({before:h,after:">"},u.current()))),h+=u.move(">")):(d=n.enter("destinationRaw"),h+=u.move(n.safe(e.url,B({before:h,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),h+=u.move(" "+o),h+=u.move(n.safe(e.title,B({before:h,after:o},u.current()))),h+=u.move(o),d()),h+=u.move(")"),c(),h}function X8(e,t,n){return $b(e,n)?"<":"["}qb.peek=K8;function qb(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const h=n.containerPhrasing(e,B({before:d,after:"]"},c.current()));d+=c.move(h+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const g=n.safe(n.associationId(e),B({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!h||h!==g?d+=c.move(g+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function K8(){return"["}function cp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Q8(e){const t=cp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function J8(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Yb(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Z8(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?J8(n):cp(n);const c=e.ordered?u==="."?")":".":Q8(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),Yb(n)===u&&p){let g=-1;for(;++g<e.children.length;){const b=e.children[g];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const h=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),h}function eM(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function tM(e,t,n,r){const o=eM(n);let a=n.bulletCurrent||cp(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;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),p);return d(),h;function p(g,b,y){return b?(y?"":" ".repeat(u))+g:(y?a:a+" ".repeat(u-a.length))+g}}function nM(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const rM=al(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function iM(e,t,n,r){return(e.children.some(function(u){return rM(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function oM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Wb.peek=sM;function Wb(e,t,n,r){const o=oM(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,B({after:o,before:c},u.current())));const h=d.charCodeAt(0),p=Yl(r.before.charCodeAt(r.before.length-1),h,o);p.inside&&(d=Oa(h)+d.slice(1));const g=d.charCodeAt(d.length-1),b=Yl(r.after.charCodeAt(0),g,o);b.inside&&(d=d.slice(0,-1)+Oa(g));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function sM(e,t,n){return n.options.strong||"*"}function aM(e,t,n,r){return n.safe(e.value,r)}function uM(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function lM(e,t,n){const r=(Yb(n)+(n.options.ruleSpaces?" ":"")).repeat(uM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Gb={blockquote:I8,break:Fb,code:B8,definition:H8,emphasis:Bb,hardBreak:Fb,heading:V8,html:Ub,image:Hb,imageReference:zb,inlineCode:jb,link:Vb,linkReference:qb,list:Z8,listItem:tM,paragraph:nM,root:iM,strong:Wb,text:aM,thematicBreak:lM};function cM(){return{enter:{table:dM,tableData:Xb,tableHeader:Xb,tableRow:hM},exit:{codeText:pM,table:fM,tableData:dp,tableHeader:dp,tableRow:dp}}}function dM(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function fM(e){this.exit(e),this.data.inTable=void 0}function hM(e){this.enter({type:"tableRow",children:[]},e)}function dp(e){this.exit(e)}function Xb(e){this.enter({type:"tableCell",children:[]},e)}function pM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,mM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function mM(e,t){return t==="|"?t:e}function gM(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=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:c}};function u(y,_,v,A){return h(p(y,v,A),y.align)}function c(y,_,v,A){const k=g(y,v,A),C=h([k]);return C.slice(0,C.indexOf(`
|
|
52
|
+
`))}function d(y,_,v,A){const k=v.enter("tableCell"),C=v.enter("phrasing"),I=v.containerPhrasing(y,oe(B({},A),{before:a,after:a}));return C(),k(),I}function h(y,_){return O8(y,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function p(y,_,v){const A=y.children;let k=-1;const C=[],I=_.enter("table");for(;++k<A.length;)C[k]=g(A[k],_,v);return I(),C}function g(y,_,v){const A=y.children;let k=-1;const C=[],I=_.enter("tableRow");for(;++k<A.length;)C[k]=d(A[k],y,_,v);return I(),C}function b(y,_,v){let A=Gb.inlineCode(y,_,v);return v.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function EM(){return{exit:{taskListCheckValueChecked:Kb,taskListCheckValueUnchecked:Kb,paragraph:TM}}}function yM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:bM}}}function Kb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function TM(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function bM(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=Gb.listItem(e,t,n,B(B({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(p){return p+u}}function xM(){return[Z5(),b8(),S8(),cM(),EM()]}function _M(e){return{extensions:[e8(),x8(e),v8(),gM(e),yM()]}}const wM={tokenize:NM,partial:!0},Qb={tokenize:OM,partial:!0},Jb={tokenize:PM,partial:!0},Zb={tokenize:IM,partial:!0},SM={tokenize:RM,partial:!0},ex={name:"wwwAutolink",tokenize:kM,previous:nx},tx={name:"protocolAutolink",tokenize:CM,previous:rx},Ur={name:"emailAutolink",tokenize:AM,previous:ix},vr={};function vM(){return{text:vr}}let Zi=48;for(;Zi<123;)vr[Zi]=Ur,Zi++,Zi===58?Zi=65:Zi===91&&(Zi=97);vr[43]=Ur,vr[45]=Ur,vr[46]=Ur,vr[95]=Ur,vr[72]=[Ur,tx],vr[104]=[Ur,tx],vr[87]=[Ur,ex],vr[119]=[Ur,ex];function AM(e,t,n){const r=this;let o,a;return u;function u(g){return!fp(g)||!ix.call(r,r.previous)||hp(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(g))}function c(g){return fp(g)?(e.consume(g),c):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(SM,p,h)(g):g===45||g===95||Xt(g)?(a=!0,e.consume(g),d):p(g)}function h(g){return e.consume(g),o=!0,d}function p(g){return a&&o&&rn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function kM(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!nx.call(r,r.previous)||hp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(wM,e.attempt(Qb,e.attempt(Jb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function CM(e,t,n){const r=this;let o="",a=!1;return u;function u(g){return(g===72||g===104)&&rx.call(r,r.previous)&&!hp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),c):n(g)}function c(g){if(rn(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),c;if(g===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),a?h:(a=!0,d)):n(g)}function h(g){return g===null||Zu(g)||st(g)||Ui(g)||el(g)?n(g):e.attempt(Qb,e.attempt(Jb,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function NM(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function OM(e,t,n){let r,o,a;return u;function u(h){return h===46||h===95?e.check(Zb,d,c)(h):h===null||st(h)||Ui(h)||h!==45&&el(h)?d(h):(a=!0,e.consume(h),u)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),u}function d(h){return o||r||!a?n(h):t(h)}}function PM(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):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(Zb,t,a)(u):u===null||st(u)||Ui(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function IM(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||st(c)||Ui(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||st(c)||Ui(c)?t(c):r(c)}function a(c){return rn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):rn(c)?(e.consume(c),u):n(c)}}function RM(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Xt(a)?n(a):t(a)}}function nx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function rx(e){return!rn(e)}function ix(e){return!(e===47||fp(e))}function fp(e){return e===43||e===45||e===46||e===95||Xt(e)}function hp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const LM={tokenize:jM,partial:!0};function DM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:UM,continuation:{tokenize:HM},exit:zM}},text:{91:{name:"gfmFootnoteCall",tokenize:BM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:MM,resolveTo:FM}}}}function MM(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const h=Zn(r.sliceSerialize({start:u.end,end:r.now()}));return h.codePointAt(0)!==94||!a.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function FM(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function BM(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(a>999||g===93&&!u||g===null||g===91||st(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(Zn(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return st(g)||(u=!0),a++,e.consume(g),g===92?p:h}function p(g){return g===91||g===92||g===93?(e.consume(g),a++,h):h(g)}}function UM(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!c||_===null||_===91||st(_))return n(_);if(_===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=Zn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return st(_)||(c=!0),u++,e.consume(_),_===92?g:p}function g(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),Qe(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function HM(e,t,n){return e.check(Zs,t,e.attempt(LM,t,n))}function zM(e){e.exit("gfmFootnoteDefinition")}function jM(e,t,n){const r=this;return Qe(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function $M(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let h=d;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[d][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[d][1].end)},g={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,c],["enter",u[h][1],c],["exit",u[h][1],c],["enter",g,c]],y=c.parser.constructs.insideSpan.null;y&&vn(b,b.length,0,tl(y,u.slice(h+1,d),c)),vn(b,b.length,0,[["exit",g,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),vn(u,h-1,d-h+3,b),d=h+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const h=this.previous,p=this.events;let g=0;return b;function b(_){return h===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const v=Io(h);if(_===126)return g>1?d(_):(u.consume(_),g++,y);if(g<2&&!n)return d(_);const A=u.exit("strikethroughSequenceTemporary"),k=Io(_);return A._open=!k||k===2&&!!v,A._close=!v||v===2&&!!k,c(_)}}}class VM{constructor(){this.map=[]}add(t,n,r){qM(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function qM(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function YM(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function WM(){return{flow:{null:{name:"table",tokenize:GM,resolveAll:XM}}}}function GM(e,t,n){const r=this;let o=0,a=0,u;return c;function c($){let ne=r.events.length-1;for(;ne>-1;){const se=r.events[ne][1].type;if(se==="lineEnding"||se==="linePrefix")ne--;else break}const re=ne>-1?r.events[ne][1].type:null,de=re==="tableHead"||re==="tableRow"?F:d;return de===F&&r.parser.lazy[r.now().line]?n($):de($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),h($)}function h($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):Le($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):Xe($)?Qe(e,p,"whitespace")($):(a+=1,u&&(u=!1,o+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g($)))}function g($){return $===null||$===124||st($)?(e.exit("data"),p($)):(e.consume($),$===92?b:g)}function b($){return $===92||$===124?(e.consume($),g):g($)}function y($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),u=!1,Xe($)?Qe(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):_($))}function _($){return $===45||$===58?A($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),v):W($)}function v($){return Xe($)?Qe(e,A,"whitespace")($):A($)}function A($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),k):$===45?(a+=1,k($)):$===null||Le($)?j($):W($)}function k($){return $===45?(e.enter("tableDelimiterFiller"),C($)):W($)}function C($){return $===45?(e.consume($),C):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I($))}function I($){return Xe($)?Qe(e,j,"whitespace")($):j($)}function j($){return $===124?_($):$===null||Le($)?!u||o!==a?W($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):W($)}function W($){return n($)}function F($){return e.enter("tableRow"),ee($)}function ee($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),ee):$===null||Le($)?(e.exit("tableRow"),t($)):Xe($)?Qe(e,ee,"whitespace")($):(e.enter("data"),ue($))}function ue($){return $===null||$===124||st($)?(e.exit("data"),ee($)):(e.consume($),$===92?me:ue)}function me($){return $===92||$===124?(e.consume($),ue):ue($)}}function XM(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,h,p,g;const b=new VM;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(ox(b,t,d,h,p),p=void 0,d=0),h={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",h,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,g=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",p,t]])),o=_.type==="tableDelimiterRow"?2:p?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],g=Wl(b,t,a,o,void 0,g),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],g=Wl(b,t,a,o,void 0,g)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],g=Wl(b,t,a,o,n,g)):u[1]!==0&&(g=Wl(b,t,u,o,n,g)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&ox(b,t,d,h,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=YM(t.events,n))}return e}function Wl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},ss(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=ss(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 h=ss(t.events,n[2]),p=ss(t.events,n[3]),g={type:c,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",g,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,v=n[3]-n[2]-1;e.add(_,v,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return o!==void 0&&(a.end=Object.assign({},ss(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function ox(e,t,n,r,o){const a=[],u=ss(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function ss(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const KM={name:"tasklistCheck",tokenize:JM};function QM(){return{text:{91:KM}}}function JM(e,t,n){const r=this;return o;function o(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 st(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Le(d)?t(d):Xe(d)?e.check({tokenize:ZM},t,n)(d):n(d)}}function ZM(e,t,n){return Qe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function e9(e){return v1([vM(),DM(),$M(e),WM(),QM()])}const t9={};function n9(e){const t=this,n=e||t9,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(e9(n)),a.push(xM()),u.push(_M(n))}const r9=()=>x.jsx("span",{className:`${L}-blinking-cursor`,children:x.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),pp=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>x.jsx(mE,{remarkPlugins:[n9],rehypePlugins:[ky],components:{h1:({children:o})=>x.jsx("h1",{className:U(e,`${L}-header h1`),children:o}),h2:({children:o})=>x.jsx("h2",{className:U(e,`${L}-header h2`),children:o}),h3:({children:o})=>x.jsx("h3",{className:U(e,`${L}-header h3`),children:o}),ul:({children:o})=>x.jsx("ul",{className:U(e,`${L}-ul`),children:o}),ol:({children:o})=>x.jsx("ol",{className:U(e,`${L}-ol`),children:o}),li:({children:o})=>x.jsx("li",{className:U(e,`${L}-li`),children:o}),a:({href:o,children:a})=>x.jsx(Ly,{globalClassName:e,openLinksInNewTab:t,href:o,children:a}),table:({children:o})=>x.jsx("div",{className:U(e,`${L}-table-container`),children:x.jsx("table",{className:U(e,`${L}-table`),children:o})}),thead:({children:o})=>x.jsx("thead",{className:U(e,`${L}-thead`),children:o}),tbody:({children:o})=>x.jsx("tbody",{className:U(e,`${L}-tbody`),children:o}),tr:({children:o})=>x.jsx("tr",{className:U(e,`${L}-tr`),children:o}),th:({children:o})=>x.jsx("th",{className:U(e,`${L}-th`),children:o}),td:({children:o})=>x.jsx("td",{className:U(e,`${L}-td`),children:o}),span:({className:o,children:a})=>o===`${L}-blinking-cursor`?x.jsx(r9,{}):x.jsx("span",{children:a})},children:r+(n?`<span className='${L}-blinking-cursor'></span>`:"")}),sx=({product:e,globalClassName:t,isFullWidth:n,openLinksInNewTab:r,isCartMgmtSupported:o=!1})=>{const{sendMessage:a,loading:u}=Mn(),{id:c,name:d,imageUrl:h,productPageUrl:p,price:g,discountPrice:b,compareAtPrice:y,currencyCode:_}=e,v=typeof b=="number"&&typeof g=="number"&&b<g,A=v?g:y!=null?y:g,k=v?b:g,C=()=>{if(u)return;const j=d||"this product",W=c?` [SKU: ${c}]`:"";a(`Show me details for ${j}${W}`)},I=o?`View details for ${d}`:`Go to product page for ${d}`;return x.jsxs("div",{className:U(t,`${L}-msg-product-card`,{"card-full-width":n}),children:[x.jsx("div",{className:U(t,`${L}-msg-product-card__image-wrapper`),children:h&&(o?x.jsx("button",{type:"button",className:U(t,`${L}-msg-product-card__image-button`),onClick:C,disabled:u,"aria-label":I,children:x.jsx("img",{className:U(t,`${L}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"})}):p?x.jsx("a",{href:p,target:r?"_blank":"_self",rel:"noopener","aria-label":I,children:x.jsx("img",{className:U(t,`${L}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"})}):x.jsx("img",{className:U(t,`${L}-msg-product-card__image`),src:h,alt:d||"Product image",loading:"lazy"}))}),x.jsxs("div",{className:U(t,`${L}-msg-product-card__content`),children:[o?x.jsx("button",{type:"button",disabled:u,onClick:C,className:U(t,`${L}-msg-product-card__title-link`),"aria-label":I,children:d}):p?x.jsx("a",{href:p,target:r?"_blank":"_self",rel:"noopener",className:U(t,`${L}-msg-product-card__title-link`),"aria-label":I,children:d}):x.jsx("p",{className:U(t,`${L}-msg-product-card__title`),children:d}),x.jsx("div",{className:U(t,`${L}-msg-product-card__price-row`),children:x.jsx(ip,{globalClassName:t,retailPrice:A,discountPrice:k,currencyCode:_})})]})]})},ax=e=>({id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:e.data.discountPrice,currencyCode:e.data.currencyCode}),i9=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a=!1})=>{if(t.length===1){const u=t[0];return x.jsxs("div",{children:[e&&x.jsx("p",{className:U(n,`${L}-product-carousel-title`),children:e}),x.jsx(sx,{product:ax(u),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a,isFullWidth:!o})]})}return x.jsxs("div",{style:{marginBottom:"1rem"},children:[e&&x.jsx("p",{className:U(n,`${L}-product-carousel-title`),children:e}),x.jsx(u5,{globalClassName:n,spacing:o?"0.5rem":"6px",ariaLabel:e||"Product recommendations",children:t.map(u=>x.jsx(sx,{product:ax(u),globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:o,isCartMgmtSupported:a},u.id))})]})},mp=44,o9=400,s9=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?mp:Math.min(Math.max(Math.round(t),mp),o9)},a9=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},u9=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=q.useRef(null),[o,a]=q.useState(!1),[u,c]=q.useState(mp),d=a9(e);return q.useEffect(()=>{const h=p=>{var b,y,_;if(d&&p.origin!==d||r.current&&p.source!==r.current.contentWindow)return;const g=p.data;if(!(!g||typeof g.type!="string"))switch(g.type){case"express.payment.available":a(!0),c(s9((b=g.payload)==null?void 0:b.height));break;case"express.payment.unavailable":a(!1);break;case"express.payment.success":n==null||n((_=(y=g.payload)==null?void 0:y.orderId)!=null?_:null);break}};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[d,n]),x.jsx("div",{className:U(t,`${L}-cart-express`,{[`${L}-cart-express-ready`]:o}),style:o?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!o,children:x.jsx("iframe",{ref:r,className:U(t,`${L}-cart-express-frame`),src:e,title:"Express payment",allow:"payment *",scrolling:"no"})})},ux=({code:e,globalClassName:t})=>x.jsxs("span",{className:U(t,`${L}-cart-chip`),children:[x.jsx(Wg,{"aria-hidden":"true"}),x.jsx("span",{children:e})]}),eo=({label:e,badge:t,value:n,currencyCode:r,globalClassName:o,emphasized:a,isDiscount:u,fallback:c})=>{let d;if(typeof n=="number")n===0&&!u?d="Free":d=Na(u?-n:n,r);else if(c)d=c;else return null;return x.jsxs("div",{className:U(o,`${L}-cart-total-row`,{emphasized:a}),children:[x.jsxs("span",{className:U(o,`${L}-cart-total-label`),children:[e,t&&x.jsx("span",{className:U(o,`${L}-cart-total-badge`),children:t})]}),x.jsx("span",{className:U(o,`${L}-cart-total-value`),children:d})]})},l9=({item:e,currencyCode:t,loading:n,globalClassName:r,onRemove:o})=>{var u,c,d;const a=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal;return x.jsxs("li",{className:U(r,`${L}-cart-item`),children:[e.imageUrl&&x.jsx("div",{className:U(r,`${L}-cart-item-image`),children:x.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),x.jsxs("div",{className:U(r,`${L}-cart-item-details`),children:[x.jsx("p",{className:U(r,`${L}-cart-item-name`),children:e.name}),x.jsxs("div",{className:U(r,`${L}-cart-item-attrs`),children:[((u=e.variants)!=null?u:[]).map(h=>x.jsxs("p",{className:U(r,`${L}-cart-item-attr`),children:[h.lbl,": ",h.value]},`${h.type}-${h.value}`)),((c=e.promotions)!=null?c:[]).map(h=>x.jsxs("p",{className:U(r,`${L}-cart-item-attr`),children:["Promotion: ",h]},h))]}),((d=e.coupons)!=null?d:[]).length>0&&x.jsx("div",{className:U(r,`${L}-cart-chips`),children:e.coupons.map(h=>x.jsx(ux,{code:h,globalClassName:r},h))}),x.jsxs("span",{className:U(r,`${L}-cart-item-price`),children:[a&&x.jsx("span",{className:U(r,`${L}-cart-item-original-price`),children:Na(e.originalSubtotal,t)}),x.jsx("span",{className:U(r,`${L}-cart-item-final-price`),children:Na(e.itemSubtotal,t)})]}),x.jsxs("div",{className:U(r,`${L}-cart-item-footer`),children:[x.jsxs("span",{className:U(r,`${L}-cart-item-qty`),children:["Qty: ",e.quantity]}),x.jsx("button",{type:"button",className:U(r,`${L}-cart-item-remove`),disabled:n,onClick:()=>o(e),children:"Remove"})]})]})]})},c9=({cart:e,globalClassName:t,openLinksInNewTab:n})=>{const{sendMessage:r,loading:o}=Mn(),[a,u]=q.useState(!0),[c,d]=q.useState(""),{items:h=[],currencyCode:p="USD",subtotal:g,total:b,taxes:y,shippingCost:_,shippingDiscount:v,shippingPromotions:A=[],promotionsDiscount:k,promotions:C=[],couponsDiscount:I,couponsApplied:j=[],bodyMessage:W,footerMessage:F,checkoutButtonUrl:ee,expressPaymentUrl:ue}=e,me=re=>{o||r(`Remove ${re.name} from my cart`)},$=re=>{r(re?`I completed express payment. Show my order confirmation for order ${re}.`:"I completed express payment. Show my order confirmation.")},ne=()=>{const re=c.trim();!re||o||(r(`Apply coupon code ${re}`),d(""))};return x.jsxs("div",{className:U(t,`${L}-cart`),children:[x.jsxs("div",{className:U(t,`${L}-cart-box`),children:[W&&x.jsxs("button",{type:"button",className:U(t,`${L}-cart-summary`),"aria-expanded":a,onClick:()=>u(re=>!re),children:[x.jsx("span",{className:U(t,`${L}-cart-summary-text`),children:x.jsx(pp,{text:W,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})}),x.jsx("span",{className:U(t,`${L}-cart-summary-toggle`),"aria-hidden":"true",children:a?x.jsx(gk,{}):x.jsx(Ek,{})})]}),a&&x.jsxs("div",{className:U(t,`${L}-cart-expanded`),children:[x.jsx("ul",{className:U(t,`${L}-cart-items`),children:h.map(re=>x.jsx(l9,{item:re,currencyCode:p,loading:o,globalClassName:t,onRemove:me},re.itemId))}),j.length>0&&x.jsx("div",{className:U(t,`${L}-cart-chips`,`${L}-cart-applied-coupons`),children:j.map(re=>x.jsx(ux,{code:re,globalClassName:t},re))}),x.jsxs("div",{className:U(t,`${L}-cart-totals`),children:[x.jsx(eo,{label:"Subtotal",value:g,currencyCode:p,globalClassName:t}),x.jsx(eo,{label:"Coupon",value:I,currencyCode:p,globalClassName:t,isDiscount:!0}),x.jsx(eo,{label:"Promotions",badge:C[0],value:k,currencyCode:p,globalClassName:t,isDiscount:!0}),x.jsx(eo,{label:"Shipping",value:_,currencyCode:p,globalClassName:t,fallback:"TBD"}),x.jsx(eo,{label:"Shipping Discount",badge:A[0],value:v,currencyCode:p,globalClassName:t,isDiscount:!0}),x.jsx(eo,{label:"Tax",value:y,currencyCode:p,globalClassName:t,fallback:"TBD"}),x.jsx(eo,{label:"Total",value:b,currencyCode:p,globalClassName:t,emphasized:!0})]})]})]}),x.jsxs("div",{className:U(t,`${L}-cart-coupon`),children:[x.jsxs("div",{className:U(t,`${L}-cart-coupon-field`),children:[x.jsx("span",{className:U(t,`${L}-cart-coupon-icon`),"aria-hidden":"true",children:x.jsx(Wg,{})}),x.jsx("input",{type:"text",className:U(t,`${L}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:c,disabled:o,onChange:re=>d(re.target.value),onKeyDown:re=>{re.key==="Enter"&&(re.preventDefault(),ne())}})]}),x.jsx("button",{type:"button",className:U(t,`${L}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:o||!c.trim(),onClick:ne,children:x.jsx(mk,{"aria-hidden":"true"})})]}),ue&&x.jsx(u9,{expressPaymentUrl:ue,globalClassName:t,onOrderComplete:$}),ee&&x.jsxs("a",{className:U(t,`${L}-cart-checkout-button`),href:ee,target:n?"_blank":"_self",rel:"noopener noreferrer",children:[x.jsx(hk,{"aria-hidden":"true"}),x.jsx("span",{children:"Checkout"})]}),x.jsx("p",{className:U(t,`${L}-cart-footer`),children:F||"Shipping and taxes calculated at checkout."})]})},d9=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return x.jsxs(Qh,{className:U(n,`${L}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[x.jsx(Gh,{className:U(n,`${L}-pdp-gallery__item-group`),children:e.map((o,a)=>x.jsx(Wh,{index:a,className:U(n,`${L}-pdp-gallery__item`),children:x.jsx("img",{className:U(n,`${L}-pdp-gallery__image`),src:o,alt:t?`${t} (${a+1})`:`Product image ${a+1}`,loading:"lazy"})},o))}),r&&x.jsxs(Vh,{className:U(n,`${L}-pdp-gallery__control`),children:[x.jsx(Kh,{className:U(n,`${L}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:x.jsx(rb,{size:"16px"})}),x.jsx(Xh,{className:U(n,`${L}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:x.jsx(ib,{size:"16px"})})]}),r&&x.jsx(Yh,{className:U(n,`${L}-pdp-gallery__indicator-group`),children:e.map((o,a)=>x.jsx(qh,{index:a,className:U(n,`${L}-pdp-gallery__indicator`),"aria-label":`Go to image ${a+1}`},a))})]})},Pa="color",gp=(e,t)=>/^https?:\/\//i.test(t)||!e?t:`${e}${t}`,lx=e=>e.replace(/(^|\/)large\//,"$1medium/"),cx=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>n.id===Pa&&n.vals.includes(t)),f9=(e,t)=>{var c,d;const n=((c=e.imgGroups)!=null?c:[]).filter(h=>h.viewType==="large"),r=t&&n.find(h=>cx(h,t)),o=n.find(h=>h.vattr===null),a=r||o||n[0],u=((d=a==null?void 0:a.imgs)!=null?d:[]).map(h=>gp(e.baseUrl,lx(h.url)));return u.length>0?u:e.imageUrl?[gp(e.baseUrl,lx(e.imageUrl))]:[]},h9=(e,t)=>{var o,a,u;const n=((o=e.imgGroups)!=null?o:[]).find(c=>c.viewType==="swatch"&&cx(c,t)),r=(u=(a=n==null?void 0:n.imgs)==null?void 0:a[0])==null?void 0:u.url;return r?gp(e.baseUrl,r):""},Gl=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(o=>{var a;return((a=o.vars)==null?void 0:a[t])!==n||o.ord===!1?!1:Object.entries(r).every(([u,c])=>{var d;return u===t||((d=o.vars)==null?void 0:d[u])===c})}),p9=(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(o=>{var a;return((a=r.vars)==null?void 0:a[o])===t[o]}))},m9=(e,t,n,r,o)=>{if(!e||e.length===0)return oe(B({},o),{[n]:r});const a=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length&&Object.entries(o).every(([h,p])=>{var g;return h===n||((g=c.vars)==null?void 0:g[h])===p})});if(a)return B({},a.vars);const u=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length});return u?B({},u.vars):oe(B({},o),{[n]:r})},g9=(e,t)=>{var o,a,u,c;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(o=e.id)!=null?o: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(([h,p])=>{var g;return((g=d.vars)==null?void 0:g[h])===p}));return(c=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?c:null},E9=(e,t)=>{if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return e.pr;const n=e.vmat.find(r=>r.ord!==!1&&Object.entries(t).every(([o,a])=>{var u;return((u=r.vars)==null?void 0:u[o])===a}));return n!=null&&n.pr?n.pr:e.pr},y9=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const o=r.opts.find(u=>Gl(e.vmat,r.id,u.val)),a=o!=null?o:r.opts[0];a&&(t[r.id]=a.val)}return t},T9=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var se,be,ke,ae,z,J,w;const{addToCart:o,loading:a}=Mn(),u=e.data,c=(se=u.vattr)!=null?se:[],[d,h]=q.useState(()=>y9(u)),p=p9(u.vmat,d),g=(ke=(be=u.quantity)==null?void 0:be.minQuantity)!=null?ke:1,b=(z=(ae=u.quantity)==null?void 0:ae.maxQuantity)!=null?z:Number.POSITIVE_INFINITY,y=(w=(J=u.quantity)==null?void 0:J.increment)!=null?w:1,[_,v]=q.useState(g),A=d[Pa],k=q.useMemo(()=>f9(u,A),[u,A]),C=q.useMemo(()=>E9(u,d),[u,d]),I=c.find(N=>N.id===Pa),j=c.filter(N=>N.id!==Pa),W=(N,Y)=>()=>{h(O=>{const ye=!Gl(u.vmat,N,Y,O);return N===Pa||ye?m9(u.vmat,c,N,Y,O):oe(B({},O),{[N]:Y})})},F=()=>{if(a)return;const N=g9(u,d);if(!N)return;const Y=c.map(O=>{const ye=O.opts.find(Ce=>Ce.val===d[O.id]);return ye?{label:O.lbl||O.id,value:ye.name||ye.val}:null}).filter(O=>O!==null);o({productName:u.name,sku:N,quantity:_,variants:Y})},ee=!p||_-y<g,ue=!p||_+y>b,me=N=>{var O;const Y=d[N.id];return(O=N.opts.find(ye=>ye.val===Y))==null?void 0:O.name},$=()=>v(N=>Math.max(g,N-y)),ne=()=>v(N=>Math.min(b,N+y)),re=N=>x.jsxs("div",{className:U(t,`${L}-msg-pdp__variant`),children:[x.jsxs("div",{className:U(t,`${L}-msg-pdp__variant-label`),children:[x.jsx("span",{id:`variant-label-${N.id}`,className:U(t,`${L}-msg-pdp__variant-name`),children:N.lbl||N.id}),me(N)&&x.jsx("span",{className:U(t,`${L}-msg-pdp__variant-value`),children:me(N)})]}),x.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${N.id}`,className:U(t,`${L}-msg-pdp__chips`),children:N.opts.map(Y=>{const O=Gl(u.vmat,N.id,Y.val,d),ye=d[N.id]===Y.val;return x.jsxs("label",{className:U(`${L}-msg-pdp__chip`,{selected:ye,unavailable:!O}),children:[x.jsx("input",{type:"radio",name:`variant-${N.id}`,value:Y.val,checked:ye,"aria-description":O?void 0:"unavailable",onChange:W(N.id,Y.val),className:`${L}-msg-pdp__radio-input`}),x.jsx("span",{children:Y.name||Y.val})]},Y.val)})})]},N.id),de=N=>x.jsxs("div",{className:U(t,`${L}-msg-pdp__variant`),children:[x.jsxs("div",{className:U(t,`${L}-msg-pdp__variant-label`),children:[x.jsx("span",{id:`variant-label-${N.id}`,className:U(t,`${L}-msg-pdp__variant-name`),children:N.lbl||"Color"}),me(N)&&x.jsx("span",{className:U(t,`${L}-msg-pdp__variant-value`),children:me(N)})]}),x.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${N.id}`,className:U(t,`${L}-msg-pdp__swatches`),children:N.opts.map(Y=>{const O=Gl(u.vmat,N.id,Y.val,d),ye=d[N.id]===Y.val,Ce=h9(u,Y.val);return Ce?x.jsxs("label",{className:U(`${L}-msg-pdp__swatch`,{selected:ye,unavailable:!O}),children:[x.jsx("input",{type:"radio",name:`variant-${N.id}`,value:Y.val,checked:ye,"aria-label":Y.name||Y.val,"aria-description":O?void 0:"unavailable",onChange:W(N.id,Y.val),className:`${L}-msg-pdp__radio-input`}),x.jsx("img",{className:U(t,`${L}-msg-pdp__swatch-image`),src:Ce,alt:Y.name||Y.val,loading:"lazy"})]},Y.val):x.jsxs("label",{className:U(`${L}-msg-pdp__chip`,{selected:ye,unavailable:!O}),children:[x.jsx("input",{type:"radio",name:`variant-${N.id}`,value:Y.val,checked:ye,"aria-description":O?void 0:"unavailable",onChange:W(N.id,Y.val),className:`${L}-msg-pdp__radio-input`}),x.jsx("span",{children:Y.name||Y.val})]},Y.val)})})]});return x.jsx("div",{className:U(t,`${L}-msg-pdp`),children:x.jsxs("div",{className:U(t,`${L}-msg-pdp__card`),children:[x.jsx("div",{className:U(t,`${L}-msg-pdp__gallery`),children:x.jsx(d9,{images:k,altText:u.name,globalClassName:t})}),x.jsxs("div",{className:U(t,`${L}-msg-pdp__content`),children:[u.slugUrl?x.jsx("a",{href:u.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:U(t,`${L}-msg-pdp__title-link`),"aria-label":`Go to product page for ${u.name}`,children:u.name}):x.jsx("p",{className:U(t,`${L}-msg-pdp__title`),children:u.name}),x.jsx(ip,{globalClassName:t,className:`${L}-msg-pdp__price`,retailPrice:C==null?void 0:C.orig,discountPrice:(C==null?void 0:C.cur)||(C==null?void 0:C.prom),currencyCode:u.ccy,fontSize:"14px"}),u.dscr&&x.jsx("p",{className:U(t,`${L}-msg-pdp__description`),children:u.dscr}),I&&de(I),j.map(re),x.jsxs("div",{className:U(t,`${L}-msg-pdp__variant`),children:[x.jsxs("div",{className:U(t,`${L}-msg-pdp__variant-label`),children:[x.jsx("span",{className:U(t,`${L}-msg-pdp__variant-name`),children:"Quantity"}),x.jsx("span",{className:U(t,`${L}-msg-pdp__variant-value`),children:_})]}),x.jsxs("div",{className:U(t,`${L}-msg-pdp__stepper`),children:[x.jsx(Jn,{className:`${L}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:x.jsx(ik,{}),disabled:ee,onClick:$}),x.jsx("span",{className:U(t,`${L}-msg-pdp__quantity`),children:_}),x.jsx(Jn,{className:`${L}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:x.jsx(ok,{}),disabled:ue,onClick:ne})]})]}),r&&x.jsx("div",{className:U(t,`${L}-msg-pdp__actions`),children:x.jsx(Ku,{className:`${L}-msg-pdp__add-to-cart`,disabled:!p||a,onClick:F,children:a?"Adding...":"Add to cart"})})]})]})})},b9=e=>{if(e.imageUrl)return e.baseUrl?e.baseUrl+e.imageUrl:e.imageUrl},x9=({products:e,table:t,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:o=!1})=>{const{addToCart:a,loading:u}=Mn();if(!e.length)return null;const c=`auto repeat(${e.length}, 1fr)`,d=`${90+e.length*140}px`,h=p=>()=>{u||a({productName:p.name,sku:p.id})};return x.jsx("div",{className:U(n,`${L}-product-comparison`),children:x.jsxs("div",{className:`${L}-product-comparison__grid`,style:{gridTemplateColumns:c,minWidth:d},children:[x.jsxs("div",{className:`${L}-product-comparison__header`,children:[x.jsx("div",{className:`${L}-product-comparison__header-spacer`}),e.map(p=>{var b,y,_,v;const g=b9(p);return x.jsxs("div",{className:U(n,`${L}-product-comparison__product-col`),children:[g&&x.jsx("img",{className:U(n,`${L}-product-comparison__image`),src:g,alt:p.name||"Product image",loading:"eager"}),p.slugUrl?x.jsx("a",{href:p.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:U(n,`${L}-product-comparison__name`),"aria-label":`Go to product page for ${p.name}`,children:p.name}):x.jsx("span",{className:U(n,`${L}-product-comparison__name`),children:p.name}),x.jsx(ip,{globalClassName:n,retailPrice:(b=p.pr)==null?void 0:b.orig,discountPrice:(v=(y=p.pr)==null?void 0:y.prom)!=null?v:(_=p.pr)==null?void 0:_.cur,currencyCode:p.ccy,fontSize:"0.875rem"})]},p.id)})]}),x.jsx("div",{className:`${L}-product-comparison__table`,children:t.map(p=>x.jsxs("div",{className:`${L}-product-comparison__row`,children:[x.jsx("div",{className:U(n,`${L}-product-comparison__row-label`),children:p.row_name}),p.values.map((g,b)=>x.jsx("div",{className:U(n,`${L}-product-comparison__row-value`),children:g},`${p.row_name}-${b}`))]},p.row_name))}),o&&x.jsxs("div",{className:`${L}-product-comparison__footer`,children:[x.jsx("div",{className:`${L}-product-comparison__footer-spacer`}),e.map(p=>x.jsx("div",{className:U(n,`${L}-product-comparison__footer-cell`),children:x.jsxs(Ku,{className:`${L}-product-comparison__add-to-cart`,disabled:u,onClick:h(p),children:[x.jsx(fk,{size:"14px"}),"Add to cart"]})},`cart-${p.id}`))]})]})})},dx=({content:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{sendMessage:o,loading:a}=Mn(),{isCartMgmtSupported:u}=ot();return x.jsx(x.Fragment,{children:e.response.map((c,d)=>{var h,p,g,b,y,_,v,A,k,C,I,j,W,F,ee,ue,me,$,ne,re,de;switch(c.type){case"markdown":return x.jsx(pp,{text:(p=(h=c.data)==null?void 0:h.content)!=null?p:"",globalClassName:t,openLinksInNewTab:n,showIsLoading:!1},`${c.type}-${(g=c.index)!=null?g:d}`);case"product_carousel":return x.jsx(i9,{title:(y=(b=c.data)==null?void 0:b.title)!=null?y:"",products:(v=(_=c.data)==null?void 0:_.products)!=null?v:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(A=c.index)!=null?A:d}`);case"product_tile":return x.jsx(T9,{product:c.data,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(k=c.index)!=null?k:d}`);case"product_comparison":return x.jsx(x9,{products:(I=(C=c.data)==null?void 0:C.products)!=null?I:[],table:(W=(j=c.data)==null?void 0:j.table)!=null?W:[],globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r,isCartMgmtSupported:u},`${c.type}-${(F=c.index)!=null?F:d}`);case"cart":{const se=(me=(ue=(ee=c.data)==null?void 0:ee.cart)==null?void 0:ue.cartSummary)==null?void 0:me.cartDetails;return se?x.jsx(c9,{cart:se,productsToHighlight:c.data.products_to_highlight,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r},`${c.type}-${($=c.index)!=null?$:d}`):null}case"suggestions":return x.jsx("div",{style:{marginTop:"0.5rem"},children:x.jsx(H5,{disabled:a,suggestions:(re=(ne=c.data)==null?void 0:ne.display_text)!=null?re:[],globalClassName:t,isWidgetStandalone:r,onSuggestionClick:o})},`${c.type}-${(de=c.index)!=null?de:d}`);default:return null}})})},_9=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{const{logger:o}=ot(),a=q.useMemo(()=>{try{const c=JSON.parse(e.content);return Array.isArray(c==null?void 0:c.response)?c:null}catch(c){return null}},[e.content]),u=q.useMemo(()=>{const c="Oops, I had trouble with your request.";if(typeof e.content!="string")return o==null||o.warn("Message content is not richtext format. Showing fallback text.",e.content),c;const d=e.content.trim();try{const h=JSON.parse(d);if(typeof h=="object"&&h!==null)return o==null||o.debug("Detected JSON object instead of array of responses in message content",e.content),h.text||h.message||c}catch(h){if(d.startsWith("{")||d.startsWith("["))return o==null||o.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),c}return e.content||c},[o,e.content]);switch(e.role){case"user":return x.jsx("div",{className:U(t,`${L}-message`,r?"standalone":"embedded"),children:x.jsx("div",{className:U(t,`${L}-user-message`,r?"standalone":"embedded"),children:x.jsxs("div",{className:U(t,`${L}-user-message-row`,r?"standalone":"embedded"),children:[x.jsx("span",{className:U(t,`${L}-message-icon user-message-icon`,r?"standalone":"embedded"),children:x.jsx(pk,{})}),x.jsx("p",{className:U(t,`${L}-user-message-text`,r?"standalone":"embedded"),children:e.content})]})})});case"agent":return x.jsx("div",{className:U(t,`${L}-message-group`,r?"standalone":"embedded"),children:x.jsx("div",{className:`${L}-message-group-child`,children:a?x.jsx(dx,{content:a,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r}):x.jsx(pp,{text:u,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1})})});case"system":return x.jsx("div",{className:U(t,`${L}-message`,r?"standalone":"embedded"),children:x.jsx("p",{className:U(t,`${L}-reset-message`),children:e.content})})}},w9=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>x.jsxs("div",{className:U(n,`${L}-send-error`,r?"standalone":"embedded"),role:"alert",children:[x.jsx("span",{className:U(n,`${L}-send-error-text`),children:e}),x.jsxs("button",{type:"button",className:U(n,`${L}-retry-button`),onClick:t,children:[x.jsx(bk,{"aria-hidden":"true"})," Retry"]})]}),S9="You are offline or we couldn't reach the assistant. Check connection and try again.",Ep=({isWidgetStandalone:e})=>{var ue,me;const{globalClassName:t,openLinksInNewTab:n,logger:r,autoScroll:o}=ot(),{messages:a,streamingBlocks:u,isAgentTyping:c,loading:d,progressMessage:h,connectionStatus:p,error:g,sendError:b,retryLastMessage:y,retryConnection:_}=Mn(),v=q.useRef(null),A=a.length>0,k=u.length>0,C=A&&(d||c)&&!k,I=p==="reconnecting"&&!C,j=p==="error";let W=null;j?W={message:g!=null?g:S9,kind:"connection",onRetry:_}:b&&(W={message:b.message,kind:"send",onRetry:y}),q.useEffect(()=>{var $;($=v.current)==null||$.scrollIntoView({behavior:"smooth"})},[]),q.useEffect(()=>{var $;o&&(($=v.current)==null||$.scrollIntoView({behavior:"smooth"}))},[a,u,b,g,o]);const F=(ue=W==null?void 0:W.message)!=null?ue:null,ee=(me=W==null?void 0:W.kind)!=null?me:null;return q.useEffect(()=>{F&&(r==null||r.error("Error message shown to user",{message:F,kind:ee}))},[F,ee,r]),x.jsxs(x.Fragment,{children:[d&&!A&&x.jsx(q5,{globalClassName:t,isWidgetStandalone:e}),a.map($=>x.jsx(_9,{message:$,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e},$.id)),W&&x.jsx(w9,{message:W.message,onRetry:W.onRetry,globalClassName:t,isWidgetStandalone:e}),k&&x.jsxs("div",{className:U(t,`${L}-message-group`,e?"standalone":"embedded"),children:[x.jsx(dx,{content:{response:u},globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:e}),(d||c)&&x.jsx(op,{globalClassName:t,isWidgetStandalone:e})]}),C&&x.jsx(op,{globalClassName:t,isWidgetStandalone:e,loadingText:h}),I&&x.jsx(op,{globalClassName:t,isWidgetStandalone:e,loadingText:"Reconnecting..."}),x.jsx("div",{ref:v})]})},v9=()=>x.jsxs("svg",{className:`${L}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),x.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),A9=()=>x.jsx("svg",{className:`${L}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.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"})}),yp=({steps:e,globalClassName:t})=>e.length===0?null:x.jsx("div",{className:U(t,`${L}-progress-steps-panel`),children:x.jsxs("div",{className:`${L}-progress-steps`,children:[x.jsxs("span",{className:`${L}-progress-steps-header`,children:["Loading Step ",e.length]}),x.jsx("ul",{className:`${L}-progress-steps-list`,children:e.map((n,r)=>{const o=r<e.length-1,a=r===e.length-1;return x.jsxs("li",{className:U(`${L}-progress-step`,a&&"active"),children:[a&&x.jsx("span",{className:`${L}-progress-step-arc`}),x.jsx("span",{className:`${L}-progress-step-text`,children:n}),x.jsx("span",{className:U(`${L}-progress-step-icon`,o?"done":"active"),children:o?x.jsx(v9,{}):x.jsx(A9,{})})]},`${r}-${n}`)})})]})}),fx=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n,enableDownloadTranscript:r}=ot(),{isAgentTyping:o,sendMessage:a,resetConversation:u,progressSteps:c,downloadTranscript:d}=Mn(),h=o;return x.jsxs("div",{className:U(e,`${L}-container`,`${L}-embedded-chat`),style:t,children:[x.jsx("div",{className:U(e,`${L}-message-container`,`container-${n}`,"embedded"),children:x.jsx(Ep,{isWidgetStandalone:!1})}),x.jsx(yp,{steps:c,globalClassName:e}),x.jsx(ah,{componentType:"chat",className:"embedded-chat",isLoading:h,onSubmit:p=>a(p)}),x.jsx("div",{className:U(`${L}-embedded-chat-menu`),children:x.jsxs(VD,{componentType:"chat",children:[x.jsx(Nb,{componentType:"chat"}),x.jsx(Fy,{componentType:"chat",onClearChat:u}),r&&x.jsx(By,{componentType:"chat",onDownloadTranscript:d})]})})]})},hx=e=>{var d;const{children:t,disabled:n}=e,[r,o]=q.useState((d=e.container)==null?void 0:d.current),a=q.useSyncExternalStore(C9,()=>!1,()=>!0),{getRootNode:u}=jl();if(q.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),a||n)return x.jsx(x.Fragment,{children:t});const c=r!=null?r:k9(u);return x.jsx(x.Fragment,{children:q.Children.map(t,h=>Ao.createPortal(h,c))})},k9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Yi(n)?n:yr(t).body},C9=()=>()=>{},px=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ot(),{mode:r,status:o,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=Fi(),{loading:d,isAgentTyping:h,sendMessage:p,resetConversation:g,progressSteps:b,downloadTranscript:y}=Mn(),{isOpen:_}=o||{},v=!!o.isOpen,A=r==="standalone",k=h||d,C=()=>{Rr(!1)};return v?x.jsx(xb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:v,children:x.jsx(hx,{children:x.jsx(ep,{className:U(e,`${L}-container`,`${L}-dialog`,a,u&&"full-height"),style:B(B({},t),c&&{width:c}),children:x.jsxs(Jh,{className:U(e,`${L}-dialog-content`,{standalone:A,embedded:!A}),children:[x.jsx(Ab,{componentType:"dialog",onClearChat:g,onClose:C,onDownloadTranscript:y}),x.jsx(Zh,{className:U(e,`${L}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:x.jsx(Ep,{isWidgetStandalone:A,isOpen:_})}),x.jsx(yp,{steps:b,globalClassName:e}),x.jsx(ah,{componentType:"dialog",isLoading:k,onSubmit:I=>p(I)})]})})})}):null},mx=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=ot(),{mode:r,status:o,isModalFullscreen:a}=Fi(),{loading:u,isAgentTyping:c,sendMessage:d,resetConversation:h,progressSteps:p,downloadTranscript:g}=Mn(),{isOpen:b}=o||{},y=!!o.isOpen,_=r==="standalone",v=c||u,A=({open:C})=>{Rr(C)},k=()=>{Rr(!1)};return y?x.jsx(xb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:A,children:x.jsx(hx,{children:x.jsxs("div",{className:U(e,`${L}-modal-container`),style:t,children:[x.jsx(gb,{className:U(e,`${L}-modal-backdrop`)}),x.jsx(ep,{className:U(e,`${L}-container`,`${L}-modal`,{fullscreen:a,standalone:_,embedded:!_}),children:x.jsxs(Jh,{className:U(e,`${L}-modal-content`,{standalone:_,embedded:!_}),children:[x.jsx(Ab,{componentType:"modal",onClearChat:h,onClose:k,onDownloadTranscript:g}),x.jsx(Zh,{className:U(e,`${L}-message-container`,`container-${n}`,{standalone:_,embedded:!_}),children:x.jsx(Ep,{isWidgetStandalone:_,isOpen:b})}),x.jsx(yp,{steps:p,globalClassName:e}),x.jsx(ah,{componentType:"modal",isLoading:v,onSubmit:C=>d(C)})]})})]})})}):null},N9=()=>{const e=Fi(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?x.jsx(lk,{}):t==="dialog"?x.jsx(px,{}):t==="modal"?x.jsx(mx,{}):x.jsx(fx,{})},O9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=L5();q.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&o(d))};return N5(a),()=>{O5(a)}},[e,t,n,r,o])};function P9({isReady:e,hasError:t,transmit:n}){const r=q.useRef([]),o=q.useRef(e);o.current=e;const a=q.useRef(n);a.current=n;const u=q.useCallback(c=>{o.current?a.current(c):r.current.push(c)},[]);return q.useEffect(()=>{if(e&&r.current.length){const c=r.current;r.current=[],c.forEach(d=>a.current(d))}},[e]),q.useEffect(()=>{t&&(r.current=[])},[t]),u}const gx={copilot:"Ask Copilot",messaging:"Ask a question"},I9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=ot(),{placeholder:o,isResponseLoading:a}=ql(),u=o||gx[r],[c,d]=q.useState(""),h=t||a,p=g=>{const b=c.trim();b&&(g.preventDefault(),e(b),d(""))};return x.jsxs("form",{className:U(n,`${L}-prompts-input-container`),name:`${L}-prompts-form`,onSubmit:p,children:[x.jsx("label",{htmlFor:`${L}-prompts-input`,"aria-label":u,children:x.jsx($h,{className:U(n,`${L}-prompts-input-icon`)})}),x.jsx("input",{id:`${L}-prompts-input`,className:U(n,`${L}-prompts-input`),name:`${L}-prompts-input`,placeholder:u,type:"text",disabled:h,value:c,onChange:g=>d(g.target.value)}),x.jsx(Jn,{className:U(n,`${L}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:x.jsx(uf,{}),disabled:h})]})},R9=()=>{const{globalClassName:e,mode:t}=ot(),{placeholder:n}=ql(),r=n||gx[t];return x.jsxs("div",{className:U(e,`${L}-prompts-header`),children:[x.jsx($h,{className:U(e,`${L}-prompts-input-icon`),"aria-hidden":"true"}),x.jsx("span",{className:U(e,`${L}-prompts-header-text`),children:r})]})},Ex=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:o}=ot(),a=o==null?void 0:o.icon,u=(c=o==null?void 0:o.iconPosition)!=null?c:"left";return x.jsxs("button",{className:U(r,`${L}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&x.jsx(Cb,{icon:a,className:`${L}-suggestion-button-icon`}),x.jsx("span",{children:e})]})},L9="Ask me something else",D9=({label:e,disabled:t=!1})=>x.jsx(Ex,{label:e||L9,disabled:t,onClick:()=>Rr(!0)}),M9=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),F9=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=ot(),{staticQuestions:r,askElseButtonLabel:o,disableAskElseButton:a}=ql(),u=M9(r);if(u.length===0)return null;const c=d=>()=>{const h=d.trim();h&&e(h)};return x.jsxs("div",{className:U(n,`${L}-prompts-button-group`),children:[u.map(d=>x.jsx(Ex,{label:d,disabled:t,onClick:c(d)},d)),!a&&x.jsx(D9,{label:o,disabled:t})]})},B9=()=>{const{globalClassName:e,themeVariables:t}=ot(),{isOpen:n,elementId:r,promptsDisplay:o}=ql(),{isConnected:a,sendMessage:u,connectionStatus:c}=Mn(),d=o!=="buttons",h=o!=="input",[p,g]=q.useState(null),b=c==="error",y=c==="connecting",_=P9({isReady:a,hasError:b,transmit:u});q.useEffect(()=>{if(!r||p)return;const A=document.getElementById(r);A&&g(A)},[r,p]);const v=q.useCallback(A=>{Rr(!0),_(A)},[_]);return!n||!p?null:Ao.createPortal(x.jsxs("div",{className:U(e,`${L}-prompts-extension-container`),style:t,children:[d&&x.jsx(I9,{onSubmit:v,disabled:b}),!d&&x.jsx(R9,{}),h&&x.jsx(F9,{onPromptClick:v,disabled:b}),!b&&y&&x.jsx("p",{className:U(e,`${L}-prompts-connecting-message`),children:"Connecting to agent..."}),b&&x.jsx("p",{className:U(e,`${L}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),p)},U9=()=>(O9(),x.jsx(B9,{})),Tp=e=>x.jsxs(Dg,oe(B({},e),{children:[x.jsx(N9,{}),x.jsx(U9,{})]}));var Xl={},yx;function H9(){if(yx)return Xl;yx=1;var e=Hg();return Xl.createRoot=e.createRoot,Xl.hydrateRoot=e.hydrateRoot,Xl}var Tx=H9();const z9=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=an(o,["elementId","timeout"]);let a;const u=(d,h)=>{var p;for(const g of d)if(g.type==="childList"&&g.addedNodes.length)for(const b of g.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(Ri(!0,"log","Target element found, rendering Messaging Widget"),h.disconnect(),clearTimeout(a),(p=Tx.createRoot(b))==null||p.render(x.jsx(Tp,oe(B({},n),{mode:"messaging"}))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ri(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},j9=r=>{var o=r,{timeout:e,elementId:t}=o,n=an(o,["timeout","elementId"]);if(!n.messagingConfig){Ri(!0,"error","Messaging Widget requires messagingConfig");return}if(!n.messagingConfig.scrt2Url||!n.messagingConfig.orgId||!n.messagingConfig.esDeveloperName){Ri(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const a=document.getElementById(t);if(!a){Ri(!0,"warn","Container element not found for id:",t),Ri(!0,"warn","Beginning observation for element"),z9(B({elementId:t,timeout:e},n));return}Tx.createRoot(a).render(x.jsx(Tp,oe(B({},n),{mode:"messaging"})))},$9={components:{setEntryType:Rg,toggleWidgetOpen:Rr,toggleWidgetMinimized:Yu,toggleModalFullscreen:nf,setWidgetType:Wu,setWidgetDialogPosition:rf,loadPromptsComponent:R5,togglePromptsExtensionOpen:vb}};Pe.AgentForceWidget=Tp,Pe.AgentforceWidgetProvider=Dg,Pe.CIMULATE_WIDGET_READY_EVENT=pg,Pe.MessagingDialog=px,Pe.MessagingEmbed=fx,Pe.MessagingModal=mx,Pe.MessagingProvider=Eg,Pe.eventHandlers=$9,Pe.injectMessagingWidget=j9,Pe.useMessaging=Mn,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})}));
|